Represents an IP address as descibed in RFC 2741, section 5.4. More...
#include <IpAddress.hpp>
Public Member Functions | |
| IpAddress (data_t::const_iterator &pos, const data_t::const_iterator &end, bool big_endian=true) | |
| Construct the object from input stream. | |
| data_t | serialize () const |
| Encode the object as described in RFC 2741, section 5.4 / 5.3. | |
| IpAddress (uint32_t a, uint32_t b, uint32_t c, uint32_t d) | |
| FIXME. | |
Protected Attributes | |
| uint32_t | address [4] |
Private Member Functions | |
| IpAddress () | |
| Hide default constructor. | |
Represents an IP address as descibed in RFC 2741, section 5.4.
Definition at line 32 of file IpAddress.hpp.
| agentxcpp::IpAddress::IpAddress | ( | ) | [private] |
Hide default constructor.
| IpAddress::IpAddress | ( | data_t::const_iterator & | pos, |
| const data_t::const_iterator & | end, | ||
| bool | big_endian = true |
||
| ) |
Construct the object from input stream.
This constructor parses the serialized form of the object. It takes an iterator, starts parsing at the position of the iterator and advances the iterator to the position right behind the object.
The constructor expects valid data from the stream; if parsing fails, parse_error is thrown. In this case, the iterator position is undefined.
| pos | Iterator pointing to the current stream position. The iterator is advanced while reading the header. |
| end | Iterator pointing one element past the end of the current stream. This is needed to mark the end of the buffer. |
| big_endian | Whether the input stream is in big endian format |
Definition at line 56 of file IpAddress.cpp.
References address.
| agentxcpp::IpAddress::IpAddress | ( | uint32_t | a, |
| uint32_t | b, | ||
| uint32_t | c, | ||
| uint32_t | d | ||
| ) | [inline] |
| data_t IpAddress::serialize | ( | ) | const [virtual] |
Encode the object as described in RFC 2741, section 5.4 / 5.3.
Note: We always use big endian.
Implements variable.
Definition at line 24 of file IpAddress.cpp.
References address.
uint32_t agentxcpp::IpAddress::address[4] [protected] |
Definition at line 41 of file IpAddress.hpp.
Referenced by IpAddress(), and serialize().