diff options
author | andre <andre@FreeBSD.org> | 2004-10-19 15:45:57 +0000 |
---|---|---|
committer | andre <andre@FreeBSD.org> | 2004-10-19 15:45:57 +0000 |
commit | 00d43f4bd8218e12e456cef93e786e0a910ba560 (patch) | |
tree | 5e1381e3fd7b17aca48188a8e5c4717260ca205f /sys/netinet/ip_var.h | |
parent | 8112f95a8c58a972c772b025bf4229fb1623a162 (diff) | |
download | FreeBSD-src-00d43f4bd8218e12e456cef93e786e0a910ba560.zip FreeBSD-src-00d43f4bd8218e12e456cef93e786e0a910ba560.tar.gz |
Support for dynamically loadable and unloadable IP protocols in the ipmux.
With pr_proto_register() it has become possible to dynamically load protocols
within the PF_INET domain. However the PF_INET domain has a second important
structure called ip_protox[] that is derived from the 'struct protosw inetsw[]'
and takes care of the de-multiplexing of the various protocols that ride on
top of IP packets.
The functions ipproto_[un]register() allow to dynamically adjust the ip_protox[]
array mux in a consistent and easy way. To register a protocol within
ip_protox[] the existence of a corresponding and matching protocol definition
in inetsw[] is required. The function does not allow to overwrite an already
registered protocol. The unregister function simply replaces the mux slot with
the default index pointer to IPPROTO_RAW as it was previously.
Diffstat (limited to 'sys/netinet/ip_var.h')
-rw-r--r-- | sys/netinet/ip_var.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/netinet/ip_var.h b/sys/netinet/ip_var.h index 2fa80d3..b4c99d2 100644 --- a/sys/netinet/ip_var.h +++ b/sys/netinet/ip_var.h @@ -168,6 +168,8 @@ extern int (*ip_mforward)(struct ip *, struct ifnet *, struct mbuf *, int ip_output(struct mbuf *, struct mbuf *, struct route *, int, struct ip_moptions *, struct inpcb *); +int ipproto_register(u_char); +int ipproto_unregister(u_char); struct mbuf * ip_reass(struct mbuf *); struct in_ifaddr * |