Add missing definitions from nf_osf.h in order to extract Passive OS fingerprint infrastructure from xt_osf.
Showing the changes to include/uapi/linux (2 of 2 files). Show all
Unified · Split
| @@ -16,9 +16,14 @@ · 15 unmodified lines | |||
| 16 | 16 | ||
| 17 | #define NF_OSF_TTL_TRUE 0 /* True ip and fingerprint TTL comparison */ | 17 | #define NF_OSF_TTL_TRUE 0 /* True ip and fingerprint TTL comparison */ |
| 18 | 18 | ||
| 19 | /* Check if ip TTL is less than fingerprint one */ | ||
| 20 | #define NF_OSF_TTL_LESS 1 | ||
| 21 | |||
| 19 | /* Do not compare ip and fingerprint TTL at all */ | 22 | /* Do not compare ip and fingerprint TTL at all */ |
| 20 | #define NF_OSF_TTL_NOCHECK 2 | 23 | #define NF_OSF_TTL_NOCHECK 2 |
| 21 | 24 | ||
| 25 | #define NF_OSF_FLAGMASK (NF_OSF_GENRE | NF_OSF_TTL | \ | ||
| 26 | NF_OSF_LOG | NF_OSF_INVERT) | ||
| 22 | /* Wildcard MSS (kind of). | 27 | /* Wildcard MSS (kind of). |
| 23 | * It is used to implement a state machine for the different wildcard values | 28 | * It is used to implement a state machine for the different wildcard values |
| 24 | * of the MSS and window sizes. | 29 | * of the MSS and window sizes. |
| @@ -83,4 +88,10 @@ enum iana_options { · 58 unmodified lines | |||
| 83 | OSFOPT_EMPTY = 255, | 88 | OSFOPT_EMPTY = 255, |
| 84 | }; | 89 | }; |
| 85 | 90 | ||
| 91 | enum nf_osf_attr_type { | ||
| 92 | OSF_ATTR_UNSPEC, | ||
| 93 | OSF_ATTR_FINGER, | ||
| 94 | OSF_ATTR_MAX, | ||
| 95 | }; | ||
| 96 | |||
| 86 | #endif /* _NF_OSF_H */ | 97 | #endif /* _NF_OSF_H */ |
| @@ -37,8 +37,7 @@ · 36 unmodified lines | |||
| 37 | 37 | ||
| 38 | #define XT_OSF_TTL_TRUE NF_OSF_TTL_TRUE | 38 | #define XT_OSF_TTL_TRUE NF_OSF_TTL_TRUE |
| 39 | #define XT_OSF_TTL_NOCHECK NF_OSF_TTL_NOCHECK | 39 | #define XT_OSF_TTL_NOCHECK NF_OSF_TTL_NOCHECK |
| 40 | 40 | #define XT_OSF_TTL_LESS NF_OSF_TTL_LESS | |
| 41 | #define XT_OSF_TTL_LESS 1 /* Check if ip TTL is less than fingerprint one */ | ||
| 42 | 41 | ||
| 43 | #define xt_osf_wc nf_osf_wc | 42 | #define xt_osf_wc nf_osf_wc |
| 44 | #define xt_osf_opt nf_osf_opt | 43 | #define xt_osf_opt nf_osf_opt |
| @@ -47,6 +46,7 @@ · 2 unmodified lines | |||
| 47 | #define xt_osf_finger nf_osf_finger | 46 | #define xt_osf_finger nf_osf_finger |
| 48 | #define xt_osf_nlmsg nf_osf_nlmsg | 47 | #define xt_osf_nlmsg nf_osf_nlmsg |
| 49 | 48 | ||
| 49 | #define xt_osf_attr_type nf_osf_attr_type | ||
| 50 | /* | 50 | /* |
| 51 | * Add/remove fingerprint from the kernel. | 51 | * Add/remove fingerprint from the kernel. |
| 52 | */ | 52 | */ |
| @@ -56,10 +56,4 @@ enum xt_osf_msg_types { · 3 unmodified lines | |||
| 56 | OSF_MSG_MAX, | 56 | OSF_MSG_MAX, |
| 57 | }; | 57 | }; |
| 58 | 58 | ||
| 59 | enum xt_osf_attr_type { | ||
| 60 | OSF_ATTR_UNSPEC, | ||
| 61 | OSF_ATTR_FINGER, | ||
| 62 | OSF_ATTR_MAX, | ||
| 63 | }; | ||
| 64 | |||
| 65 | #endif /* _XT_OSF_H */ | 59 | #endif /* _XT_OSF_H */ |