diff options
author | rwatson <rwatson@FreeBSD.org> | 2008-07-09 15:48:16 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2008-07-09 15:48:16 +0000 |
commit | 754034c5cf572b6def935dfa55606273daf042c8 (patch) | |
tree | 723ae7ca9460a1b1337cd82ac0bd81bb312adb58 /sys/net/raw_cb.h | |
parent | c490da6d2678016039a02b7fbe09affbc616e9f9 (diff) | |
download | FreeBSD-src-754034c5cf572b6def935dfa55606273daf042c8.zip FreeBSD-src-754034c5cf572b6def935dfa55606273daf042c8.tar.gz |
Remove unused support for local and foreign addresses in generic raw
socket support. These utility routines are used only for routing and
pfkey sockets, neither of which have a notion of address, so were
required to mock up fake socket addresses to avoid connection
requirements for applications that did not specify their own fake
addresses (most of them).
Quite a bit of the removed code is #ifdef notdef, since raw sockets
don't support bind() or connect() in practice. Removing this
simplifies the raw socket implementation, and removes two (commented
out) uses of dtom(9).
Fake addresses passed to sendto(2) by applications are ignored for
compatibility reasons, but this is now done in a more consistent way
(and with a comment). Possibly, EINVAL could be returned here in
the future if it is determined that no applications depend on the
semantic inconsistency of specifying a destination address for a
protocol without address support, but this will require some amount
of careful surveying.
NB: This does not affect netinet, netinet6, or other wire protocol
raw sockets, which provide their own independent infrastructure with
control block address support specific to the protocol.
MFC after: 3 weeks
Reviewed by: bz
Diffstat (limited to 'sys/net/raw_cb.h')
-rw-r--r-- | sys/net/raw_cb.h | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/sys/net/raw_cb.h b/sys/net/raw_cb.h index 9f96bf1..34dd875 100644 --- a/sys/net/raw_cb.h +++ b/sys/net/raw_cb.h @@ -43,8 +43,6 @@ struct rawcb { LIST_ENTRY(rawcb) list; struct socket *rcb_socket; /* back pointer to socket */ - struct sockaddr *rcb_faddr; /* destination address */ - struct sockaddr *rcb_laddr; /* socket's address */ struct sockproto rcb_proto; /* protocol family, protocol */ }; @@ -72,9 +70,7 @@ pr_init_t raw_init; */ int raw_attach(struct socket *, int); void raw_detach(struct rawcb *); -void raw_disconnect(struct rawcb *); -void raw_input(struct mbuf *, struct sockproto *, struct sockaddr *, - struct sockaddr *); +void raw_input(struct mbuf *, struct sockproto *, struct sockaddr *); /* * Generic pr_usrreqs entries for raw socket protocols, usually wrapped so |