This class encapsulates an IP address. More...
#include <DwmIpAddress.hh>
Public Member Functions | |
| IpAddress (const IpAddress &addr) | |
| IpAddress & | operator= (const IpAddress &addr) |
| IpAddress (const Ipv6Address &addr) | |
| IpAddress (const Ipv4Address &addr) | |
| IpAddress (const std::string &addr) | |
| int | Family () const |
| template<typename T > | |
| const T * | Addr () const |
| operator std::string () const | |
| Returns a string representation. | |
| bool | operator< (const IpAddress &addr) const |
| bool | operator== (const IpAddress &addr) const |
| uint64_t | StreamedLength () const |
| Returns the number of bytes that would be written if we called one of the non-compressing Write() members. | |
| std::istream & | Read (std::istream &is) |
| Reads from an istream. Returns the istream. | |
| std::ostream & | Write (std::ostream &os) const |
| Writes to an ostream. Returns the ostream. | |
| ssize_t | Read (int fd) |
| Reads from a file descriptor. | |
| ssize_t | Write (int fd) const |
| Writes to a file descriptor. | |
| size_t | Read (FILE *f) |
| Reads from a FILE pointer. Returns 1 on success, 0 on failure. | |
| size_t | Write (FILE *f) const |
| Writes to a FILE pointer. Returns 1 on success, 0 on failure. | |
| int | Read (gzFile gzf) |
| Reads from a gzFile. | |
| int | Write (gzFile gzf) const |
| Writes to a gzFile. | |
| int | BZRead (BZFILE *bzf) |
| Reads from a BZFILE pointer. | |
| int | BZWrite (BZFILE *bzf) const |
| Writes to a BZFILE pointer. | |
Friends | |
| std::ostream & | operator<< (std::ostream &os, const IpAddress &addr) |
This class encapsulates an IP address.
| int Dwm::IpAddress::BZRead | ( | BZFILE * | bzf | ) |
Reads from a BZFILE pointer.
Returns the number of bytes read on success, -1 on failure.
| int Dwm::IpAddress::BZWrite | ( | BZFILE * | bzf | ) | const |
Writes to a BZFILE pointer.
Returns the number of bytes written on success, -1 on failure.
| int Dwm::IpAddress::Read | ( | gzFile | gzf | ) |
Reads from a gzFile.
Returns the number of bytes read on success, -1 on failure.
| ssize_t Dwm::IpAddress::Read | ( | int | fd | ) |
Reads from a file descriptor.
Returns the number of bytes read on success, -1 on failure.
| int Dwm::IpAddress::Write | ( | gzFile | gzf | ) | const |
Writes to a gzFile.
Returns the number of bytes written on success, -1 on failure.
| ssize_t Dwm::IpAddress::Write | ( | int | fd | ) | const |
Writes to a file descriptor.
Returns the number of bytes written on success, -1 on failure.