summaryrefslogtreecommitdiffstats
path: root/include/exthdr.h
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2019-12-17 18:16:53 +0100
committerFlorian Westphal <fw@strlen.de>2019-12-17 23:10:46 +0100
commit41023042d984b9c2d69cd23daf7af8ca12a30f3c (patch)
tree853484dd7f81faf0368ba96f05607327aea724b0 /include/exthdr.h
parent2aa3efa47a6c901eeb87a9208671965fde873291 (diff)
exthdr: add exthdr_desc_id enum and use it
This allows to identify the exthdr protocol from the userdata area. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> Signed-off-by: Florian Westphal <fw@strlen.de>
Diffstat (limited to 'include/exthdr.h')
-rw-r--r--include/exthdr.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/exthdr.h b/include/exthdr.h
index 3959a65c..c9a3c211 100644
--- a/include/exthdr.h
+++ b/include/exthdr.h
@@ -5,6 +5,20 @@
#include <tcpopt.h>
#include <ipopt.h>
+enum exthdr_desc_id {
+ EXTHDR_DESC_UNKNOWN = 0,
+ EXTHDR_DESC_HBH,
+ EXTHDR_DESC_RT,
+ EXTHDR_DESC_RT0,
+ EXTHDR_DESC_RT2,
+ EXTHDR_DESC_SRH,
+ EXTHDR_DESC_FRAG,
+ EXTHDR_DESC_DST,
+ EXTHDR_DESC_MH,
+ __EXTHDR_DESC_MAX
+};
+#define EXTHDR_DESC_MAX (__EXTHDR_DESC_MAX - 1)
+
/**
* struct exthdr_desc - extension header description
*
@@ -14,6 +28,7 @@
*/
struct exthdr_desc {
const char *name;
+ enum exthdr_desc_id id;
uint8_t type;
int proto_key;
struct proto_hdr_template templates[10];