diff options
author | ae <ae@FreeBSD.org> | 2015-06-06 13:26:13 +0000 |
---|---|---|
committer | ae <ae@FreeBSD.org> | 2015-06-06 13:26:13 +0000 |
commit | f1be259e6af9ac775f04f085d8c66353f768d5b4 (patch) | |
tree | 31e552507a67237f877155076898df6b54d81805 /sys/net | |
parent | 920800a21fab4e6f4bbb3159edfbd5a9bca22370 (diff) | |
download | FreeBSD-src-f1be259e6af9ac775f04f085d8c66353f768d5b4.zip FreeBSD-src-f1be259e6af9ac775f04f085d8c66353f768d5b4.tar.gz |
MFC r276148:
Remove in_gif.h and in6_gif.h files. They only contain function
declarations used by gif(4). Instead declare these functions in C files.
Also make some variables static.
MFC r276215:
Extern declarations in C files loses compile-time checking that
the functions' calls match their definitions. Move them to header files.
Diffstat (limited to 'sys/net')
-rw-r--r-- | sys/net/if_gif.c | 2 | ||||
-rw-r--r-- | sys/net/if_gif.h | 10 | ||||
-rw-r--r-- | sys/net/if_gre.c | 10 | ||||
-rw-r--r-- | sys/net/if_gre.h | 9 |
4 files changed, 19 insertions, 12 deletions
diff --git a/sys/net/if_gif.c b/sys/net/if_gif.c index 6d7145b..919825e 100644 --- a/sys/net/if_gif.c +++ b/sys/net/if_gif.c @@ -72,7 +72,6 @@ __FBSDID("$FreeBSD$"); #include <netinet/ip_ecn.h> #ifdef INET #include <netinet/in_var.h> -#include <netinet/in_gif.h> #include <netinet/ip_var.h> #endif /* INET */ @@ -85,7 +84,6 @@ __FBSDID("$FreeBSD$"); #include <netinet6/ip6_ecn.h> #include <netinet6/ip6_var.h> #include <netinet6/scope6_var.h> -#include <netinet6/in6_gif.h> #include <netinet6/ip6protosw.h> #endif /* INET6 */ diff --git a/sys/net/if_gif.h b/sys/net/if_gif.h index eebdf4c..ed143e8 100644 --- a/sys/net/if_gif.h +++ b/sys/net/if_gif.h @@ -111,6 +111,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 d7ba610..9b31356 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 3a48efe..806b0cb 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 |