INET Framework for OMNeT++/OMNEST
|
Class generated from inet/routing/bgpv4/BGPMessage/BGPUpdate.msg:82
by nedtool.
More...
#include <BGPUpdate_m.h>
Public Member Functions | |
virtual | ~BGPUpdateMessage_Base () |
virtual BGPUpdateMessage_Base * | dup () const override |
virtual void | parsimPack (omnetpp::cCommBuffer *b) const override |
virtual void | parsimUnpack (omnetpp::cCommBuffer *b) override |
virtual void | setWithdrawnRoutesArraySize (unsigned int size) |
virtual unsigned int | getWithdrawnRoutesArraySize () const |
virtual BGPUpdateWithdrawnRoutes & | getWithdrawnRoutes (unsigned int k) |
virtual const BGPUpdateWithdrawnRoutes & | getWithdrawnRoutes (unsigned int k) const |
virtual void | setWithdrawnRoutes (unsigned int k, const BGPUpdateWithdrawnRoutes &withdrawnRoutes) |
virtual void | setPathAttributeListArraySize (unsigned int size) |
virtual unsigned int | getPathAttributeListArraySize () const |
virtual BGPUpdatePathAttributeList & | getPathAttributeList (unsigned int k) |
virtual const BGPUpdatePathAttributeList & | getPathAttributeList (unsigned int k) const |
virtual void | setPathAttributeList (unsigned int k, const BGPUpdatePathAttributeList &pathAttributeList) |
virtual BGPUpdateNLRI & | getNLRI () |
virtual const BGPUpdateNLRI & | getNLRI () const |
virtual void | setNLRI (const BGPUpdateNLRI &NLRI) |
Public Member Functions inherited from inet::bgp::BGPHeader | |
BGPHeader (const char *name=nullptr, short kind=0) | |
BGPHeader (const BGPHeader &other) | |
virtual | ~BGPHeader () |
BGPHeader & | operator= (const BGPHeader &other) |
virtual char | getType () const |
virtual void | setType (char type) |
Protected Member Functions | |
bool | operator== (const BGPUpdateMessage_Base &) |
BGPUpdateMessage_Base (const char *name=nullptr, short kind=0) | |
BGPUpdateMessage_Base (const BGPUpdateMessage_Base &other) | |
BGPUpdateMessage_Base & | operator= (const BGPUpdateMessage_Base &other) |
Protected Member Functions inherited from inet::bgp::BGPHeader | |
bool | operator== (const BGPHeader &) |
Protected Attributes | |
BGPUpdateWithdrawnRoutes * | withdrawnRoutes |
unsigned int | withdrawnRoutes_arraysize |
BGPUpdatePathAttributeList * | pathAttributeList |
unsigned int | pathAttributeList_arraysize |
BGPUpdateNLRI | NLRI |
Protected Attributes inherited from inet::bgp::BGPHeader | |
char | type |
Private Member Functions | |
void | copy (const BGPUpdateMessage_Base &other) |
Class generated from inet/routing/bgpv4/BGPMessage/BGPUpdate.msg:82
by nedtool.
// // Represents a BGPv4 UPDATE message. // // BGP UPDATE fields modelled: // - Unfeasible routes length: 2 octets (number of withdrawn routes) // - Withdrawn routes : variable size (list of IP prefixes of unfeasible routes) // - Total Path Attributes Length: 1 octet (if = 0, no Path Attributes) // - Path Attributes: // - Attribute Type (2 octets) // - Attribute Length // - Attribute Values (variable size) // - Network Layer Reachability Information: (variable size) // - Length : 1 octet // - prefix : variable size (contains the IP prefix; IPv4: 4 octets) // packet BGPUpdateMessage extends BGPHeader { @customize(true); type = BGP_UPDATE; byteLength = BGP_HEADER_OCTETS + BGP_EMPTY_UPDATE_OCTETS;
BGPUpdateWithdrawnRoutes withdrawnRoutes[]; BGPUpdatePathAttributeList pathAttributeList[]; // optional field (size is either 0 or 1) BGPUpdateNLRI NLRI; }
BGPUpdateMessage_Base is only useful if it gets subclassed, and BGPUpdateMessage is derived from it. The minimum code to be written for BGPUpdateMessage is the following:
class INET_API BGPUpdateMessage : public BGPUpdateMessage_Base { private: void copy(const BGPUpdateMessage& other) { ... }
public: BGPUpdateMessage(const char *name=nullptr, short kind=0) : BGPUpdateMessage_Base(name,kind) {} BGPUpdateMessage(const BGPUpdateMessage& other) : BGPUpdateMessage_Base(other) {copy(other);} BGPUpdateMessage& operator=(const BGPUpdateMessage& other) {if (this==&other) return *this; BGPUpdateMessage_Base::operator=(other); copy(other); return *this;} virtual BGPUpdateMessage *dup() const override {return new BGPUpdateMessage(*this);} // ADD CODE HERE to redefine and implement pure virtual functions from BGPUpdateMessage_Base };
The following should go into a .cc (.cpp) file:
Register_Class(BGPUpdateMessage)
|
protected |
|
protected |
|
virtual |
|
private |
|
inlineoverridevirtual |
Reimplemented from inet::bgp::BGPHeader.
Reimplemented in inet::bgp::BGPUpdateMessage.
|
virtual |
Referenced by inet::bgp::BGPRouting::processMessage().
|
inlinevirtual |
Referenced by getNLRI().
|
virtual |
|
inlinevirtual |
Referenced by getPathAttributeList().
|
virtual |
Referenced by inet::bgp::BGPUpdateMessage::setPathAttributeList().
|
virtual |
|
inlinevirtual |
Referenced by getWithdrawnRoutes().
|
virtual |
|
protected |
|
protected |
|
overridevirtual |
Reimplemented from inet::bgp::BGPHeader.
|
overridevirtual |
Reimplemented from inet::bgp::BGPHeader.
|
virtual |
Reimplemented in inet::bgp::BGPUpdateMessage.
|
virtual |
Referenced by inet::bgp::BGPUpdateMessage::setPathAttributeList().
|
virtual |
|
virtual |
|
virtual |
Reimplemented in inet::bgp::BGPUpdateMessage.
|
protected |
Referenced by inet::bgp::BGPUpdateMessage::setNLRI().
|
protected |
|
protected |
|
protected |
|
protected |