summaryrefslogtreecommitdiffstats
path: root/usr.bin/systat/netstat.c
diff options
context:
space:
mode:
authordelphij <delphij@FreeBSD.org>2008-01-16 19:27:43 +0000
committerdelphij <delphij@FreeBSD.org>2008-01-16 19:27:43 +0000
commit8f8cb7cbeccab35f93144e4796554b23c37ca424 (patch)
tree1949ff10a24f623c91c0dd1c161428d8022ef1b7 /usr.bin/systat/netstat.c
parente0a03b53e1322296a173e94b1501785915211127 (diff)
downloadFreeBSD-src-8f8cb7cbeccab35f93144e4796554b23c37ca424.zip
FreeBSD-src-8f8cb7cbeccab35f93144e4796554b23c37ca424.tar.gz
ANSIfy and remove register.
Resulting binary verified with strip(1)+md5(1).
Diffstat (limited to 'usr.bin/systat/netstat.c')
-rw-r--r--usr.bin/systat/netstat.c44
1 files changed, 14 insertions, 30 deletions
diff --git a/usr.bin/systat/netstat.c b/usr.bin/systat/netstat.c
index 22ef864..0bafc5a 100644
--- a/usr.bin/systat/netstat.c
+++ b/usr.bin/systat/netstat.c
@@ -93,7 +93,7 @@ static void inetprint(struct sockaddr *, const char *);
#define YMAX(w) ((w)->_maxy-1)
WINDOW *
-opennetstat()
+opennetstat(void)
{
sethostent(1);
setnetent(1);
@@ -122,8 +122,7 @@ static int nflag = 0;
static int lastrow = 1;
void
-closenetstat(w)
- WINDOW *w;
+closenetstat(WINDOW *w)
{
struct netinfo *p;
@@ -157,14 +156,14 @@ struct nlist namelist[] = {
};
int
-initnetstat()
+initnetstat(void)
{
protos = TCP|UDP;
return(1);
}
void
-fetchnetstat()
+fetchnetstat(void)
{
if (use_kvm)
fetchnetstat_kvm();
@@ -173,7 +172,7 @@ fetchnetstat()
}
static void
-fetchnetstat_kvm()
+fetchnetstat_kvm(void)
{
struct inpcb *next;
struct netinfo *p;
@@ -245,7 +244,7 @@ again:
}
static void
-fetchnetstat_sysctl()
+fetchnetstat_sysctl(void)
{
struct netinfo *p;
int idx;
@@ -334,11 +333,7 @@ fetchnetstat_sysctl()
}
static void
-enter_kvm(inp, so, state, proto)
- struct inpcb *inp;
- struct socket *so;
- int state;
- const char *proto;
+enter_kvm(struct inpcb *inp, struct socket *so, int state, const char *proto)
{
struct netinfo *p;
@@ -349,11 +344,7 @@ enter_kvm(inp, so, state, proto)
}
static void
-enter_sysctl(inp, so, state, proto)
- struct inpcb *inp;
- struct xsocket *so;
- int state;
- const char *proto;
+enter_sysctl(struct inpcb *inp, struct xsocket *so, int state, const char *proto)
{
struct netinfo *p;
@@ -365,10 +356,7 @@ enter_sysctl(inp, so, state, proto)
static struct netinfo *
-enter(inp, state, proto)
- struct inpcb *inp;
- int state;
- const char *proto;
+enter(struct inpcb *inp, int state, const char *proto)
{
struct netinfo *p;
struct sockaddr_storage lsa, fsa;
@@ -456,7 +444,7 @@ enter(inp, state, proto)
void
-labelnetstat()
+labelnetstat(void)
{
if (use_kvm && namelist[X_TCB].n_type == 0)
return;
@@ -470,7 +458,7 @@ labelnetstat()
}
void
-shownetstat()
+shownetstat(void)
{
struct netinfo *p, *q;
char proto[6];
@@ -551,9 +539,7 @@ shownetstat()
* If the nflag was specified, use numbers instead of names.
*/
static void
-inetprint(sa, proto)
- struct sockaddr *sa;
- const char *proto;
+inetprint(struct sockaddr *sa, const char *proto)
{
struct servent *sp = 0;
char line[80], *cp;
@@ -596,8 +582,7 @@ inetprint(sa, proto)
* numeric value, otherwise try for symbolic name.
*/
static char *
-inetname(sa)
- struct sockaddr *sa;
+inetname(struct sockaddr *sa)
{
char *cp = 0;
static char line[NI_MAXHOST];
@@ -647,8 +632,7 @@ inetname(sa)
}
int
-cmdnetstat(cmd, args)
- const char *cmd, *args;
+cmdnetstat(const char *cmd, const char *args)
{
if (prefix(cmd, "all")) {
aflag = !aflag;
OpenPOWER on IntegriCloud