class XrlRawSocket6Manager

A class that manages raw sockets as used by the XORP Xrl Interface. More...

 
LOGO
 Annotated List  Files  Globals  Hierarchy  Index  Top

Public Methods

Protected Types

Protected Methods

Protected Members


Detailed Description

The XrlRawSocket6Manager has two containers: a container for raw sockets indexed by the protocol associated with the raw socket, and a container for the filters associated with each xrl_target. When an Xrl Target registers for interest in a particular type of raw packet a raw socket (FilterRawSocket6) is created if necessary, then the relevent filter is created and associated with the RawSocket.

 XrlRawSocket6Manager (EventLoop& eventloop, const IfTree& iftree, XrlRouter& xr)

XrlRawSocket6Manager

Constructor for XrlRawSocket6Manager instances.

 ~XrlRawSocket6Manager ()

~XrlRawSocket6Manager

XrlCmdError  send ( const string& if_name, const string& vif_name, const IPv6& src_address, const IPv6& dst_address, uint32_t ip_protocol, int32_t ip_ttl, int32_t ip_tos, bool ip_router_alert, const vector<uint8_t>& payload)

send

Send an IPv6 packet on a raw socket.

Parameters:

if_namethe interface to send the packet on. It is essential for multicast. In the unicast case this field may be empty.
vif_namethe vif to send the packet on. It is essential for multicast. In the unicast case this field may be empty.
src_addressthe IP source address.
dst_addressthe IP destination address.
ip_protocolthe IP protocol number. It must be between 1 and 255.
ip_ttlthe IP TTL (hop-limit). If it has a negative value, the TTL will be set internally before transmission.
ip_tosthe Type Of Service (IP traffic class for IPv6). If it has a negative value, the TOS will be set internally before transmission.
ip_router_alertif true, then add the IP Router Alert option to the IP packet.
payloadthe payload, everything after the IP header and options.
XrlCmdError  register_receiver ( const string& xrl_target_name, const string& if_name, const string& vif_name, uint32_t ip_protocol, bool enable_multicast_loopback)

register_receiver

Register to receive IPv6 packets. The receiver is expected to support raw_packet6_client/0.1 interface.

Parameters:

xrl_target_namethe receiver's XRL target name.
if_namethe interface through which packets should be accepted.
vif_namethe vif through which packets should be accepted.
ip_protocolthe IP protocol number that the receiver is interested in. It must be between 0 and 255. A protocol number of 0 is used to specify all protocols.
enable_multicast_loopbackif true then enable delivering of multicast datagrams back to this host (assuming the host is a member of the same multicast group.
XrlCmdError  unregister_receiver ( const string& xrl_target_name, const string& if_name, const string& vif_name, uint32_t ip_protocol)

unregister_receiver

Unregister to receive IPv6 packets.

Parameters:

xrl_target_namethe receiver's XRL target name.
if_namethe interface through which packets should not be accepted.
vif_namethe vif through which packets should not be accepted.
ip_protocolthe IP Protocol number that the receiver is not interested in anymore. It must be between 0 and 255. A protocol number of 0 is used to specify all protocols.
XrlCmdError  join_multicast_group ( const string& xrl_target_name, const string& if_name, const string& vif_name, uint32_t ip_protocol, const IPv6& group_address)

join_multicast_group

Join an IPv6 multicast group.

Parameters:

xrl_target_namethe receiver's XRL target name.
if_namethe interface through which packets should be accepted.
vif_namethe vif through which packets should be accepted.
ip_protocolthe IP protocol number that the receiver is interested in. It must be between 0 and 255. A protocol number of 0 is used to specify all protocols.
group_addressthe multicast group address to join.
XrlCmdError  leave_multicast_group ( const string& xrl_target_name, const string& if_name, const string& vif_name, uint32_t ip_protocol, const IPv6& group_address)

leave_multicast_group

Leave an IPv6 multicast group.

Parameters:

xrl_target_namethe receiver's XRL target name.
if_namethe interface through which packets should not be accepted.
vif_namethe vif through which packets should not be accepted.
ip_protocolthe IP protocol number that the receiver is not interested in anymore. It must be between 0 and 255. A protocol number of 0 is used to specify all protocols.
group_addressthe multicast group address to leave.
XrlRouter&  router ()

router

const IfTree&  iftree ()

iftree

[const]

void  xrl_send_recv_cb (const XrlError& e, string xrl_target_name)

xrl_send_recv_cb

Method to be called by Xrl sending filter invoker

EventLoop& _eventloop

_eventloop

[protected]

const IfTree& _iftree

_iftree

[protected]

XrlRouter& _xrlrouter

_xrlrouter

[protected]

typedef map<uint8_t, FilterRawSocket6*> SocketTable6

SocketTable6

[protected]

SocketTable6 _sockets

_sockets

[protected]

typedef multimap<string, XrlFilterRawSocket6*> FilterBag6

FilterBag6

[protected]

FilterBag6 _filters

_filters

[protected]

void  erase_filters (const FilterBag6::iterator& begin, const FilterBag6::iterator& end)

erase_filters

[protected]


Generated by: pavlin on possum.icir.org on Thu Mar 9 04:43:06 2006, using kdoc $.