summaryrefslogtreecommitdiffstats
path: root/contrib/tcpdump/tcpdump.c
diff options
context:
space:
mode:
authordelphij <delphij@FreeBSD.org>2012-10-05 20:19:28 +0000
committerdelphij <delphij@FreeBSD.org>2012-10-05 20:19:28 +0000
commitdca5e2df844aab1432db6569445dc152e22cb279 (patch)
tree9869d83ad1eec4a1fa6e21d5865136e11aa5f9c0 /contrib/tcpdump/tcpdump.c
parenta130b811b9a9a99ca8b02c74857b7fa5be4a6e2a (diff)
parent69fe8a0033b22318969c85b57837b48863946665 (diff)
downloadFreeBSD-src-dca5e2df844aab1432db6569445dc152e22cb279.zip
FreeBSD-src-dca5e2df844aab1432db6569445dc152e22cb279.tar.gz
MFV: tcpdump 4.3.0.
MFC after: 4 weeks
Diffstat (limited to 'contrib/tcpdump/tcpdump.c')
-rw-r--r--contrib/tcpdump/tcpdump.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/contrib/tcpdump/tcpdump.c b/contrib/tcpdump/tcpdump.c
index 52783d3..8348338 100644
--- a/contrib/tcpdump/tcpdump.c
+++ b/contrib/tcpdump/tcpdump.c
@@ -89,6 +89,12 @@ extern int SIZE_BUF;
#define NAME_MAX 255
#endif
+#ifdef SIGINFO
+#define SIGNAL_REQ_INFO SIGINFO
+#elif SIGUSR1
+#define SIGNAL_REQ_INFO SIGUSR1
+#endif
+
netdissect_options Gndo;
netdissect_options *gndo = &Gndo;
@@ -121,7 +127,7 @@ static void ndo_error(netdissect_options *ndo, const char *fmt, ...)
__attribute__ ((noreturn, format (printf, 2, 3)));
static void ndo_warning(netdissect_options *ndo, const char *fmt, ...);
-#ifdef SIGINFO
+#ifdef SIGNAL_REQ_INFO
RETSIGTYPE requestinfo(int);
#endif
@@ -1351,13 +1357,13 @@ main(int argc, char **argv)
pcap_userdata = (u_char *)&printinfo;
}
-#ifdef SIGINFO
+#ifdef SIGNAL_REQ_INFO
/*
* We can't get statistics when reading from a file rather
* than capturing from a device.
*/
if (RFileName == NULL)
- (void)setsignal(SIGINFO, requestinfo);
+ (void)setsignal(SIGNAL_REQ_INFO, requestinfo);
#endif
if (vflag > 0 && WFileName) {
@@ -1846,7 +1852,7 @@ default_print(const u_char *bp, u_int length)
ndo_default_print(gndo, bp, length);
}
-#ifdef SIGINFO
+#ifdef SIGNAL_REQ_INFO
RETSIGTYPE requestinfo(int signo _U_)
{
if (infodelay)
OpenPOWER on IntegriCloud