xorp

AnyAttribute Class Reference

Inheritance diagram for AnyAttribute:
PathAttribute NONCOPYABLE

List of all members.

Public Member Functions

 AnyAttribute (const char *attr) throw (InvalidString)
PathAttributeclone () const
 Make a copy of the current attribute.
bool encode (uint8_t *buf, size_t &wire_size, const BGPPeerData *peerdata) const
 encode a path attribute.

Private Attributes

uint8_t * _data
size_t _size
size_t _wire_size
string _init_string

Static Private Attributes

static const uint8_t _valid [] = {0x80|0x40, 255, 1, 1}

Member Function Documentation

PathAttribute* AnyAttribute::clone ( ) const [inline, virtual]

Make a copy of the current attribute.

The derived class should use new to generate a copy of itself. The wire format representation will not be used by the caller.

Implements PathAttribute.

bool AnyAttribute::encode ( uint8_t *  buf,
size_t &  wire_size,
const BGPPeerData peerdata 
) const [inline, virtual]

encode a path attribute.

In a sane world, we'd use a virtual function for this. But we store so many path attributes that we can't afford the overhead of a virtual function table for them, so we have to do this the hard way

XXX THE ABOVE IS NO LONGER THE CASE. WE SHOULD REWRITE THIS TO USE VIRTUAL FUNCTIONS

Implements PathAttribute.


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