in_proto.c (130613) | in_proto.c (133874) |
---|---|
1/* 2 * Copyright (c) 1982, 1986, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 13 unchanged lines hidden (view full) --- 22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 * 29 * @(#)in_proto.c 8.2 (Berkeley) 2/9/95 | 1/* 2 * Copyright (c) 1982, 1986, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 13 unchanged lines hidden (view full) --- 22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 * 29 * @(#)in_proto.c 8.2 (Berkeley) 2/9/95 |
30 * $FreeBSD: head/sys/netinet/in_proto.c 130613 2004-06-16 23:24:02Z mlaier $ | 30 * $FreeBSD: head/sys/netinet/in_proto.c 133874 2004-08-16 18:32:07Z rwatson $ |
31 */ 32 33#include "opt_ipdivert.h" 34#include "opt_ipx.h" 35#include "opt_mrouting.h" 36#include "opt_ipsec.h" 37#include "opt_inet6.h" 38#include "opt_pf.h" --- 97 unchanged lines hidden (view full) --- 136{ SOCK_RAW, &inetdomain, IPPROTO_RSVP, PR_ATOMIC|PR_ADDR|PR_LASTHDR, 137 rsvp_input, 0, 0, rip_ctloutput, 138 0, 139 0, 0, 0, 0, 140 &rip_usrreqs 141}, 142#ifdef IPSEC 143{ SOCK_RAW, &inetdomain, IPPROTO_AH, PR_ATOMIC|PR_ADDR, | 31 */ 32 33#include "opt_ipdivert.h" 34#include "opt_ipx.h" 35#include "opt_mrouting.h" 36#include "opt_ipsec.h" 37#include "opt_inet6.h" 38#include "opt_pf.h" --- 97 unchanged lines hidden (view full) --- 136{ SOCK_RAW, &inetdomain, IPPROTO_RSVP, PR_ATOMIC|PR_ADDR|PR_LASTHDR, 137 rsvp_input, 0, 0, rip_ctloutput, 138 0, 139 0, 0, 0, 0, 140 &rip_usrreqs 141}, 142#ifdef IPSEC 143{ SOCK_RAW, &inetdomain, IPPROTO_AH, PR_ATOMIC|PR_ADDR, |
144 ah4_input, 0, 0, 0, 145 0, | 144 ah4_input, 0, 0, 0, 145 0, |
146 0, 0, 0, 0, 147 &nousrreqs 148}, 149#ifdef IPSEC_ESP 150{ SOCK_RAW, &inetdomain, IPPROTO_ESP, PR_ATOMIC|PR_ADDR, | 146 0, 0, 0, 0, 147 &nousrreqs 148}, 149#ifdef IPSEC_ESP 150{ SOCK_RAW, &inetdomain, IPPROTO_ESP, PR_ATOMIC|PR_ADDR, |
151 esp4_input, 0, 0, 0, 152 0, | 151 esp4_input, 0, 0, 0, 152 0, |
153 0, 0, 0, 0, 154 &nousrreqs 155}, 156#endif 157{ SOCK_RAW, &inetdomain, IPPROTO_IPCOMP, PR_ATOMIC|PR_ADDR, | 153 0, 0, 0, 0, 154 &nousrreqs 155}, 156#endif 157{ SOCK_RAW, &inetdomain, IPPROTO_IPCOMP, PR_ATOMIC|PR_ADDR, |
158 ipcomp4_input, 0, 0, 0, 159 0, | 158 ipcomp4_input, 0, 0, 0, 159 0, |
160 0, 0, 0, 0, 161 &nousrreqs 162}, 163#endif /* IPSEC */ 164#ifdef FAST_IPSEC 165{ SOCK_RAW, &inetdomain, IPPROTO_AH, PR_ATOMIC|PR_ADDR, | 160 0, 0, 0, 0, 161 &nousrreqs 162}, 163#endif /* IPSEC */ 164#ifdef FAST_IPSEC 165{ SOCK_RAW, &inetdomain, IPPROTO_AH, PR_ATOMIC|PR_ADDR, |
166 ah4_input, 0, ah4_ctlinput, 0, 167 0, | 166 ah4_input, 0, ah4_ctlinput, 0, 167 0, |
168 0, 0, 0, 0, 169 &nousrreqs 170}, 171{ SOCK_RAW, &inetdomain, IPPROTO_ESP, PR_ATOMIC|PR_ADDR, | 168 0, 0, 0, 0, 169 &nousrreqs 170}, 171{ SOCK_RAW, &inetdomain, IPPROTO_ESP, PR_ATOMIC|PR_ADDR, |
172 esp4_input, 0, esp4_ctlinput, 0, 173 0, | 172 esp4_input, 0, esp4_ctlinput, 0, 173 0, |
174 0, 0, 0, 0, 175 &nousrreqs 176}, 177{ SOCK_RAW, &inetdomain, IPPROTO_IPCOMP, PR_ATOMIC|PR_ADDR, | 174 0, 0, 0, 0, 175 &nousrreqs 176}, 177{ SOCK_RAW, &inetdomain, IPPROTO_IPCOMP, PR_ATOMIC|PR_ADDR, |
178 ipcomp4_input, 0, 0, 0, 179 0, | 178 ipcomp4_input, 0, 0, 0, 179 0, |
180 0, 0, 0, 0, 181 &nousrreqs 182}, 183#endif /* FAST_IPSEC */ 184{ SOCK_RAW, &inetdomain, IPPROTO_IPV4, PR_ATOMIC|PR_ADDR|PR_LASTHDR, | 180 0, 0, 0, 0, 181 &nousrreqs 182}, 183#endif /* FAST_IPSEC */ 184{ SOCK_RAW, &inetdomain, IPPROTO_IPV4, PR_ATOMIC|PR_ADDR|PR_LASTHDR, |
185 encap4_input, 0, 0, rip_ctloutput, | 185 encap4_input, 0, 0, rip_ctloutput, |
186 0, 187 encap_init, 0, 0, 0, 188 &rip_usrreqs 189}, 190{ SOCK_RAW, &inetdomain, IPPROTO_MOBILE, PR_ATOMIC|PR_ADDR|PR_LASTHDR, 191 encap4_input, 0, 0, rip_ctloutput, 192 0, 193 encap_init, 0, 0, 0, 194 &rip_usrreqs 195}, 196{ SOCK_RAW, &inetdomain, IPPROTO_GRE, PR_ATOMIC|PR_ADDR|PR_LASTHDR, 197 encap4_input, 0, 0, rip_ctloutput, 198 0, 199 encap_init, 0, 0, 0, 200 &rip_usrreqs 201}, 202# ifdef INET6 203{ SOCK_RAW, &inetdomain, IPPROTO_IPV6, PR_ATOMIC|PR_ADDR|PR_LASTHDR, | 186 0, 187 encap_init, 0, 0, 0, 188 &rip_usrreqs 189}, 190{ SOCK_RAW, &inetdomain, IPPROTO_MOBILE, PR_ATOMIC|PR_ADDR|PR_LASTHDR, 191 encap4_input, 0, 0, rip_ctloutput, 192 0, 193 encap_init, 0, 0, 0, 194 &rip_usrreqs 195}, 196{ SOCK_RAW, &inetdomain, IPPROTO_GRE, PR_ATOMIC|PR_ADDR|PR_LASTHDR, 197 encap4_input, 0, 0, rip_ctloutput, 198 0, 199 encap_init, 0, 0, 0, 200 &rip_usrreqs 201}, 202# ifdef INET6 203{ SOCK_RAW, &inetdomain, IPPROTO_IPV6, PR_ATOMIC|PR_ADDR|PR_LASTHDR, |
204 encap4_input, 0, 0, rip_ctloutput, | 204 encap4_input, 0, 0, rip_ctloutput, |
205 0, 206 encap_init, 0, 0, 0, 207 &rip_usrreqs 208}, 209#endif 210#ifdef IPDIVERT 211{ SOCK_RAW, &inetdomain, IPPROTO_DIVERT, PR_ATOMIC|PR_ADDR, | 205 0, 206 encap_init, 0, 0, 0, 207 &rip_usrreqs 208}, 209#endif 210#ifdef IPDIVERT 211{ SOCK_RAW, &inetdomain, IPPROTO_DIVERT, PR_ATOMIC|PR_ADDR, |
212 div_input, 0, div_ctlinput, ip_ctloutput, | 212 div_input, 0, div_ctlinput, ip_ctloutput, |
213 0, 214 div_init, 0, 0, 0, 215 &div_usrreqs, 216}, 217#endif 218#ifdef IPXIP 219{ SOCK_RAW, &inetdomain, IPPROTO_IDP, PR_ATOMIC|PR_ADDR|PR_LASTHDR, 220 ipxip_input, 0, ipxip_ctlinput, 0, --- 25 unchanged lines hidden (view full) --- 246 rip_init, 0, 0, 0, 247 &rip_usrreqs 248}, 249}; 250 251extern int in_inithead(void **, int); 252 253struct domain inetdomain = | 213 0, 214 div_init, 0, 0, 0, 215 &div_usrreqs, 216}, 217#endif 218#ifdef IPXIP 219{ SOCK_RAW, &inetdomain, IPPROTO_IDP, PR_ATOMIC|PR_ADDR|PR_LASTHDR, 220 ipxip_input, 0, ipxip_ctlinput, 0, --- 25 unchanged lines hidden (view full) --- 246 rip_init, 0, 0, 0, 247 &rip_usrreqs 248}, 249}; 250 251extern int in_inithead(void **, int); 252 253struct domain inetdomain = |
254 { AF_INET, "internet", 0, 0, 0, | 254 { AF_INET, "internet", 0, 0, 0, |
255 inetsw, 256 &inetsw[sizeof(inetsw)/sizeof(inetsw[0])], 0, 257 in_inithead, 32, sizeof(struct sockaddr_in) 258 }; 259 260DOMAIN_SET(inet); 261 262SYSCTL_NODE(_net, PF_INET, inet, CTLFLAG_RW, 0, --- 26 unchanged lines hidden --- | 255 inetsw, 256 &inetsw[sizeof(inetsw)/sizeof(inetsw[0])], 0, 257 in_inithead, 32, sizeof(struct sockaddr_in) 258 }; 259 260DOMAIN_SET(inet); 261 262SYSCTL_NODE(_net, PF_INET, inet, CTLFLAG_RW, 0, --- 26 unchanged lines hidden --- |