Deleted Added
full compact
in_proto.c (57178) in_proto.c (62587)
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

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

26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
32 *
33 * @(#)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

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

26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
32 *
33 * @(#)in_proto.c 8.2 (Berkeley) 2/9/95
34 * $FreeBSD: head/sys/netinet/in_proto.c 57178 2000-02-13 03:32:07Z peter $
34 * $FreeBSD: head/sys/netinet/in_proto.c 62587 2000-07-04 16:35:15Z itojun $
35 */
36
37#include "opt_ipdivert.h"
38#include "opt_ipx.h"
39#include "opt_ipsec.h"
40#include "opt_inet6.h"
41
42#include <sys/param.h>

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

56#include <netinet/ip_var.h>
57#include <netinet/ip_icmp.h>
58#include <netinet/igmp_var.h>
59#include <netinet/tcp.h>
60#include <netinet/tcp_timer.h>
61#include <netinet/tcp_var.h>
62#include <netinet/udp.h>
63#include <netinet/udp_var.h>
35 */
36
37#include "opt_ipdivert.h"
38#include "opt_ipx.h"
39#include "opt_ipsec.h"
40#include "opt_inet6.h"
41
42#include <sys/param.h>

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

56#include <netinet/ip_var.h>
57#include <netinet/ip_icmp.h>
58#include <netinet/igmp_var.h>
59#include <netinet/tcp.h>
60#include <netinet/tcp_timer.h>
61#include <netinet/tcp_var.h>
62#include <netinet/udp.h>
63#include <netinet/udp_var.h>
64#include <netinet/ip_encap.h>
64
65#include <netinet/ipprotosw.h>
66
67/*
68 * TCP/IP protocol family: IP, ICMP, UDP, TCP.
69 */
70
71#ifdef IPSEC

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

76#endif
77#endif /* IPSEC */
78
79#include "gif.h"
80#if NGIF > 0
81#include <netinet/in_gif.h>
82#endif
83
65
66#include <netinet/ipprotosw.h>
67
68/*
69 * TCP/IP protocol family: IP, ICMP, UDP, TCP.
70 */
71
72#ifdef IPSEC

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

77#endif
78#endif /* IPSEC */
79
80#include "gif.h"
81#if NGIF > 0
82#include <netinet/in_gif.h>
83#endif
84
85#include "stf.h"
86#if NSTF > 0
87#include <net/if_stf.h>
88#endif
89
84#ifdef IPXIP
85#include <netipx/ipx_ip.h>
86#endif
87
88#ifdef NSIP
89#include <netns/ns.h>
90#include <netns/ns_if.h>
91#endif

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

148{ SOCK_RAW, &inetdomain, IPPROTO_ESP, PR_ATOMIC|PR_ADDR,
149 esp4_input, 0, 0, 0,
150 0,
151 0, 0, 0, 0,
152 &nousrreqs
153},
154#endif
155#endif /* IPSEC */
90#ifdef IPXIP
91#include <netipx/ipx_ip.h>
92#endif
93
94#ifdef NSIP
95#include <netns/ns.h>
96#include <netns/ns_if.h>
97#endif

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

154{ SOCK_RAW, &inetdomain, IPPROTO_ESP, PR_ATOMIC|PR_ADDR,
155 esp4_input, 0, 0, 0,
156 0,
157 0, 0, 0, 0,
158 &nousrreqs
159},
160#endif
161#endif /* IPSEC */
156#if NGIF > 0
157{ SOCK_RAW, &inetdomain, IPPROTO_IPV4, PR_ATOMIC|PR_ADDR,
162{ SOCK_RAW, &inetdomain, IPPROTO_IPV4, PR_ATOMIC|PR_ADDR,
158 in_gif_input, 0, 0, 0,
163 encap4_input, 0, 0, rip_ctloutput,
159 0,
164 0,
160 0, 0, 0, 0,
165 encap_init, 0, 0, 0,
161 &nousrreqs
162},
163# ifdef INET6
164{ SOCK_RAW, &inetdomain, IPPROTO_IPV6, PR_ATOMIC|PR_ADDR,
166 &nousrreqs
167},
168# ifdef INET6
169{ SOCK_RAW, &inetdomain, IPPROTO_IPV6, PR_ATOMIC|PR_ADDR,
165 in_gif_input, 0, 0, 0,
170 encap4_input, 0, 0, rip_ctloutput,
166 0,
167 0, 0, 0, 0,
168 &nousrreqs
169},
170#endif
171 0,
172 0, 0, 0, 0,
173 &nousrreqs
174},
175#endif
171#else /*NGIF*/
172{ SOCK_RAW, &inetdomain, IPPROTO_IPIP, PR_ATOMIC|PR_ADDR,
173 ipip_input, 0, 0, rip_ctloutput,
174 0,
175 0, 0, 0, 0,
176 &rip_usrreqs
177},
178#endif /*NGIF*/
179#ifdef IPDIVERT
180{ SOCK_RAW, &inetdomain, IPPROTO_DIVERT, PR_ATOMIC|PR_ADDR,
181 div_input, 0, 0, ip_ctloutput,
182 0,
183 div_init, 0, 0, 0,
184 &div_usrreqs,
185},
186#endif

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

204{ SOCK_RAW, &inetdomain, 0, PR_ATOMIC|PR_ADDR,
205 rip_input, 0, 0, rip_ctloutput,
206 0,
207 rip_init, 0, 0, 0,
208 &rip_usrreqs
209},
210};
211
176#ifdef IPDIVERT
177{ SOCK_RAW, &inetdomain, IPPROTO_DIVERT, PR_ATOMIC|PR_ADDR,
178 div_input, 0, 0, ip_ctloutput,
179 0,
180 div_init, 0, 0, 0,
181 &div_usrreqs,
182},
183#endif

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

201{ SOCK_RAW, &inetdomain, 0, PR_ATOMIC|PR_ADDR,
202 rip_input, 0, 0, rip_ctloutput,
203 0,
204 rip_init, 0, 0, 0,
205 &rip_usrreqs
206},
207};
208
209#if NGIF > 0
210struct ipprotosw in_gif_protosw =
211{ SOCK_RAW, &inetdomain, 0/*IPPROTO_IPV[46]*/, PR_ATOMIC|PR_ADDR,
212 in_gif_input, rip_output, 0, rip_ctloutput,
213 0,
214 0, 0, 0, 0,
215 &rip_usrreqs
216};
217#endif /*NGIF*/
218
219#if NSTF > 0
220struct ipprotosw in_stf_protosw =
221{ SOCK_RAW, &inetdomain, IPPROTO_IPV6, PR_ATOMIC|PR_ADDR,
222 in_stf_input, rip_output, 0, rip_ctloutput,
223 0,
224 0, 0, 0, 0,
225 &rip_usrreqs
226};
227#endif /*NSTF*/
228
212extern int in_inithead __P((void **, int));
213
214struct domain inetdomain =
215 { AF_INET, "internet", 0, 0, 0,
216 (struct protosw *)inetsw,
217 (struct protosw *)&inetsw[sizeof(inetsw)/sizeof(inetsw[0])], 0,
218 in_inithead, 32, sizeof(struct sockaddr_in)
219 };

--- 19 unchanged lines hidden ---
229extern int in_inithead __P((void **, int));
230
231struct domain inetdomain =
232 { AF_INET, "internet", 0, 0, 0,
233 (struct protosw *)inetsw,
234 (struct protosw *)&inetsw[sizeof(inetsw)/sizeof(inetsw[0])], 0,
235 in_inithead, 32, sizeof(struct sockaddr_in)
236 };

--- 19 unchanged lines hidden ---