class FilterRawSocket6

A RawSocketClass that allows arbitrary filters to receive the data associated with a raw socket. More...

 
LOGO
 Annotated List  Files  Globals  Hierarchy  Index  Top

Public Types

Public Methods

Protected Types

Protected Methods

Protected Members


Detailed Description

A RawSocketClass that allows arbitrary filters to receive the data associated with a raw socket.

InputFilter (class)

InputFilter

Filter class.

JoinedMulticastGroup (class)

JoinedMulticastGroup

Joined multicast group class.

 FilterRawSocket6 (EventLoop& eventloop, uint32_t protocol, const IfTree& iftree)

FilterRawSocket6

 ~FilterRawSocket6 ()

~FilterRawSocket6

bool  add_filter (InputFilter* filter)

add_filter

Add a filter to list of input filters. The FilterRawSocket6 class assumes that the callee will be responsible for managing the memory associated with the filter and will call remove_filter() if the filter is deleted or goes out of scope.

bool  remove_filter (InputFilter* filter)

remove_filter

Remove filter from list of input filters.

bool  empty ()

empty

[const]

Returns: true if there are no filters associated with this instance.

int  proto_socket_write (const string& if_name, const string& vif_name, const IPv6& src_address, const IPv6& dst_address, int32_t ip_ttl, int32_t ip_tos, bool ip_router_alert, const vector<uint8_t>& ext_headers_type, const vector<vector<uint8_t> >& ext_headers_payload, const vector<uint8_t>& payload, string& error_msg)

proto_socket_write

Send a 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_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.
ext_headers_typea vector of integers with the types of the optional extention headers.
ext_headers_payloada vector of payload data, one for each optional extention header. The number of entries must match ext_headers_type.
payloadthe payload, everything after the IP header and options.
error_msgthe error message (if error).

Returns: XORP_OK on success, otherwise XORP_ERROR.

Reimplemented from RawSocket.

int  join_multicast_group (const string& if_name, const string& vif_name, const IPv6& group_address, const string& receiver_name, string& error_msg)

join_multicast_group

Join an IPv6 multicast group.

Parameters:

if_namethe interface through which packets should be accepted.
vif_namethe vif through which packets should be accepted.
group_addressthe multicast group address to join.
receiver_namethe name of the receiver.
error_msgthe error message (if error).

Returns: XORP_OK on success, otherwise XORP_ERROR.

Reimplemented from RawSocket.

int  leave_multicast_group (const string& if_name, const string& vif_name, const IPv6& group_address, const string& receiver_name, string& error_msg)

leave_multicast_group

Leave an IPv6 multicast group.

Parameters:

if_namethe interface through which packets should not be accepted.
vif_namethe vif through which packets should not be accepted.
group_addressthe multicast group address to leave.
receiver_namethe name of the receiver.
error_msgthe error message (if error).

Returns: XORP_OK on success, otherwise XORP_ERROR.

Reimplemented from RawSocket.

void  process_recv_data (const string& if_name, const string& vif_name, const IPvX& src_address, const IPvX& dst_address, int32_t ip_ttl, int32_t ip_tos, bool ip_router_alert, const vector<uint8_t>& ext_headers_type, const vector<vector<uint8_t> >& ext_headers_payload, const vector<uint8_t>& payload)

process_recv_data

[protected]

Reimplemented from RawSocket.

list<InputFilter*> _filters

_filters

[protected]

typedef map<JoinedMulticastGroup, JoinedMulticastGroup> JoinedGroupsTable

JoinedGroupsTable

[protected]

JoinedGroupsTable _joined_groups_table

_joined_groups_table

[protected]


Generated by: pavlin on possum.icir.org on Wed Aug 2 15:36:19 2006, using kdoc $.