libxipc Globals


 
LOGO
 Annotated List  Files  Globals  Hierarchy  Index  Top

hmac_md5.h

permits.hh

sockutil.hh

xrl.hh

xrl_atom.hh

xrl_atom_encoding.hh

xrl_cmd_map.hh

xrl_error.hh

xrl_pf_stcp_ph.hh

xrl_router.hh

Global member Documentation

void  hmac_md5 (const unsigned char *data, int data_bytes, const unsigned char *key, int key_bytes, unsigned char digest[16])

hmac_md5

#include <hmac_md5.h>


Generate MD5 message digest.

Parameters:

datadata to be digested.
data_bytesthe amount of data to be digested.
keyto be used in making digest.
key_bytesthe amount of key data.
digestthe buffer to write the digested data.
const char*  hmac_md5_digest_to_ascii (unsigned char digest[16], char* b, unsigned int b_bytes)

hmac_md5_digest_to_ascii

#include <hmac_md5.h>


Render an MD5 digest as an ascii string.

Parameters:

digestdigest to be rendered.
bbuffered to write rendering to.
b_bytesnumber of bytes available buffer (at least 33 bytes).

Returns: pointer to buffer on success, NULL if insufficient buffer space is provided.

typedef list<IPv4> IPv4Hosts

IPv4Hosts

#include <permits.hh>


typedef list<IPv4Net> IPv4Nets

IPv4Nets

#include <permits.hh>


typedef list<IPv6> IPv6Hosts

IPv6Hosts

#include <permits.hh>


typedef list<IPv6Net> IPv6Nets

IPv6Nets

#include <permits.hh>


bool  add_permitted_host (const IPv4& host)

add_permitted_host

#include <permits.hh>


Add a host to be permitted amongst hosts allowed to participate in IPC between XORP processes.

bool  add_permitted_net (const IPv4Net& net)

add_permitted_net

#include <permits.hh>


Add a network to be permitted amongst hosts allowed to participate in IPC between XORP processes.

bool  add_permitted_host (const IPv6Net& host)

add_permitted_host

#include <permits.hh>


Add a host to be permitted amongst hosts allowed to participate in IPC between XORP processes.

bool  add_permitted_net (const IPv6Net& net)

add_permitted_net

#include <permits.hh>


Add a network to be permitted amongst hosts allowed to participate in IPC between XORP processes.

bool  host_is_permitted (const IPv4& host)

host_is_permitted

#include <permits.hh>


Test if host is permitted.

Parameters:

hostaddress to be test amongst permitted IPv4 hosts and nets.

Returns: true if host is permitted.

bool  host_is_permitted (const IPv6& host)

host_is_permitted

#include <permits.hh>


Test if host is permitted.

Parameters:

hostaddress to be test amongst permitted IPv6 hosts and nets.

Returns: true if host is permitted.

const IPv4Hosts&  permitted_ipv4_hosts ()

permitted_ipv4_hosts

#include <permits.hh>


Get list of permitted IPv4 hosts.

const IPv4Nets&  permitted_ipv4_nets ()

permitted_ipv4_nets

#include <permits.hh>


Get list of permitted IPv4 nets.

const IPv6Hosts&  permitted_ipv6_hosts ()

permitted_ipv6_hosts

#include <permits.hh>


Get list of permitted IPv6 hosts.

const IPv6Nets&  permitted_ipv6_nets ()

permitted_ipv6_nets

#include <permits.hh>


Get list of permitted IPv6 nets.

void  clear_permitted_ipv4_hosts ()

clear_permitted_ipv4_hosts

#include <permits.hh>


Clear all IPv4 host related permissions.

void  clear_permitted_ipv6_hosts ()

clear_permitted_ipv6_hosts

#include <permits.hh>


Clear all IPv6 host related permissions.

void  clear_permitted_ipv4_nets ()

clear_permitted_ipv4_nets

#include <permits.hh>


Clear all IPv4 net related permissions.

void  clear_permitted_ipv6_nets ()

clear_permitted_ipv6_nets

#include <permits.hh>


Clear all IPv6 net related permissions.

XorpFd  create_connected_tcp4_socket (const string& addr_slash_port)

create_connected_tcp4_socket

#include <sockutil.hh>


Create a socket and connect to a given remote endpoint.

Parameters:

addr_slash_portthe address and port of the remote endpoint.

Returns: socket (invalid if unsuccessful).

bool  get_local_socket_details (XorpFd fd, string& addr, uint16_t& port)

get_local_socket_details

#include <sockutil.hh>


Parse getsockname() result for a socket.

Parameters:

addrreference to a string to be filled out with local address
portreference to a port to be filled out with local port

Returns: true if addr and port were filled in.

bool  get_remote_socket_details (XorpFd fd, string& addr, uint16_t& port)

get_remote_socket_details

#include <sockutil.hh>


Parse getpeername() result for a connected socket.

Parameters:

fdsocket file descriptor
addrreference to a string to be filled out with peer address
portreference to a port to be filled out with peer remote port

Returns: true if addr and port were filled in.

string  address_slash_port (const string& addr, uint16_t port)

address_slash_port

#include <sockutil.hh>


Return a string in addr:port format.

Parameters:

addraddress portion of string
portport number to be formatted as part of string

Returns: address slash port string

bool  split_address_slash_port (const string& address_slash_port, string& address, uint16_t& port)

split_address_slash_port

#include <sockutil.hh>


Returns: true if address_slash_port was split successfully.

bool  address_lookup (const string& addr, in_addr& ia)

address_lookup

#include <sockutil.hh>


Lookup an IPv4 address by name.

Parameters:

addraddress to be resolved.
ianetwork address.

Returns: true if address resolves.

bool  is_ip_configured (const in_addr& ia)

is_ip_configured

#include <sockutil.hh>


Determine if an IPv4 address is configured and active within this host's networking stack.

Parameters:

iaIPv4 address to be checked.

Returns: true if address is an IP address belonging to a configured and administratively up interface on the system, false otherwise.

bool  set_preferred_ipv4_addr (in_addr addr)

set_preferred_ipv4_addr

#include <sockutil.hh>


Set preferred IPv4 address for IPC communication.

Parameters:

addrpreferred IPv4 address

Returns: true on success, false if addr is not an active IPv4 address configured on the system.

in_addr  get_preferred_ipv4_addr ()

get_preferred_ipv4_addr

#include <sockutil.hh>


Get preferred interface for XRL communication. If not set by set_preferred_ipv4_addr, it is the first valid loopback interface. If there is no valid loopback interface, then it is the first valid interface.

Returns: IPv4 address in use for XRL communucation.

void  get_active_ipv4_addrs (vector<IPv4>& addrs)

get_active_ipv4_addrs

#include <sockutil.hh>


typedef Xrl XrlTemplate

XrlTemplate

#include <xrl.hh>


enum XrlAtomType { xrlatom_no_type = 0, xrlatom_int32, xrlatom_uint32, xrlatom_ipv4, xrlatom_ipv4net, xrlatom_ipv6, xrlatom_ipv6net, xrlatom_mac, xrlatom_text, xrlatom_list, xrlatom_boolean, xrlatom_binary, xrlatom_start = xrlatom_int32, xrlatom_end = xrlatom_binary }

XrlAtomType

#include <xrl_atom.hh>


inline XrlAtomType&  operator++ (XrlAtomType& t)

operator++

#include <xrl_atom.hh>


const char*  xrlatom_type_name (const XrlAtomType&)

xrlatom_type_name

#include <xrl_atom.hh>


Returns: name of atom corresponding to type.

string  xrlatom_encode_value (const char* val, size_t val_bytes)

xrlatom_encode_value

#include <xrl_atom_encoding.hh>


Encode the string representation of an XrlAtom value into a value suitable for integrating into a spaceless Xrl representation. This is essentially URL encoding though a reduced subset of non-alphanumeric characters are escaped, ie only those that would otherwise interfere with Xrl parsing.

inline string  xrlatom_encode_value (const string& val)

xrlatom_encode_value

#include <xrl_atom_encoding.hh>


Encode the string representation of an XrlAtom value into a value suitable for integrating into a spaceless Xrl representation. This is essentially URL encoding though a reduced subset of non-alphanumeric characters are escaped, ie only those that would otherwise interfere with Xrl parsing.

inline string  xrlatom_encode_value (const vector<uint8_t>& v)

xrlatom_encode_value

#include <xrl_atom_encoding.hh>


Encode string representation of a binary data type XrlAtom value into a value suitable for integrating into a spaceless Xrl representation.

ssize_t  xrlatom_decode_value (const char* in, size_t in_bytes, string& out)

xrlatom_decode_value

#include <xrl_atom_encoding.hh>


Decode escaped XrlAtom representation.

Returns: -1 on success, or the index of the character causing the decode failure in the string "in".

ssize_t  xrlatom_decode_value (const char* in, size_t in_bytes, vector<uint8_t>& out)

xrlatom_decode_value

#include <xrl_atom_encoding.hh>


Decode escaped XrlAtom representation of XrlAtom binary data type.

Returns: -1 on success, or the index of the character causing the decode failure in the string "in".

typedef XorpCallback2<const XrlCmdError, const XrlArgs&, XrlArgs*>::RefPtr XrlRecvCallback

XrlRecvCallback

#include <xrl_cmd_map.hh>


enum XrlErrorCode { OKAY = 100, BAD_ARGS = 101, COMMAND_FAILED = 102, NO_FINDER = 200, RESOLVE_FAILED = 201, NO_SUCH_METHOD = 202, SEND_FAILED = 210, REPLY_TIMED_OUT = 211, SEND_FAILED_TRANSIENT = 212, INTERNAL_ERROR = 220 }

XrlErrorCode

#include <xrl_error.hh>


inline bool  operator== (const XrlError& e1, const XrlError& e2)

operator==

#include <xrl_error.hh>


Test for equality between a pair of XrlError instances. The test only examines the error codes associated with each instance.

inline bool  operator!= (const XrlError& e1, const XrlError& e2)

operator!=

#include <xrl_error.hh>


Test for inequality between a pair of XrlError instances. The test only examines the error codes associated with each instance.

enum STCPPacketType { STCP_PT_HELO = 0x00, STCP_PT_HELO_ACK = 0x01, STCP_PT_REQUEST = 0x02, STCP_PT_RESPONSE = 0x03 }

STCPPacketType

#include <xrl_pf_stcp_ph.hh>


void  wait_until_xrl_router_is_ready (EventLoop& e, XrlRouter& xr)

wait_until_xrl_router_is_ready

#include <xrl_router.hh>


Run EventLoop until an XrlRouter is ready. If XrlRouter instance fails while waiting to become ready, a warning is logged and exit() is called.

NB This method is essentially a placeholder. A future revision to the XrlRouter API is to add ServiceBase to its parent classes. This will allow a richer set of event notification semantics. For the time being, wait_until_xrl_router_is_ready should be used in appropriate cases to ease later refactoring.

Parameters:

eeventloop to run.
xrxrl_router to wait for.

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