version 1.34, 2011/03/02 06:48:17 |
version 1.35, 2012/01/30 14:35:50 |
|
|
|
|
if (!aflag) { |
if (!aflag) { |
if (!(inpcb.inp_flags & INP_IPV6) && |
if (!(inpcb.inp_flags & INP_IPV6) && |
inet_lnaof(inpcb.inp_laddr) == INADDR_ANY) |
inet_lnaof(inpcb.inp_faddr) == INADDR_ANY) |
continue; |
continue; |
if ((inpcb.inp_flags & INP_IPV6) && |
if ((inpcb.inp_flags & INP_IPV6) && |
IN6_IS_ADDR_UNSPECIFIED(&inpcb.inp_laddr6)) |
IN6_IS_ADDR_UNSPECIFIED(&inpcb.inp_faddr6)) |
continue; |
continue; |
} |
} |
KREAD(inpcb.inp_socket, &sockb, sizeof (sockb)); |
KREAD(inpcb.inp_socket, &sockb, sizeof (sockb)); |
if (istcp) { |
if (istcp) { |
KREAD(inpcb.inp_ppcb, &tcpcb, sizeof (tcpcb)); |
KREAD(inpcb.inp_ppcb, &tcpcb, sizeof (tcpcb)); |
|
if (!aflag && tcpcb.t_state <= TCPS_LISTEN) |
|
continue; |
enter(&inpcb, &sockb, tcpcb.t_state, "tcp"); |
enter(&inpcb, &sockb, tcpcb.t_state, "tcp"); |
} else |
} else |
enter(&inpcb, &sockb, 0, "udp"); |
enter(&inpcb, &sockb, 0, "udp"); |
|
|
ns_keyboard_callback(int ch) |
ns_keyboard_callback(int ch) |
{ |
{ |
switch (ch) { |
switch (ch) { |
|
case 'a': |
|
aflag = !aflag; |
|
gotsig_alarm = 1; |
|
break; |
case 'n': |
case 'n': |
nflag = !nflag; |
nflag = !nflag; |
|
gotsig_alarm = 1; |
|
break; |
|
case 'r': |
|
aflag = 0; |
|
nflag = 1; |
|
protos = TCP|UDP; |
gotsig_alarm = 1; |
gotsig_alarm = 1; |
break; |
break; |
case 't': |
case 't': |