class AsPath

An AsPath is a list of AsSegments, each of which can be an AS_SET or an AS_SEQUENCE. More...

Definition#include <aspath.hh>
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Types

Public Methods


Detailed Description

An AsPath is a list of AsSegments, each of which can be an AS_SET or an AS_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)

AsPath

construct from received data

 AsPath (const AsPath &a)

AsPath

Copy constructor

 ~AsPath ()

~AsPath

void  add_segment (const AsSegment& s)

add_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. 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

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]


Generated by: pavlin on possum.icir.org on Mon Jun 9 13:23:59 2003, using kdoc 2.0a54+XORP.