Route/Prefix related utilities.
More...
#include <prefix.h>
|
| virtual ssize_t | parse (const uint8_t *buffer, size_t buf_sz)=0 |
| | Parse a NLRI prefix from buffer. More...
|
| |
| virtual ssize_t | write (uint8_t *buffer, size_t buf_sz) const =0 |
| | Write a prefix to NLRI buffer. More...
|
| |
| virtual bool | includes (const Prefix &other) const =0 |
| | Test if another prefix is inside this prefix. More...
|
| |
|
virtual bool | operator== (const Prefix &other) const =0 |
| |
|
virtual bool | operator> (const Prefix &other) const =0 |
| |
|
virtual bool | operator< (const Prefix &other) const =0 |
| |
|
virtual bool | operator>= (const Prefix &other) const =0 |
| |
|
virtual bool | operator<= (const Prefix &other) const =0 |
| |
|
virtual bool | operator!= (const Prefix &other) const =0 |
| |
Route/Prefix related utilities.
Definition at line 25 of file prefix.h.
◆ includes()
| virtual bool libbgp::Prefix::includes |
( |
const Prefix & |
other | ) |
const |
|
pure virtual |
Test if another prefix is inside this prefix.
- Parameters
-
- Returns
- true The other prefix is in this prefix.
-
false The other prefix is not in this prefix.
Implemented in libbgp::Prefix6, and libbgp::Prefix4.
◆ parse()
| virtual ssize_t libbgp::Prefix::parse |
( |
const uint8_t * |
buffer, |
|
|
size_t |
buf_sz |
|
) |
| |
|
pure virtual |
Parse a NLRI prefix from buffer.
- Parameters
-
| buffer | Buffer to parse from. |
| buf_sz | Size of the buffer. |
- Returns
- ssize_t Bytes read.
- Return values
-
| -1 | Failed to parse prefix. |
| >=0 | Bytes read. |
Implemented in libbgp::Prefix6, and libbgp::Prefix4.
◆ write()
| virtual ssize_t libbgp::Prefix::write |
( |
uint8_t * |
buffer, |
|
|
size_t |
buf_sz |
|
) |
| const |
|
pure virtual |
Write a prefix to NLRI buffer.
- Parameters
-
| buffer | Buffer to write to. |
| buf_sz | Size of the buffer (max write size). |
- Returns
- ssize_t Bytes written.
- Return values
-
| -1 | Failed to write. |
| >=0 | Bytes written. |
Implemented in libbgp::Prefix6, and libbgp::Prefix4.
The documentation for this class was generated from the following file: