|
OpenSDN source code
|
This class encapsulates the wire-format representation of a BGP Large Community attribute and provides encoding, comparison, and canonicalization functions for Large Community attributes. More...
#include <community.h>


Public Member Functions | |
| LargeCommunitySpec () | |
| Constructs a new instance using the attribute type and flags. More... | |
| LargeCommunitySpec (const BgpAttribute &rhs) | |
| Construct from an existing BgpAttribute. More... | |
| virtual size_t | EncodeLength () const |
| Compute the encoded length of the attribute. More... | |
| virtual int | CompareTo (const BgpAttribute &rhs_attr) const |
| Compare the attribute with another BgpAttribute. More... | |
| virtual void | ToCanonical (BgpAttr *attr) |
| Convert the attribute to its canonical form. More... | |
| virtual std::string | ToString () const |
| Generate a human-readable string representation. More... | |
Public Member Functions inherited from BgpAttribute | |
| BgpAttribute () | |
| BgpAttribute (uint8_t code, uint8_t flags) | |
| BgpAttribute (uint8_t code, uint8_t subcode, uint8_t flags) | |
| uint8_t | GetEncodeFlags () const |
Public Member Functions inherited from ParseObject | |
| virtual | ~ParseObject () |
Public Attributes | |
| std::vector< uint32_t > | communities |
| Vector of community values. Each Large Community value consists of three 4-byte fields (12 bytes total). More... | |
Public Attributes inherited from BgpAttribute | |
| uint8_t | code |
| uint8_t | subcode |
| uint8_t | flags |
Static Public Attributes | |
| static const int | kSize = -1 |
| static const uint8_t | kFlags = Optional | Transitive |
Static Public Attributes inherited from BgpAttribute | |
| static const uint8_t | FLAG_MASK = Optional|Transitive |
Additional Inherited Members | |
Public Types inherited from BgpAttribute | |
| enum | Flag { Optional = 1 << 7 , Transitive = 1 << 6 , Partial = 1 << 5 , ExtendedLength = 1 << 4 } |
| enum | Code { Reserved = 0 , Origin = 1 , AsPath = 2 , NextHop = 3 , MultiExitDisc = 4 , LocalPref = 5 , AtomicAggregate = 6 , Aggregator = 7 , Communities = 8 , OriginatorId = 9 , ClusterList = 10 , MPReachNlri = 14 , MPUnreachNlri = 15 , ExtendedCommunities = 16 , As4Path = 17 , As4Aggregator = 18 , PmsiTunnel = 22 , LargeCommunities = 32 , McastEdgeDiscovery = 241 , McastEdgeForwarding = 242 , OriginVnPath = 243 } |
| enum | Subcode { OList = 1 , LabelBlock = 2 , SourceRd = 3 , Esi = 4 , Params = 5 , LeafOList = 6 , SubProtocol = 7 } |
This class encapsulates the wire-format representation of a BGP Large Community attribute and provides encoding, comparison, and canonicalization functions for Large Community attributes.
Definition at line 508 of file community.h.
|
inline |
Constructs a new instance using the attribute type and flags.
Definition at line 521 of file community.h.
|
inlineexplicit |
Construct from an existing BgpAttribute.
Definition at line 524 of file community.h.
|
virtual |
Compare the attribute with another BgpAttribute.
Reimplemented from BgpAttribute.
Definition at line 969 of file community.cc.

|
virtual |
Compute the encoded length of the attribute.
Reimplemented from BgpAttribute.
Definition at line 965 of file community.cc.
|
virtual |
Convert the attribute to its canonical form.
Reimplemented from BgpAttribute.
Definition at line 977 of file community.cc.

|
virtual |
Generate a human-readable string representation.
Reimplemented from BgpAttribute.
Definition at line 958 of file community.cc.
| std::vector<uint32_t> LargeCommunitySpec::communities |
Vector of community values. Each Large Community value consists of three 4-byte fields (12 bytes total).
Definition at line 532 of file community.h.
|
static |
Flags indicating whether the attribute is Optional and Transitive per BGP standards.
Definition at line 517 of file community.h.
|
static |
Indicates variable size of BGP attribute in encoded form (used internally by encoding functions). -1 means the total size depends on how many communities are present.
Definition at line 513 of file community.h.