42#ifndef _DWMMACADDRESS_HH_
43#define _DWMMACADDRESS_HH_
86 operator std::string ()
const;
101 std::istream &
Read(std::istream & is);
106 std::ostream &
Write(std::ostream & os)
const;
165 friend std::ostream &
171 friend std::istream &
Encapsulates a 6-byte MAC address.
Definition DwmMacAddress.hh:61
ssize_t Write(int fd) const
Writes the MAC address to a file descriptor.
MacAddress(const std::string &s)
Construct from a string of the form xx:xx:xx:xx:xx:xx.
size_t Read(FILE *f)
Reads the MAC address from a FILE.
MacAddress()
Constructor. Sets the address to 00:00:00:00:00:00.
int Read(gzFile gzf)
Reads the MAC address from a gzFile.
bool operator==(const MacAddress &addr) const
operator ==
int BZWrite(BZFILE *bzf) const
Writes the MAC address to a BZFILE.
std::ostream & Write(std::ostream &os) const
Writes the MAC address to an ostream. Returns the ostream.
MacAddress(const MacAddress &addr)
Copy constructor.
int Write(gzFile gzf) const
Writes the MAC address to a gzFile.
bool operator<(const MacAddress &addr) const
operator <
std::istream & Read(std::istream &is)
Reads the MAC address from an istream. Returns the istream.
MacAddress & operator=(const MacAddress &addr)
operator =
uint64_t StreamedLength() const
Returns the number of bytes that should be written if we call one of the Write() members.
int BZRead(BZFILE *bzf)
Reads the MAC address from a BZFILE.
friend std::istream & operator>>(std::istream &is, MacAddress &addr)
Reads from an istream in 'xx:xx:xx:xx:xx:xx' format.
friend std::ostream & operator<<(std::ostream &os, const MacAddress &addr)
Prints to an ostream in 'xx:xx:xx:xx:xx:xx' format.
ssize_t Read(int fd)
Reads the MAC address from a file descriptor.
size_t Write(FILE *f) const
Writes the MAC address to a FILE.