OpenSDN source code
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
BgpProto Class Reference

#include <bgp_proto.h>

Classes

struct  BgpMessage
 
struct  Keepalive
 
struct  Notification
 
struct  OpenMessage
 
struct  Update
 

Public Types

enum  MessageType { OPEN = 1, UPDATE = 2, NOTIFICATION = 3, KEEPALIVE = 4 }
 
enum  BgpPeerType { IBGP, EBGP, XMPP }
 

Static Public Member Functions

static std::string BgpPeerTypeString (BgpPeerType peer_type)
 
static BgpMessageDecode (const uint8_t *data, size_t size, ParseErrorContext *ec=NULL, bool as4=false)
 
static int Encode (const BgpMessage *msg, uint8_t *data, size_t size, EncodeOffsets *offsets=NULL, bool as4=false)
 
static int Encode (const BgpMpNlri *msg, uint8_t *data, size_t size, EncodeOffsets *offsets=NULL)
 

Static Public Attributes

static const int kMinMessageSize = 19
 
static const int kMaxMessageSize = 4096
 

Detailed Description

Definition at line 19 of file bgp_proto.h.

Member Enumeration Documentation

Enumerator
IBGP 
EBGP 
XMPP 

Definition at line 28 of file bgp_proto.h.

Enumerator
OPEN 
UPDATE 
NOTIFICATION 
KEEPALIVE 

Definition at line 21 of file bgp_proto.h.

Member Function Documentation

static std::string BgpProto::BgpPeerTypeString ( BgpPeerType  peer_type)
inlinestatic

Definition at line 34 of file bgp_proto.h.

BgpProto::BgpMessage * BgpProto::Decode ( const uint8_t *  data,
size_t  size,
ParseErrorContext ec = NULL,
bool  as4 = false 
)
static

Definition at line 2087 of file bgp_proto.cc.

Here is the call graph for this function:

int BgpProto::Encode ( const BgpMessage msg,
uint8_t *  data,
size_t  size,
EncodeOffsets offsets = NULL,
bool  as4 = false 
)
static

Definition at line 2107 of file bgp_proto.cc.

Here is the call graph for this function:

int BgpProto::Encode ( const BgpMpNlri msg,
uint8_t *  data,
size_t  size,
EncodeOffsets offsets = NULL 
)
static

Definition at line 2122 of file bgp_proto.cc.

Here is the call graph for this function:

Member Data Documentation

const int BgpProto::kMaxMessageSize = 4096
static

Definition at line 441 of file bgp_proto.h.

const int BgpProto::kMinMessageSize = 19
static

Definition at line 440 of file bgp_proto.h.


The documentation for this class was generated from the following files: