]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Some modules such as SCTP supplies a valid route entry as an input argument
authorQing Li <qingli@FreeBSD.org>
Sat, 3 Jan 2009 00:27:28 +0000 (00:27 +0000)
committerQing Li <qingli@FreeBSD.org>
Sat, 3 Jan 2009 00:27:28 +0000 (00:27 +0000)
commitdc495497132b0b902604d978a87df45bc214ae69
treefc0a5a77b2b2d0cb0e6f2e3281d36db90f96bcf5
parentbcca92c0e5a08caff315fa4ba590c6c6240dbe7f
Some modules such as SCTP supplies a valid route entry as an input argument
to ip_output(). The destionation is represented in a sockaddr{} object
that may contain other pieces of information, e.g., port number. This
same destination sockaddr{} object may be passed into L2 code, which
could be used to create a L2 entry. Since there exists a L2 table per
address family, the L2 lookup function can make address family specific
comparison instead of the generic bcmp() operation over the entire
sockaddr{} structure.

Note in the IPv6 case the sin6_scope_id is not compared because the
address is currently stored in the embedded form inside the kernel.
The in6_lltable_lookup() has to account for the scope-id if this
storage format were to change in the future.
sys/netinet/in.c
sys/netinet6/in6.c