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

#include <bgp_proto.h>

Inheritance diagram for BgpProto::Notification:
Collaboration diagram for BgpProto::Notification:

Public Types

enum  Code {
  MsgHdrErr = 1, OpenMsgErr = 2, UpdateMsgErr = 3, HoldTimerExp = 4,
  FSMErr = 5, Cease = 6
}
 
enum  MsgHdrSubCode { ConnNotSync = 1, BadMsgLength = 2, BadMsgType = 3 }
 
enum  OpenMsgSubCode {
  UnsupportedVersion = 1, BadPeerAS = 2, BadBgpId = 3, UnsupportedOptionalParam = 4,
  AuthenticationFailure = 5, UnacceptableHoldTime = 6, UnsupportedCapability = 7
}
 
enum  UpdateMsgSubCode {
  MalformedAttributeList = 1, UnrecognizedWellKnownAttrib = 2, MissingWellKnownAttrib = 3, AttribFlagsError = 4,
  AttribLengthError = 5, InvalidOrigin = 6, InvalidNH = 8, OptionalAttribError = 9,
  InvalidNetworkField = 10, MalformedASPath = 11
}
 
enum  FsmSubcode { UnspecifiedError = 0, OpenSentError = 1, OpenConfirmError = 2, EstablishedError = 3 }
 
enum  CeaseSubCode {
  Unknown = 0, MaxPrefixes = 1, AdminShutdown = 2, PeerDeconfigured = 3,
  AdminReset = 4, ConnectionRejected = 5, OtherConfigChange = 6, ConnectionCollision = 7,
  OutOfResources = 8, HardReset = 9
}
 

Public Member Functions

 Notification ()
 
virtual const std::string ToString () const
 
- Public Member Functions inherited from BgpProto::BgpMessage
 BgpMessage (MessageType type)
 
- Public Member Functions inherited from ParseObject
virtual ~ParseObject ()
 

Static Public Member Functions

static std::string CodeToString (Code code)
 
static std::string MsgHdrSubcodeToString (MsgHdrSubCode sub_code)
 
static std::string OpenMsgSubcodeToString (OpenMsgSubCode sub_code)
 
static std::string UpdateMsgSubCodeToString (UpdateMsgSubCode sub_code)
 
static std::string FsmSubcodeToString (FsmSubcode sub_code)
 
static std::string CeaseSubcodeToString (CeaseSubCode sub_code)
 
static BgpProto::NotificationDecode (const uint8_t *data, size_t size)
 
static int EncodeData (Notification *msg, uint8_t *data, size_t size)
 
static const std::string toString (Code code, int subcode)
 

Public Attributes

int error
 
int subcode
 
std::string data
 
- Public Attributes inherited from BgpProto::BgpMessage
MessageType type
 

Detailed Description

Definition at line 229 of file bgp_proto.h.

Member Enumeration Documentation

Enumerator
Unknown 
MaxPrefixes 
AdminShutdown 
PeerDeconfigured 
AdminReset 
ConnectionRejected 
OtherConfigChange 
ConnectionCollision 
OutOfResources 
HardReset 

Definition at line 370 of file bgp_proto.h.

Enumerator
MsgHdrErr 
OpenMsgErr 
UpdateMsgErr 
HoldTimerExp 
FSMErr 
Cease 

Definition at line 230 of file bgp_proto.h.

Enumerator
UnspecifiedError 
OpenSentError 
OpenConfirmError 
EstablishedError 

Definition at line 348 of file bgp_proto.h.

Enumerator
ConnNotSync 
BadMsgLength 
BadMsgType 

Definition at line 258 of file bgp_proto.h.

Enumerator
UnsupportedVersion 
BadPeerAS 
BadBgpId 
UnsupportedOptionalParam 
AuthenticationFailure 
UnacceptableHoldTime 
UnsupportedCapability 

Definition at line 277 of file bgp_proto.h.

Enumerator
MalformedAttributeList 
UnrecognizedWellKnownAttrib 
MissingWellKnownAttrib 
AttribFlagsError 
AttribLengthError 
InvalidOrigin 
InvalidNH 
OptionalAttribError 
InvalidNetworkField 
MalformedASPath 

Definition at line 308 of file bgp_proto.h.

Constructor & Destructor Documentation

BgpProto::Notification::Notification ( )

Definition at line 339 of file bgp_proto.cc.

Member Function Documentation

static std::string BgpProto::Notification::CeaseSubcodeToString ( CeaseSubCode  sub_code)
inlinestatic

Definition at line 383 of file bgp_proto.h.

static std::string BgpProto::Notification::CodeToString ( Code  code)
inlinestatic

Definition at line 238 of file bgp_proto.h.

static BgpProto::Notification* BgpProto::Notification::Decode ( const uint8_t *  data,
size_t  size 
)
static
static int BgpProto::Notification::EncodeData ( Notification msg,
uint8_t *  data,
size_t  size 
)
static
static std::string BgpProto::Notification::FsmSubcodeToString ( FsmSubcode  sub_code)
inlinestatic

Definition at line 354 of file bgp_proto.h.

static std::string BgpProto::Notification::MsgHdrSubcodeToString ( MsgHdrSubCode  sub_code)
inlinestatic

Definition at line 263 of file bgp_proto.h.

static std::string BgpProto::Notification::OpenMsgSubcodeToString ( OpenMsgSubCode  sub_code)
inlinestatic

Definition at line 286 of file bgp_proto.h.

const string BgpProto::Notification::ToString ( ) const
virtual

Reimplemented from BgpProto::BgpMessage.

Definition at line 343 of file bgp_proto.cc.

const string BgpProto::Notification::toString ( Code  code,
int  subcode 
)
static

Definition at line 347 of file bgp_proto.cc.

static std::string BgpProto::Notification::UpdateMsgSubCodeToString ( UpdateMsgSubCode  sub_code)
inlinestatic

Definition at line 320 of file bgp_proto.h.

Member Data Documentation

std::string BgpProto::Notification::data

Definition at line 415 of file bgp_proto.h.

int BgpProto::Notification::error

Definition at line 413 of file bgp_proto.h.

int BgpProto::Notification::subcode

Definition at line 414 of file bgp_proto.h.


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