Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/net Eliminate more commons.



details:   https://anonhg.NetBSD.org/src/rev/60979cd8097a
branches:  trunk
changeset: 526848:60979cd8097a
user:      matt <matt%NetBSD.org@localhost>
date:      Sun May 12 20:40:11 2002 +0000

description:
Eliminate more commons.

diffstat:

 sys/net/if.c     |  10 ++++++----
 sys/net/netisr.h |   4 ++--
 sys/net/raw_cb.c |   6 ++++--
 sys/net/raw_cb.h |   5 +++--
 sys/net/route.c  |   8 ++++++--
 sys/net/route.h  |   8 ++++----
 6 files changed, 25 insertions(+), 16 deletions(-)

diffs (148 lines):

diff -r ea48aaf745fb -r 60979cd8097a sys/net/if.c
--- a/sys/net/if.c      Sun May 12 20:38:15 2002 +0000
+++ b/sys/net/if.c      Sun May 12 20:40:11 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if.c,v 1.103 2002/03/17 10:21:42 simonb Exp $  */
+/*     $NetBSD: if.c,v 1.104 2002/05/12 20:40:11 matt Exp $    */
 
 /*-
  * Copyright (c) 1999, 2000, 2001 The NetBSD Foundation, Inc.
@@ -101,7 +101,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if.c,v 1.103 2002/03/17 10:21:42 simonb Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if.c,v 1.104 2002/05/12 20:40:11 matt Exp $");
 
 #include "opt_inet.h"
 
@@ -150,10 +150,12 @@
  * XXX: declare here to avoid to include many inet6 related files..
  * should be more generalized?
  */
-extern void nd6_setmtu __P((struct ifnet *));
+void nd6_setmtu __P((struct ifnet *));
 #endif 
 
-int    if_rt_walktree __P((struct radix_node *, void *));
+int netisr;                    /* scheduling bits for network */
+
+int if_rt_walktree __P((struct radix_node *, void *));
 
 struct if_clone *if_clone_lookup __P((const char *, int *));
 int if_clone_list __P((struct if_clonereq *));
diff -r ea48aaf745fb -r 60979cd8097a sys/net/netisr.h
--- a/sys/net/netisr.h  Sun May 12 20:38:15 2002 +0000
+++ b/sys/net/netisr.h  Sun May 12 20:40:11 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: netisr.h,v 1.29 2001/10/06 15:46:33 thorpej Exp $ */
+/* $NetBSD: netisr.h,v 1.30 2002/05/12 20:40:12 matt Exp $ */
 
 /*
  * Copyright (c) 1980, 1986, 1989, 1993
@@ -151,7 +151,7 @@
 
 #define        schednetisr(anisr)      { netisr |= 1<<(anisr); setsoftnet(); }
 
-int    netisr;                         /* scheduling bits for network */
+extern int netisr;                     /* scheduling bits for network */
 
 #endif /* defined(_KERNEL) && !defined(_LOCORE) */
 
diff -r ea48aaf745fb -r 60979cd8097a sys/net/raw_cb.c
--- a/sys/net/raw_cb.c  Sun May 12 20:38:15 2002 +0000
+++ b/sys/net/raw_cb.c  Sun May 12 20:40:11 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: raw_cb.c,v 1.12 2001/11/12 23:49:47 lukem Exp $        */
+/*     $NetBSD: raw_cb.c,v 1.13 2002/05/12 20:40:12 matt Exp $ */
 
 /*
  * Copyright (c) 1980, 1986, 1993
@@ -36,7 +36,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: raw_cb.c,v 1.12 2001/11/12 23:49:47 lukem Exp $");
+__KERNEL_RCSID(0, "$NetBSD: raw_cb.c,v 1.13 2002/05/12 20:40:12 matt Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -61,6 +61,8 @@
  *     redo address binding to allow wildcards
  */
 
+struct rawcbhead rawcb = LIST_HEAD_INITIALIZER(rawcb);
+
 u_long raw_sendspace = RAWSNDQ;
 u_long raw_recvspace = RAWRCVQ;
 
diff -r ea48aaf745fb -r 60979cd8097a sys/net/raw_cb.h
--- a/sys/net/raw_cb.h  Sun May 12 20:38:15 2002 +0000
+++ b/sys/net/raw_cb.h  Sun May 12 20:40:11 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: raw_cb.h,v 1.12 1998/02/09 17:43:56 perry Exp $        */
+/*     $NetBSD: raw_cb.h,v 1.13 2002/05/12 20:40:12 matt Exp $ */
 
 /*
  * Copyright (c) 1980, 1986, 1993
@@ -59,7 +59,8 @@
 #define        RAWRCVQ         8192
 
 #ifdef _KERNEL
-LIST_HEAD(, rawcb) rawcb;              /* head of list */
+LIST_HEAD(rawcbhead, rawcb);
+extern struct  rawcbhead rawcb;                /* head of list */
 
 int    raw_attach __P((struct socket *, int));
 void   *raw_ctlinput __P((int, struct sockaddr *, void *));
diff -r ea48aaf745fb -r 60979cd8097a sys/net/route.c
--- a/sys/net/route.c   Sun May 12 20:38:15 2002 +0000
+++ b/sys/net/route.c   Sun May 12 20:40:11 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: route.c,v 1.51 2002/03/08 20:48:43 thorpej Exp $       */
+/*     $NetBSD: route.c,v 1.52 2002/05/12 20:40:12 matt Exp $  */
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -102,7 +102,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: route.c,v 1.51 2002/03/08 20:48:43 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: route.c,v 1.52 2002/05/12 20:40:12 matt Exp $");
 
 #include "opt_ns.h"
 
@@ -132,6 +132,10 @@
 
 #define        SA(p) ((struct sockaddr *)(p))
 
+struct route_cb route_cb;
+struct rtstat  rtstat;
+struct radix_node_head *rt_tables[AF_MAX+1];
+
 int    rttrash;                /* routes not in table but not freed */
 struct sockaddr wildcard;      /* zero valued cookie for wildcard searches */
 
diff -r ea48aaf745fb -r 60979cd8097a sys/net/route.h
--- a/sys/net/route.h   Sun May 12 20:38:15 2002 +0000
+++ b/sys/net/route.h   Sun May 12 20:40:11 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: route.h,v 1.28 2001/03/08 03:22:28 enami Exp $ */
+/*     $NetBSD: route.h,v 1.29 2002/05/12 20:40:12 matt Exp $  */
 
 /*
  * Copyright (c) 1980, 1986, 1993
@@ -276,9 +276,9 @@
                (rt)->rt_refcnt--; \
 } while (0)
 
-struct route_cb route_cb;
-struct rtstat  rtstat;
-struct radix_node_head *rt_tables[AF_MAX+1];
+extern struct  route_cb route_cb;
+extern struct  rtstat  rtstat;
+extern struct  radix_node_head *rt_tables[AF_MAX+1];
 
 struct socket;
 



Home | Main Index | Thread Index | Old Index