1/* $NetBSD: if_gre.c,v 1.42 2002/08/14 00:23:27 itojun Exp $ */
2/* $FreeBSD: head/sys/net/if_gre.c 103394 2002-09-16 10:10:18Z bde $ */
3
4/*
5 * Copyright (c) 1998 The NetBSD Foundation, Inc.
6 * All rights reserved.
7 *
8 * This code is derived from software contributed to The NetBSD Foundation
9 * by Heiko W.Rupp <hwr@pilhuhn.de>
10 *
--- 31 unchanged lines hidden (view full) ---
42 * See RFC 1701 and 1702 for more details.
43 * If_gre is compatible with Cisco GRE tunnels, so you can
44 * have a NetBSD box as the other end of a tunnel interface of a Cisco
45 * router. See gre(4) for more details.
46 * Also supported: IP in IP encaps (proto 55) as of RFC 2004
47 */
48
49#include <sys/cdefs.h>
50__RCSID("@(#) $FreeBSD: head/sys/net/if_gre.c 103394 2002-09-16 10:10:18Z bde $");
51
52#include "opt_atalk.h"
53#include "opt_inet.h"
54#include "opt_ns.h"
55#include "bpf.h"
56
57#include <sys/param.h>
58#include <sys/kernel.h>
59#include <sys/malloc.h>
60#include <sys/mbuf.h>
61#include <sys/protosw.h>
62#include <sys/socket.h>
63#include <sys/sockio.h>
64#include <sys/sysctl.h>
65#include <sys/systm.h>
66
67#include <net/ethernet.h>
68#include <net/if.h>
69#include <net/if_types.h>
70#include <net/route.h>
71
72#ifdef INET
73#include <netinet/in.h>
74#include <netinet/in_systm.h>
75#include <netinet/in_var.h>
76#include <netinet/ip.h>
77#include <netinet/ip_gre.h>
78#include <netinet/ip_var.h>
79#include <netinet/ip_encap.h>
80#else
81#error "Huh? if_gre without inet?"
82#endif
83
84#if NBPF > 0
85#include <net/bpf.h>
86#endif
87
88#include <net/net_osdep.h>
89#include <net/if_gre.h>
90
91/*
92 * It is not easy to calculate the right value for a GRE MTU.
--- 676 unchanged lines hidden ---
2/* $FreeBSD: head/sys/net/if_gre.c 103394 2002-09-16 10:10:18Z bde $ */
3
4/*
5 * Copyright (c) 1998 The NetBSD Foundation, Inc.
6 * All rights reserved.
7 *
8 * This code is derived from software contributed to The NetBSD Foundation
9 * by Heiko W.Rupp <hwr@pilhuhn.de>
10 *
--- 31 unchanged lines hidden (view full) ---
42 * See RFC 1701 and 1702 for more details.
43 * If_gre is compatible with Cisco GRE tunnels, so you can
44 * have a NetBSD box as the other end of a tunnel interface of a Cisco
45 * router. See gre(4) for more details.
46 * Also supported: IP in IP encaps (proto 55) as of RFC 2004
47 */
48
49#include <sys/cdefs.h>
50__RCSID("@(#) $FreeBSD: head/sys/net/if_gre.c 103394 2002-09-16 10:10:18Z bde $");
51
52#include "opt_atalk.h"
53#include "opt_inet.h"
54#include "opt_ns.h"
55#include "bpf.h"
56
57#include <sys/param.h>
58#include <sys/kernel.h>
59#include <sys/malloc.h>
60#include <sys/mbuf.h>
61#include <sys/protosw.h>
62#include <sys/socket.h>
63#include <sys/sockio.h>
64#include <sys/sysctl.h>
65#include <sys/systm.h>
66
67#include <net/ethernet.h>
68#include <net/if.h>
69#include <net/if_types.h>
70#include <net/route.h>
71
72#ifdef INET
73#include <netinet/in.h>
74#include <netinet/in_systm.h>
75#include <netinet/in_var.h>
76#include <netinet/ip.h>
77#include <netinet/ip_gre.h>
78#include <netinet/ip_var.h>
79#include <netinet/ip_encap.h>
80#else
81#error "Huh? if_gre without inet?"
82#endif
83
84#if NBPF > 0
85#include <net/bpf.h>
86#endif
87
88#include <net/net_osdep.h>
89#include <net/if_gre.h>
90
91/*
92 * It is not easy to calculate the right value for a GRE MTU.
--- 676 unchanged lines hidden ---