xorp

Lsa_header Class Reference

LSA Header. More...

#include <lsa.hh>

List of all members.

Public Member Functions

 Lsa_header (OspfTypes::Version version)
 Lsa_header (const Lsa_header &rhs)
Lsa_header operator= (const Lsa_header &rhs)
void copy (const Lsa_header &rhs)
Lsa_header decode (uint8_t *ptr) const throw (InvalidPacket)
 Decode a LSA header and return a LSA header inline not a pointer.
void decode_inline (uint8_t *ptr) throw (InvalidPacket)
 Decode this lsa header in this context.
size_t copy_out (uint8_t *to_uint8) const
 Copy a wire format representation to the pointer provided.
OspfTypes::Version get_version () const
void set_ls_age (uint16_t ls_age)
uint16_t get_ls_age () const
void set_options (uint8_t options)
uint8_t get_options () const
void set_ls_type (uint16_t ls_type)
uint16_t get_ls_type () const
void set_link_state_id (uint32_t link_state_id)
uint32_t get_link_state_id () const
void set_advertising_router (uint32_t advertising_router)
uint32_t get_advertising_router () const
void set_ls_sequence_number (int32_t ls_sequence_number)
int32_t get_ls_sequence_number () const
void set_ls_checksum (uint16_t ls_checksum)
uint16_t get_ls_checksum () const
void set_length (uint16_t length)
uint16_t get_length () const
string str () const
 Generate a printable representation of the header.

Static Public Member Functions

static size_t length ()
static uint16_t get_lsa_len_from_buffer (uint8_t *ptr)
 Get the length of the LSA from the buffer provided.

Private Member Functions

void decode (Lsa_header &header, uint8_t *ptr) const throw (InvalidPacket)

Private Attributes

OspfTypes::Version _version
uint16_t _LS_age
uint8_t _options
uint16_t _ls_type
uint32_t _link_state_id
uint32_t _advertising_router
int32_t _ls_sequence_number
uint16_t _ls_checksum
uint16_t _length

Detailed Description

LSA Header.

Common header for all LSAs. Never store or pass a pointer, just deal with it inline.


Member Function Documentation

size_t Lsa_header::copy_out ( uint8_t *  to_uint8) const

Copy a wire format representation to the pointer provided.

A LSA header is a fixed length, the caller should have allocated enough space by calling the length() method.

Returns:
the number of bytes written.
Lsa_header Lsa_header::decode ( uint8_t *  ptr) const throw (InvalidPacket)

Decode a LSA header and return a LSA header inline not a pointer.

A LSA header is a fixed length, the caller should have allocated enough space by calling the length() method.

static size_t Lsa_header::length ( ) [inline, static]
Returns:
the length of an LSA header.

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