Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

NetBSD 1.6

  • Loading branch information...
commit 9e58c88729563e61ccbb85980c3fd12bf84227ea 1 parent b27857a
itojun authored
Showing with 22 additions and 19 deletions.
  1. +13 −13 netbsd/usr.sbin/trpt/trpt.8
  2. +9 −6 netbsd/usr.sbin/trpt/trpt.c
View
26 netbsd/usr.sbin/trpt/trpt.8
@@ -1,4 +1,4 @@
-.\" $NetBSD: trpt.8,v 1.11 1999/03/22 18:44:13 garbled Exp $
+.\" $NetBSD: trpt.8,v 1.13 2002/02/02 02:03:48 wiz Exp $
.\"
.\" Copyright (c) 1983, 1991, 1993
.\" The Regents of the University of California. All rights reserved.
@@ -59,7 +59,7 @@ when a socket is marked for
(see
.Xr setsockopt 2 ) ,
and prints a readable description of these records.
-When no options are supplied,
+When no options are supplied,
.Nm
prints all the trace records found in the system
grouped according to
@@ -110,9 +110,9 @@ is as follows.
Isolate the problem and enable debugging on the
socket(s) involved in the connection.
Find the address of the protocol control blocks
-associated with the sockets using the
+associated with the sockets using the
.Fl A
-option to
+option to
.Xr netstat 1 .
Then run
.Nm
@@ -136,10 +136,6 @@ default kernel memory
.It Pa /netbsd
default system namelist
.El
-.Sh SEE ALSO
-.Xr netstat 1 ,
-.Xr setsockopt 2 ,
-.Xr trsp 8
.Sh DIAGNOSTICS
.Bl -tag -width Ds
.It Sy no namelist
@@ -147,14 +143,18 @@ When the system image doesn't
contain the proper symbols to find the trace buffer;
others which should be self explanatory.
.El
+.Sh SEE ALSO
+.Xr netstat 1 ,
+.Xr setsockopt 2 ,
+.Xr trsp 8
+.Sh HISTORY
+The
+.Nm
+command appeared in
+.Bx 4.2 .
.Sh BUGS
Should also print the data for each input or output,
but this is not saved in the trace record.
.Pp
The output format is inscrutable and should be described
here.
-.Sh HISTORY
-The
-.Nm
-command appeared in
-.Bx 4.2 .
View
15 netbsd/usr.sbin/trpt/trpt.c
@@ -1,4 +1,4 @@
-/* $NetBSD: trpt.c,v 1.9 1999/07/01 19:15:03 itojun Exp $ */
+/* $NetBSD: trpt.c,v 1.12 2001/09/11 15:45:01 thorpej Exp $ */
/*-
* Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -81,7 +81,7 @@ __COPYRIGHT(
#if 0
static char sccsid[] = "@(#)trpt.c 8.1 (Berkeley) 6/6/93";
#else
-__RCSID("$NetBSD: trpt.c,v 1.9 1999/07/01 19:15:03 itojun Exp $");
+__RCSID("$NetBSD: trpt.c,v 1.12 2001/09/11 15:45:01 thorpej Exp $");
#endif
#endif /* not lint */
@@ -144,7 +144,9 @@ static caddr_t tcp_pcbs[TCP_NDEBUG];
static n_time ntime;
static int aflag, follow, sflag, tflag;
-extern char *__progname;
+/* see sys/netinet/tcp_debug.c */
+struct tcp_debug tcp_debug[TCP_NDEBUG];
+int tcp_debx;
int main __P((int, char *[]));
void dotrace __P((caddr_t));
@@ -510,9 +512,10 @@ tcp_trace(act, ostate, atp, tp, family, packet, req)
register int i;
for (i = 0; i < TCPT_NTIMERS; i++) {
- if (tp->t_timer[i] == 0)
+ if ((tp->t_timer[i].c_flags & CALLOUT_ACTIVE) == 0)
continue;
- printf("%s%s=%d", cp, tcptimers[i], tp->t_timer[i]);
+ printf("%s%s=%llu", cp, tcptimers[i],
+ (unsigned long long) tp->t_timer[i].c_time);
if (i == TCPT_REXMT)
printf(" (t_rxtshft=%d)", tp->t_rxtshift);
cp = ", ";
@@ -545,6 +548,6 @@ usage()
{
(void) fprintf(stderr, "usage: %s [-afjst] [-p hex-address]"
- " [-N system] [-M core]\n", __progname);
+ " [-N system] [-M core]\n", getprogname());
exit(1);
}
Please sign in to comment.
Something went wrong with that request. Please try again.