ospf Globals


 
LOGO
 Annotated List  Files  Globals  Hierarchy  Index  Top

fletcher_checksum.hh

lsa.hh

ospf.hh

packet.hh

Global member Documentation

void  fletcher_checksum (uint8_t *bufp, size_t len, size_t off, int32_t& x, int32_t& y)

fletcher_checksum

#include <fletcher_checksum.hh>


Compute a fletcher checksum

Parameters:

bufppointer to start of the buffer.
lengthof the buffer.
offOffset into the buffer where the checksum is placed.
xoutput value checksum
youtput value checksum
inline bool  operator== (const Lsa_header& lhs, const Lsa_header& rhs)

operator==

#include <lsa.hh>


Compare the three fields that make an LSA equivalent.

RFC 2328 Section 12.1. The LSA Header:

"The LSA header contains the LS type, Link State ID and Advertising Router fields. The combination of these three fields uniquely identifies the LSA."

inline bool  compare_all_header_fields (const Lsa_header& lhs, const Lsa_header& rhs)

compare_all_header_fields

#include <lsa.hh>


RFC 2328 Section 13.7. Receiving link state acknowledgments

All the fields in the header need to be compared except for the age.

inline void  initialise_lsa_decoder (OspfTypes::Version version, LsaDecoder& lsa_decoder)

initialise_lsa_decoder

#include <lsa.hh>


The definitive list of LSAs. All decoder lists should be primed using this function.

inline IPNet<IPv4>  lsa_to_net (uint32_t lsid, uint32_t mask)

lsa_to_net

#include <lsa.hh>


Given an address and a mask generate an IPNet both of the values are in host order.

inline uint32_t  set_host_bits (uint32_t lsid, uint32_t mask)

set_host_bits

#include <lsa.hh>


Given a link state ID and a mask both in host order return a link state ID with the host bits set.

inline const char *  xrl_target (OspfTypes::Version version)

xrl_target

#include <ospf.hh>


Get the XRL target name.

inline string  pr_id (uint32_t id)

pr_id

#include <ospf.hh>


Pretty print a router or area ID.

inline uint32_t  set_id (const char *addr)

set_id

#include <ospf.hh>


Set a router or area ID using dot notation: "128.16.64.16".

inline string  pp_link_type (OspfTypes::LinkType link_type)

pp_link_type

#include <ospf.hh>


Pretty print the link type.

inline OspfTypes::LinkType  from_string_to_link_type (const string& type, bool& status)

from_string_to_link_type

#include <ospf.hh>


Convert from a string to the type of area

inline string  pp_area_type (OspfTypes::AreaType area_type)

pp_area_type

#include <ospf.hh>


Pretty print the area type.

inline OspfTypes::AreaType  from_string_to_area_type (const string& type, bool& status)

from_string_to_area_type

#include <ospf.hh>


Convert from a string to the type of area

inline const char *  pb (const bool val)

pb

#include <ospf.hh>


inline void  initialise_packet_decoder (OspfTypes::Version version, PacketDecoder& packet_decoder, LsaDecoder& lsa_decoder)

initialise_packet_decoder

#include <packet.hh>


The definitive list of packets. All decoder lists should be primed using this function.

template <typename A> void  ipv6_checksum_verify (const A& src, const A& dst, const uint8_t *data, size_t len, size_t checksum_offset, uint8_t protocol)
throw(InvalidPacket)

ipv6_checksum_verify

#include <packet.hh>


Verify the checksum of an IPv6 PDU, throw an exception if the checksum doesn't match.

In IPv6 the payload is not checksummed it is up to the protocol to checksum its own payload. The checksum includes a pseduo header that is described in RFC 2460 section 8.1

Parameters:

srcSource address of packet.
dstDestination address of packet.
datapointer to payload.
lenlength of payload.
checksum_offsetoffset of checksum in the payload.
protocolprotocol number.
template <typename A> void  ipv6_checksum_apply (const A& src, const A& dst, uint8_t *data, size_t len, size_t checksum_offset, uint8_t protocol)
throw(InvalidPacket)

ipv6_checksum_apply

#include <packet.hh>


Compute the IPv6 checksum and apply it to the packet provided. If the checksum_offset is outside the packet then an exception is thrown.

In IPv6 the payload is not checksummed it is up to the protocol to checksum its own payload. The checksum includes a pseduo header that is described in RFC 2460 section 8.1

Parameters:

srcSource address of packet.
dstDestination address of packet.
datapointer to payload.
lenlength of payload.
checksum_offsetoffset of checksum in the payload.
protocolprotocol number.

Generated by: pavlin on possum.icir.org on Wed Mar 21 11:23:58 2007, using kdoc $.