From owner-svn-src-stable@FreeBSD.ORG Sat Jun 6 13:26:16 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9FD737B3; Sat, 6 Jun 2015 13:26:16 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 80A6D1D63; Sat, 6 Jun 2015 13:26:16 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t56DQGhM041489; Sat, 6 Jun 2015 13:26:16 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t56DQEei041476; Sat, 6 Jun 2015 13:26:14 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201506061326.t56DQEei041476@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Sat, 6 Jun 2015 13:26:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r284072 - in stable/10: . sys/net sys/netinet sys/netinet6 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Jun 2015 13:26:16 -0000 Author: ae Date: Sat Jun 6 13:26:13 2015 New Revision: 284072 URL: https://svnweb.freebsd.org/changeset/base/284072 Log: 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. Deleted: stable/10/sys/netinet/in_gif.h stable/10/sys/netinet6/in6_gif.h Modified: stable/10/ObsoleteFiles.inc stable/10/sys/net/if_gif.c stable/10/sys/net/if_gif.h stable/10/sys/net/if_gre.c stable/10/sys/net/if_gre.h stable/10/sys/netinet/in_gif.c stable/10/sys/netinet/ip_gre.c stable/10/sys/netinet6/in6_gif.c stable/10/sys/netinet6/ip6_gre.c Directory Properties: stable/10/ (props changed) Modified: stable/10/ObsoleteFiles.inc ============================================================================== --- stable/10/ObsoleteFiles.inc Sat Jun 6 13:20:02 2015 (r284071) +++ stable/10/ObsoleteFiles.inc Sat Jun 6 13:26:13 2015 (r284072) @@ -40,6 +40,9 @@ # 20150506 OLD_FILES+=usr/share/man/man9/NDHASGIANT.9.gz +# 20141223: remove in6_gif.h and in_gif.h +OLD_FILES+=usr/include/netinet/in_gif.h +OLD_FILES+=usr/include/netinet6/in6_gif.h # 20141205: convert sbin/mdconfig/tests to ATF format tests OLD_FILES+=usr/tests/sbin/mdconfig/legacy_test OLD_FILES+=usr/tests/sbin/mdconfig/mdconfig.test Modified: stable/10/sys/net/if_gif.c ============================================================================== --- stable/10/sys/net/if_gif.c Sat Jun 6 13:20:02 2015 (r284071) +++ stable/10/sys/net/if_gif.c Sat Jun 6 13:26:13 2015 (r284072) @@ -72,7 +72,6 @@ __FBSDID("$FreeBSD$"); #include #ifdef INET #include -#include #include #endif /* INET */ @@ -85,7 +84,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #endif /* INET6 */ Modified: stable/10/sys/net/if_gif.h ============================================================================== --- stable/10/sys/net/if_gif.h Sat Jun 6 13:20:02 2015 (r284071) +++ stable/10/sys/net/if_gif.h Sat Jun 6 13:26:13 2015 (r284072) @@ -111,6 +111,16 @@ void gif_input(struct mbuf *, struct ifn 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) Modified: stable/10/sys/net/if_gre.c ============================================================================== --- stable/10/sys/net/if_gre.c Sat Jun 6 13:20:02 2015 (r284071) +++ stable/10/sys/net/if_gre.c Sat Jun 6 13:26:13 2015 (r284072) @@ -119,16 +119,6 @@ static int gre_set_tunnel(struct ifnet * 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"); Modified: stable/10/sys/net/if_gre.h ============================================================================== --- stable/10/sys/net/if_gre.h Sat Jun 6 13:20:02 2015 (r284071) +++ stable/10/sys/net/if_gre.h Sat Jun 6 13:26:13 2015 (r284072) @@ -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 Modified: stable/10/sys/netinet/in_gif.c ============================================================================== --- stable/10/sys/netinet/in_gif.c Sat Jun 6 13:20:02 2015 (r284071) +++ stable/10/sys/netinet/in_gif.c Sat Jun 6 13:26:13 2015 (r284072) @@ -57,7 +57,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include @@ -70,10 +69,11 @@ __FBSDID("$FreeBSD$"); static int gif_validate4(const struct ip *, struct gif_softc *, struct ifnet *); +static int in_gif_input(struct mbuf **, int *, int); static void in_gif_input10(struct mbuf *, int); extern struct domain inetdomain; -struct protosw in_gif_protosw = { +static struct protosw in_gif_protosw = { .pr_type = SOCK_RAW, .pr_domain = &inetdomain, .pr_protocol = 0/* IPPROTO_IPV[46] */, @@ -84,7 +84,8 @@ struct protosw in_gif_protosw = { .pr_usrreqs = &rip_usrreqs }; -VNET_DEFINE(int, ip_gif_ttl) = GIF_TTL; +#define GIF_TTL 30 +static VNET_DEFINE(int, ip_gif_ttl) = GIF_TTL; #define V_ip_gif_ttl VNET(ip_gif_ttl) SYSCTL_VNET_INT(_net_inet_ip, IPCTL_GIF_TTL, gifttl, CTLFLAG_RW, &VNET_NAME(ip_gif_ttl), 0, ""); @@ -143,7 +144,7 @@ in_gif_input10(struct mbuf *m, int off) in_gif_input(&m, &off, proto); } -int +static int in_gif_input(struct mbuf **mp, int *offp, int proto) { struct mbuf *m = *mp; Modified: stable/10/sys/netinet/ip_gre.c ============================================================================== --- stable/10/sys/netinet/ip_gre.c Sat Jun 6 13:20:02 2015 (r284071) +++ stable/10/sys/netinet/ip_gre.c Sat Jun 6 13:26:13 2015 (r284072) @@ -73,11 +73,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 void gre_input10(struct mbuf *, int); static const struct protosw in_gre_protosw = { .pr_type = SOCK_RAW, Modified: stable/10/sys/netinet6/in6_gif.c ============================================================================== --- stable/10/sys/netinet6/in6_gif.c Sat Jun 6 13:20:02 2015 (r284071) +++ stable/10/sys/netinet6/in6_gif.c Sat Jun 6 13:26:13 2015 (r284072) @@ -64,7 +64,6 @@ __FBSDID("$FreeBSD$"); #ifdef INET6 #include #include -#include #include #endif #include @@ -75,7 +74,8 @@ __FBSDID("$FreeBSD$"); #include -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_ 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 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; Modified: stable/10/sys/netinet6/ip6_gre.c ============================================================================== --- stable/10/sys/netinet6/ip6_gre.c Sat Jun 6 13:20:02 2015 (r284071) +++ stable/10/sys/netinet6/ip6_gre.c Sat Jun 6 13:26:13 2015 (r284072) @@ -63,11 +63,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 ip6protosw in6_gre_protosw = { .pr_type = SOCK_RAW, .pr_domain = &inet6domain,