Deleted Added
full compact
in6_gif.c (269054) in6_gif.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

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

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 * $KAME: in6_gif.c,v 1.49 2001/05/14 14:02:17 itojun Exp $
30 */
31
32#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

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

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 * $KAME: in6_gif.c,v 1.49 2001/05/14 14:02:17 itojun Exp $
30 */
31
32#include <sys/cdefs.h>
33__FBSDID("$FreeBSD: head/sys/netinet6/in6_gif.c 269054 2014-07-24 10:42:47Z hrs $");
33__FBSDID("$FreeBSD: head/sys/netinet6/in6_gif.c 269699 2014-08-08 01:57:15Z kevlo $");
34
35#include "opt_inet.h"
36#include "opt_inet6.h"
37
38#include <sys/param.h>
39#include <sys/systm.h>
40#include <sys/socket.h>
41#include <sys/sockio.h>

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

60#endif
61#include <netinet/ip_encap.h>
62#ifdef INET6
63#include <netinet/ip6.h>
64#include <netinet6/ip6_var.h>
65#include <netinet6/in6_gif.h>
66#include <netinet6/in6_var.h>
67#endif
34
35#include "opt_inet.h"
36#include "opt_inet6.h"
37
38#include <sys/param.h>
39#include <sys/systm.h>
40#include <sys/socket.h>
41#include <sys/sockio.h>

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

60#endif
61#include <netinet/ip_encap.h>
62#ifdef INET6
63#include <netinet/ip6.h>
64#include <netinet6/ip6_var.h>
65#include <netinet6/in6_gif.h>
66#include <netinet6/in6_var.h>
67#endif
68#include <netinet6/ip6protosw.h>
69#include <netinet/ip_ecn.h>
70#ifdef INET6
71#include <netinet6/ip6_ecn.h>
72#endif
73
74#include <net/if_gif.h>
75
76VNET_DEFINE(int, ip6_gif_hlim) = GIF_HLIM;
77#define V_ip6_gif_hlim VNET(ip6_gif_hlim)
78
79SYSCTL_DECL(_net_inet6_ip6);
80SYSCTL_VNET_INT(_net_inet6_ip6, IPV6CTL_GIF_HLIM, gifhlim, CTLFLAG_RW,
81 &VNET_NAME(ip6_gif_hlim), 0, "");
82
83static int gif_validate6(const struct ip6_hdr *, struct gif_softc *,
84 struct ifnet *);
85
86extern struct domain inet6domain;
68#include <netinet/ip_ecn.h>
69#ifdef INET6
70#include <netinet6/ip6_ecn.h>
71#endif
72
73#include <net/if_gif.h>
74
75VNET_DEFINE(int, ip6_gif_hlim) = GIF_HLIM;
76#define V_ip6_gif_hlim VNET(ip6_gif_hlim)
77
78SYSCTL_DECL(_net_inet6_ip6);
79SYSCTL_VNET_INT(_net_inet6_ip6, IPV6CTL_GIF_HLIM, gifhlim, CTLFLAG_RW,
80 &VNET_NAME(ip6_gif_hlim), 0, "");
81
82static int gif_validate6(const struct ip6_hdr *, struct gif_softc *,
83 struct ifnet *);
84
85extern struct domain inet6domain;
87struct ip6protosw in6_gif_protosw = {
86struct protosw in6_gif_protosw = {
88 .pr_type = SOCK_RAW,
89 .pr_domain = &inet6domain,
90 .pr_protocol = 0, /* IPPROTO_IPV[46] */
91 .pr_flags = PR_ATOMIC|PR_ADDR,
92 .pr_input = in6_gif_input,
87 .pr_type = SOCK_RAW,
88 .pr_domain = &inet6domain,
89 .pr_protocol = 0, /* IPPROTO_IPV[46] */
90 .pr_flags = PR_ATOMIC|PR_ADDR,
91 .pr_input = in6_gif_input,
93 .pr_output = rip6_output,
92 .pr_output = (pr_output_t *)rip6_output,
94 .pr_ctloutput = rip6_ctloutput,
95 .pr_usrreqs = &rip6_usrreqs
96};
97
98int
99in6_gif_output(struct ifnet *ifp,
100 int family, /* family of the packet to be encapsulate */
101 struct mbuf *m)

--- 370 unchanged lines hidden ---
93 .pr_ctloutput = rip6_ctloutput,
94 .pr_usrreqs = &rip6_usrreqs
95};
96
97int
98in6_gif_output(struct ifnet *ifp,
99 int family, /* family of the packet to be encapsulate */
100 struct mbuf *m)

--- 370 unchanged lines hidden ---