netfilter: nfnetlink_osf: extract nfnetlink_subsystem code from xt_osf.c

Move nfnetlink osf subsystem from xt_osf.c to standalone module so we can
reuse it from the new nft_ost extension.

Signed-off-by: Fernando Fernandez Mancera <ffmancera@riseup.net>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
This commit is contained in:
Fernando Fernandez Mancera 2018-07-25 01:32:45 +02:00 committed by Pablo Neira Ayuso
parent f6b7b5f4f3
commit f932495208
4 changed files with 169 additions and 154 deletions

View file

@ -70,6 +70,8 @@ struct nf_osf_nlmsg {
struct tcphdr tcp;
};
extern struct list_head nf_osf_fingers[2];
/* Defines for IANA option kinds */
enum iana_options {
OSFOPT_EOL = 0, /* End of options */
@ -94,4 +96,13 @@ enum nf_osf_attr_type {
OSF_ATTR_MAX,
};
/*
* Add/remove fingerprint from the kernel.
*/
enum nf_osf_msg_types {
OSF_MSG_ADD,
OSF_MSG_REMOVE,
OSF_MSG_MAX,
};
#endif /* _NF_OSF_H */

View file

@ -47,13 +47,6 @@
#define xt_osf_nlmsg nf_osf_nlmsg
#define xt_osf_attr_type nf_osf_attr_type
/*
* Add/remove fingerprint from the kernel.
*/
enum xt_osf_msg_types {
OSF_MSG_ADD,
OSF_MSG_REMOVE,
OSF_MSG_MAX,
};
#define xt_osf_msg_types nf_osf_msg_types
#endif /* _XT_OSF_H */