|
xorp
|
The main container for BGP messages (packets) which are sent back and forth. More...
#include <packet.hh>
Public Types | |
| enum | Status { GOOD_MESSAGE, ILLEGAL_MESSAGE_LENGTH, CONNECTION_CLOSED } |
Status returned by message reader. | |
Public Member Functions | |
| uint8_t | type () const |
| virtual string | str () const =0 |
| virtual bool | encode (uint8_t *buf, size_t &len, const BGPPeerData *peerdata) const =0 |
Static Public Attributes | |
| static const size_t | MARKER_SIZE = 16 |
| static const size_t | COMMON_HEADER_LEN |
| static const size_t | MARKER_OFFSET = 0 |
| static const size_t | LENGTH_OFFSET = MARKER_SIZE |
| static const size_t | TYPE_OFFSET = LENGTH_OFFSET + sizeof(uint16_t) |
| static const size_t | MINPACKETSIZE = COMMON_HEADER_LEN |
| static const size_t | MAXPACKETSIZE = 4096 |
| static const size_t | MINOPENPACKET = COMMON_HEADER_LEN + 10 |
| static const size_t | MINUPDATEPACKET = COMMON_HEADER_LEN + 2 + 2 |
| static const size_t | MINKEEPALIVEPACKET = COMMON_HEADER_LEN |
| static const size_t | MINNOTIFICATIONPACKET = COMMON_HEADER_LEN + 2 |
| static const uint8_t | Marker [MARKER_SIZE] |
Protected Member Functions | |
| uint8_t * | basic_encode (size_t len, uint8_t *buf) const |
| BGPPacket (const BGPPacket &BGPPacket) | |
Protected Attributes | |
| uint8_t | _Type |
The main container for BGP messages (packets) which are sent back and forth.
This base class only contains the standard fields (length, type) leaving other information to be stored in the derived objects.
const size_t BGPPacket::COMMON_HEADER_LEN [static] |
MARKER_SIZE
+ sizeof(uint16_t) + sizeof(uint8_t)
const uint8_t BGPPacket::Marker [static] |
{
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff
}