mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2025-01-11 17:04:19 +01:00
fix conflicts
This commit is contained in:
parent
8982edd714
commit
6dda709260
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=60854
File diff suppressed because it is too large
Load Diff
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 1995-1998 by Darren Reed.
|
||||
* Copyright (C) 1995-2000 by Darren Reed.
|
||||
*
|
||||
* Redistribution and use in source and binary forms are permitted
|
||||
* provided that this notice is preserved and due credit is given
|
||||
@ -12,6 +12,12 @@
|
||||
#ifndef __IP_STATE_H__
|
||||
#define __IP_STATE_H__
|
||||
|
||||
#if defined(__STDC__) || defined(__GNUC__)
|
||||
# define SIOCDELST _IOW('r', 61, struct ipstate *)
|
||||
#else
|
||||
# define SIOCDELST _IOW(r, 61, struct ipstate *)
|
||||
#endif
|
||||
|
||||
#define IPSTATE_SIZE 257
|
||||
#define IPSTATE_MAX 2048 /* Maximum number of states held */
|
||||
|
||||
@ -47,17 +53,20 @@ typedef struct tcpstate {
|
||||
|
||||
typedef struct ipstate {
|
||||
struct ipstate *is_next;
|
||||
struct ipstate **is_pnext;
|
||||
struct ipstate *is_hnext;
|
||||
struct ipstate **is_phnext;
|
||||
u_long is_age;
|
||||
u_int is_pass;
|
||||
U_QUAD_T is_pkts;
|
||||
U_QUAD_T is_bytes;
|
||||
void *is_ifpin;
|
||||
void *is_ifpout;
|
||||
void *is_ifp[2];
|
||||
frentry_t *is_rule;
|
||||
struct in_addr is_src;
|
||||
struct in_addr is_dst;
|
||||
union i6addr is_src;
|
||||
union i6addr is_dst;
|
||||
u_char is_p; /* Protocol */
|
||||
u_char is_rout; /* Is rule in/out ? */
|
||||
u_char is_v;
|
||||
u_int is_hv;
|
||||
u_32_t is_flags;
|
||||
u_32_t is_opt; /* packet options set */
|
||||
u_32_t is_optmsk; /* " " mask */
|
||||
@ -70,15 +79,21 @@ typedef struct ipstate {
|
||||
tcpstate_t is_ts;
|
||||
udpstate_t is_us;
|
||||
} is_ps;
|
||||
char is_ifname[2][IFNAMSIZ];
|
||||
#if SOLARIS || defined(__sgi)
|
||||
kmutex_t is_lock;
|
||||
#endif
|
||||
} ipstate_t;
|
||||
|
||||
#define is_icmp is_ps.is_ics
|
||||
#define is_type is_icmp.ics_type
|
||||
#define is_code is_icmp.ics_code
|
||||
#define is_tcp is_ps.is_ts
|
||||
#define is_udp is_ps.is_us
|
||||
#define is_send is_tcp.ts_data[0].td_end
|
||||
#define is_dend is_tcp.ts_data[1].td_end
|
||||
#define is_saddr is_src.in4.s_addr
|
||||
#define is_daddr is_dst.in4.s_addr
|
||||
#define is_icmp is_ps.is_ics
|
||||
#define is_type is_icmp.ics_type
|
||||
#define is_code is_icmp.ics_code
|
||||
#define is_tcp is_ps.is_ts
|
||||
#define is_udp is_ps.is_us
|
||||
#define is_send is_tcp.ts_data[0].td_end
|
||||
#define is_dend is_tcp.ts_data[1].td_end
|
||||
#define is_maxswin is_tcp.ts_data[0].td_maxwin
|
||||
#define is_maxdwin is_tcp.ts_data[1].td_maxwin
|
||||
#define is_maxsend is_tcp.ts_data[0].td_maxend
|
||||
@ -86,6 +101,8 @@ typedef struct ipstate {
|
||||
#define is_sport is_tcp.ts_sport
|
||||
#define is_dport is_tcp.ts_dport
|
||||
#define is_state is_tcp.ts_state
|
||||
#define is_ifpin is_ifp[0]
|
||||
#define is_ifpout is_ifp[1]
|
||||
|
||||
#define TH_OPENING (TH_SYN|TH_ACK)
|
||||
/*
|
||||
@ -97,21 +114,30 @@ typedef struct ipstate {
|
||||
* Bits 8,9 are used to indicate wildcard source/destination port matching.
|
||||
*/
|
||||
|
||||
typedef struct ipstate_save {
|
||||
void *ips_next;
|
||||
struct ipstate ips_is;
|
||||
struct frentry ips_fr;
|
||||
} ipstate_save_t;
|
||||
|
||||
#define ips_rule ips_is.is_rule
|
||||
|
||||
|
||||
typedef struct ipslog {
|
||||
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_char isl_state[2];
|
||||
union i6addr isl_src;
|
||||
union i6addr isl_dst;
|
||||
u_short isl_type;
|
||||
union {
|
||||
u_short isl_filler[2];
|
||||
u_short isl_ports[2];
|
||||
u_short isl_icmp;
|
||||
} isl_ps;
|
||||
u_char isl_v;
|
||||
u_char isl_p;
|
||||
u_char isl_flags;
|
||||
u_char isl_state[2];
|
||||
} ipslog_t;
|
||||
|
||||
#define isl_sport isl_ps.isl_ports[0]
|
||||
@ -121,6 +147,7 @@ typedef struct ipslog {
|
||||
#define ISL_NEW 0
|
||||
#define ISL_EXPIRE 0xffff
|
||||
#define ISL_FLUSH 0xfffe
|
||||
#define ISL_REMOVE 0xfffd
|
||||
|
||||
|
||||
typedef struct ips_stat {
|
||||
@ -138,6 +165,7 @@ typedef struct ips_stat {
|
||||
u_long iss_logfail;
|
||||
u_long iss_inuse;
|
||||
ipstate_t **iss_table;
|
||||
ipstate_t *iss_list;
|
||||
} ips_stat_t;
|
||||
|
||||
|
||||
@ -148,13 +176,14 @@ extern u_long fr_tcptimeout;
|
||||
extern u_long fr_tcpclosed;
|
||||
extern u_long fr_udptimeout;
|
||||
extern u_long fr_icmptimeout;
|
||||
extern int fr_state_lock;
|
||||
extern int fr_stateinit __P((void));
|
||||
extern int fr_tcpstate __P((ipstate_t *, fr_info_t *, ip_t *, tcphdr_t *));
|
||||
extern ipstate_t *fr_addstate __P((ip_t *, fr_info_t *, u_int));
|
||||
extern frentry_t *fr_checkstate __P((ip_t *, fr_info_t *));
|
||||
extern void ip_statesync __P((void *));
|
||||
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_tcp_age __P((u_long *, u_char *, fr_info_t *, int));
|
||||
extern void fr_stateunload __P((void));
|
||||
extern void ipstate_log __P((struct ipstate *, u_int));
|
||||
#if defined(__NetBSD__) || defined(__OpenBSD__)
|
||||
|
Loading…
Reference in New Issue
Block a user