42 #ifndef _DWMDNSNSECBITMAP_HH_ 43 #define _DWMDNSNSECBITMAP_HH_ 67 NSECBitmap(uint8_t window,
const std::vector<uint8_t> & bits);
82 uint8_t
Window(uint8_t window);
87 const std::vector<uint8_t> &
Bits()
const;
92 const std::vector<uint8_t> &
Bits(
const std::vector<uint8_t> & bits);
100 uint8_t *
Encode(uint8_t *pkt, uint8_t *ptr, uint16_t pktlen)
const;
108 const uint8_t *
Decode(
const uint8_t *pkt,
const uint8_t *ptr,
109 uint16_t pktlen, uint16_t rdlen);
114 friend std::ostream &
operator << (std::ostream & os,
119 std::vector<uint8_t> _bits;
126 #endif // _DWMDNSNSECBITMAP_HH_ uint8_t * Encode(uint8_t *pkt, uint8_t *ptr, uint16_t pktlen) const
Encodes the bitmap into buffer @ pkt of length pktlen, starting at ptr.
Definition: DwmDnsEtcHosts.hh:60
const uint8_t * Decode(const uint8_t *pkt, const uint8_t *ptr, uint16_t pktlen, uint16_t rdlen)
Decodes the bitmap from buffer pkt of length pktlen, starting at ptr.
bool operator==(const NSECBitmap &bitmap) const
Equal-to operator, for unit testing.
NSECBitmap()
Construct an empty bitmap.
uint8_t Window() const
Returns the window number of the bitmap.
friend std::ostream & operator<<(std::ostream &os, const NSECBitmap &bitmap)
Prints the bitmap to an ostream in human-readable form.
Encapsulates an NSEC bitmap. See section 4.1.2 of RFC4034.
Definition: DwmDnsNSECBitmap.hh:56
const std::vector< uint8_t > & Bits() const
Returns the bits in the bitmap.