diff --git a/sys/net/if_gif.c b/sys/net/if_gif.c index 421d1b34b8d9..0a4139ffa787 100644 --- a/sys/net/if_gif.c +++ b/sys/net/if_gif.c @@ -118,16 +118,6 @@ void (*ng_gif_input_orphan_p)(struct ifnet *ifp, struct mbuf *m, int af); void (*ng_gif_attach_p)(struct ifnet *ifp); void (*ng_gif_detach_p)(struct ifnet *ifp); -#ifdef INET -extern int in_gif_output(struct ifnet *, struct mbuf *, int, uint8_t); -extern int in_gif_encapcheck(const struct mbuf *, int, int, void *); -extern int in_gif_attach(struct gif_softc *); -#endif -#ifdef INET6 -extern int in6_gif_output(struct ifnet *, struct mbuf *, int, uint8_t); -extern int in6_gif_encapcheck(const struct mbuf *, int, int, void *); -extern int in6_gif_attach(struct gif_softc *); -#endif static int gif_set_tunnel(struct ifnet *, struct sockaddr *, struct sockaddr *); static void gif_delete_tunnel(struct ifnet *); diff --git a/sys/net/if_gif.h b/sys/net/if_gif.h index b5ebf15d3c45..b263850ef47c 100644 --- a/sys/net/if_gif.h +++ b/sys/net/if_gif.h @@ -114,6 +114,16 @@ void gif_input(struct mbuf *, struct ifnet *, int, uint8_t); int gif_output(struct ifnet *, struct mbuf *, const struct sockaddr *, struct route *); int gif_encapcheck(const struct mbuf *, int, int, void *); +#ifdef INET +int in_gif_output(struct ifnet *, struct mbuf *, int, uint8_t); +int in_gif_encapcheck(const struct mbuf *, int, int, void *); +int in_gif_attach(struct gif_softc *); +#endif +#ifdef INET6 +int in6_gif_output(struct ifnet *, struct mbuf *, int, uint8_t); +int in6_gif_encapcheck(const struct mbuf *, int, int, void *); +int in6_gif_attach(struct gif_softc *); +#endif #endif /* _KERNEL */ #define GIFGOPTS _IOWR('i', 150, struct ifreq) diff --git a/sys/net/if_gre.c b/sys/net/if_gre.c index 4d00ca2911a5..23e55e21c5c3 100644 --- a/sys/net/if_gre.c +++ b/sys/net/if_gre.c @@ -119,16 +119,6 @@ static int gre_set_tunnel(struct ifnet *, struct sockaddr *, struct sockaddr *); static void gre_delete_tunnel(struct ifnet *); -int gre_input(struct mbuf **, int *, int); -#ifdef INET -extern int in_gre_attach(struct gre_softc *); -extern int in_gre_output(struct mbuf *, int, int); -#endif -#ifdef INET6 -extern int in6_gre_attach(struct gre_softc *); -extern int in6_gre_output(struct mbuf *, int, int); -#endif - SYSCTL_DECL(_net_link); static SYSCTL_NODE(_net_link, IFT_TUNNEL, gre, CTLFLAG_RW, 0, "Generic Routing Encapsulation"); diff --git a/sys/net/if_gre.h b/sys/net/if_gre.h index 3a48efe85e16..806b0cb82964 100644 --- a/sys/net/if_gre.h +++ b/sys/net/if_gre.h @@ -100,6 +100,15 @@ struct gre_softc { #define gre_oip gre_gihdr->gi_ip #define gre_oip6 gre_gi6hdr->gi6_ip6 +int gre_input(struct mbuf **, int *, int); +#ifdef INET +int in_gre_attach(struct gre_softc *); +int in_gre_output(struct mbuf *, int, int); +#endif +#ifdef INET6 +int in6_gre_attach(struct gre_softc *); +int in6_gre_output(struct mbuf *, int, int); +#endif /* * CISCO uses special type for GRE tunnel created as part of WCCP * connection, while in fact those packets are just IPv4 encapsulated diff --git a/sys/netinet/in_gif.c b/sys/netinet/in_gif.c index 261c88acf99b..cd412adc0c95 100644 --- a/sys/netinet/in_gif.c +++ b/sys/netinet/in_gif.c @@ -67,10 +67,6 @@ __FBSDID("$FreeBSD$"); #include -int in_gif_output(struct ifnet *, struct mbuf *, int, uint8_t); -int in_gif_encapcheck(const struct mbuf *, int, int, void *); -int in_gif_attach(struct gif_softc *); - static int gif_validate4(const struct ip *, struct gif_softc *, struct ifnet *); static int in_gif_input(struct mbuf **, int *, int); diff --git a/sys/netinet/ip_gre.c b/sys/netinet/ip_gre.c index 9f2819131168..59423644c73a 100644 --- a/sys/netinet/ip_gre.c +++ b/sys/netinet/ip_gre.c @@ -68,11 +68,6 @@ __FBSDID("$FreeBSD$"); #include extern struct domain inetdomain; -extern int gre_input(struct mbuf **, int *, int); - -int in_gre_attach(struct gre_softc *); -int in_gre_output(struct mbuf *, int, int); - static const struct protosw in_gre_protosw = { .pr_type = SOCK_RAW, .pr_domain = &inetdomain, diff --git a/sys/netinet6/in6_gif.c b/sys/netinet6/in6_gif.c index 855315ed150b..3db4b4f1d584 100644 --- a/sys/netinet6/in6_gif.c +++ b/sys/netinet6/in6_gif.c @@ -81,10 +81,6 @@ SYSCTL_DECL(_net_inet6_ip6); SYSCTL_INT(_net_inet6_ip6, IPV6CTL_GIF_HLIM, gifhlim, CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(ip6_gif_hlim), 0, ""); -int in6_gif_output(struct ifnet *, struct mbuf *, int, uint8_t); -int in6_gif_encapcheck(const struct mbuf *, int, int, void *); -int in6_gif_attach(struct gif_softc *); - static int gif_validate6(const struct ip6_hdr *, struct gif_softc *, struct ifnet *); static int in6_gif_input(struct mbuf **, int *, int); diff --git a/sys/netinet6/ip6_gre.c b/sys/netinet6/ip6_gre.c index 29a07253a0c6..095a1deeb633 100644 --- a/sys/netinet6/ip6_gre.c +++ b/sys/netinet6/ip6_gre.c @@ -62,11 +62,6 @@ __FBSDID("$FreeBSD$"); #include extern struct domain inet6domain; -extern int gre_input(struct mbuf **, int *, int); - -int in6_gre_attach(struct gre_softc *); -int in6_gre_output(struct mbuf *, int, int); - struct protosw in6_gre_protosw = { .pr_type = SOCK_RAW, .pr_domain = &inet6domain,