aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/netfilter
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2018-07-13 14:54:45 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2018-07-30 14:06:59 +0200
commit51c23b47e6b8590ea7a6a6776ffb21810ece73bf (patch)
tree7cbfe77c652fc855cd2018640e14e78d38aace46 /include/linux/netfilter
parentnetfilter: nf_tables: handle meta/lookup with direct call (diff)
downloadlinux-dev-51c23b47e6b8590ea7a6a6776ffb21810ece73bf.tar.xz
linux-dev-51c23b47e6b8590ea7a6a6776ffb21810ece73bf.zip
netfilter: nf_osf: add nf_osf_find()
This new function returns the OS genre as a string. Plan is to use to from the new nft_osf extension. Note that this doesn't yet support ttl options, but it could be easily extended to do so. Tested-by: Fernando Fernandez Mancera <ffmancera@riseup.net> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include/linux/netfilter')
-rw-r--r--include/linux/netfilter/nf_osf.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/netfilter/nf_osf.h b/include/linux/netfilter/nf_osf.h
index 0e114c492fb8..aee460fcbd31 100644
--- a/include/linux/netfilter/nf_osf.h
+++ b/include/linux/netfilter/nf_osf.h
@@ -1,3 +1,7 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef _NFOSF_H
+#define _NFOSF_H
+
#include <uapi/linux/netfilter/nf_osf.h>
/* Initial window size option state machine: multiple of mss, mtu or
@@ -31,3 +35,8 @@ bool nf_osf_match(const struct sk_buff *skb, u_int8_t family,
int hooknum, struct net_device *in, struct net_device *out,
const struct nf_osf_info *info, struct net *net,
const struct list_head *nf_osf_fingers);
+
+const char *nf_osf_find(const struct sk_buff *skb,
+ const struct list_head *nf_osf_fingers);
+
+#endif /* _NFOSF_H */