xorp

AS4Path Class Reference

Inheritance diagram for AS4Path:
ASPath

List of all members.

Public Member Functions

 AS4Path (const uint8_t *d, size_t len) throw (CorruptMessage)
 Construct from received data from 4-byte peer.
 AS4Path (const char *as_path) throw (InvalidString)
 Initialize from a string in the format 3.1,2,(3,10.4,5),6,7,8,(9,10,11),12,13.
const uint8_t * encode (size_t &len, uint8_t *buf) const
 Convert from internal to external representation, with the correct representation for the original AS4_PATH attribute.
size_t wire_size () const
void cross_validate (const ASPath &as_path)
 the AS_PATH attribute may have had new ASes added since the AS4_PATH was last updated.

Private Member Functions

void decode (const uint8_t *d, size_t len) throw (CorruptMessage)
 populate an ASPath from received data.
void pad_segment (const ASSegment &old_seg, ASSegment &new_seg)
void do_patchup (const ASPath &as_path)

Member Function Documentation

void AS4Path::cross_validate ( const ASPath as_path)

the AS_PATH attribute may have had new ASes added since the AS4_PATH was last updated.

We need to copy across anything that is missing

void AS4Path::decode ( const uint8_t *  d,
size_t  len 
) throw (CorruptMessage) [private]

populate an ASPath from received data.

populate a ASPath from the received data representation from a AS4_PATH attribute.

Only used in the constructor.

Reimplemented from ASPath.

const uint8_t * AS4Path::encode ( size_t &  len,
uint8_t *  buf 
) const

Convert from internal to external representation, with the correct representation for the original AS4_PATH attribute.

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.

Reimplemented from ASPath.

size_t AS4Path::wire_size ( ) const
Returns:
the size of the list on the wire. XXX this should be made more efficient.

Reimplemented from ASPath.


The documentation for this class was generated from the following files:
 All Classes Namespaces Functions Variables Typedefs Enumerations