Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys Eliminate commons.
details: https://anonhg.NetBSD.org/src/rev/5edf5b1c2680
branches: trunk
changeset: 526851:5edf5b1c2680
user: matt <matt%NetBSD.org@localhost>
date: Sun May 12 21:30:35 2002 +0000
description:
Eliminate commons.
diffstat:
sys/netccitt/hd_input.c | 8 ++++++--
sys/netccitt/hd_var.h | 14 +++++++-------
sys/netccitt/if_x25subr.c | 6 +++---
sys/netccitt/pk_var.h | 7 ++++---
sys/netiso/argo_debug.h | 4 ++--
sys/netiso/clnp_input.c | 5 +++--
sys/netiso/clnp_stat.h | 10 +++++++---
sys/netiso/cltp_usrreq.c | 8 +++++---
sys/netiso/cltp_var.h | 6 +++---
sys/netiso/esis.c | 7 +++----
sys/netiso/esis.h | 7 +++++--
sys/netiso/iso_pcb.c | 7 +++++--
sys/netiso/iso_snpac.c | 8 +++-----
sys/netiso/iso_var.h | 7 +++++--
sys/netiso/tp_clnp.h | 6 ++++--
sys/netiso/tp_ip.h | 4 ++--
sys/netiso/tp_pcb.c | 6 ++++--
sys/netiso/tp_pcb.h | 4 ++--
sys/netiso/tp_stat.h | 15 +++++++++------
19 files changed, 82 insertions(+), 57 deletions(-)
diffs (truncated from 496 to 300 lines):
diff -r 52f21f97d9fa -r 5edf5b1c2680 sys/netccitt/hd_input.c
--- a/sys/netccitt/hd_input.c Sun May 12 21:28:50 2002 +0000
+++ b/sys/netccitt/hd_input.c Sun May 12 21:30:35 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: hd_input.c,v 1.17 2001/11/13 00:12:57 lukem Exp $ */
+/* $NetBSD: hd_input.c,v 1.18 2002/05/12 21:30:35 matt Exp $ */
/*
* Copyright (c) 1984 University of British Columbia.
@@ -41,7 +41,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: hd_input.c,v 1.17 2001/11/13 00:12:57 lukem Exp $");
+__KERNEL_RCSID(0, "$NetBSD: hd_input.c,v 1.18 2002/05/12 21:30:35 matt Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -60,6 +60,10 @@
#include <netccitt/x25.h>
#include <netccitt/pk_extern.h>
+struct hdcb *hdcbhead; /* head of linked list of hdcb's */
+struct Frmr_frame hd_frmr; /* rejected frame diagnostic info */
+struct ifqueue hdintrq; /* hdlc packet input queue */
+
static void frame_reject __P((struct hdcb *, int, struct Hdlc_iframe *));
static void rej_routine __P((struct hdcb *, int));
static void free_iframes __P((struct hdcb *, int *, int));
diff -r 52f21f97d9fa -r 5edf5b1c2680 sys/netccitt/hd_var.h
--- a/sys/netccitt/hd_var.h Sun May 12 21:28:50 2002 +0000
+++ b/sys/netccitt/hd_var.h Sun May 12 21:30:35 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: hd_var.h,v 1.9 1998/09/13 16:21:17 christos Exp $ */
+/* $NetBSD: hd_var.h,v 1.10 2002/05/12 21:30:35 matt Exp $ */
/*
* Copyright (c) 1984 University of British Columbia.
@@ -100,16 +100,16 @@
};
#ifdef _KERNEL
-struct hdcb *hdcbhead; /* head of linked list of hdcb's */
-struct Frmr_frame hd_frmr; /* rejected frame diagnostic info */
-struct ifqueue hdintrq; /* hdlc packet input queue */
+extern struct hdcb *hdcbhead; /* head of linked list of hdcb's */
+extern struct Frmr_frame hd_frmr; /* rejected frame diagnostic info */
+extern struct ifqueue hdintrq; /* hdlc packet input queue */
struct Hdlc_frame;
struct Hdlc_iframe;
struct Hdlc_sframe;
-int hd_t1; /* timer T1 value */
-int hd_t3; /* RR send timer */
-int hd_n2; /* frame retransmission limit */
+extern int hd_t1; /* timer T1 value */
+extern int hd_t3; /* RR send timer */
+extern int hd_n2; /* frame retransmission limit */
/* hd_debug.c */
diff -r 52f21f97d9fa -r 5edf5b1c2680 sys/netccitt/if_x25subr.c
--- a/sys/netccitt/if_x25subr.c Sun May 12 21:28:50 2002 +0000
+++ b/sys/netccitt/if_x25subr.c Sun May 12 21:30:35 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_x25subr.c,v 1.27 2001/11/13 00:12:57 lukem Exp $ */
+/* $NetBSD: if_x25subr.c,v 1.28 2002/05/12 21:30:35 matt Exp $ */
/*
* Copyright (c) 1990, 1993
@@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_x25subr.c,v 1.27 2001/11/13 00:12:57 lukem Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_x25subr.c,v 1.28 2002/05/12 21:30:35 matt Exp $");
#include "opt_inet.h"
#include "opt_iso.h"
@@ -700,11 +700,11 @@
int x25_startproto = 1;
+struct pklcdhead pk_listenhead;
void
pk_init()
{
-
TAILQ_INIT(&pk_listenhead);
if (x25_startproto) {
pk_protolisten(0xcc, 1, x25_dgram_incoming);
diff -r 52f21f97d9fa -r 5edf5b1c2680 sys/netccitt/pk_var.h
--- a/sys/netccitt/pk_var.h Sun May 12 21:28:50 2002 +0000
+++ b/sys/netccitt/pk_var.h Sun May 12 21:30:35 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pk_var.h,v 1.14 2001/06/19 07:37:16 jdolecek Exp $ */
+/* $NetBSD: pk_var.h,v 1.15 2002/05/12 21:30:35 matt Exp $ */
/*
* Copyright (c) 1985 Computing Centre, University of British Columbia.
@@ -235,8 +235,9 @@
#include <sys/queue.h>
extern struct pkcb_q pkcb_q;
-TAILQ_HEAD(, pklcd) pk_listenhead;
+TAILQ_HEAD(pklcdhead, pklcd);
+extern struct pklcdhead pk_listenhead;
extern char *pk_name[], *pk_state[];
-int pk_t20, pk_t21, pk_t22, pk_t23;
+extern int pk_t20, pk_t21, pk_t22, pk_t23;
#endif
diff -r 52f21f97d9fa -r 5edf5b1c2680 sys/netiso/argo_debug.h
--- a/sys/netiso/argo_debug.h Sun May 12 21:28:50 2002 +0000
+++ b/sys/netiso/argo_debug.h Sun May 12 21:30:35 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: argo_debug.h,v 1.10 1997/09/08 02:06:31 mikel Exp $ */
+/* $NetBSD: argo_debug.h,v 1.11 2002/05/12 21:30:35 matt Exp $ */
/*-
* Copyright (c) 1991, 1993
@@ -86,7 +86,7 @@
#endif
*/
-unsigned char argo_debug[128];
+extern unsigned char argo_debug[128];
#endif /* ARGO_DEBUG */
diff -r 52f21f97d9fa -r 5edf5b1c2680 sys/netiso/clnp_input.c
--- a/sys/netiso/clnp_input.c Sun May 12 21:28:50 2002 +0000
+++ b/sys/netiso/clnp_input.c Sun May 12 21:30:35 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: clnp_input.c,v 1.24 2001/11/13 01:10:47 lukem Exp $ */
+/* $NetBSD: clnp_input.c,v 1.25 2002/05/12 21:30:35 matt Exp $ */
/*-
* Copyright (c) 1991, 1993
@@ -63,7 +63,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: clnp_input.c,v 1.24 2001/11/13 01:10:47 lukem Exp $");
+__KERNEL_RCSID(0, "$NetBSD: clnp_input.c,v 1.25 2002/05/12 21:30:35 matt Exp $");
#include "opt_iso.h"
@@ -110,6 +110,7 @@
#endif /* ISO_X25ESIS */
struct iso_ifaddrhead iso_ifaddr = TAILQ_HEAD_INITIALIZER(iso_ifaddr);
struct ifqueue clnlintrq;
+struct clnp_stat clnp_stat;
/*
* FUNCTION: clnp_init
diff -r 52f21f97d9fa -r 5edf5b1c2680 sys/netiso/clnp_stat.h
--- a/sys/netiso/clnp_stat.h Sun May 12 21:28:50 2002 +0000
+++ b/sys/netiso/clnp_stat.h Sun May 12 21:30:35 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: clnp_stat.h,v 1.6 1996/02/13 22:08:46 christos Exp $ */
+/* $NetBSD: clnp_stat.h,v 1.7 2002/05/12 21:30:36 matt Exp $ */
/*-
* Copyright (c) 1991, 1993
@@ -95,11 +95,15 @@
* received */
int cns_er_inhist[CLNP_ERRORS + 1];
int cns_er_outhist[CLNP_ERRORS + 1];
-} clnp_stat;
+};
+
+#ifdef _KERNEL
+extern struct clnp_stat clnp_stat;
#ifdef INCSTAT
#undef INCSTAT
#endif /* INCSTAT */
-#define INCSTAT(x) clnp_stat./**/x/**/++
+#define INCSTAT(x) clnp_stat.x++
+#endif /* _KERNEL */
#endif /* _NETISO_CLNP_STAT_H_ */
diff -r 52f21f97d9fa -r 5edf5b1c2680 sys/netiso/cltp_usrreq.c
--- a/sys/netiso/cltp_usrreq.c Sun May 12 21:28:50 2002 +0000
+++ b/sys/netiso/cltp_usrreq.c Sun May 12 21:30:35 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cltp_usrreq.c,v 1.18 2001/11/13 01:10:48 lukem Exp $ */
+/* $NetBSD: cltp_usrreq.c,v 1.19 2002/05/12 21:30:36 matt Exp $ */
/*
* Copyright (c) 1989, 1993
@@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cltp_usrreq.c,v 1.18 2001/11/13 01:10:48 lukem Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cltp_usrreq.c,v 1.19 2002/05/12 21:30:36 matt Exp $");
#ifndef CLTPOVAL_SRC /* XXX -- till files gets changed */
#include <sys/param.h>
@@ -76,7 +76,9 @@
cltb.isop_next = cltb.isop_prev = &cltb;
}
-int cltp_cksum = 1;
+int cltp_cksum = 1;
+struct isopcb cltb;
+struct cltpstat cltpstat;
/* ARGUSED */
diff -r 52f21f97d9fa -r 5edf5b1c2680 sys/netiso/cltp_var.h
--- a/sys/netiso/cltp_var.h Sun May 12 21:28:50 2002 +0000
+++ b/sys/netiso/cltp_var.h Sun May 12 21:30:35 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cltp_var.h,v 1.8 1996/05/22 13:55:48 mycroft Exp $ */
+/* $NetBSD: cltp_var.h,v 1.9 2002/05/12 21:30:36 matt Exp $ */
/*
* Copyright (c) 1989, 1993
@@ -51,8 +51,8 @@
};
#ifdef _KERNEL
-struct isopcb cltb;
-struct cltpstat cltpstat;
+extern struct isopcb cltb;
+extern struct cltpstat cltpstat;
/* cltp_usrreq.c */
void cltp_init __P((void));
diff -r 52f21f97d9fa -r 5edf5b1c2680 sys/netiso/esis.c
--- a/sys/netiso/esis.c Sun May 12 21:28:50 2002 +0000
+++ b/sys/netiso/esis.c Sun May 12 21:30:35 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: esis.c,v 1.26 2001/11/13 01:10:48 lukem Exp $ */
+/* $NetBSD: esis.c,v 1.27 2002/05/12 21:30:36 matt Exp $ */
/*-
* Copyright (c) 1991, 1993
@@ -63,7 +63,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: esis.c,v 1.26 2001/11/13 01:10:48 lukem Exp $");
+__KERNEL_RCSID(0, "$NetBSD: esis.c,v 1.27 2002/05/12 21:30:36 matt Exp $");
#include "opt_iso.h"
#ifdef ISO
@@ -106,14 +106,13 @@
*
*/
LIST_HEAD(, rawcb) esis_pcb;
+struct esis_stat esis_stat;
int esis_sendspace = 2048;
int esis_recvspace = 2048;
short esis_holding_time = ESIS_HT;
short esis_config_time = ESIS_CONFIG;
short esis_esconfig_time = ESIS_CONFIG;
-extern int iso_systype;
struct sockaddr_dl esis_dl = {sizeof(esis_dl), AF_LINK};
-extern char all_es_snpa[], all_is_snpa[];
struct callout esis_config_ch;
diff -r 52f21f97d9fa -r 5edf5b1c2680 sys/netiso/esis.h
--- a/sys/netiso/esis.h Sun May 12 21:28:50 2002 +0000
+++ b/sys/netiso/esis.h Sun May 12 21:30:35 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: esis.h,v 1.11 1997/11/03 15:01:19 is Exp $ */
+/* $NetBSD: esis.h,v 1.12 2002/05/12 21:30:36 matt Exp $ */
/*-
* Copyright (c) 1991, 1993
@@ -117,7 +117,10 @@
};
#ifdef _KERNEL
-struct esis_stat esis_stat;
+extern struct esis_stat esis_stat;
+extern short esis_holding_time;
+extern short esis_config_time;
+extern short esis_esconfig_time;
struct socket;
struct mbuf;
struct snpa_hdr;
diff -r 52f21f97d9fa -r 5edf5b1c2680 sys/netiso/iso_pcb.c
--- a/sys/netiso/iso_pcb.c Sun May 12 21:28:50 2002 +0000
+++ b/sys/netiso/iso_pcb.c Sun May 12 21:30:35 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: iso_pcb.c,v 1.21 2001/11/13 01:10:49 lukem Exp $ */
+/* $NetBSD: iso_pcb.c,v 1.22 2002/05/12 21:30:36 matt Exp $ */
/*-
* Copyright (c) 1991, 1993
@@ -66,7 +66,7 @@
*/
Home |
Main Index |
Thread Index |
Old Index