From owner-svn-src-head@FreeBSD.ORG Tue Dec 23 16:17:39 2014 Return-Path: Delivered-To: svn-src-head@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 C5A6B786; Tue, 23 Dec 2014 16:17:39 +0000 (UTC) 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 A632264E7F; Tue, 23 Dec 2014 16:17:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBNGHdpc010373; Tue, 23 Dec 2014 16:17:39 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBNGHcfe010367; Tue, 23 Dec 2014 16:17:38 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201412231617.sBNGHcfe010367@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Tue, 23 Dec 2014 16:17:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276148 - in head: . sys/net sys/netinet sys/netinet6 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Dec 2014 16:17:39 -0000 Author: ae Date: Tue Dec 23 16:17:37 2014 New Revision: 276148 URL: https://svnweb.freebsd.org/changeset/base/276148 Log: 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. Deleted: head/sys/netinet/in_gif.h head/sys/netinet6/in6_gif.h Modified: head/ObsoleteFiles.inc head/sys/net/if_gif.c head/sys/netinet/in_gif.c head/sys/netinet6/in6_gif.c Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Tue Dec 23 16:00:25 2014 (r276147) +++ head/ObsoleteFiles.inc Tue Dec 23 16:17:37 2014 (r276148) @@ -38,6 +38,9 @@ # xargs -n1 | sort | uniq -d; # done +# 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 # 20141202: update to mandoc CVS 20141201 OLD_FILES+=usr.bin/preconv OLD_FILES+=share/man/man1/preconv.1.gz Modified: head/sys/net/if_gif.c ============================================================================== --- head/sys/net/if_gif.c Tue Dec 23 16:00:25 2014 (r276147) +++ head/sys/net/if_gif.c Tue Dec 23 16:17:37 2014 (r276148) @@ -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 */ @@ -120,6 +118,16 @@ void (*ng_gif_input_orphan_p)(struct ifn 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 *); Modified: head/sys/netinet/in_gif.c ============================================================================== --- head/sys/netinet/in_gif.c Tue Dec 23 16:00:25 2014 (r276147) +++ head/sys/netinet/in_gif.c Tue Dec 23 16:17:37 2014 (r276148) @@ -57,7 +57,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include @@ -68,11 +67,16 @@ __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); 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] */, @@ -83,7 +87,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_INT(_net_inet_ip, IPCTL_GIF_TTL, gifttl, CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(ip_gif_ttl), 0, ""); @@ -133,7 +138,7 @@ in_gif_output(struct ifnet *ifp, struct return (ip_output(m, NULL, NULL, 0, NULL, NULL)); } -int +static int in_gif_input(struct mbuf **mp, int *offp, int proto) { struct mbuf *m = *mp; Modified: head/sys/netinet6/in6_gif.c ============================================================================== --- head/sys/netinet6/in6_gif.c Tue Dec 23 16:00:25 2014 (r276147) +++ head/sys/netinet6/in6_gif.c Tue Dec 23 16:17:37 2014 (r276148) @@ -64,7 +64,6 @@ __FBSDID("$FreeBSD$"); #ifdef INET6 #include #include -#include #include #endif #include @@ -74,18 +73,24 @@ __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); 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); extern struct domain inet6domain; -struct protosw in6_gif_protosw = { +static struct protosw in6_gif_protosw = { .pr_type = SOCK_RAW, .pr_domain = &inet6domain, .pr_protocol = 0, /* IPPROTO_IPV[46] */ @@ -144,7 +149,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;