4 #include <linux/types.h>
10 #define NF_OSF_GENRE (1 << 0)
11 #define NF_OSF_TTL (1 << 1)
12 #define NF_OSF_LOG (1 << 2)
13 #define NF_OSF_INVERT (1 << 3)
15 #define NF_OSF_LOGLEVEL_ALL 0 /* log all matched fingerprints */
16 #define NF_OSF_LOGLEVEL_FIRST 1 /* log only the first matced fingerprint */
17 #define NF_OSF_LOGLEVEL_ALL_KNOWN 2 /* do not log unknown packets */
19 #define NF_OSF_TTL_TRUE 0 /* True ip and fingerprint TTL comparison */
21 /* Check if ip TTL is less than fingerprint one */
22 #define NF_OSF_TTL_LESS 1
24 /* Do not compare ip and fingerprint TTL at all */
25 #define NF_OSF_TTL_NOCHECK 2
27 #define NF_OSF_FLAGMASK (NF_OSF_GENRE | NF_OSF_TTL | \
28 NF_OSF_LOG | NF_OSF_INVERT)
29 /* Wildcard MSS (kind of).
30 * It is used to implement a state machine for the different wildcard values
31 * of the MSS and window sizes.
38 /* This struct represents IANA options
39 * http://www.iana.org/assignments/tcp-parameters
47 char genre[MAXGENRELEN];
54 struct nf_osf_user_finger {
61 char genre[MAXGENRELEN];
62 char version[MAXGENRELEN];
63 char subtype[MAXGENRELEN];
65 /* MAX_IPOPTLEN is maximum if all options are NOPs or EOLs */
66 struct nf_osf_opt opt[MAX_IPOPTLEN];
70 struct nf_osf_user_finger f;
75 /* Defines for IANA option kinds */
77 OSFOPT_EOL = 0, /* End of options */
79 OSFOPT_MSS, /* Maximum segment size */
80 OSFOPT_WSO, /* Window scale option */
81 OSFOPT_SACKP, /* SACK permitted */
82 OSFOPT_SACK, /* SACK */
85 OSFOPT_TS, /* Timestamp option */
86 OSFOPT_POCP, /* Partial Order Connection Permitted */
87 OSFOPT_POSP, /* Partial Order Service Profile */
89 /* Others are not used in the current OSF */
93 /* Initial window size option state machine: multiple of mss, mtu or
94 * plain numeric value. Can also be made as plain numeric value which
95 * is not a multiple of specified value.
97 enum nf_osf_window_size_options {
105 enum nf_osf_attr_type {
112 * Add/remove fingerprint from the kernel.
114 enum nf_osf_msg_types {
120 #endif /* _NF_OSF_H */