1/* SPDX-License-Identifier: GPL-2.0 */
2#ifndef _NFOSF_H
3#define _NFOSF_H
4
5#include <uapi/linux/netfilter/nfnetlink_osf.h>
6
7enum osf_fmatch_states {
8 /* Packet does not match the fingerprint */
9 FMATCH_WRONG = 0,
10 /* Packet matches the fingerprint */
11 FMATCH_OK,
12 /* Options do not match the fingerprint, but header does */
13 FMATCH_OPT_WRONG,
14};
15
16extern struct list_head nf_osf_fingers[2];
17
18struct nf_osf_finger {
19 struct rcu_head rcu_head;
20 struct list_head finger_entry;
21 struct nf_osf_user_finger finger;
22};
23
24bool nf_osf_match(const struct sk_buff *skb, u_int8_t family,
25 int hooknum, struct net_device *in, struct net_device *out,
26 const struct nf_osf_info *info, struct net *net,
27 const struct list_head *nf_osf_fingers);
28
29const char *nf_osf_find(const struct sk_buff *skb,
30 const struct list_head *nf_osf_fingers,
31 const int ttl_check);
32
33#endif /* _NFOSF_H */
34