xorp

IntraAreaPrefixLsa Class Reference

OSPFv3 only: Intra-Area-Prefix-LSA. More...

#include <lsa.hh>

Inheritance diagram for IntraAreaPrefixLsa:
Lsa

List of all members.

Public Member Functions

 IntraAreaPrefixLsa (OspfTypes::Version version)
 IntraAreaPrefixLsa (OspfTypes::Version version, uint8_t *buf, size_t len)
size_t min_length () const
uint16_t get_ls_type () const
 It is the responsibilty of the derived type to return this information.
LsaRef decode (uint8_t *buf, size_t &len) const throw (InvalidPacket)
 Decode an LSA.
bool encode ()
 Encode an LSA for transmission.
void set_referenced_ls_type (uint16_t referenced_ls_type)
uint16_t get_referenced_ls_type () const
void set_referenced_link_state_id (uint32_t referenced_link_state_id)
uint32_t get_referenced_link_state_id () const
void set_referenced_advertising_router (uint32_t referenced_adv_router)
uint32_t get_referenced_advertising_router () const
list< IPv6Prefix > & get_prefixes ()
uint32_t create_link_state_id (uint16_t ls_type, uint32_t interface_id) const
 Given a referenced LS type and an interface ID generate a candidate Link State ID for Intra-Area-Prefix-LSAs.
const char * name () const
 Printable name of this LSA.
string str () const
 Generate a printable representation.

Private Attributes

uint16_t _referenced_ls_type
uint32_t _referenced_link_state_id
uint32_t _referenced_advertising_router
list< IPv6Prefix_prefixes

Detailed Description

OSPFv3 only: Intra-Area-Prefix-LSA.


Member Function Documentation

uint32_t IntraAreaPrefixLsa::create_link_state_id ( uint16_t  ls_type,
uint32_t  interface_id 
) const [inline]

Given a referenced LS type and an interface ID generate a candidate Link State ID for Intra-Area-Prefix-LSAs.

This is *NOT* part of the protocol, just a way to create a unique mapping.

The underlying assumption is that for every area only one Intra-Area-Prefix-LSA will be generated per Router-LSA and Network-LSA. More importantly one Router-LSA will be generated per area although it is legal to generate many. The size of the Router-LSA is a function of the number of interfaces on the generating router and for the time being we only generate one Router-LSA. If the number of interfaces exceeds the capacity of a single Router-LSA then this method and the Router-LSA code will need to be re-visited.

Lsa::LsaRef IntraAreaPrefixLsa::decode ( uint8_t *  buf,
size_t &  len 
) const throw (InvalidPacket) [virtual]

Decode an LSA.

Parameters:
bufpointer to buffer.
lenlength of the buffer on input set to the number of bytes consumed on output.
Returns:
A reference to an LSA that manages its own memory.

Implements Lsa.

bool IntraAreaPrefixLsa::encode ( ) [virtual]

Encode an LSA for transmission.

Returns:
True on success.

Implements Lsa.

uint16_t IntraAreaPrefixLsa::get_ls_type ( ) const [inline, virtual]

It is the responsibilty of the derived type to return this information.

Returns:
The type this lsa represents.

Implements Lsa.

size_t IntraAreaPrefixLsa::min_length ( ) const [inline, virtual]
Returns:
the minimum length of a Link-LSA.

Implements Lsa.


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