summaryrefslogtreecommitdiffstats
path: root/sys/contrib/ipfilter/netinet/ip_log.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/contrib/ipfilter/netinet/ip_log.c')
-rw-r--r--sys/contrib/ipfilter/netinet/ip_log.c43
1 files changed, 13 insertions, 30 deletions
diff --git a/sys/contrib/ipfilter/netinet/ip_log.c b/sys/contrib/ipfilter/netinet/ip_log.c
index e57bd69..4e8488b 100644
--- a/sys/contrib/ipfilter/netinet/ip_log.c
+++ b/sys/contrib/ipfilter/netinet/ip_log.c
@@ -3,7 +3,8 @@
*
* See the IPFILTER.LICENCE file for details on licencing.
*
- * $Id: ip_log.c,v 2.5.2.21 2002/10/26 06:21:30 darrenr Exp $
+ * $Id: ip_log.c,v 2.5.2.1 2000/07/19 13:11:47 darrenr Exp $
+ * $FreeBSD$
*/
#include <sys/param.h>
#if defined(KERNEL) && !defined(_KERNEL)
@@ -14,9 +15,14 @@
# include "opt_ipfilter_log.h"
#endif
#ifdef __FreeBSD__
-# if defined(_KERNEL) && !defined(IPFILTER_LKM)
-# if defined(__FreeBSD_version) && (__FreeBSD_version >= 300000)
-# include "opt_ipfilter.h"
+# if defined(IPFILTER_LKM) || defined(_KERNEL)
+# if !defined(__FreeBSD_version)
+# include <sys/osreldate.h>
+# endif
+# if !defined(IPFILTER_LKM)
+# if defined(__FreeBSD_version) && (__FreeBSD_version >= 300000)
+# include "opt_ipfilter.h"
+# endif
# endif
# else
# ifdef KLD_MODULE
@@ -30,7 +36,7 @@
# endif
# endif
#endif
-#ifdef IPFILTER_LOG
+#ifdef IPFILTER_LOG
# ifndef SOLARIS
# define SOLARIS (defined(sun) && (defined(__svr4__) || defined(__SVR4)))
# endif
@@ -99,9 +105,6 @@
# include <netinet/tcp.h>
# include <netinet/udp.h>
# include <netinet/ip_icmp.h>
-# ifdef USE_INET6
-# include <netinet/icmp6.h>
-# endif
# include <netinet/ip_var.h>
# ifndef _KERNEL
# include <syslog.h>
@@ -214,26 +217,6 @@ mb_t *m;
break;
}
}
-#ifdef USE_INET6
- else if (p == IPPROTO_ICMPV6) {
- struct icmp6_hdr *icmp;
-
- icmp = (struct icmp6_hdr *)fin->fin_dp;
-
- /*
- * For ICMPV6, if the packet is an error packet, also
- * include the information about the packet which
- * caused the error.
- */
- if (icmp->icmp6_type < 128) {
- hlen += MIN(sizeof(struct icmp6_hdr) + 8,
- fin->fin_dlen);
- } else {
- hlen += MIN(sizeof(struct icmp6_hdr),
- fin->fin_dlen);
- }
- }
-#endif
}
/*
* Get the interface number and name to which this packet is
@@ -357,10 +340,10 @@ int *types, cnt;
ipl->ipl_dsize = len;
# ifdef _KERNEL
# if SOLARIS || defined(sun)
- uniqtime(&ipl->ipl_tv);
+ uniqtime((struct timeval *)&ipl->ipl_sec);
# else
# if BSD >= 199306 || defined(__FreeBSD__) || defined(__sgi)
- microtime(&ipl->ipl_tv);
+ microtime((struct timeval *)&ipl->ipl_sec);
# endif
# endif
# else
OpenPOWER on IntegriCloud