4 #include <linux/types.h>
8 #define NF_OSF_GENRE (1 << 0)
9 #define NF_OSF_TTL (1 << 1)
10 #define NF_OSF_LOG (1 << 2)
11 #define NF_OSF_INVERT (1 << 3)
13 #define NF_OSF_LOGLEVEL_ALL 0 /* log all matched fingerprints */
14 #define NF_OSF_LOGLEVEL_FIRST 1 /* log only the first matced fingerprint */
15 #define NF_OSF_LOGLEVEL_ALL_KNOWN 2 /* do not log unknown packets */
17 #define NF_OSF_TTL_TRUE 0 /* True ip and fingerprint TTL comparison */
19 /* Check if ip TTL is less than fingerprint one */
20 #define NF_OSF_TTL_LESS 1
22 /* Do not compare ip and fingerprint TTL at all */
23 #define NF_OSF_TTL_NOCHECK 2
25 #define NF_OSF_FLAGMASK (NF_OSF_GENRE | NF_OSF_TTL | \
26 NF_OSF_LOG | NF_OSF_INVERT)
27 /* Wildcard MSS (kind of).
28 * It is used to implement a state machine for the different wildcard values
29 * of the MSS and window sizes.
36 /* This struct represents IANA options
37 * http://www.iana.org/assignments/tcp-parameters
45 char genre[MAXGENRELEN];
52 struct nf_osf_user_finger {
59 char genre[MAXGENRELEN];
60 char version[MAXGENRELEN];
61 char subtype[MAXGENRELEN];
63 /* MAX_IPOPTLEN is maximum if all options are NOPs or EOLs */
64 struct nf_osf_opt opt[MAX_IPOPTLEN];
68 struct nf_osf_user_finger f;
73 extern struct list_head nf_osf_fingers[2];
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 enum nf_osf_attr_type {
100 * Add/remove fingerprint from the kernel.
102 enum nf_osf_msg_types {
108 #endif /* _NF_OSF_H */