1 /* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
2 /*
3  * Copyright (c) 2003+ Evgeniy Polyakov <johnpol@2ka.mxt.ru>
4  *
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, see <http://www.gnu.org/licenses/>.
18  */
19 
20 #ifndef _XT_OSF_H
21 #define _XT_OSF_H
22 
23 #include <linux/types.h>
24 #include <linux/ip.h>
25 #include <linux/tcp.h>
26 #include <linux/netfilter/nf_osf.h>
27 
28 #define XT_OSF_GENRE		NF_OSF_GENRE
29 #define XT_OSF_INVERT		NF_OSF_INVERT
30 
31 #define XT_OSF_TTL		NF_OSF_TTL
32 #define XT_OSF_LOG		NF_OSF_LOG
33 
34 #define XT_OSF_LOGLEVEL_ALL		NF_OSF_LOGLEVEL_ALL
35 #define XT_OSF_LOGLEVEL_FIRST		NF_OSF_LOGLEVEL_FIRST
36 #define XT_OSF_LOGLEVEL_ALL_KNOWN	NF_OSF_LOGLEVEL_ALL_KNOWN
37 
38 #define XT_OSF_TTL_TRUE		NF_OSF_TTL_TRUE
39 #define XT_OSF_TTL_NOCHECK	NF_OSF_TTL_NOCHECK
40 
41 #define XT_OSF_TTL_LESS	1	/* Check if ip TTL is less than fingerprint one */
42 
43 #define xt_osf_wc		nf_osf_wc
44 #define xt_osf_opt		nf_osf_opt
45 #define xt_osf_info		nf_osf_info
46 #define xt_osf_user_finger	nf_osf_user_finger
47 #define xt_osf_finger		nf_osf_finger
48 #define xt_osf_nlmsg		nf_osf_nlmsg
49 
50 /*
51  * Add/remove fingerprint from the kernel.
52  */
53 enum xt_osf_msg_types {
54 	OSF_MSG_ADD,
55 	OSF_MSG_REMOVE,
56 	OSF_MSG_MAX,
57 };
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 */
66