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:
bufp | pointer to start of the buffer. |
length | of the buffer. |
off | Offset into the buffer where the checksum is placed. |
x | output value checksum |
y | output 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>
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>
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>
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.
inline
uint16_t
extract_16 (const uint8_t *ptr)
| extract_16 |
#include <packet.hh>
inline
void
embed_16 (uint8_t *ptr, uint16_t val)
| embed_16 |
#include <packet.hh>
inline
uint32_t
extract_24 (const uint8_t *ptr)
| extract_24 |
#include <packet.hh>
inline
void
embed_24 (uint8_t *ptr, uint32_t val)
| embed_24 |
#include <packet.hh>
inline
uint32_t
extract_32 (const uint8_t *ptr)
| extract_32 |
#include <packet.hh>
inline
void
embed_32 (uint8_t *ptr, uint32_t val)
| embed_32 |
#include <packet.hh>
typedef uint32_t PeerID | PeerID |
#include <peer_manager.hh>
An opaque handle that identifies a peer.