[Xorp-cvs] XORP cvs commit: xorp/libcomm
Bruce Simpson
bms at icir.org
Tue Apr 22 06:53:02 PDT 2008
CVSROOT: /usr/local/www/data/cvs
Module name: xorp
Changes by: bms at chum.icir.org 2008-04-22 13:53:02 UTC
XORP CVS repository
Modified files:
libcomm comm_api.h comm_sock.c comm_user.c
Log message:
Import libcomm enhancements which are needed by OLSRv1 for
generating IPv4 limited broadcast traffic (255.255.255.255).
* Most IP stacks have certain quirks regarding how IPv4 broadcasts
are sent and received, because the BSD socket API did not historically
handle them with completeness.
* For example, like a multicast channel (S,G), the limited broadcast
address on its own does not supply enough information to the BSD kernel
ip_output() function.
* These inconsistencies have been addressed since, by deprecating the use
of limited broadcast in favour of link-scope multicast. In the case of
IPv6, limited broadcast has been completely eliminated from the
network layer protocol.
* Unfortunately, protocols such as OLSRv1 and RIPv1 have seen operational
deployment WITHOUT being updated to use link-scope multicast, therefore
we need to make the appropriate changes to support this behaviour.
* Add functions:
* comm_set_send_broadcast()
Most implementations require that SO_BROADCAST is set to permit the
transmission of broadcast messages on a socket.
* comm_set_unicast_ttl()
Set the TTL field or hop-count field in outgoing IPv4/IPv6 messages.
* comm_set_tos()
Set the TOS field in outgoing IPv4 messages.
* The following functions MUST NOT be used by user routing processes.
They exist only to address the specific issue described above regarding
the addressing of limited broadcasts.
* comm_set_onesbcast()
BSD specific. Enables a kernel feature whereby sends to the network
broadcast address configured on a vif, are automatically rewritten
to contain the limited broadcast address.
* comm_set_bindtodevice()
Linux specific. Bind a socket to a link-layer device for all receives
and transmits. Operates independently of the socket API function bind().
* comm_set_receive_broadcast()
Windows Vista and Windows Server 2003 specific. The new TCP/IP
implementation requires that processes explicitly request to
receive broadcast messages.
Windows creates a separate connected FIB entry for each NDIS interface
with the TCPIP.SYS transport bound to it which points to the limited
broadcast address.
* Additionally add *_present() functions to allow libcomm clients to
test for the presence of these features.
* These functions may potentially be used by RIPv1 at a later date.
* The FEA support will come in a later patch.
Note: In the XORP/OLSR branch, the new function for setting the TTL
on an IPV4 socket is named "comm_set_ttl()". This clashes with the
existing function in CVS, which sets the multicast ttl.
Therefore the following functions are renamed in this CVS commit:
the import of this change set is atomic in CVS:
comm_ttl_present -> comm_unicast_ttl_present
comm_set_ttl -> comm_set_unicast_ttl
Obtained from: XORP/OLSR
Sponsored by: CenGen, Inc.
Revision Changes Path
1.31 +94 -1; commitid: e6dd480ded6641a7; xorp/libcomm/comm_api.h
1.45 +218 -8; commitid: e6dd480ded6641a7; xorp/libcomm/comm_sock.c
1.32 +41 -1; commitid: e6dd480ded6641a7; xorp/libcomm/comm_user.c
More information about the Xorp-cvs
mailing list