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/netinet6 | |
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/netinet6')
-rw-r--r-- | sys/netinet6/in6_gif.c | 9 | ||||
-rw-r--r-- | sys/netinet6/in6_gif.h | 44 | ||||
-rw-r--r-- | sys/netinet6/ip6_gre.c | 5 |
3 files changed, 5 insertions, 53 deletions
diff --git a/sys/netinet6/in6_gif.c b/sys/netinet6/in6_gif.c index 002bf53..8db8cba 100644 --- a/sys/netinet6/in6_gif.c +++ b/sys/netinet6/in6_gif.c @@ -64,7 +64,6 @@ __FBSDID("$FreeBSD$"); #ifdef INET6 #include <netinet/ip6.h> #include <netinet6/ip6_var.h> -#include <netinet6/in6_gif.h> #include <netinet6/in6_var.h> #endif #include <netinet6/ip6protosw.h> @@ -75,7 +74,8 @@ __FBSDID("$FreeBSD$"); #include <net/if_gif.h> -VNET_DEFINE(int, ip6_gif_hlim) = GIF_HLIM; +#define GIF_HLIM 30 +static VNET_DEFINE(int, ip6_gif_hlim) = GIF_HLIM; #define V_ip6_gif_hlim VNET(ip6_gif_hlim) SYSCTL_DECL(_net_inet6_ip6); @@ -84,9 +84,10 @@ SYSCTL_VNET_INT(_net_inet6_ip6, IPV6CTL_GIF_HLIM, gifhlim, CTLFLAG_RW, static int gif_validate6(const struct ip6_hdr *, struct gif_softc *, struct ifnet *); +static int in6_gif_input(struct mbuf **, int *, int); extern struct domain inet6domain; -struct ip6protosw in6_gif_protosw = { +static struct ip6protosw in6_gif_protosw = { .pr_type = SOCK_RAW, .pr_domain = &inet6domain, .pr_protocol = 0, /* IPPROTO_IPV[46] */ @@ -145,7 +146,7 @@ in6_gif_output(struct ifnet *ifp, struct mbuf *m, int proto, uint8_t ecn) return (ip6_output(m, 0, NULL, IPV6_MINMTU, 0, NULL, NULL)); } -int +static int in6_gif_input(struct mbuf **mp, int *offp, int proto) { struct mbuf *m = *mp; diff --git a/sys/netinet6/in6_gif.h b/sys/netinet6/in6_gif.h deleted file mode 100644 index 1246171..0000000 --- a/sys/netinet6/in6_gif.h +++ /dev/null @@ -1,44 +0,0 @@ -/*- - * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the project nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * $KAME: in6_gif.h,v 1.5 2000/04/14 08:36:03 itojun Exp $ - * $FreeBSD$ - */ - -#ifndef _NETINET6_IN6_GIF_H_ -#define _NETINET6_IN6_GIF_H_ - -#define GIF_HLIM 30 - -struct gif_softc; -int in6_gif_input(struct mbuf **, int *, int); -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 /* _NETINET6_IN6_GIF_H_ */ diff --git a/sys/netinet6/ip6_gre.c b/sys/netinet6/ip6_gre.c index 002d388..4646892 100644 --- a/sys/netinet6/ip6_gre.c +++ b/sys/netinet6/ip6_gre.c @@ -63,11 +63,6 @@ __FBSDID("$FreeBSD$"); #include <net/if_gre.h> 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 ip6protosw in6_gre_protosw = { .pr_type = SOCK_RAW, .pr_domain = &inet6domain, |