|
| ||||||||||||||||
A RawSocketClass that allows arbitrary filters to receive the data associated with a raw socket.
| InputFilter (class) | InputFilter |
| JoinedMulticastGroup (class) | JoinedMulticastGroup |
| 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>& payload,
string& error_msg)
| proto_socket_write |
Send a packet on a raw socket.
Parameters:
| if_name | the interface to send the packet on. It is essential for multicast. In the unicast case this field may be empty. |
| vif_name | the vif to send the packet on. It is essential for multicast. In the unicast case this field may be empty. |
| src_address | the IP source address. |
| dst_address | the IP destination address. |
| ip_ttl | the IP TTL (hop-limit). If it has a negative value, the TTL will be set internally before transmission. |
| ip_tos | the Type Of Service (IP traffic class for IPv6). If it has a negative value, the TOS will be set internally before transmission. |
| ip_router_alert | if true, then add the IP Router Alert option to the IP packet. |
| payload | the payload, everything after the IP header and options. |
| error_msg | the 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_name | the interface through which packets should be accepted. |
| vif_name | the vif through which packets should be accepted. |
| group_address | the multicast group address to join. |
| receiver_name | the name of the receiver. |
| error_msg | the 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_name | the interface through which packets should not be accepted. |
| vif_name | the vif through which packets should not be accepted. |
| group_address | the multicast group address to leave. |
| receiver_name | the name of the receiver. |
| error_msg | the 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>& 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]