xorp

MPReachNLRIAttribute< A > Class Template Reference

Inheritance diagram for MPReachNLRIAttribute< A >:
PathAttribute NONCOPYABLE

List of all members.

Public Types

typedef list< IPNet< A >
>::const_iterator 
const_iterator

Public Member Functions

 MPReachNLRIAttribute (Safi safi)
 Specialise these constructors for each AFI.
 MPReachNLRIAttribute (const uint8_t *d) throw (CorruptMessage)
PathAttributeclone () const
 Make a copy of the current attribute.
string str () const
 We need to encode an attribute to send to a peer.
const A & nexthop () const
void set_nexthop (const A &nexthop)
void add_nlri (const IPNet< A > &nlri)
const list< IPNet< A > > & nlri_list () const
const A & link_local_nexthop () const
void set_link_local_nexthop (const A &n)
Safi safi () const
bool encode (uint8_t *buf, size_t &wire_size, const BGPPeerData *peerdata) const
 encode a path attribute.
template<>
bool encode (uint8_t *buf, size_t &wire_size, const BGPPeerData *peerdata) const
template<>
bool encode (uint8_t *buf, size_t &wire_size, const BGPPeerData *peerdata) const
 encode a path attribute.
template<>
 MPReachNLRIAttribute (Safi safi)
template<>
 MPReachNLRIAttribute (Safi safi)
template<>
 MPReachNLRIAttribute (const uint8_t *d) throw(CorruptMessage)
template<>
 MPReachNLRIAttribute (const uint8_t *d) throw(CorruptMessage)

Private Attributes

Afi _afi
Safi _safi
_nexthop
list< IPNet< A > > _nlri
_link_local_next_hop

template<class A>
class MPReachNLRIAttribute< A >


Member Function Documentation

template<class A >
PathAttribute * MPReachNLRIAttribute< 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 MPReachNLRIAttribute< 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<>
bool MPReachNLRIAttribute< IPv6 >::encode ( uint8_t *  buf,
size_t &  wire_size,
const BGPPeerData peerdata 
) const [virtual]

This is an optional non-transitive attribute that can be used for the following purposes:

(a) to advertise a feasible route to a peer

(b) to permit a router to advertise the Network Layer address of the router that should be used as the next hop to the destinations listed in the Network Layer Reachability Information field of the MP_NLRI attribute.

(c) to allow a given router to report some or all of the Subnetwork Points of Attachment (SNPAs) that exist within the local system

Implements PathAttribute.

template<>
bool MPReachNLRIAttribute< IPv4 >::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 MPReachNLRIAttribute< A >::str ( ) const [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