summaryrefslogtreecommitdiffstats
path: root/sys/netinet/ip_state.h
diff options
context:
space:
mode:
Diffstat (limited to 'sys/netinet/ip_state.h')
-rw-r--r--sys/netinet/ip_state.h48
1 files changed, 40 insertions, 8 deletions
diff --git a/sys/netinet/ip_state.h b/sys/netinet/ip_state.h
index ee30b98..b92f8c2 100644
--- a/sys/netinet/ip_state.h
+++ b/sys/netinet/ip_state.h
@@ -6,7 +6,7 @@
* to the original author and the contributors.
*
* @(#)ip_state.h 1.3 1/12/96 (C) 1995 Darren Reed
- * $Id: ip_state.h,v 2.0.1.1 1997/01/09 15:14:43 darrenr Exp $
+ * $Id: ip_state.h,v 1.1.1.2 1997/04/03 10:11:33 darrenr Exp $
*/
#ifndef __IP_STATE_H__
#define __IP_STATE_H__
@@ -37,8 +37,10 @@ typedef struct tcpstate {
typedef struct ipstate {
struct ipstate *is_next;
- int is_age;
+ u_long is_age;
u_int is_pass;
+ U_QUAD_T is_pkts;
+ U_QUAD_T is_bytes;
struct in_addr is_src;
struct in_addr is_dst;
u_char is_p;
@@ -63,6 +65,31 @@ typedef struct ipstate {
#define TH_OPENING (TH_SYN|TH_ACK)
+
+typedef struct ipslog {
+ struct timeval isl_tv;
+ U_QUAD_T isl_pkts;
+ U_QUAD_T isl_bytes;
+ struct in_addr isl_src;
+ struct in_addr isl_dst;
+ u_char isl_p;
+ u_char isl_flags;
+ u_short isl_type;
+ union {
+ u_short isl_filler[2];
+ u_short isl_ports[2];
+ u_short isl_icmp;
+ } isl_ps;
+} ipslog_t;
+
+#define isl_sport isl_ps.isl_ports[0]
+#define isl_dport isl_ps.isl_ports[1]
+#define isl_itype isl_ps.isl_icmp
+
+#define ISL_NEW 0
+#define ISL_EXPIRE 0xffff
+
+
typedef struct ips_stat {
u_long iss_hits;
u_long iss_miss;
@@ -74,13 +101,18 @@ typedef struct ips_stat {
u_long iss_expire;
u_long iss_fin;
u_long iss_active;
+ u_long iss_logged;
+ u_long iss_logfail;
ipstate_t **iss_table;
} ips_stat_t;
-extern ips_stat_t *fr_statetstats();
-extern int fr_addstate(), fr_checkstate();
-extern void fr_timeoutstate(), set_tcp_age();
-# ifdef _KERNEL
-extern void fr_stateunload();
-# endif
+extern int fr_tcpstate __P((ipstate_t *, fr_info_t *, ip_t *,
+ tcphdr_t *, u_short));
+extern ips_stat_t *fr_statetstats __P((void));
+extern int fr_addstate __P((ip_t *, fr_info_t *, u_int));
+extern int fr_checkstate __P((ip_t *, fr_info_t *));
+extern void fr_timeoutstate __P((void));
+extern void fr_tcp_age __P((u_long *, u_char *, ip_t *, fr_info_t *, int));
+extern void fr_stateunload __P((void));
+extern void ipstate_log __P((struct ipstate *, u_short));
#endif /* __IP_STATE_H__ */
OpenPOWER on IntegriCloud