if_gre.c (122699) | if_gre.c (123338) |
---|---|
1/* $NetBSD: if_gre.c,v 1.42 2002/08/14 00:23:27 itojun Exp $ */ | 1/* $NetBSD: if_gre.c,v 1.42 2002/08/14 00:23:27 itojun Exp $ */ |
2/* $FreeBSD: head/sys/net/if_gre.c 122699 2003-11-14 20:58:00Z bms $ */ | 2/* $FreeBSD: head/sys/net/if_gre.c 123338 2003-12-09 06:39:25Z bms $ */ |
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 * --- 111 unchanged lines hidden (view full) --- 122 (pr_input_t*)gre_mobile_input, (pr_output_t*)rip_output, rip_ctlinput, rip_ctloutput, 123 0, 124 0, 0, 0, 0, 125 &rip_usrreqs 126}; 127#endif 128 129SYSCTL_DECL(_net_link); | 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 * --- 111 unchanged lines hidden (view full) --- 122 (pr_input_t*)gre_mobile_input, (pr_output_t*)rip_output, rip_ctlinput, rip_ctloutput, 123 0, 124 0, 0, 0, 0, 125 &rip_usrreqs 126}; 127#endif 128 129SYSCTL_DECL(_net_link); |
130SYSCTL_NODE(_net_link, IFT_OTHER, gre, CTLFLAG_RW, 0, | 130SYSCTL_NODE(_net_link, IFT_TUNNEL, gre, CTLFLAG_RW, 0, |
131 "Generic Routing Encapsulation"); 132#ifndef MAX_GRE_NEST 133/* 134 * This macro controls the default upper limitation on nesting of gre tunnels. 135 * Since, setting a large value to this macro with a careless configuration 136 * may introduce system crash, we don't allow any nestings by default. 137 * If you need to configure nested gre tunnels, you can define this macro 138 * in your kernel configuration file. However, if you do so, please be --- 22 unchanged lines hidden (view full) --- 161 struct gre_softc *sc; 162 163 sc = malloc(sizeof(struct gre_softc), M_GRE, M_WAITOK); 164 memset(sc, 0, sizeof(struct gre_softc)); 165 166 if_initname(&sc->sc_if, ifc->ifc_name, unit); 167 sc->sc_if.if_softc = sc; 168 sc->sc_if.if_snd.ifq_maxlen = IFQ_MAXLEN; | 131 "Generic Routing Encapsulation"); 132#ifndef MAX_GRE_NEST 133/* 134 * This macro controls the default upper limitation on nesting of gre tunnels. 135 * Since, setting a large value to this macro with a careless configuration 136 * may introduce system crash, we don't allow any nestings by default. 137 * If you need to configure nested gre tunnels, you can define this macro 138 * in your kernel configuration file. However, if you do so, please be --- 22 unchanged lines hidden (view full) --- 161 struct gre_softc *sc; 162 163 sc = malloc(sizeof(struct gre_softc), M_GRE, M_WAITOK); 164 memset(sc, 0, sizeof(struct gre_softc)); 165 166 if_initname(&sc->sc_if, ifc->ifc_name, unit); 167 sc->sc_if.if_softc = sc; 168 sc->sc_if.if_snd.ifq_maxlen = IFQ_MAXLEN; |
169 sc->sc_if.if_type = IFT_OTHER; | 169 sc->sc_if.if_type = IFT_TUNNEL; |
170 sc->sc_if.if_addrlen = 0; 171 sc->sc_if.if_hdrlen = 24; /* IP + GRE */ 172 sc->sc_if.if_mtu = GREMTU; 173 sc->sc_if.if_flags = IFF_POINTOPOINT|IFF_MULTICAST; 174 sc->sc_if.if_output = gre_output; 175 sc->sc_if.if_ioctl = gre_ioctl; 176 sc->g_dst.s_addr = sc->g_src.s_addr = INADDR_ANY; 177 sc->g_proto = IPPROTO_GRE; --- 579 unchanged lines hidden --- | 170 sc->sc_if.if_addrlen = 0; 171 sc->sc_if.if_hdrlen = 24; /* IP + GRE */ 172 sc->sc_if.if_mtu = GREMTU; 173 sc->sc_if.if_flags = IFF_POINTOPOINT|IFF_MULTICAST; 174 sc->sc_if.if_output = gre_output; 175 sc->sc_if.if_ioctl = gre_ioctl; 176 sc->g_dst.s_addr = sc->g_src.s_addr = INADDR_ANY; 177 sc->g_proto = IPPROTO_GRE; --- 579 unchanged lines hidden --- |