diff options
author | jhay <jhay@FreeBSD.org> | 1997-05-10 09:58:58 +0000 |
---|---|---|
committer | jhay <jhay@FreeBSD.org> | 1997-05-10 09:58:58 +0000 |
commit | 0993d64164c5645de9b918e293cd3ae73cc6eeab (patch) | |
tree | 1020b5e960a3798c25dbbee04af310936411983a /sys/netipx/spx_debug.c | |
parent | d166039f66bb01a24268ecef1ad2038d00c72a4d (diff) | |
download | FreeBSD-src-0993d64164c5645de9b918e293cd3ae73cc6eeab.zip FreeBSD-src-0993d64164c5645de9b918e293cd3ae73cc6eeab.tar.gz |
Mega IPX commit.
Use the MAC address of an interface for the host part of an IPX address
and not the MAC address of the first interface for every IPX address.
This is more inline with the way others like Novell do it.
Mostly Submitted by: "Serge A. Babkin" <babkin@hq.icb.chel.su>
Take out the error messages (the ip icmp equivalent) with #ifdef IPXERRORMSGS.
This is bogus and as far as I could figure out IPX don't have anything like
it. This is a leftover from its XNS heritage. If nobody complains, I will
take it out completely in a few weeks.
Add some more ipxstat statistics counters.
Make ipxprintfs a sysctl variable and off by default.
Add IPX Netbios "routing" support. This is off by default and can be
switched on with a sysctl knob.
General code cleanup to at least use the same style throughout the IPX
code, but also be more style(9) conformant. Also make a lot of functions
static.
If I don't get any complaints I'll bring all of this over to the 2.2 tree
in a few weeks.
Diffstat (limited to 'sys/netipx/spx_debug.c')
-rw-r--r-- | sys/netipx/spx_debug.c | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/sys/netipx/spx_debug.c b/sys/netipx/spx_debug.c index 0fec239..6194b49 100644 --- a/sys/netipx/spx_debug.c +++ b/sys/netipx/spx_debug.c @@ -33,7 +33,7 @@ * * @(#)spx_debug.c * - * $Id$ + * $Id: spx_debug.c,v 1.8 1997/02/22 09:41:58 peter Exp $ */ #include <sys/param.h> @@ -63,9 +63,9 @@ #include <netipx/spx_debug.h> #ifdef TCPDEBUG -static int spxconsdebug = 0; -static struct spx_debug spx_debug[SPX_NDEBUG]; -static int spx_debx; +static int spxconsdebug = 0; +static struct spx_debug spx_debug[SPX_NDEBUG]; +static int spx_debx; #endif /* @@ -91,20 +91,22 @@ spx_trace(act, ostate, sp, si, req) sd->sd_act = act; sd->sd_ostate = ostate; sd->sd_cb = (caddr_t)sp; - if (sp) + if (sp != NULL) sd->sd_sp = *sp; else - bzero((caddr_t)&sd->sd_sp, sizeof (*sp)); - if (si) + bzero((caddr_t)&sd->sd_sp, sizeof(*sp)); + if (si != NULL) sd->sd_si = *si; else - bzero((caddr_t)&sd->sd_si, sizeof (*si)); + bzero((caddr_t)&sd->sd_si, sizeof(*si)); sd->sd_req = req; if (spxconsdebug == 0) return; - if (ostate >= TCP_NSTATES) ostate = 0; - if (act >= SA_DROP) act = SA_DROP; - if (sp) + if (ostate >= TCP_NSTATES) + ostate = 0; + if (act >= SA_DROP) + act = SA_DROP; + if (sp != NULL) printf("%x %s:", sp, tcpstates[ostate]); else printf("???????? "); @@ -115,7 +117,7 @@ spx_trace(act, ostate, sp, si, req) case SA_INPUT: case SA_OUTPUT: case SA_DROP: - if (si == 0) + if (si == NULL) break; seq = si->si_seq; ack = si->si_ack; @@ -149,7 +151,7 @@ spx_trace(act, ostate, sp, si, req) ipx_printhost(&si->si_sna); ipx_printhost(&si->si_dna); - if (act==SA_RESPOND) { + if (act == SA_RESPOND) { printf("ipx_len = %x, ", ((struct ipx *)si)->ipx_len); } |