remove most of the warnings

This commit is contained in:
Assar Westerlund 2001-06-15 01:53:05 +00:00
parent 70439d2750
commit af7a0a2d2b
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=78245
16 changed files with 144 additions and 277 deletions

View File

@ -102,7 +102,7 @@ static char mybuf[50];
return mybuf;
}
char *
static char *
at_pr_port(struct sockaddr_at *sat)
{
static char mybuf[50];
@ -142,8 +142,7 @@ static char mybuf[50];
/* 4 for port */
/* 8 for numeric only */
char *
atalk_print(sa,what)
register struct sockaddr *sa;
atalk_print(struct sockaddr *sa, int what)
{
struct sockaddr_at *sat = (struct sockaddr_at *)sa;
static char mybuf[50];
@ -200,9 +199,7 @@ atalk_print2(struct sockaddr *sa, struct sockaddr *mask, int what)
}
void
atalkprotopr(off, name)
u_long off;
char *name;
atalkprotopr(u_long off __unused, char *name, int af __unused)
{
struct ddpcb *this, *next;
@ -251,9 +248,7 @@ atalkprotopr(off, name)
* Dump DDP statistics structure.
*/
void
ddp_stats(off, name)
u_long off;
char *name;
ddp_stats(u_long off __unused, char *name, int af __unused)
{
struct ddpstat ddpstat;

View File

@ -85,8 +85,9 @@ static char ntop_buf[INET6_ADDRSTRLEN]; /* for inet_ntop() */
static int bdg_done;
#endif
/* print bridge statistics */
void
bdg_stats(u_long dummy, char *name) /* print bridge statistics */
bdg_stats(u_long dummy __unused, char *name, int af __unused)
{
int i;
size_t slen ;
@ -131,12 +132,8 @@ bdg_stats(u_long dummy, char *name) /* print bridge statistics */
/*
* Display a formatted value, or a '-' in the same space.
*/
void
show_stat(fmt, width, value, showvalue)
char *fmt;
int width;
u_long value;
short showvalue;
static void
show_stat(const char *fmt, int width, u_long value, short showvalue)
{
char newfmt[32];
@ -156,10 +153,7 @@ show_stat(fmt, width, value, showvalue)
* Print a description of the network interfaces.
*/
void
intpr(interval, ifnetaddr, pfunc)
int interval;
u_long ifnetaddr;
void (*pfunc)(char *);
intpr(int interval, u_long ifnetaddr, void (*pfunc)(char *))
{
struct ifnet ifnet;
struct ifnethead ifnethead;
@ -514,9 +508,7 @@ u_char signalled; /* set if alarm goes off "early" */
* XXX - should be rewritten to use ifmib(4).
*/
static void
sidewaysintpr(interval, off)
unsigned interval;
u_long off;
sidewaysintpr(unsigned interval, u_long off)
{
struct ifnet ifnet;
u_long firstifnet;
@ -679,8 +671,7 @@ sidewaysintpr(interval, off)
* Sets a flag to not wait for the alarm.
*/
static void
catchalarm(signo)
int signo;
catchalarm(int signo __unused)
{
signalled = YES;
}

View File

@ -94,10 +94,8 @@ static int udp_done, tcp_done;
* -a (all) flag is specified.
*/
void
protopr(proto, name, af)
u_long proto; /* for sysctl version we pass proto # */
char *name;
int af;
protopr(u_long proto, /* for sysctl version we pass proto # */
char *name, int af)
{
int istcp;
static int first = 1;
@ -167,7 +165,7 @@ protopr(proto, name, af)
}
/* Ignore sockets for protocols other than the desired one. */
if (so->xso_protocol != proto)
if (so->xso_protocol != (int)proto)
continue;
/* Ignore PCBs which were freed during copyout. */
@ -348,9 +346,7 @@ protopr(proto, name, af)
* Dump TCP statistics structure.
*/
void
tcp_stats(off, name)
u_long off;
char *name;
tcp_stats(u_long off __unused, char *name, int af __unused)
{
struct tcpstat tcpstat;
size_t len = sizeof tcpstat;
@ -448,9 +444,7 @@ tcp_stats(off, name)
* Dump UDP statistics structure.
*/
void
udp_stats(off, name)
u_long off;
char *name;
udp_stats(u_long off __unused, char *name, int af __unused)
{
struct udpstat udpstat;
size_t len = sizeof udpstat;
@ -501,9 +495,7 @@ udp_stats(off, name)
* Dump IP statistics structure.
*/
void
ip_stats(off, name)
u_long off;
char *name;
ip_stats(u_long off __unused, char *name, int af __unused)
{
struct ipstat ipstat;
size_t len = sizeof ipstat;
@ -583,9 +575,7 @@ static char *icmpnames[] = {
* Dump ICMP statistics.
*/
void
icmp_stats(off, name)
u_long off;
char *name;
icmp_stats(u_long off __unused, char *name, int af __unused)
{
struct icmpstat icmpstat;
int i, first;
@ -651,9 +641,7 @@ icmp_stats(off, name)
* Dump IGMP statistics structure.
*/
void
igmp_stats(off, name)
u_long off;
char *name;
igmp_stats(u_long off __unused, char *name, int af __unused)
{
struct igmpstat igmpstat;
size_t len = sizeof igmpstat;
@ -686,11 +674,7 @@ igmp_stats(off, name)
* Pretty print an Internet address (net address + port).
*/
void
inetprint(in, port, proto, numeric_port)
register struct in_addr *in;
int port;
char *proto;
int numeric_port;
inetprint(struct in_addr *in, int port, char *proto, int numeric_port)
{
struct servent *sp = 0;
char line[80], *cp;
@ -720,8 +704,7 @@ inetprint(in, port, proto, numeric_port)
* numeric value, otherwise try for symbolic name.
*/
char *
inetname(inp)
struct in_addr *inp;
inetname(struct in_addr *inp)
{
register char *cp;
static char line[MAXHOSTNAMELEN];

View File

@ -340,9 +340,7 @@ static char *ip6nh[] = {
* Dump IP6 statistics structure.
*/
void
ip6_stats(off, name)
u_long off;
char *name;
ip6_stats(u_long off __unused, char *name, int af __unused)
{
struct ip6stat ip6stat;
int first, i;
@ -494,8 +492,7 @@ ip6_stats(off, name)
* Dump IPv6 per-interface statistics based on RFC 2465.
*/
void
ip6_ifstats(ifname)
char *ifname;
ip6_ifstats(char *ifname)
{
struct in6_ifreq ifr;
int s;
@ -810,9 +807,7 @@ static char *icmp6names[] = {
* Dump ICMP6 statistics.
*/
void
icmp6_stats(off, name)
u_long off;
char *name;
icmp6_stats(u_long off __unused, char *name, int af __unused)
{
struct icmp6stat icmp6stat;
register int i, first;
@ -885,8 +880,7 @@ icmp6_stats(off, name)
* Dump ICMPv6 per-interface statistics based on RFC 2466.
*/
void
icmp6_ifstats(ifname)
char *ifname;
icmp6_ifstats(char *ifname)
{
struct in6_ifreq ifr;
int s;
@ -951,9 +945,7 @@ icmp6_ifstats(ifname)
* Dump PIM statistics structure.
*/
void
pim6_stats(off, name)
u_long off;
char *name;
pim6_stats(u_long off __unused, char *name, int af __unused)
{
struct pim6stat pim6stat;
@ -978,9 +970,7 @@ pim6_stats(off, name)
* Dump raw ip6 statistics structure.
*/
void
rip6_stats(off, name)
u_long off;
char *name;
rip6_stats(u_long off __unused, char *name, int af __unused)
{
struct rip6stat rip6stat;
u_quad_t delivered;
@ -1035,11 +1025,7 @@ rip6_stats(off, name)
};
void
inet6print(in6, port, proto, numeric)
register struct in6_addr *in6;
int port;
char *proto;
int numeric;
inet6print(struct in6_addr *in6, int port, char *proto, int numeric)
{
struct servent *sp = 0;
char line[80], *cp;
@ -1065,8 +1051,7 @@ inet6print(in6, port, proto, numeric)
*/
char *
inet6name(in6p)
struct in6_addr *in6p;
inet6name(struct in6_addr *in6p)
{
register char *cp;
static char line[50];

View File

@ -162,18 +162,16 @@ static struct ipsecstat ipsecstat;
static void print_ipsecstats __P((void));
static const char *pfkey_msgtype_names __P((int));
static void ipsec_hist __P((const u_quad_t *, size_t, const struct val2str *,
size_t, const char *));
const char *));
/*
* Dump IPSEC statistics structure.
*/
static void
ipsec_hist(hist, histmax, name, namemax, title)
const u_quad_t *hist;
size_t histmax;
const struct val2str *name;
size_t namemax;
const char *title;
ipsec_hist(const u_quad_t *hist,
size_t histmax,
const struct val2str *name,
const char *title)
{
int first;
size_t proto;
@ -188,7 +186,7 @@ ipsec_hist(hist, histmax, name, namemax, title)
first = 0;
}
for (p = name; p && p->str; p++) {
if (p->val == proto)
if (p->val == (int)proto)
break;
}
if (p && p->str) {
@ -201,12 +199,12 @@ ipsec_hist(hist, histmax, name, namemax, title)
}
static void
print_ipsecstats()
print_ipsecstats(void)
{
#define p(f, m) if (ipsecstat.f || sflag <= 1) \
printf(m, (CAST)ipsecstat.f, plural(ipsecstat.f))
#define hist(f, n, t) \
ipsec_hist((f), sizeof(f)/sizeof(f[0]), (n), sizeof(n)/sizeof(n[0]), (t));
ipsec_hist((f), sizeof(f)/sizeof(f[0]), (n), (t));
p(in_success, "\t" LLU " inbound packet%s processed successfully\n");
p(in_polvio, "\t" LLU " inbound packet%s violated process security "
@ -238,9 +236,7 @@ print_ipsecstats()
}
void
ipsec_stats(off, name)
u_long off;
char *name;
ipsec_stats(u_long off __unused, char *name, int af __unused)
{
if (off == 0)
return;
@ -251,8 +247,7 @@ ipsec_stats(off, name)
}
static const char *
pfkey_msgtype_names(x)
int x;
pfkey_msgtype_names(int x)
{
const int max =
sizeof(pfkey_msgtypenames)/sizeof(pfkey_msgtypenames[0]);
@ -265,12 +260,10 @@ pfkey_msgtype_names(x)
}
void
pfkey_stats(off, name)
u_long off;
char *name;
pfkey_stats(u_long off __unused, char *name, int af __unused)
{
struct pfkeystat pfkeystat;
int first, type;
unsigned first, type;
if (off == 0)
return;

View File

@ -83,9 +83,7 @@ static int first = 1;
*/
void
ipxprotopr(off, name)
u_long off;
char *name;
ipxprotopr(u_long off, char *name, int af __unused)
{
struct ipxpcb cb;
register struct ipxpcb *prev, *next;
@ -161,9 +159,7 @@ ipxprotopr(off, name)
* Dump SPX statistics structure.
*/
void
spx_stats(off, name)
u_long off;
char *name;
spx_stats(u_long off, char *name, int af __unused)
{
struct spx_istat spx_istat;
#define spxstat spx_istat.newstats
@ -239,9 +235,7 @@ spx_stats(off, name)
* Dump IPX statistics structure.
*/
void
ipx_stats(off, name)
u_long off;
char *name;
ipx_stats(u_long off, char *name, int af __unused)
{
struct ipxstat ipxstat;
@ -284,9 +278,7 @@ static struct {
*/
/*ARGSUSED*/
void
ipxerr_stats(off, name)
u_long off;
char *name;
ipxerr_stats(u_long off, char *name, int af __unused)
{
struct ipx_errstat ipx_errstat;
register int j;
@ -326,8 +318,7 @@ ipxerr_stats(off, name)
}
static void
ipx_erputil(z, c)
int z, c;
ipx_erputil(int z, int c)
{
int j;
char codebuf[30];
@ -355,8 +346,7 @@ ipx_erputil(z, c)
static struct sockaddr_ipx ssipx = {AF_IPX};
static
char *ipx_prpr(x)
struct ipx_addr *x;
char *ipx_prpr(struct ipx_addr *x)
{
struct sockaddr_ipx *sipx = &ssipx;

View File

@ -115,9 +115,7 @@ extern void inetprint __P((struct in_addr *, int, char *));
* Dump esis stats
*/
void
esis_stats(off, name)
u_long off;
char *name;
esis_stats(u_long off, char *name, int af __unused)
{
struct esis_stat esis_stat;
@ -144,9 +142,7 @@ esis_stats(off, name)
* Dump clnp statistics structure.
*/
void
clnp_stats(off, name)
u_long off;
char *name;
clnp_stats(u_long off, char *name, int af __unused)
{
struct clnp_stat clnp_stat;
@ -179,9 +175,7 @@ clnp_stats(off, name)
* Dump CLTP statistics structure.
*/
void
cltp_stats(off, name)
u_long off;
char *name;
cltp_stats(u_long off, char *name, int af __unused)
{
struct cltpstat cltpstat;
@ -215,9 +209,7 @@ static int first = 1;
* -a (all) flag is specified.
*/
void
iso_protopr(off, name)
u_long off;
char *name;
iso_protopr(u_long off, char *name, int af __unused)
{
struct isopcb cb;
register struct isopcb *prev, *next;
@ -252,9 +244,7 @@ iso_protopr(off, name)
}
void
iso_protopr1(kern_addr, istp)
u_long kern_addr;
int istp;
iso_protopr1(u_long kern_addr, int istp)
{
if (first) {
printf("Active ISO net connections");
@ -303,9 +293,7 @@ iso_protopr1(kern_addr, istp)
}
void
tp_protopr(off, name)
u_long off;
char *name;
tp_protopr(u_long off, char *name, int af __unused)
{
extern char *tp_sstring[];
struct tp_ref *tpr, *tpr_base;
@ -349,8 +337,7 @@ tp_protopr(off, name)
}
void
tp_inproto(pcb)
u_long pcb;
tp_inproto(u_long pcb)
{
struct inpcb inpcb;
kget(tpcb.tp_npcb, inpcb);
@ -372,8 +359,7 @@ tp_inproto(pcb)
#ifdef notdef
char *
isonetname(iso)
register struct iso_addr *iso;
isonetname(struct iso_addr *iso)
{
struct sockaddr_iso sa;
struct iso_hostent *ihe = 0;
@ -404,11 +390,7 @@ isonetname(iso)
}
static void
isonetprint(iso, sufx, sufxlen, islocal)
register struct iso_addr *iso;
char *sufx;
u_short sufxlen;
int islocal;
isonetprint(struct iso_addr *iso, char *sufx, u_short sufxlen, int islocal)
{
struct iso_hostent *iso_getserventrybytsel(), *ihe;
struct iso_hostent Ihe;
@ -462,9 +444,7 @@ isonetprint(iso, sufx, sufxlen, islocal)
#ifdef notdef
static void
x25_protopr(off, name)
u_long off;
char *name;
x25_protopr(u_long off, char *name, int af __unused)
{
static char *xpcb_states[] = {
"CLOSED",
@ -533,8 +513,7 @@ x25_protopr(off, name)
struct tp_stat tp_stat;
void
tp_stats(off, name)
caddr_t off, name;
tp_stats(caddr_t off, caddr_t name)
{
if (off == 0) {
printf("TP not configured\n\n");
@ -548,9 +527,7 @@ tp_stats(off, name)
#define OUT stdout
static void
tprintstat(s, indent)
register struct tp_stat *s;
int indent;
tprintstat(struct tp_stat *s, int indent)
{
fprintf(OUT,
"%*sReceiving:\n",indent," ");
@ -800,9 +777,7 @@ tprintstat(s, indent)
#endif
static void
isonetprint(siso, islocal)
register struct sockaddr_iso *siso;
int islocal;
isonetprint(struct sockaddr_iso *siso, int islocal)
{
hexprint(siso->siso_nlen, siso->siso_addr.isoa_genaddr, "{}");
if (siso->siso_tlen || siso->siso_slen || siso->siso_plen)
@ -817,9 +792,7 @@ isonetprint(siso, islocal)
static char hexlist[] = "0123456789abcdef", obuf[128];
static void
hexprint(n, buf, delim)
int n;
char *buf, *delim;
hexprint(int n, char *buf, char *delim)
{
register u_char *in = (u_char *)buf, *top = in + n;
register char *out = obuf;

View File

@ -160,9 +160,11 @@ struct protox {
u_char pr_index; /* index into nlist of cb head */
u_char pr_sindex; /* index into nlist of stat block */
u_char pr_wanted; /* 1 if wanted, 0 otherwise */
void (*pr_cblocks)(); /* control blocks printing routine */
void (*pr_stats)(); /* statistics printing routine */
void (*pr_istats)(); /* per/if statistics printing routine */
void (*pr_cblocks)(u_long, char *, int);
/* control blocks printing routine */
void (*pr_stats)(u_long, char *, int);
/* statistics printing routine */
void (*pr_istats)(char *); /* per/if statistics printing routine */
char *pr_name; /* well-known name */
int pr_usesysctl; /* true if we use sysctl, not kvm */
} protox[] = {
@ -500,11 +502,11 @@ main(argc, argv)
exit(0);
}
if (tp->pr_usesysctl) {
(*tp->pr_stats)(tp->pr_usesysctl, tp->pr_name);
(*tp->pr_stats)(tp->pr_usesysctl, tp->pr_name, af);
} else {
kread(0, 0, 0);
(*tp->pr_stats)(nl[tp->pr_sindex].n_value,
tp->pr_name);
tp->pr_name, af);
}
exit(0);
}
@ -611,7 +613,7 @@ printproto(tp, name)
register struct protox *tp;
char *name;
{
void (*pr)();
void (*pr)(u_long, char *, int);
u_long off;
if (sflag) {
@ -639,10 +641,7 @@ printproto(tp, name)
* Read kernel memory, return 0 on success.
*/
int
kread(addr, buf, size)
u_long addr;
char *buf;
int size;
kread(u_long addr, char *buf, int size)
{
if (kvmd == 0) {
/*
@ -679,15 +678,13 @@ kread(addr, buf, size)
}
char *
plural(n)
int n;
plural(int n)
{
return (n != 1 ? "s" : "");
}
char *
plurales(n)
int n;
plurales(int n)
{
return (n != 1 ? "es" : "");
}
@ -696,8 +693,7 @@ plurales(n)
* Find the protox for the given "well-known" name.
*/
static struct protox *
knownname(name)
char *name;
knownname(char *name)
{
struct protox **tpp, *tp;
@ -712,8 +708,7 @@ knownname(name)
* Find the protox corresponding to name.
*/
static struct protox *
name2protox(name)
char *name;
name2protox(char *name)
{
struct protox *tp;
char **alias; /* alias from p->aliases */
@ -740,7 +735,7 @@ name2protox(name)
}
static void
usage()
usage(void)
{
(void)fprintf(stderr, "%s\n%s\n%s\n%s\n%s\n",
"usage: netstat [-AaLlnW] [-f address_family] [-M core] [-N system]",

View File

@ -94,8 +94,7 @@ static struct mbtypenames {
* Print mbuf statistics.
*/
void
mbpr(mbaddr, mbtaddr, nmbcaddr, nmbufaddr)
u_long mbaddr, mbtaddr, nmbcaddr, nmbufaddr;
mbpr(u_long mbaddr, u_long mbtaddr, u_long nmbcaddr, u_long nmbufaddr)
{
u_long totmem, totpossible, totmbufs;
register int i;

View File

@ -67,8 +67,7 @@ static const char rcsid[] =
#include "netstat.h"
void
mroutepr(mfcaddr, vifaddr)
u_long mfcaddr, vifaddr;
mroutepr(u_long mfcaddr, u_long vifaddr)
{
struct mfc *mfctable[MFCTBLSIZ];
struct vif viftable[MAXVIFS];
@ -150,8 +149,7 @@ mroutepr(mfcaddr, vifaddr)
void
mrt_stats(mstaddr)
u_long mstaddr;
mrt_stats(u_long mstaddr)
{
struct mrtstat mrtstat;

View File

@ -94,8 +94,7 @@
extern char *routename6 __P((struct sockaddr_in6 *));
void
mroute6pr(mfcaddr, mifaddr)
u_long mfcaddr, mifaddr;
mroute6pr(u_long mfcaddr, u_long mifaddr)
{
struct mf6c *mf6ctable[MF6CTBLSIZ], *mfcp;
struct mif6 mif6table[MAXMIFS];
@ -196,8 +195,7 @@ mroute6pr(mfcaddr, mifaddr)
}
void
mrt6_stats(mstaddr)
u_long mstaddr;
mrt6_stats(u_long mstaddr)
{
struct mrt6stat mrtstat;

View File

@ -65,7 +65,7 @@ static int first = 1;
static int csock = -1;
void
netgraphprotopr(u_long off, char *name)
netgraphprotopr(u_long off, char *name, int af __unused)
{
struct ngpcb *this, *next;
struct ngpcb ngpcb;

View File

@ -65,22 +65,22 @@ char *plural __P((int));
char *plurales __P((int));
void protopr __P((u_long, char *, int));
void tcp_stats __P((u_long, char *));
void udp_stats __P((u_long, char *));
void ip_stats __P((u_long, char *));
void icmp_stats __P((u_long, char *));
void igmp_stats __P((u_long, char *));
void tcp_stats __P((u_long, char *, int));
void udp_stats __P((u_long, char *, int));
void ip_stats __P((u_long, char *, int));
void icmp_stats __P((u_long, char *, int));
void igmp_stats __P((u_long, char *, int));
#ifdef IPSEC
void ipsec_stats __P((u_long, char *));
void ipsec_stats __P((u_long, char *, int));
#endif
#ifdef INET6
void ip6_stats __P((u_long, char *));
void ip6_stats __P((u_long, char *, int));
void ip6_ifstats __P((char *));
void icmp6_stats __P((u_long, char *));
void icmp6_stats __P((u_long, char *, int));
void icmp6_ifstats __P((char *));
void pim6_stats __P((u_long, char *));
void rip6_stats __P((u_long, char *));
void pim6_stats __P((u_long, char *, int));
void rip6_stats __P((u_long, char *, int));
void mroute6pr __P((u_long, u_long));
void mrt6_stats __P((u_long));
@ -91,10 +91,10 @@ char *netname6 __P((struct sockaddr_in6 *, struct in6_addr *));
#endif /*INET6*/
#ifdef IPSEC
void pfkey_stats __P((u_long, char *));
void pfkey_stats __P((u_long, char *, int));
#endif
void bdg_stats __P((u_long, char *));
void bdg_stats __P((u_long, char *, int));
void mbpr __P((u_long, u_long, u_long, u_long));
@ -119,29 +119,29 @@ char *ipx_print __P((struct sockaddr *));
char *ns_print __P((struct sockaddr *));
void routepr __P((u_long));
void ipxprotopr __P((u_long, char *));
void spx_stats __P((u_long, char *));
void ipx_stats __P((u_long, char *));
void ipxerr_stats __P((u_long, char *));
void ipxprotopr __P((u_long, char *, int));
void spx_stats __P((u_long, char *, int));
void ipx_stats __P((u_long, char *, int));
void ipxerr_stats __P((u_long, char *, int));
void nsprotopr __P((u_long, char *));
void spp_stats __P((u_long, char *));
void idp_stats __P((u_long, char *));
void nserr_stats __P((u_long, char *));
void nsprotopr __P((u_long, char *, int));
void spp_stats __P((u_long, char *, int));
void idp_stats __P((u_long, char *, int));
void nserr_stats __P((u_long, char *, int));
void atalkprotopr __P((u_long, char *));
void ddp_stats __P((u_long, char *));
void atalkprotopr __P((u_long, char *, int));
void ddp_stats __P((u_long, char *, int));
void netgraphprotopr __P((u_long, char *));
void netgraphprotopr __P((u_long, char *, int));
void unixpr __P((void));
void esis_stats __P((u_long, char *));
void clnp_stats __P((u_long, char *));
void cltp_stats __P((u_long, char *));
void iso_protopr __P((u_long, char *));
void esis_stats __P((u_long, char *, int));
void clnp_stats __P((u_long, char *, int));
void cltp_stats __P((u_long, char *, int));
void iso_protopr __P((u_long, char *, int));
void iso_protopr1 __P((u_long, int));
void tp_protopr __P((u_long, char *));
void tp_protopr __P((u_long, char *, int));
void tp_inproto __P((u_long));
void tp_stats __P((caddr_t, caddr_t));

View File

@ -32,7 +32,11 @@
*/
#ifndef lint
#if 0
static char sccsid[] = "@(#)ns.c 8.1 (Berkeley) 6/6/93";
#endif
static const char rcsid[] =
"$FreeBSD$";
#endif /* not lint */
#include <sys/param.h>
@ -81,9 +85,7 @@ static int first = 1;
*/
void
nsprotopr(off, name)
u_long off;
char *name;
nsprotopr(u_long off, char *name, int af __unused)
{
struct nspcb cb;
register struct nspcb *prev, *next;
@ -156,9 +158,7 @@ nsprotopr(off, name)
* Dump SPP statistics structure.
*/
void
spp_stats(off, name)
u_long off;
char *name;
spp_stats(u_long off, char *name, int af __unused)
{
struct spp_istat spp_istat;
#define sppstat spp_istat.newstats
@ -234,9 +234,7 @@ spp_stats(off, name)
* Dump IDP statistics structure.
*/
void
idp_stats(off, name)
u_long off;
char *name;
idp_stats(u_long off, char *name, int af __unused)
{
struct idpstat idpstat;
@ -270,9 +268,7 @@ static struct {
*/
/*ARGSUSED*/
void
nserr_stats(off, name)
u_long off;
char *name;
nserr_stats(u_long off, char *name, int af __unused)
{
struct ns_errstat ns_errstat;
register int j;
@ -313,8 +309,7 @@ nserr_stats(off, name)
}
static void
ns_erputil(z, c)
int z, c;
ns_erputil(int z, int c)
{
int j;
char codebuf[30];
@ -341,8 +336,7 @@ ns_erputil(z, c)
static struct sockaddr_ns ssns = {AF_NS};
static
char *ns_prpr(x)
struct ns_addr *x;
char *ns_prpr(struct ns_addr *x)
{
struct sockaddr_ns *sns = &ssns;

View File

@ -144,8 +144,7 @@ char *netname6 __P((struct sockaddr_in6 *, struct in6_addr *));
* Print routing tables.
*/
void
routepr(rtree)
u_long rtree;
routepr(u_long rtree)
{
struct radix_node_head *rnh, head;
int i;
@ -184,8 +183,7 @@ routepr(rtree)
* Print address family header before a section of the routing table.
*/
void
pr_family(af)
int af;
pr_family(int af)
{
char *afname;
@ -245,8 +243,7 @@ pr_family(af)
* Print header for routing table columns.
*/
void
pr_rthdr(af)
int af;
pr_rthdr(int af)
{
if (Aflag)
@ -271,8 +268,7 @@ pr_rthdr(af)
}
static struct sockaddr *
kgetsa(dst)
register struct sockaddr *dst;
kgetsa(struct sockaddr *dst)
{
kget(dst, pt_u.u_sa);
@ -282,8 +278,7 @@ kgetsa(dst)
}
static void
p_tree(rn)
struct radix_node *rn;
p_tree(struct radix_node *rn)
{
again:
@ -321,7 +316,7 @@ p_tree(rn)
char nbuf[20];
static void
p_rtnode()
p_rtnode(void)
{
struct radix_mask *rm = rnode.rn_mklist;
@ -358,7 +353,7 @@ p_rtnode()
}
static void
ntreestuff()
ntreestuff(void)
{
size_t needed;
int mib[6];
@ -389,8 +384,7 @@ ntreestuff()
}
static void
np_rtentry(rtm)
register struct rt_msghdr *rtm;
np_rtentry(struct rt_msghdr *rtm)
{
register struct sockaddr *sa = (struct sockaddr *)(rtm + 1);
#ifdef notdef
@ -429,9 +423,7 @@ np_rtentry(rtm)
}
static void
p_sockaddr(sa, mask, flags, width)
struct sockaddr *sa, *mask;
int flags, width;
p_sockaddr(struct sockaddr *sa, struct sockaddr *mask, int flags, int width)
{
char workbuf[128], *cplim;
register char *cp = workbuf;
@ -572,9 +564,7 @@ p_sockaddr(sa, mask, flags, width)
}
static void
p_flags(f, format)
register int f;
char *format;
p_flags(int f, char *format)
{
char name[33], *flags;
register struct bits *p = bits;
@ -587,8 +577,7 @@ p_flags(f, format)
}
static void
p_rtentry(rt)
register struct rtentry *rt;
p_rtentry(struct rtentry *rt)
{
static struct ifnet ifnet, *lastif;
struct rtentry parent;
@ -654,8 +643,7 @@ ifandkey:;
}
char *
routename(in)
u_long in;
routename(u_long in)
{
register char *cp;
static char line[MAXHOSTNAMELEN];
@ -683,8 +671,7 @@ routename(in)
}
static u_long
forgemask(a)
u_long a;
forgemask(u_long a)
{
u_long m;
@ -698,9 +685,7 @@ forgemask(a)
}
static void
domask(dst, addr, mask)
char *dst;
u_long addr, mask;
domask(char *dst, u_long addr, u_long mask)
{
register int b, i;
@ -732,8 +717,7 @@ domask(dst, addr, mask)
* The address is assumed to be that of a net or subnet, not a host.
*/
char *
netname(in, mask)
u_long in, mask;
netname(u_long in, u_long mask)
{
char *cp = 0;
static char line[MAXHOSTNAMELEN];
@ -789,9 +773,7 @@ netname(in, mask)
#ifdef INET6
char *
netname6(sa6, mask)
struct sockaddr_in6 *sa6;
struct in6_addr *mask;
netname6(struct sockaddr_in6 *sa6, struct in6_addr *mask)
{
static char line[MAXHOSTNAMELEN];
u_char *p = (u_char *)mask;
@ -853,8 +835,7 @@ netname6(sa6, mask)
}
char *
routename6(sa6)
struct sockaddr_in6 *sa6;
routename6(struct sockaddr_in6 *sa6)
{
static char line[MAXHOSTNAMELEN];
int flag = NI_WITHSCOPEID;
@ -878,8 +859,7 @@ routename6(sa6)
* Print routing statistics
*/
void
rt_stats(off)
u_long off;
rt_stats(u_long off)
{
struct rtstat rtstat;
@ -902,8 +882,7 @@ rt_stats(off)
}
char *
ipx_print(sa)
register struct sockaddr *sa;
ipx_print(struct sockaddr *sa)
{
u_short port;
struct servent *sp = 0;
@ -972,8 +951,7 @@ ipx_print(sa)
}
char *
ipx_phost(sa)
struct sockaddr *sa;
ipx_phost(struct sockaddr *sa)
{
register struct sockaddr_ipx *sipx = (struct sockaddr_ipx *)sa;
struct sockaddr_ipx work;
@ -997,8 +975,7 @@ short ns_nullh[] = {0,0,0};
short ns_bh[] = {-1,-1,-1};
char *
ns_print(sa)
register struct sockaddr *sa;
ns_print(struct sockaddr *sa)
{
register struct sockaddr_ns *sns = (struct sockaddr_ns*)sa;
struct ns_addr work;
@ -1044,8 +1021,7 @@ ns_print(sa)
}
char *
ns_phost(sa)
struct sockaddr *sa;
ns_phost(struct sockaddr *sa)
{
register struct sockaddr_ns *sns = (struct sockaddr_ns *)sa;
struct sockaddr_ns work;
@ -1064,8 +1040,7 @@ ns_phost(sa)
#endif
void
upHex(p0)
char *p0;
upHex(char *p0)
{
register char *p = p0;

View File

@ -68,7 +68,7 @@ static const char *const socktype[] =
{ "#0", "stream", "dgram", "raw", "rdm", "seqpacket" };
void
unixpr()
unixpr(void)
{
char *buf;
int type;
@ -126,9 +126,7 @@ unixpr()
}
static void
unixdomainpr(xunp, so)
struct xunpcb *xunp;
struct xsocket *so;
unixdomainpr(struct xunpcb *xunp, struct xsocket *so)
{
struct unpcb *unp;
struct sockaddr_un *sa;