Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/npf/npfd set the timeout to 1 second so we can see ...
details: https://anonhg.NetBSD.org/src/rev/d5bc74e1b0d1
branches: trunk
changeset: 350134:d5bc74e1b0d1
user: christos <christos%NetBSD.org@localhost>
date: Thu Jan 05 16:23:31 2017 +0000
description:
set the timeout to 1 second so we can see packets flowing in real time.
diffstat:
usr.sbin/npf/npfd/npfd_log.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diffs (29 lines):
diff -r fe897a51db31 -r d5bc74e1b0d1 usr.sbin/npf/npfd/npfd_log.c
--- a/usr.sbin/npf/npfd/npfd_log.c Thu Jan 05 14:39:59 2017 +0000
+++ b/usr.sbin/npf/npfd/npfd_log.c Thu Jan 05 16:23:31 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: npfd_log.c,v 1.4 2016/12/30 19:55:46 christos Exp $ */
+/* $NetBSD: npfd_log.c,v 1.5 2017/01/05 16:23:31 christos Exp $ */
/*-
* Copyright (c) 2015 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: npfd_log.c,v 1.4 2016/12/30 19:55:46 christos Exp $");
+__RCSID("$NetBSD: npfd_log.c,v 1.5 2017/01/05 16:23:31 christos Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -93,6 +93,10 @@
errx(EXIT_FAILURE, "pcap_set_snaplen failed: %s",
pcap_geterr(ctx->pcap));
+ if (pcap_set_timeout(ctx->pcap, 1000) == -1)
+ errx(EXIT_FAILURE, "pcap_set_timeout failed: %s",
+ pcap_geterr(ctx->pcap));
+
if (pcap_activate(ctx->pcap) == -1)
errx(EXIT_FAILURE, "pcap_activate failed: %s",
pcap_geterr(ctx->pcap));
Home |
Main Index |
Thread Index |
Old Index