xorp

NextHopAttribute< A > Class Template Reference

NextHopAttribute contains the IP address of the next hop. More...

#include <path_attribute.hh>

Inheritance diagram for NextHopAttribute< A >:
PathAttribute NONCOPYABLE

List of all members.

Public Member Functions

 NextHopAttribute (const A &n) throw (CorruptMessage)
 NextHopAttribute.
 NextHopAttribute (const uint8_t *d) throw (CorruptMessage)
PathAttributeclone () const
 Make a copy of the current attribute.
void verify () throw (CorruptMessage)
string str () const
 We need to encode an attribute to send to a peer.
A & nexthop ()
void set_nexthop (const A &n)
bool encode (uint8_t *buf, size_t &wire_size, const BGPPeerData *peerdata) const
 encode a path attribute.

Private Attributes

_next_hop

Detailed Description

template<class A>
class NextHopAttribute< A >

NextHopAttribute contains the IP address of the next hop.


Member Function Documentation

template<class A >
PathAttribute * NextHopAttribute< A >::clone ( ) const [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.

template<class A >
bool NextHopAttribute< A >::encode ( uint8_t *  buf,
size_t &  wire_size,
const BGPPeerData peerdata 
) const [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.

template<class A>
string NextHopAttribute< A >::str ( ) const [inline, virtual]

We need to encode an attribute to send to a peer.

However we only have the canonically encoded byte stream data for it. Sometimes that is fine, and we should just send that; sometimes we need to decode and re-encode for this specific peer.

Reimplemented from PathAttribute.


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