diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1997-12-06 21:19:35 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1997-12-06 21:19:35 +0000 |
commit | 1c7a3c2cc8b4df0a3921bd5066e4d0ef8519a798 (patch) | |
tree | 279a53c879c868bdaee7a494a1a9773fa1eded32 /usr.bin/fstat/fstat.c | |
parent | ab1b3ab7e235618e50038fb3f33a57638571ab02 (diff) |
tag direction based on SS_CONNECTOUT
Diffstat (limited to 'usr.bin/fstat/fstat.c')
-rw-r--r-- | usr.bin/fstat/fstat.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/usr.bin/fstat/fstat.c b/usr.bin/fstat/fstat.c index 35fc0e972ff..51b40c4d2b1 100644 --- a/usr.bin/fstat/fstat.c +++ b/usr.bin/fstat/fstat.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fstat.c,v 1.12 1997/08/25 22:27:59 deraadt Exp $ */ +/* $OpenBSD: fstat.c,v 1.13 1997/12/06 21:19:34 deraadt Exp $ */ /*- * Copyright (c) 1988, 1993 @@ -41,7 +41,7 @@ static char copyright[] = #ifndef lint /*static char sccsid[] = "from: @(#)fstat.c 8.1 (Berkeley) 6/6/93";*/ -static char *rcsid = "$OpenBSD: fstat.c,v 1.12 1997/08/25 22:27:59 deraadt Exp $"; +static char *rcsid = "$OpenBSD: fstat.c,v 1.13 1997/12/06 21:19:34 deraadt Exp $"; #endif /* not lint */ #include <sys/param.h> @@ -675,7 +675,11 @@ socktrans(sock, i) inet_ntoa(inpcb.inp_laddr), ntohs(inpcb.inp_lport)); if (inpcb.inp_fport) - printf(" <-> %s:%d", + if (so.so_state & SS_CONNECTOUT) + printf(" --> "); + else + printf(" <-- "); + printf("%s:%d", inpcb.inp_faddr.s_addr == INADDR_ANY ? "*" : inet_ntoa(inpcb.inp_faddr), ntohs(inpcb.inp_fport)); |