ip_state.h revision e25114606324e602221c0929ba86c88e159df849
/*
* Copyright (C) 1995-2001 by Darren Reed.
*
* See the IPFILTER.LICENCE file for details on licencing.
*
* @(#)ip_state.h 1.3 1/12/96 (C) 1995 Darren Reed
* $Id: ip_state.h,v 2.68.2.5 2005/08/11 19:58:04 darrenr Exp $
*
* Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef __IP_STATE_H__
#define __IP_STATE_H__
#else
#endif
struct ipscan;
#ifndef IPSTATE_SIZE
# define IPSTATE_SIZE 5737
#endif
#ifndef IPSTATE_MAX
#endif
typedef struct ipstate {
void *is_ifp[4];
void *is_sync;
int is_ref; /* reference count */
int is_isninc[2];
/* in both directions */
/* in both directions */
union {
} is_ps;
char is_group[FR_GROUPLEN];
} ipstate_t;
#define IS_TCPFSM 0x10000
#define IS_STRICT 0x20000
#define IS_ISNSYN 0x40000
#define IS_ISNACK 0x80000
#define IS_STATESYNC 0x100000
/*
* IS_SC flags are for scan-operations that need to be recognised in state.
*/
#define IS_SC_CLIENT 0x10000000
#define IS_SC_SERVER 0x20000000
#define IS_SC_MATCHC 0x40000000
#define IS_SC_MATCHS 0x80000000
/*
* Flags that can be passed into fr_addstate
*/
#define IS_INHERITED 0x0fffff00
/*
* is_flags:
* Bits 0 - 3 are use as a mask with the current packet's bits to check for
* Bits 4 - 7 are set from the initial packet and contain what the packet
* anded with bits 0-3 must match.
* Bits 8,9 are used to indicate wildcard source/destination port matching.
* Bits 10,11 are reserved for other wildcard flag compatibility.
* Bits 12,13 are for scaning.
*/
typedef struct ipstate_save {
void *ips_next;
typedef struct ipslog {
union {
} isl_ps;
char isl_group[FR_GROUPLEN];
} ipslog_t;
#define ISL_NEW 0
#define ISL_CLONE 1
#define ISL_EXPIRE 0xffff
#define ISL_FLUSH 0xfffe
#define ISL_REMOVE 0xfffd
#define ISL_INTERMEDIATE 0xfffc
#define ISL_KILLED 0xfffb
#define ISL_ORPHAN 0xfffa
typedef struct ips_stat {
int iss_statesize;
int iss_statemax;
} ips_stat_t;
typedef struct port_pair {
} port_pair_t;
struct ipftq *, int));
#endif /* __IP_STATE_H__ */