diff options
author | alex <alex@FreeBSD.org> | 1998-01-08 03:03:54 +0000 |
---|---|---|
committer | alex <alex@FreeBSD.org> | 1998-01-08 03:03:54 +0000 |
commit | 35f59936c3cbf51c3f961b2cf754a13f5d40359e (patch) | |
tree | 4599342babe5d77e88f8834779900be03c908afb /sys/netinet/ip_fw.h | |
parent | 4ff390e7194d0fdda36569ce05d58c4d3aa8fe01 (diff) | |
download | FreeBSD-src-35f59936c3cbf51c3f961b2cf754a13f5d40359e.zip FreeBSD-src-35f59936c3cbf51c3f961b2cf754a13f5d40359e.tar.gz |
Bump up packet and byte counters to 64-bit unsigned ints. As a
consequence, ipfw's list command now adjusts its output at runtime
based on the largest packet/byte counter values.
NOTE:
o The ipfw struct has changed requiring a recompile of both kernel
and userland ipfw utility.
o This probably should not be brought into 2.2.
PR: 3738
Diffstat (limited to 'sys/netinet/ip_fw.h')
-rw-r--r-- | sys/netinet/ip_fw.h | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/sys/netinet/ip_fw.h b/sys/netinet/ip_fw.h index 20e6f3d..6f7deb2 100644 --- a/sys/netinet/ip_fw.h +++ b/sys/netinet/ip_fw.h @@ -11,7 +11,7 @@ * * This software is provided ``AS IS'' without any warranties of any kind. * - * $Id: ip_fw.h,v 1.29 1997/09/16 11:43:57 bde Exp $ + * $Id: ip_fw.h,v 1.30 1997/10/28 15:58:45 bde Exp $ */ #ifndef _IP_FW_H @@ -49,17 +49,20 @@ union ip_fw_if { */ struct ip_fw { - u_long fw_pcnt,fw_bcnt; /* Packet and byte counters */ + u_int64_t fw_pcnt,fw_bcnt; /* Packet and byte counters */ struct in_addr fw_src, fw_dst; /* Source and destination IP addr */ struct in_addr fw_smsk, fw_dmsk; /* Mask for src and dest IP addr */ u_short fw_number; /* Rule number */ u_short fw_flg; /* Flags word */ #define IP_FW_MAX_PORTS 10 /* A reasonable maximum */ - u_short fw_pts[IP_FW_MAX_PORTS]; /* Array of port numbers to match */ + union { + u_short fw_pts[IP_FW_MAX_PORTS]; /* Array of port numbers to match */ +#define IP_FW_ICMPTYPES_MAX 128 +#define IP_FW_ICMPTYPES_DIM (IP_FW_ICMPTYPES_MAX / (sizeof(unsigned) * 8)) + unsigned fw_icmptypes[IP_FW_ICMPTYPES_DIM]; /* ICMP types bitmap */ + } fw_uar; u_char fw_ipopt,fw_ipnopt; /* IP options set/unset */ u_char fw_tcpf,fw_tcpnf; /* TCP flags set/unset */ -#define IP_FW_ICMPTYPES_DIM (32 / (sizeof(unsigned) * 8)) - unsigned fw_icmptypes[IP_FW_ICMPTYPES_DIM]; /* ICMP types bitmap */ long timestamp; /* timestamp (tv_sec) of last match */ union ip_fw_if fw_in_if, fw_out_if; /* Incoming and outgoing interfaces */ union { |