Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys Refactor protosw codes in gif(4). No functional change.
details: https://anonhg.NetBSD.org/src/rev/37100869a1cf
branches: trunk
changeset: 343007:37100869a1cf
user: knakahara <knakahara%NetBSD.org@localhost>
date: Mon Jan 18 06:08:26 2016 +0000
description:
Refactor protosw codes in gif(4). No functional change.
- remove unnecessary include
- reduce scopes
diffstat:
sys/net/if_gif.c | 6 ++----
sys/netinet/in_gif.c | 6 +++---
sys/netinet6/in6_gif.c | 8 ++++----
3 files changed, 9 insertions(+), 11 deletions(-)
diffs (97 lines):
diff -r 0379685ce19f -r 37100869a1cf sys/net/if_gif.c
--- a/sys/net/if_gif.c Mon Jan 18 05:59:37 2016 +0000
+++ b/sys/net/if_gif.c Mon Jan 18 06:08:26 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_gif.c,v 1.104 2016/01/08 03:55:39 knakahara Exp $ */
+/* $NetBSD: if_gif.c,v 1.105 2016/01/18 06:08:26 knakahara Exp $ */
/* $KAME: if_gif.c,v 1.76 2001/08/20 02:01:02 kjc Exp $ */
/*
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_gif.c,v 1.104 2016/01/08 03:55:39 knakahara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_gif.c,v 1.105 2016/01/18 06:08:26 knakahara Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@@ -49,7 +49,6 @@
#include <sys/socketvar.h>
#include <sys/syslog.h>
#include <sys/proc.h>
-#include <sys/protosw.h>
#include <sys/cpu.h>
#include <sys/intr.h>
#include <sys/kmem.h>
@@ -77,7 +76,6 @@
#include <netinet/ip6.h>
#include <netinet6/ip6_var.h>
#include <netinet6/in6_gif.h>
-#include <netinet6/ip6protosw.h>
#endif /* INET6 */
#include <netinet/ip_encap.h>
diff -r 0379685ce19f -r 37100869a1cf sys/netinet/in_gif.c
--- a/sys/netinet/in_gif.c Mon Jan 18 05:59:37 2016 +0000
+++ b/sys/netinet/in_gif.c Mon Jan 18 06:08:26 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: in_gif.c,v 1.67 2015/12/25 06:47:56 knakahara Exp $ */
+/* $NetBSD: in_gif.c,v 1.68 2016/01/18 06:08:26 knakahara Exp $ */
/* $KAME: in_gif.c,v 1.66 2001/07/29 04:46:09 itojun Exp $ */
/*
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: in_gif.c,v 1.67 2015/12/25 06:47:56 knakahara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: in_gif.c,v 1.68 2016/01/18 06:08:26 knakahara Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@@ -79,7 +79,7 @@
int ip_gif_ttl = 0;
#endif
-const struct protosw in_gif_protosw = {
+static const struct protosw in_gif_protosw = {
.pr_type = SOCK_RAW,
.pr_domain = &inetdomain,
.pr_protocol = 0 /* IPPROTO_IPV[46] */,
diff -r 0379685ce19f -r 37100869a1cf sys/netinet6/in6_gif.c
--- a/sys/netinet6/in6_gif.c Mon Jan 18 05:59:37 2016 +0000
+++ b/sys/netinet6/in6_gif.c Mon Jan 18 06:08:26 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: in6_gif.c,v 1.64 2015/12/25 06:47:57 knakahara Exp $ */
+/* $NetBSD: in6_gif.c,v 1.65 2016/01/18 06:08:26 knakahara Exp $ */
/* $KAME: in6_gif.c,v 1.62 2001/07/29 04:27:25 itojun Exp $ */
/*
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: in6_gif.c,v 1.64 2015/12/25 06:47:57 knakahara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: in6_gif.c,v 1.65 2016/01/18 06:08:26 knakahara Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@@ -79,7 +79,7 @@
extern LIST_HEAD(, gif_softc) gif_softc_list;
-extern const struct ip6protosw in6_gif_protosw;
+static const struct ip6protosw in6_gif_protosw;
/*
* family - family of the packet to be encapsulate.
@@ -458,7 +458,7 @@
extern struct domain inet6domain;
-const struct ip6protosw in6_gif_protosw = {
+static const struct ip6protosw in6_gif_protosw = {
.pr_type = SOCK_RAW,
.pr_domain = &inet6domain,
.pr_protocol = 0 /* IPPROTO_IPV[46] */,
Home |
Main Index |
Thread Index |
Old Index