| 
 | 
 | ||||||||||||||||
An ASPath is a list of ASSegments, each of which can be an AS_SET, AS_CONFED_SET, AS_SEQUENCE, or an AS_CONFED_SEQUENCE.
| typedef list <ASSegment>::const_iterator const_iterator | const_iterator | 
| typedef list <ASSegment>::iterator iterator | iterator | 
| ASPath () | ASPath | 
| ASPath (const char *as_path) throw(InvalidString) | ASPath | 
Initialize from a string in the format 1,2,(3,4,5),6,7,8,(9,10,11),12,13
| ASPath (const uint8_t* d, size_t len) throw(CorruptMessage) | ASPath | 
| ASPath (const ASPath &asp1, const ASPath &asp2) | ASPath | 
construct an aggregate from two ASPaths
| ASPath (const ASPath &a) | ASPath | 
| ~ASPath () | ~ASPath | 
| void  add_segment (const ASSegment& s) | add_segment | 
| void  prepend_segment (const ASSegment& s) | prepend_segment | 
| size_t  path_length () | path_length | 
[const]
| bool  contains (const AsNum& as_num) | contains | 
[const]
| const AsNum&  first_asnum () | first_asnum | 
[const]
| string  str () | str | 
[const]
| string  short_str () | short_str | 
[const]
| const ASSegment&  segment (size_t n) | segment | 
[const]
| size_t  num_segments () | num_segments | 
[const]
| const uint8_t * encode (size_t &len, uint8_t *buf) | encode | 
[const]
Convert from internal to external representation, with the correct representation for the original AS_PATH attribute. If there are any 4-byte AS numbers, they will be encoded as AS_TRAN.
If we do not pass a buffer (buf = 0), then the routine will allocate a new one; otherwise, len indicates the size of the input buffer, which must be large enough to store the encoding.
Returns: the pointer to the buffer, len is the actual size.
| size_t  wire_size () | wire_size | 
[const]
Returns: the size of the list on the wire. XXX this should be made more efficient.
| void  prepend_as (const AsNum &asn) | prepend_as | 
Add the As number to the begining of the AS_SEQUENCE that starts the As path, or if the ASPath starts with an AS_SET, then add a new AS_SEQUENCE with the new AsNum to the start of the ASPath
| void  prepend_confed_as (const AsNum &asn) | prepend_confed_as | 
Add the As number to the begining of the AS_CONFED_SEQUENCE that starts the As path, or if the ASPath does not start with an AS_CONFED_SEQUENCE, then add a new AS_CONFED_SEQUENCE with the new AsNum to the start of the ASPath
| void  remove_confed_segments () | remove_confed_segments | 
remove all confederation segments from aspath
| bool  contains_confed_segments () | contains_confed_segments | 
[const]
Returns: true if the AS_PATH Contains confederation segments.
| ASPath&  operator= (const ASPath& him) | operator= | 
| bool  operator== (const ASPath& him) | operator== | 
[const]
| bool  operator< (const ASPath& him) | operator< | 
[const]
| void  encode_for_mib (vector<uint8_t>& aspath) | encode_for_mib | 
[const]
| bool  two_byte_compatible () | two_byte_compatible | 
[const]
returns true if the AS path does not lose information when represented entirely as two-byte AS numbers
| void  merge_as4_path (AS4Path& as4_path) | merge_as4_path | 
Merge an AS4Path into a 2-byte AS Path. Both paths will end up containing the same data
param as4path the AS4_PATH to be merged.
| list <ASSegment> _segments | _segments | 
[protected]
| size_t _num_segments | _num_segments | 
[protected]
| size_t _path_len | _path_len | 
[protected]