libDwm-0.6.0
Dwm::Ipv6Address Class Reference

This class encapsulates an IPv6 address. More...

#include <DwmIpv6Address.hh>

Inheritance diagram for Dwm::Ipv6Address:
Collaboration diagram for Dwm::Ipv6Address:

Public Member Functions

 Ipv6Address ()
 Constructor. Sets address to 0::
 
 Ipv6Address (const std::string &addr)
 Construct from a string.
 
Ipv6Addressoperator= (const std::string &addr)
 
 Ipv6Address (const struct in6_addr &addr)
 Construct from an in6_addr.
 
 operator std::string () const
 Returns a string representation.
 
 operator struct in6_addr () const
 Returns an in6_addr representation.
 
bool operator< (const Ipv6Address &addr) const
 Less-than operator.
 
bool operator> (const Ipv6Address &addr) const
 Greater-than operator.
 
bool operator< (const IpAddress &addr) const
 Less-than operator for generic IpAddress.
 
bool operator== (const Ipv6Address &addr) const
 Equal-to operator.
 
Ipv6Addressoperator&= (const Ipv6Address &netmask)
 Mask operator.
 
Ipv6Address operator& (const Ipv6Address &netmask) const
 Mask operator.
 
bool IsV6 () const
 
const uint8_t * RawPointer () const
 Returns a pointer to the memory containing the address.
 
uint32_t StreamedLength () const
 Returns the number of bytes that would be written if we called one of the Write() members. More...
 
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. More...
 
ssize_t Write (int fd) const
 Writes to a file descriptor. More...
 
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. More...
 
int Write (gzFile gzf) const
 Writes to a gzFile. More...
 
int BZRead (BZFILE *bzf)
 Reads from a BZFILE pointer. More...
 
int BZWrite (BZFILE *bzf) const
 Writes to a BZFILE pointer. More...
 
- Public Member Functions inherited from Dwm::Readable
virtual ~Readable ()
 destructor
 
- Public Member Functions inherited from Dwm::Writable
virtual ~Writable ()
 Destructor.
 
- Public Member Functions inherited from Dwm::GZReadable
virtual ~GZReadable ()
 destructor
 
- Public Member Functions inherited from Dwm::GZWritable
virtual ~GZWritable ()
 destructor
 

Detailed Description

This class encapsulates an IPv6 address.

Member Function Documentation

◆ BZRead()

int Dwm::Ipv6Address::BZRead ( BZFILE *  bzf)
virtual

Reads from a BZFILE pointer.

Returns the number of bytes read (16 on success).

Implements Dwm::BZ2Readable.

◆ BZWrite()

int Dwm::Ipv6Address::BZWrite ( BZFILE *  bzf) const
virtual

Writes to a BZFILE pointer.

Returns the number of bytes written (16 on success).

Implements Dwm::BZ2Writable.

◆ Read() [1/2]

ssize_t Dwm::Ipv6Address::Read ( int  fd)
virtual

Reads from a file descriptor.

Returns the number of bytes read (16 on success).

Implements Dwm::Readable.

◆ Read() [2/2]

int Dwm::Ipv6Address::Read ( gzFile  gzf)
virtual

Reads from a gzFile.

Returns the number of bytes read (16 on success).

Implements Dwm::GZReadable.

◆ StreamedLength()

uint32_t Dwm::Ipv6Address::StreamedLength ( ) const
virtual

Returns the number of bytes that would be written if we called one of the Write() members.

Implements Dwm::Writable.

◆ Write() [1/2]

ssize_t Dwm::Ipv6Address::Write ( int  fd) const
virtual

Writes to a file descriptor.

Returns the number of bytes written (16 on success).

Implements Dwm::Writable.

◆ Write() [2/2]

int Dwm::Ipv6Address::Write ( gzFile  gzf) const
virtual

Writes to a gzFile.

Returns the number of bytes written (16 on success).

Implements Dwm::GZWritable.


The documentation for this class was generated from the following file: