|
OpenSDN source code
|
Represents a single BGP Large Community tag. More...
#include <tag.h>
Public Types | |
| typedef boost::array< uint8_t, kSize > | bytes_type |
| Raw 12-byte type representing the community on the wire. More... | |
Public Member Functions | |
| TagLC (const bytes_type &data) | |
| Construct from a raw 12-byte value. More... | |
| TagLC (as_t asn, uint64_t tag) | |
| Construct from AS number and tag value. More... | |
| std::string | ToString () const |
| Returns a string representation. More... | |
| bool | IsGlobal () const |
| Returns true if this tag belongs to a global community. More... | |
| as_t | as_number () const |
| Returns the AS number. More... | |
| uint64_t | tag () const |
| Returns the tag id. More... | |
| const std::vector< uint32_t > | GetLargeCommunityValue () const |
| Returns the community value as a vector of 3 32-bit integers. More... | |
Static Public Attributes | |
| static const int | kSize = 12 |
| Fixed size (in bytes) of a BGP Large Community value. More... | |
| static const int | kMinGlobalId = 8000000 |
| Minimum tag id to belong to a global community. More... | |
Private Attributes | |
| bytes_type | data_ |
| Raw 12-byte encoded Large Community value. More... | |
Represents a single BGP Large Community tag.
Definition at line 16 of file bgp/large-community/tag.h.
| typedef boost::array<uint8_t, kSize> TagLC::bytes_type |
Raw 12-byte type representing the community on the wire.
Definition at line 23 of file bgp/large-community/tag.h.
|
explicit |
Construct from a raw 12-byte value.
Definition at line 18 of file bgp/large-community/tag.cc.
|
explicit |
Construct from AS number and tag value.
Definition at line 22 of file bgp/large-community/tag.cc.

| as_t TagLC::as_number | ( | ) | const |
Returns the AS number.
Definition at line 28 of file bgp/large-community/tag.cc.

|
inline |
Returns the community value as a vector of 3 32-bit integers.
Definition at line 40 of file bgp/large-community/tag.h.

| bool TagLC::IsGlobal | ( | ) | const |
Returns true if this tag belongs to a global community.
Definition at line 44 of file bgp/large-community/tag.cc.

| uint64_t TagLC::tag | ( | ) | const |
Returns the tag id.
Definition at line 36 of file bgp/large-community/tag.cc.

| string TagLC::ToString | ( | ) | const |
Returns a string representation.
Definition at line 48 of file bgp/large-community/tag.cc.

|
private |
Raw 12-byte encoded Large Community value.
Definition at line 51 of file bgp/large-community/tag.h.
|
static |
Minimum tag id to belong to a global community.
Definition at line 21 of file bgp/large-community/tag.h.
|
static |
Fixed size (in bytes) of a BGP Large Community value.
Definition at line 19 of file bgp/large-community/tag.h.