print the timer flags.
This commit is contained in:
parent
a4efcfa6a1
commit
b0698f50d1
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: Makefile,v 1.40 2014/11/06 21:30:09 christos Exp $
|
||||
# $NetBSD: Makefile,v 1.41 2015/02/07 19:36:06 christos Exp $
|
||||
# from: @(#)Makefile 8.1 (Berkeley) 6/12/93
|
||||
|
||||
.include <bsd.own.mk>
|
||||
|
@ -11,8 +11,8 @@ SRCS= atalk.c bpf.c fast_ipsec.c if.c inet.c inet6.c \
|
|||
unix.c vtw.c rtutil.c
|
||||
BINGRP= kmem
|
||||
BINMODE=2555
|
||||
LDADD= -lkvm
|
||||
DPADD= ${LIBKVM}
|
||||
LDADD= -lutil -lkvm
|
||||
DPADD= ${LIBUTIL} ${LIBKVM}
|
||||
CPPFLAGS+= -DIPSEC -I${.CURDIR}
|
||||
CPPFLAGS+= -I${NETBSDSRCDIR}/sys/dist/pf
|
||||
CPPFLAGS+= -I${NETBSDSRCDIR}/sbin/route
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: inet.c,v 1.104 2013/11/23 22:01:12 christos Exp $ */
|
||||
/* $NetBSD: inet.c,v 1.105 2015/02/07 19:36:06 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1983, 1988, 1993
|
||||
|
@ -34,7 +34,7 @@
|
|||
#if 0
|
||||
static char sccsid[] = "from: @(#)inet.c 8.4 (Berkeley) 4/20/94";
|
||||
#else
|
||||
__RCSID("$NetBSD: inet.c,v 1.104 2013/11/23 22:01:12 christos Exp $");
|
||||
__RCSID("$NetBSD: inet.c,v 1.105 2015/02/07 19:36:06 christos Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
|
@ -87,6 +87,7 @@ __RCSID("$NetBSD: inet.c,v 1.104 2013/11/23 22:01:12 christos Exp $");
|
|||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
#include <err.h>
|
||||
#include <util.h>
|
||||
#include "netstat.h"
|
||||
#include "vtw.h"
|
||||
#include "prog_ops.h"
|
||||
|
@ -982,10 +983,14 @@ tcp_dump(u_long off, const char *name, u_long pcbaddr)
|
|||
|
||||
printf("Timers:\n");
|
||||
for (i = 0; i < TCPT_NTIMERS; i++) {
|
||||
char buf[128];
|
||||
ci = (callout_impl_t *)&tcpcb.t_timer[i];
|
||||
printf("\t%s: %d", tcptimers[i],
|
||||
(ci->c_flags & CALLOUT_PENDING) ?
|
||||
ci->c_time - hardticks : 0);
|
||||
snprintb(buf, sizeof(buf), CALLOUT_FMT, ci->c_flags);
|
||||
printf("\t%s\t%s", tcptimers[i], buf);
|
||||
if (ci->c_flags & CALLOUT_PENDING)
|
||||
printf("\t%d\n", ci->c_time - hardticks);
|
||||
else
|
||||
printf("\n");
|
||||
}
|
||||
printf("\n\n");
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: inet6.c,v 1.66 2013/11/23 22:01:12 christos Exp $ */
|
||||
/* $NetBSD: inet6.c,v 1.67 2015/02/07 19:36:06 christos Exp $ */
|
||||
/* BSDI inet.c,v 2.3 1995/10/24 02:19:29 prb Exp */
|
||||
|
||||
/*
|
||||
|
@ -64,7 +64,7 @@
|
|||
#if 0
|
||||
static char sccsid[] = "@(#)inet.c 8.4 (Berkeley) 4/20/94";
|
||||
#else
|
||||
__RCSID("$NetBSD: inet6.c,v 1.66 2013/11/23 22:01:12 christos Exp $");
|
||||
__RCSID("$NetBSD: inet6.c,v 1.67 2015/02/07 19:36:06 christos Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
|
@ -135,6 +135,7 @@ extern const char * const tcptimers[];
|
|||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <util.h>
|
||||
#include "netstat.h"
|
||||
#include "vtw.h"
|
||||
#include "prog_ops.h"
|
||||
|
@ -1468,10 +1469,14 @@ tcp6_dump(u_long off, const char *name, u_long pcbaddr)
|
|||
printf("TCP Protocol Control Block at 0x%08lx:\n\n", pcbaddr);
|
||||
printf("Timers:\n");
|
||||
for (i = 0; i < TCP6T_NTIMERS; i++) {
|
||||
char buf[128];
|
||||
ci = (callout_impl_t *)&tcpcb.t_timer[i];
|
||||
printf("\t%s: %d", tcptimers[i],
|
||||
(ci->c_flags & CALLOUT_PENDING) ?
|
||||
ci->c_time - hardticks : 0);
|
||||
snprintb(buf, sizeof(buf), CALLOUT_FMT, ci->c_flags);
|
||||
printf("\t%s\t%s", tcptimers[i], buf);
|
||||
if (ci->c_flags & CALLOUT_PENDING)
|
||||
printf("\t%d\n", ci->c_time - hardticks);
|
||||
else
|
||||
printf("\n");
|
||||
}
|
||||
printf("\n\n");
|
||||
|
||||
|
|
Loading…
Reference in New Issue