1 /* 2 3 p0f - fingerprint entry 4 ----------------------- 5 6 No servicable parts inside. 7 8 Copyright (C) 2003 by Michal Zalewski <lcamtuf@coredump.cx> 9 10 */ 11 12 #ifndef _HAVE_FPENTRY_H 13 #define _HAVE_FPENTRY_H 14 15 #include "p0f-config.h" 16 17 #define MOD_NONE 0 18 #define MOD_CONST 1 19 #define MOD_MSS 2 20 #define MOD_MTU 3 21 22 #define QUIRK_PAST 0x00000001 /* P */ 23 #define QUIRK_ZEROID 0x00000002 /* Z */ 24 #define QUIRK_IPOPT 0x00000004 /* I */ 25 #define QUIRK_URG 0x00000008 /* U */ 26 #define QUIRK_X2 0x00000010 /* X */ 27 #define QUIRK_ACK 0x00000020 /* A */ 28 #define QUIRK_T2 0x00000040 /* T */ 29 #define QUIRK_FLAGS 0x00000080 /* F */ 30 #define QUIRK_DATA 0x00000100 /* D */ 31 #define QUIRK_BROKEN 0x00000200 /* ! */ 32 #define QUIRK_RSTACK 0x00000400 /* K */ 33 #define QUIRK_SEQEQ 0x00000800 /* Q */ 34 #define QUIRK_SEQ0 0x00001000 /* 0 */ 35 36 struct fp_entry { 37 uint8_t* os; /* OS genre */ 38 uint8_t* desc; /* OS description */ 39 uint8_t no_detail; /* Disable guesstimates */ 40 uint8_t generic; /* Generic hit */ 41 uint8_t userland; /* Userland stack */ 42 uint16_t wsize; /* window size */ 43 uint8_t wsize_mod; /* MOD_* for wsize */ 44 uint8_t ttl,df; /* TTL and don't fragment bit */ 45 uint8_t zero_stamp; /* timestamp option but zero value? */ 46 uint16_t size; /* packet size */ 47 uint8_t optcnt; /* option count */ 48 uint8_t opt[MAXOPT]; /* TCPOPT_* */ 49 uint16_t wsc,mss; /* value for WSCALE and MSS options */ 50 uint8_t wsc_mod,mss_mod; /* modulo for WSCALE and MSS (NONE or CONST) */ 51 uint32_t quirks; /* packet quirks and bugs */ 52 uint32_t line; /* config file line */ 53 struct fp_entry* next; 54 }; 55 56 #ifdef IGNORE_ZEROID 57 # undef QUIRK_ZEROID 58 # define QUIRK_ZEROID 0 59 #endif /* IGNORE_ZEROID */ 60 61 #endif /* ! _HAVE_FPENTRY_H */ 62