libproto Globals


 
LOGO
 Annotated List  Files  Globals  Hierarchy  Index  Top

checksum.h

packet.hh

proto_node_cli.hh

proto_unit.hh

spt.hh

Global member Documentation

extern uint16_t  inet_checksum (const uint8_t *addr, size_t len)

inet_checksum

#include <checksum.h>


Checksum computation for Internet Protocol family headers.

Parameters:

addrthe address with the data.
lenthe length of the data.

Returns: the calculated checksum (in network order).

extern uint16_t  inet_checksum_add (uint16_t sum1, uint16_t sum2)

inet_checksum_add

#include <checksum.h>


Add two previously computed checksums for Internet Protocol family header.

Note that if both checksums to add are in host order, the result is also in host order. Similarly, if both checksums to add are in network order, the result is also in network order.

Parameters:

sum1the first sum to add.
sum2the second sum to add.

Returns: the sum of the two checksums.

inline uint8_t  extract_8 (const uint8_t *ptr)

extract_8

#include <packet.hh>


Extract an 8-bit number from the beginning of a buffer.

Note that the integers in the buffer are stored in network order.

Parameters:

ptrthe buffer with the data.

Returns: an 8-bit number from the beginning of a buffer.

inline void  embed_8 (uint8_t *ptr, uint8_t val)

embed_8

#include <packet.hh>


Embed an 8-bit number into the beginning of a buffer.

Note that the integers in the buffer are stored in network order.

Parameters:

ptrthe buffer to store the data.
valthe 8-bit value to embed into the beginning of the buffer.
inline uint16_t  extract_16 (const uint8_t *ptr)

extract_16

#include <packet.hh>


Extract a 16-bit number from the beginning of a buffer.

Note that the integers in the buffer are stored in network order.

Parameters:

ptrthe buffer with the data.

Returns: a 16-bit number from the beginning of a buffer.

inline void  embed_16 (uint8_t *ptr, uint16_t val)

embed_16

#include <packet.hh>


Embed a 16-bit number into the beginning of a buffer.

Note that the integers in the buffer are stored in network order.

Parameters:

ptrthe buffer to store the data.
valthe 16-bit value to embed into the beginning of the buffer.
inline uint32_t  extract_24 (const uint8_t *ptr)

extract_24

#include <packet.hh>


Extract a 24-bit number from the beginning of a buffer.

Note that the integers in the buffer are stored in network order.

Parameters:

ptrthe buffer with the data.

Returns: a 24-bit number from the beginning of a buffer.

inline void  embed_24 (uint8_t *ptr, uint32_t val)

embed_24

#include <packet.hh>


Embed a 24-bit number into the beginning of a buffer.

Note that the integers in the buffer are stored in network order.

Parameters:

ptrthe buffer to store the data.
valthe 24-bit value to embed into the beginning of the buffer.
inline uint32_t  extract_32 (const uint8_t *ptr)

extract_32

#include <packet.hh>


Extract a 32-bit number from the beginning of a buffer.

Note that the integers in the buffer are stored in network order.

Parameters:

ptrthe buffer with the data.

Returns: a 32-bit number from the beginning of a buffer.

inline void  embed_32 (uint8_t *ptr, uint32_t val)

embed_32

#include <packet.hh>


Embed a 32-bit number into the beginning of a buffer.

Note that the integers in the buffer are stored in network order.

Parameters:

ptrthe buffer to store the data.
valthe 32-bit value to embed into the beginning of the buffer.
inline uint8_t  extract_host_8 (const uint8_t *ptr)

extract_host_8

#include <packet.hh>


Extract an 8-bit number from the beginning of a buffer.

Note that the integers in the buffer are stored in host order.

Parameters:

ptrthe buffer with the data.

Returns: an 8-bit number from the beginning of a buffer.

inline void  embed_host_8 (uint8_t *ptr, uint8_t val)

embed_host_8

#include <packet.hh>


Embed an 8-bit number into the beginning of a buffer.

Note that the integers in the buffer are stored in host order.

Parameters:

ptrthe buffer to store the data.
valthe 8-bit value to embed into the beginning of the buffer.
inline uint16_t  extract_host_16 (const uint8_t *ptr)

extract_host_16

#include <packet.hh>


Extract a 16-bit number from the beginning of a buffer.

Note that the integers in the buffer are stored in host order.

Parameters:

ptrthe buffer with the data.

Returns: a 16-bit number from the beginning of a buffer.

inline void  embed_host_16 (uint8_t *ptr, uint16_t val)

embed_host_16

#include <packet.hh>


Embed a 16-bit number into the beginning of a buffer.

Note that the integers in the buffer are stored in host order.

Parameters:

ptrthe buffer to store the data.
valthe 16-bit value to embed into the beginning of the buffer.
inline uint32_t  extract_host_32 (const uint8_t *ptr)

extract_host_32

#include <packet.hh>


Extract a 32-bit number from the beginning of a buffer.

Note that the integers in the buffer are stored in host order.

Parameters:

ptrthe buffer with the data.

Returns: a 32-bit number from the beginning of a buffer.

inline void  embed_host_32 (uint8_t *ptr, uint32_t val)

embed_host_32

#include <packet.hh>


Embed a 32-bit number into the beginning of a buffer.

Note that the integers in the buffer are stored in host order.

Parameters:

ptrthe buffer to store the data.
valthe 32-bit value to embed into the beginning of the buffer.
inline int  extract_host_int (const uint8_t *ptr)

extract_host_int

#include <packet.hh>


Extract an integer number from the beginning of a buffer.

Note that the integers in the buffer are stored in host order.

Parameters:

ptrthe buffer with the data.

Returns: an integer number from the beginning of a buffer.

inline void  embed_host_int (uint8_t *ptr, int val)

embed_host_int

#include <packet.hh>


Embed an integer number into the beginning of a buffer.

Note that the integers in the buffer are stored in host order.

Parameters:

ptrthe buffer to store the data.
valthe integer value to embed into the beginning of the buffer.
typedef XorpCallback1<int, const vector<string>& >::RefPtr CLIProcessCallback

CLIProcessCallback

#include <proto_node_cli.hh>


enum xorp_module_id { XORP_MODULE_MIN = 0, XORP_MODULE_NULL = 0, XORP_MODULE_FEA = 1, XORP_MODULE_MFEA = 2, XORP_MODULE_MLD6IGMP = 3, XORP_MODULE_PIMSM = 4, XORP_MODULE_PIMDM = 5, XORP_MODULE_BGMP = 6, XORP_MODULE_BGP = 7, XORP_MODULE_OSPF = 8, XORP_MODULE_RIP = 9, XORP_MODULE_CLI = 10, XORP_MODULE_RIB = 11, XORP_MODULE_RTRMGR = 12, XORP_MODULE_STATIC_ROUTES = 13, XORP_MODULE_FIB2MRIB = 14, XORP_MODULE_MAX }

xorp_module_id

#include <proto_unit.hh>


Note: the module IDs must be consistent with the _xorp_module_name definition in file proto_unit.cc (TODO: a temporary solution).

const char * xorp_module_name (int family, xorp_module_id module_id)

xorp_module_name

#include <proto_unit.hh>


Get the module name for a given address family and module ID.

TODO: temporary, all names are listed in "_xorp_module_name[][]" in proto_unit.cc.

Parameters:

familythe address family (e.g., AF_INET or AF_INET6 for IPv4 and IPv6 respectively).
module_idthe module ID (xorp_module_id).

Returns: C-style string with the module name.

xorp_module_id  xorp_module_name2id (const char *module_name)

xorp_module_name2id

#include <proto_unit.hh>


Convert from module name to module ID.

The module name must be a valid name returned by xorp_module_name().

Parameters:

module_namethe module name.

Returns: the module ID (xorp_module_id) if module_name is valid, otherwise XORP_MODULE_NULL.

bool  is_valid_module_id (xorp_module_id module_id)

is_valid_module_id

#include <proto_unit.hh>


Test if a module ID is valid.

A valid module ID is defined as valid if it is in the interval [XORP_MODULE_MIN, XORP_MODULE_MAX).

Parameters:

module_idthe module ID to test (xorp_module_id).

Returns: true if module_id is valid, otherwise false.

template <typename A> inline void  init_dijkstra (const pair<A, typename Node<A>::NodeRef >& p)

init_dijkstra

#include <spt.hh>


template <typename A> inline void  gc (const pair<A, typename Node<A>::NodeRef >& p)

gc

#include <spt.hh>



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