summaryrefslogtreecommitdiff
path: root/usr.sbin/ipmon
diff options
context:
space:
mode:
authorFederico G. Schwindt <fgsch@cvs.openbsd.org>2001-01-17 07:27:00 +0000
committerFederico G. Schwindt <fgsch@cvs.openbsd.org>2001-01-17 07:27:00 +0000
commit14afa526ef204e18153633fd6486655996aa2d7a (patch)
tree78ab72271766a9947e6828577ccba6c8a926e2fa /usr.sbin/ipmon
parenta7ac57bcb62ccc6c6f6495207a169edfc28f5760 (diff)
IPF 3.4.16 userland.
Diffstat (limited to 'usr.sbin/ipmon')
-rw-r--r--usr.sbin/ipmon/ipmon.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/usr.sbin/ipmon/ipmon.c b/usr.sbin/ipmon/ipmon.c
index d96d409ab05..c65c7fb56df 100644
--- a/usr.sbin/ipmon/ipmon.c
+++ b/usr.sbin/ipmon/ipmon.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ipmon.c,v 1.25 2001/01/17 05:01:02 fgsch Exp $ */
+/* $OpenBSD: ipmon.c,v 1.26 2001/01/17 07:26:59 fgsch Exp $ */
/*
* Copyright (C) 1993-2000 by Darren Reed.
@@ -9,7 +9,7 @@
*/
#if !defined(lint)
static const char sccsid[] = "@(#)ipmon.c 1.21 6/5/96 (C)1993-2000 Darren Reed";
-static const char rcsid[] = "@(#)$IPFilter: ipmon.c,v 2.12.2.6 2000/10/31 22:17:41 darrenr Exp $";
+static const char rcsid[] = "@(#)$IPFilter: ipmon.c,v 2.12.2.8 2001/01/10 06:18:08 darrenr Exp $";
#endif
#ifndef SOLARIS
@@ -93,6 +93,8 @@ struct flags tcpfl[] = {
{ TH_FIN, 'F' },
{ TH_URG, 'U' },
{ TH_PUSH,'P' },
+ { TH_ECN, 'E' },
+ { TH_CWR, 'C' },
{ 0, '\0' }
};
@@ -146,6 +148,7 @@ static char **tcp_ports = NULL;
#define OPT_FILTER 0x200
#define OPT_PORTNUM 0x400
#define OPT_LOGALL (OPT_NAT|OPT_STATE|OPT_FILTER)
+#define OPT_LOGBODY 0x800
#define HOSTNAME_V4(a,b) hostname((a), 4, (u_32_t *)&(b))
@@ -838,6 +841,8 @@ printipflog:
dumphex(log, (u_char *)buf, sizeof(iplog_t) + sizeof(*ipf));
if (opts & OPT_HEXBODY)
dumphex(log, (u_char *)ip, ipf->fl_plen + ipf->fl_hlen);
+ else if ((opts & OPT_LOGBODY) && (ipf->fl_flags & FR_LOGBODY))
+ dumphex(log, (u_char *)ip + ipf->fl_hlen, ipf->fl_plen);
}
@@ -949,7 +954,7 @@ char *argv[];
iplfile[1] = IPNAT_NAME;
iplfile[2] = IPSTATE_NAME;
- while ((c = getopt(argc, argv, "?aDf:FhnN:o:O:pP:sS:tvxX")) != -1)
+ while ((c = getopt(argc, argv, "?abDf:FhnN:o:O:pP:sS:tvxX")) != -1)
switch (c)
{
case 'a' :
@@ -958,6 +963,9 @@ char *argv[];
fdt[1] = IPL_LOGNAT;
fdt[2] = IPL_LOGSTATE;
break;
+ case 'b' :
+ opts |= OPT_LOGBODY;
+ break;
case 'D' :
make_daemon = 1;
break;