|
|
| 52 |
* \param address C-string containing the address as described above |
52 |
* \param address C-string containing the address as described above |
| 53 |
*/ |
53 |
*/ |
| 54 |
Ipv4Address (char const *address); |
54 |
Ipv4Address (char const *address); |
| 55 |
|
55 |
/** |
|
|
56 |
* Get the host-order 32-bit IP address |
| 57 |
* \return the host-order 32-bit IP address |
| 58 |
*/ |
| 59 |
uint32_t Get (void) const; |
| 56 |
/** |
60 |
/** |
| 57 |
* input address is in host order. |
61 |
* input address is in host order. |
| 58 |
* \param address The host order 32-bit address |
62 |
* \param address The host order 32-bit address |
|
|
| 68 |
* \param address C-string containing the address as described above |
72 |
* \param address C-string containing the address as described above |
| 69 |
*/ |
73 |
*/ |
| 70 |
void Set (char const *address); |
74 |
void Set (char const *address); |
| 71 |
|
|
|
| 72 |
/** |
75 |
/** |
| 73 |
* \brief Comparison operation between two Ipv4Addresses |
76 |
* \brief Comparison operation between two Ipv4Addresses |
| 74 |
* \param other address to which to compare this address |
77 |
* \param other address to which to compare this address |
|
|
| 78 |
{ |
81 |
{ |
| 79 |
return m_address == other.m_address; |
82 |
return m_address == other.m_address; |
| 80 |
} |
83 |
} |
| 81 |
|
|
|
| 82 |
/** |
| 83 |
* \brief Get the host-order 32-bit IP address |
| 84 |
* |
| 85 |
* Using this method is frowned upon. |
| 86 |
* Please, do _not_ use this method. |
| 87 |
* It is there only for chunk-ipv4. |
| 88 |
* \return the host-order 32-bit IP address |
| 89 |
*/ |
| 90 |
uint32_t GetHostOrder (void) const; |
| 91 |
void SetHostOrder (uint32_t ip); |
| 92 |
/** |
84 |
/** |
| 93 |
* Serialize this address to a 4-byte buffer |
85 |
* Serialize this address to a 4-byte buffer |
| 94 |
* |
86 |
* |
|
|
| 164 |
bool IsMatch (Ipv4Address a, Ipv4Address b) const; |
156 |
bool IsMatch (Ipv4Address a, Ipv4Address b) const; |
| 165 |
|
157 |
|
| 166 |
bool IsEqual (Ipv4Mask other) const; |
158 |
bool IsEqual (Ipv4Mask other) const; |
| 167 |
|
159 |
/** |
| 168 |
|
160 |
* Get the host-order 32-bit IP mask |
| 169 |
/* Using this method is frowned upon. |
161 |
* \return the host-order 32-bit IP mask |
| 170 |
* Please, do _not_ use this method. |
162 |
*/ |
| 171 |
*/ |
163 |
uint32_t Get (void) const; |
| 172 |
uint32_t GetHostOrder (void) const; |
164 |
/** |
| 173 |
void SetHostOrder (uint32_t value); |
165 |
* input mask is in host order. |
|
|
166 |
* \param mask The host order 32-bit mask |
| 167 |
*/ |
| 168 |
void Set (uint32_t mask); |
| 174 |
/** |
169 |
/** |
| 175 |
* \brief Return the inverse mask in host order. |
170 |
* \brief Return the inverse mask in host order. |
| 176 |
*/ |
171 |
*/ |