libbgp  0.6
A C++ BGP Library.
bgp-notification-message.h
Go to the documentation of this file.
1 
11 #ifndef BGP_NOTIFICATION_MSG_H_
12 #define BGP_NOTIFICATION_MSG_H_
13 
14 #include <unistd.h>
15 #include "bgp-message.h"
16 
17 namespace libbgp {
18 
27 public:
29  BgpNotificationMessage(BgpLogHandler *logger, uint8_t errcode, uint8_t subcode, const uint8_t *data, uint16_t data_len);
31 
36  uint8_t errcode;
37 
42  uint8_t subcode;
43 
48  uint8_t *data;
49 
54  uint16_t data_len;
55 
56  ssize_t doPrint(size_t indent, uint8_t **to, size_t *buf_sz) const;
57  ssize_t parse(const uint8_t *from, size_t msg_sz);
58  ssize_t write(uint8_t *to, size_t buf_sz) const;
59 };
60 
61 }
62 
63 #endif // BGP_NOTIFICATION_MSG_H_
uint8_t errcode
Notification message error code.
ssize_t doPrint(size_t indent, uint8_t **to, size_t *buf_sz) const
Print implementation.
The BGP Message base.
The BgpNotificationMessage object.
ssize_t write(uint8_t *to, size_t buf_sz) const
Serialize a BGP message body.
uint8_t * data
Notification message error data pointer.
ssize_t parse(const uint8_t *from, size_t msg_sz)
Deserialize a BGP message body.
uint8_t subcode
Notification message error subcode.
The BgpMessage base class.
Definition: bgp-message.h:35
Definition: bgp-afi.h:14
The BgpLogHandler class.
uint16_t data_len
Notification message error data length.