2 * Copyright (c) 2003+ Evgeniy Polyakov <johnpol@2ka.mxt.ru>
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 #define MAXGENRELEN 32
25 #define XT_OSF_GENRE (1<<0)
26 #define XT_OSF_TTL (1<<1)
27 #define XT_OSF_LOG (1<<2)
28 #define XT_OSF_INVERT (1<<3)
30 #define XT_OSF_LOGLEVEL_ALL 0 /* log all matched fingerprints */
31 #define XT_OSF_LOGLEVEL_FIRST 1 /* log only the first matced fingerprint */
32 #define XT_OSF_LOGLEVEL_ALL_KNOWN 2 /* do not log unknown packets */
34 #define XT_OSF_TTL_TRUE 0 /* True ip and fingerprint TTL comparison */
35 #define XT_OSF_TTL_LESS 1 /* Check if ip TTL is less than fingerprint one */
36 #define XT_OSF_TTL_NOCHECK 2 /* Do not compare ip and fingerprint TTL at all */
39 char genre[MAXGENRELEN];
47 * Wildcard MSS (kind of).
48 * It is used to implement a state machine for the different wildcard values
49 * of the MSS and window sizes.
57 * This struct represents IANA options
58 * http://www.iana.org/assignments/tcp-parameters
65 struct xt_osf_user_finger {
72 char genre[MAXGENRELEN];
73 char version[MAXGENRELEN];
74 char subtype[MAXGENRELEN];
76 /* MAX_IPOPTLEN is maximum if all options are NOPs or EOLs */
77 struct xt_osf_opt opt[MAX_IPOPTLEN];
81 struct xt_osf_user_finger f;
86 /* Defines for IANA option kinds */
89 OSFOPT_EOL = 0, /* End of options */
91 OSFOPT_MSS, /* Maximum segment size */
92 OSFOPT_WSO, /* Window scale option */
93 OSFOPT_SACKP, /* SACK permitted */
94 OSFOPT_SACK, /* SACK */
97 OSFOPT_TS, /* Timestamp option */
98 OSFOPT_POCP, /* Partial Order Connection Permitted */
99 OSFOPT_POSP, /* Partial Order Service Profile */
101 /* Others are not used in the current OSF */
106 * Initial window size option state machine: multiple of mss, mtu or
107 * plain numeric value. Can also be made as plain numeric value which
108 * is not a multiple of specified value.
110 enum xt_osf_window_size_options {
119 * Add/remove fingerprint from the kernel.
121 enum xt_osf_msg_types {
127 enum xt_osf_attr_type {
133 #endif /* _XT_OSF_H */