|
| Serial (const Serial &other) |
| Copy constructor.
|
|
| Serial (uint32_t value) |
| Constructor with value.
|
|
uint32_t | getValue () const |
| Returns the uint32_t representation of this serial value.
|
|
bool | operator!= (const Serial &other) const |
| Returns true if the serial values are not equal.
|
|
Serial | operator+ (const Serial &other) const |
| Adds the given value to the serial number.
|
|
Serial | operator+ (uint32_t other_val) const |
| Adds the given value to the serial number.
|
|
bool | operator< (const Serial &other) const |
| Returns true if the serial value of this serial is smaller than the other, according to serial arithmetic as described in RFC 1982.
|
|
bool | operator<= (const Serial &other) const |
| Returns true if the serial value of this serial is equal to or smaller than the other, according to serial arithmetic as described in RFC 1982.
|
|
Serial & | operator= (const Serial &other) |
| Direct assignment from other Serial.
|
|
void | operator= (uint32_t value) |
| Direct assignment from value.
|
|
bool | operator== (const Serial &other) const |
| Returns true if the serial values are equal.
|
|
bool | operator> (const Serial &other) const |
| Returns true if the serial value of this serial is greater than the other, according to serial arithmetic as described in RFC 1982.
|
|
bool | operator>= (const Serial &other) const |
| Returns true if the serial value of this serial is equal to or greater than the other, according to serial arithmetic as described in RFC 1982.
|
|
This class defines DNS serial numbers and serial arithmetic.
DNS Serial number are in essence unsigned 32-bits numbers, with one catch; they should be compared using sequence space arithmetic. So given that they are 32-bits; as soon as the difference between two serial numbers is greater than 2147483647 (2^31 - 1), the lower number (in plain comparison) is considered the higher one.
In order to do this as transparently as possible, these numbers are stored in the Serial class, which overrides the basic comparison operators.
In this specific context, these operations are called 'serial number arithmetic', and they are defined in RFC 1982.
- Note
- RFC 1982 defines everything based on the value SERIAL_BITS. Since the serial number has a fixed length of 32 bits, the values we use are hard-coded, and not computed based on variable bit lengths.
Definition at line 41 of file serial.h.