xorp

AS4Segment Class Reference

Inheritance diagram for AS4Segment:
ASSegment

List of all members.

Public Member Functions

 AS4Segment (const uint8_t *d) throw (CorruptMessage)
void decode (const uint8_t *d) throw (CorruptMessage)
 Convert the external representation into the internal one.
const uint8_t * encode (size_t &len, uint8_t *buf) const
 Convert from internal to external representation.
size_t wire_size () const

Member Function Documentation

void AS4Segment::decode ( const uint8_t *  d) throw (CorruptMessage)

Convert the external representation into the internal one.

_type is d[0], _entries is d[1], entries follow.

This is used when decoding a AS4_PATH attribute.

_type is d[0], _entries is d[1], entries follow.

Reimplemented from ASSegment.

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

Convert from internal to external representation.

Convert from internal to external AS4_PATH 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.

Reimplemented from ASSegment.

size_t AS4Segment::wire_size ( ) const [inline]
Returns:
the size of the list on the wire.

Reimplemented from ASSegment.


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