|
libbgp
0.6
A C++ BGP Library.
|
The BgpNotificationMessage object. More...
#include <bgp-notification-message.h>


Public Member Functions | |
| BgpNotificationMessage (BgpLogHandler *logger) | |
| BgpNotificationMessage (BgpLogHandler *logger, uint8_t errcode, uint8_t subcode, const uint8_t *data, uint16_t data_len) | |
| ssize_t | doPrint (size_t indent, uint8_t **to, size_t *buf_sz) const |
| Print implementation. More... | |
| ssize_t | parse (const uint8_t *from, size_t msg_sz) |
| Deserialize a BGP message body. More... | |
| ssize_t | write (uint8_t *to, size_t buf_sz) const |
| Serialize a BGP message body. More... | |
Public Member Functions inherited from libbgp::BgpMessage | |
| BgpMessage (BgpLogHandler *logger) | |
| Construct a new Bgp Message object. More... | |
Public Member Functions inherited from libbgp::Serializable | |
| Serializable (BgpLogHandler *logger) | |
| Construct a new Serializable:: Serializable object. More... | |
| ~Serializable () | |
| Destroy the Serializable:: Serializable object. | |
| ssize_t | print (uint8_t *to, size_t buf_sz) const |
| Print the Serializable object as human readable string. More... | |
| ssize_t | print (size_t indent, uint8_t *to, size_t buf_sz) const |
| Print the Serializable object as human readable string, with indentation. More... | |
| virtual ssize_t | length () const |
| Get size in bytes required to serialize the object. More... | |
| bool | hasError () const |
| Check if error information available. More... | |
| uint8_t | getErrorCode () const |
| uint8_t | getErrorSubCode () const |
| const uint8_t * | getError () const |
| size_t | getErrorLength () const |
| void | setLogger (BgpLogHandler *logger) |
| Replace logger for this object. More... | |
Public Attributes | |
| uint8_t | errcode |
| Notification message error code. | |
| uint8_t | subcode |
| Notification message error subcode. | |
| uint8_t * | data |
| Notification message error data pointer. | |
| uint16_t | data_len |
| Notification message error data length. | |
Public Attributes inherited from libbgp::BgpMessage | |
| uint8_t | type |
Additional Inherited Members | |
Protected Member Functions inherited from libbgp::Serializable | |
| void | setError (uint8_t err, uint8_t suberr, const uint8_t *data, size_t data_len) |
| Set the error information. More... | |
| void | forwardParseError (const Serializable &other) |
| Forward error information from other Serializable object. More... | |
Static Protected Member Functions inherited from libbgp::Serializable | |
| static ssize_t | _print (size_t indent, uint8_t **to, size_t *buf_left, const char *format,...) |
| Print helper. More... | |
Protected Attributes inherited from libbgp::Serializable | |
| uint8_t | err_code |
| uint8_t | err_subcode |
| size_t | err_len |
| uint8_t * | err_data |
| BgpLogHandler * | logger |
The BgpNotificationMessage object.
This is deserializer/serializer for BGP notification message body. If you want to deserializer/serializer a full BGP message. Take a look at BgpPacket class.
Definition at line 26 of file bgp-notification-message.h.
|
virtual |
Print implementation.
| indent | indent level. |
| to | The pointer to the pointer to the string buffer. |
| buf_sz | The pointer to the counter of avaliable buffer space. |
| -1 | Failed to print. |
| >= | 0 Bytes written. |
Implements libbgp::Serializable.
Definition at line 83 of file bgp-notification-message.cc.
References libbgp::Serializable::_print(), and libbgp::bgp_error_code_str.
|
virtual |
Deserialize a BGP message body.
BgpMessage deserializer only deserialize message body. (i.e. message without BGP marker and message length field) To deserialize a BGP packet, use BgpPacket.
| from | Pointer to message body buffer. |
| msg_sz | Size of message. |
| -1 | Deserialization error. Error may be logged. |
| >=0 | Bytes read. |
| bad_parse | Internal deserialization error. |
| bad_type | The type of message/field member in buffer does not match the attribute type of container. |
Implements libbgp::BgpMessage.
Definition at line 53 of file bgp-notification-message.cc.
References libbgp::Serializable::setError().
|
virtual |
Serialize a BGP message body.
BgpMessage serializer only serialize message body. (i.e. message without BGP marker and message length field) To serialize a BGP packet, use BgpPacket.
| to | Pointer to destination buffer. |
| buf_sz | Max write size. |
| -1 | Serialization error. Error may be logged. |
| >=0 | Bytes written. |
Implements libbgp::BgpMessage.
Definition at line 72 of file bgp-notification-message.cc.
1.8.13