version 1.16, 2001/07/28 05:36:18 |
version 1.17, 2001/11/19 19:02:16 |
|
|
closenetstat(w) |
closenetstat(w) |
WINDOW *w; |
WINDOW *w; |
{ |
{ |
register struct netinfo *p; |
struct netinfo *p; |
|
|
endhostent(); |
endhostent(); |
endnetent(); |
endnetent(); |
|
|
fetchnetstat() |
fetchnetstat() |
{ |
{ |
struct inpcbtable pcbtable; |
struct inpcbtable pcbtable; |
register struct inpcb *head, *prev, *next; |
struct inpcb *head, *prev, *next; |
register struct netinfo *p; |
struct netinfo *p; |
struct inpcb inpcb; |
struct inpcb inpcb; |
struct socket sockb; |
struct socket sockb; |
struct tcpcb tcpcb; |
struct tcpcb tcpcb; |
|
|
|
|
static void |
static void |
enter(inp, so, state, proto) |
enter(inp, so, state, proto) |
register struct inpcb *inp; |
struct inpcb *inp; |
register struct socket *so; |
struct socket *so; |
int state; |
int state; |
char *proto; |
char *proto; |
{ |
{ |
register struct netinfo *p; |
struct netinfo *p; |
|
|
/* |
/* |
* Only take exact matches, any sockets with |
* Only take exact matches, any sockets with |
|
|
void |
void |
shownetstat() |
shownetstat() |
{ |
{ |
register struct netinfo *p, *q; |
struct netinfo *p, *q; |
|
|
/* |
/* |
* First, delete any connections that have gone |
* First, delete any connections that have gone |
|
|
*/ |
*/ |
static void |
static void |
inetprint(in, port, proto) |
inetprint(in, port, proto) |
register struct in_addr *in; |
struct in_addr *in; |
int port; |
int port; |
char *proto; |
char *proto; |
{ |
{ |
|
|
#ifdef INET6 |
#ifdef INET6 |
static void |
static void |
inet6print(in6, port, proto) |
inet6print(in6, port, proto) |
register struct in6_addr *in6; |
struct in6_addr *in6; |
int port; |
int port; |
char *proto; |
char *proto; |
{ |
{ |
|
|
cmdnetstat(cmd, args) |
cmdnetstat(cmd, args) |
char *cmd, *args; |
char *cmd, *args; |
{ |
{ |
register struct netinfo *p; |
struct netinfo *p; |
|
|
if (prefix(cmd, "all")) { |
if (prefix(cmd, "all")) { |
aflag = !aflag; |
aflag = !aflag; |