Deleted Added
full compact
in6_proto.c (264213) in6_proto.c (269699)
1/*-
2 * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
3 * 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

--- 47 unchanged lines hidden (view full) ---

56 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
57 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
58 * SUCH DAMAGE.
59 *
60 * @(#)in_proto.c 8.1 (Berkeley) 6/10/93
61 */
62
63#include <sys/cdefs.h>
1/*-
2 * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
3 * 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

--- 47 unchanged lines hidden (view full) ---

56 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
57 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
58 * SUCH DAMAGE.
59 *
60 * @(#)in_proto.c 8.1 (Berkeley) 6/10/93
61 */
62
63#include <sys/cdefs.h>
64__FBSDID("$FreeBSD: head/sys/netinet6/in6_proto.c 264213 2014-04-07 01:55:53Z kevlo $");
64__FBSDID("$FreeBSD: head/sys/netinet6/in6_proto.c 269699 2014-08-08 01:57:15Z kevlo $");
65
66#include "opt_inet.h"
67#include "opt_inet6.h"
68#include "opt_ipsec.h"
69#include "opt_ipstealth.h"
70#include "opt_sctp.h"
71#include "opt_mpath.h"
72#include "opt_route.h"

--- 68 unchanged lines hidden (view full) ---

141/* Spacer for loadable protocols. */
142#define IP6PROTOSPACER \
143{ \
144 .pr_domain = &inet6domain, \
145 .pr_protocol = PROTO_SPACER, \
146 .pr_usrreqs = &nousrreqs \
147}
148
65
66#include "opt_inet.h"
67#include "opt_inet6.h"
68#include "opt_ipsec.h"
69#include "opt_ipstealth.h"
70#include "opt_sctp.h"
71#include "opt_mpath.h"
72#include "opt_route.h"

--- 68 unchanged lines hidden (view full) ---

141/* Spacer for loadable protocols. */
142#define IP6PROTOSPACER \
143{ \
144 .pr_domain = &inet6domain, \
145 .pr_protocol = PROTO_SPACER, \
146 .pr_usrreqs = &nousrreqs \
147}
148
149struct ip6protosw inet6sw[] = {
149struct protosw inet6sw[] = {
150{
151 .pr_type = 0,
152 .pr_domain = &inet6domain,
153 .pr_protocol = IPPROTO_IPV6,
154 .pr_init = ip6_init,
155#ifdef VIMAGE
156 .pr_destroy = ip6_destroy,
157#endif

--- 70 unchanged lines hidden (view full) ---

228 .pr_usrreqs = &udp6_usrreqs,
229},
230{
231 .pr_type = SOCK_RAW,
232 .pr_domain = &inet6domain,
233 .pr_protocol = IPPROTO_RAW,
234 .pr_flags = PR_ATOMIC|PR_ADDR,
235 .pr_input = rip6_input,
150{
151 .pr_type = 0,
152 .pr_domain = &inet6domain,
153 .pr_protocol = IPPROTO_IPV6,
154 .pr_init = ip6_init,
155#ifdef VIMAGE
156 .pr_destroy = ip6_destroy,
157#endif

--- 70 unchanged lines hidden (view full) ---

228 .pr_usrreqs = &udp6_usrreqs,
229},
230{
231 .pr_type = SOCK_RAW,
232 .pr_domain = &inet6domain,
233 .pr_protocol = IPPROTO_RAW,
234 .pr_flags = PR_ATOMIC|PR_ADDR,
235 .pr_input = rip6_input,
236 .pr_output = rip6_output,
236 .pr_output = (pr_output_t *)rip6_output,
237 .pr_ctlinput = rip6_ctlinput,
238 .pr_ctloutput = rip6_ctloutput,
239#ifndef INET /* Do not call initialization twice. */
240 .pr_init = rip_init,
241#endif
242 .pr_usrreqs = &rip6_usrreqs
243},
244{
245 .pr_type = SOCK_RAW,
246 .pr_domain = &inet6domain,
247 .pr_protocol = IPPROTO_ICMPV6,
248 .pr_flags = PR_ATOMIC|PR_ADDR|PR_LASTHDR,
249 .pr_input = icmp6_input,
237 .pr_ctlinput = rip6_ctlinput,
238 .pr_ctloutput = rip6_ctloutput,
239#ifndef INET /* Do not call initialization twice. */
240 .pr_init = rip_init,
241#endif
242 .pr_usrreqs = &rip6_usrreqs
243},
244{
245 .pr_type = SOCK_RAW,
246 .pr_domain = &inet6domain,
247 .pr_protocol = IPPROTO_ICMPV6,
248 .pr_flags = PR_ATOMIC|PR_ADDR|PR_LASTHDR,
249 .pr_input = icmp6_input,
250 .pr_output = rip6_output,
250 .pr_output = (pr_output_t *)rip6_output,
251 .pr_ctlinput = rip6_ctlinput,
252 .pr_ctloutput = rip6_ctloutput,
253 .pr_fasttimo = icmp6_fasttimo,
254 .pr_slowtimo = icmp6_slowtimo,
255 .pr_usrreqs = &rip6_usrreqs
256},
257{
258 .pr_type = SOCK_RAW,

--- 48 unchanged lines hidden (view full) ---

307#endif /* IPSEC */
308#ifdef INET
309{
310 .pr_type = SOCK_RAW,
311 .pr_domain = &inet6domain,
312 .pr_protocol = IPPROTO_IPV4,
313 .pr_flags = PR_ATOMIC|PR_ADDR|PR_LASTHDR,
314 .pr_input = encap6_input,
251 .pr_ctlinput = rip6_ctlinput,
252 .pr_ctloutput = rip6_ctloutput,
253 .pr_fasttimo = icmp6_fasttimo,
254 .pr_slowtimo = icmp6_slowtimo,
255 .pr_usrreqs = &rip6_usrreqs
256},
257{
258 .pr_type = SOCK_RAW,

--- 48 unchanged lines hidden (view full) ---

307#endif /* IPSEC */
308#ifdef INET
309{
310 .pr_type = SOCK_RAW,
311 .pr_domain = &inet6domain,
312 .pr_protocol = IPPROTO_IPV4,
313 .pr_flags = PR_ATOMIC|PR_ADDR|PR_LASTHDR,
314 .pr_input = encap6_input,
315 .pr_output = rip6_output,
315 .pr_output = (pr_output_t *)rip6_output,
316 .pr_ctloutput = rip6_ctloutput,
317 .pr_init = encap_init,
318 .pr_usrreqs = &rip6_usrreqs
319},
320#endif /* INET */
321{
322 .pr_type = SOCK_RAW,
323 .pr_domain = &inet6domain,
324 .pr_protocol = IPPROTO_IPV6,
325 .pr_flags = PR_ATOMIC|PR_ADDR|PR_LASTHDR,
326 .pr_input = encap6_input,
316 .pr_ctloutput = rip6_ctloutput,
317 .pr_init = encap_init,
318 .pr_usrreqs = &rip6_usrreqs
319},
320#endif /* INET */
321{
322 .pr_type = SOCK_RAW,
323 .pr_domain = &inet6domain,
324 .pr_protocol = IPPROTO_IPV6,
325 .pr_flags = PR_ATOMIC|PR_ADDR|PR_LASTHDR,
326 .pr_input = encap6_input,
327 .pr_output = rip6_output,
327 .pr_output = (pr_output_t *)rip6_output,
328 .pr_ctloutput = rip6_ctloutput,
329 .pr_init = encap_init,
330 .pr_usrreqs = &rip6_usrreqs
331},
332{
333 .pr_type = SOCK_RAW,
334 .pr_domain = &inet6domain,
335 .pr_protocol = IPPROTO_PIM,
336 .pr_flags = PR_ATOMIC|PR_ADDR|PR_LASTHDR,
337 .pr_input = encap6_input,
328 .pr_ctloutput = rip6_ctloutput,
329 .pr_init = encap_init,
330 .pr_usrreqs = &rip6_usrreqs
331},
332{
333 .pr_type = SOCK_RAW,
334 .pr_domain = &inet6domain,
335 .pr_protocol = IPPROTO_PIM,
336 .pr_flags = PR_ATOMIC|PR_ADDR|PR_LASTHDR,
337 .pr_input = encap6_input,
338 .pr_output = rip6_output,
338 .pr_output = (pr_output_t *)rip6_output,
339 .pr_ctloutput = rip6_ctloutput,
340 .pr_usrreqs = &rip6_usrreqs
341},
342/* Spacer n-times for loadable protocols. */
343IP6PROTOSPACER,
344IP6PROTOSPACER,
345IP6PROTOSPACER,
346IP6PROTOSPACER,
347IP6PROTOSPACER,
348IP6PROTOSPACER,
349IP6PROTOSPACER,
350IP6PROTOSPACER,
351/* raw wildcard */
352{
353 .pr_type = SOCK_RAW,
354 .pr_domain = &inet6domain,
355 .pr_flags = PR_ATOMIC|PR_ADDR,
356 .pr_input = rip6_input,
339 .pr_ctloutput = rip6_ctloutput,
340 .pr_usrreqs = &rip6_usrreqs
341},
342/* Spacer n-times for loadable protocols. */
343IP6PROTOSPACER,
344IP6PROTOSPACER,
345IP6PROTOSPACER,
346IP6PROTOSPACER,
347IP6PROTOSPACER,
348IP6PROTOSPACER,
349IP6PROTOSPACER,
350IP6PROTOSPACER,
351/* raw wildcard */
352{
353 .pr_type = SOCK_RAW,
354 .pr_domain = &inet6domain,
355 .pr_flags = PR_ATOMIC|PR_ADDR,
356 .pr_input = rip6_input,
357 .pr_output = rip6_output,
357 .pr_output = (pr_output_t *)rip6_output,
358 .pr_ctloutput = rip6_ctloutput,
359 .pr_usrreqs = &rip6_usrreqs
360},
361};
362
363extern int in6_inithead(void **, int);
364#ifdef VIMAGE
365extern int in6_detachhead(void **, int);

--- 256 unchanged lines hidden ---
358 .pr_ctloutput = rip6_ctloutput,
359 .pr_usrreqs = &rip6_usrreqs
360},
361};
362
363extern int in6_inithead(void **, int);
364#ifdef VIMAGE
365extern int in6_detachhead(void **, int);

--- 256 unchanged lines hidden ---