|
xorp
|
Public Member Functions | |
| AnyAttribute (const char *attr) throw (InvalidString) | |
| PathAttribute * | clone () 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} |
| 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.