aboutsummaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
authorPetri Savolainen <petri.savolainen@linaro.org>2018-01-31 15:03:20 +0200
committerMaxim Uvarov <maxim.uvarov@linaro.org>2018-02-26 14:01:50 +0300
commitb5cb45b96f5b04f8d950e8a050424779e55bbcdc (patch)
tree031ae2bb22109d7ab6fb3845a8903f83736dff4b /platform
parentd058f94572b2f699f005f2358d35f1ef87e97516 (diff)
api: packet: add protocol type enumeration
Add enumerations for L3 and L4 protocol types, and functions to request those. Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org> Reviewed-by: Balasubramanian Manoharan <bala.manoharan@linaro.org> Reviewed-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Diffstat (limited to 'platform')
-rw-r--r--platform/linux-generic/include-abi/odp/api/abi/packet.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/platform/linux-generic/include-abi/odp/api/abi/packet.h b/platform/linux-generic/include-abi/odp/api/abi/packet.h
index 66948aa18..5d4673fc9 100644
--- a/platform/linux-generic/include-abi/odp/api/abi/packet.h
+++ b/platform/linux-generic/include-abi/odp/api/abi/packet.h
@@ -47,6 +47,34 @@ static inline odp_packet_seg_t _odp_packet_seg_from_ndx(uint8_t ndx)
#define ODP_PACKET_SEG_INVALID ((odp_packet_seg_t)-1)
+typedef uint8_t odp_proto_l3_type_t;
+
+#define ODP_PROTO_L3_TYPE_NONE 0
+#define ODP_PROTO_L3_TYPE_ARP 1
+#define ODP_PROTO_L3_TYPE_RARP 2
+#define ODP_PROTO_L3_TYPE_MPLS 3
+#define ODP_PROTO_L3_TYPE_IPV4 4
+#define ODP_PROTO_L3_TYPE_IPV6 6
+
+typedef uint8_t odp_proto_l4_type_t;
+
+/* Numbers from IANA Assigned Internet Protocol Numbers list */
+#define ODP_PROTO_L4_TYPE_NONE 0
+#define ODP_PROTO_L4_TYPE_ICMPV4 1
+#define ODP_PROTO_L4_TYPE_IGMP 2
+#define ODP_PROTO_L4_TYPE_IPV4 4
+#define ODP_PROTO_L4_TYPE_TCP 6
+#define ODP_PROTO_L4_TYPE_UDP 17
+#define ODP_PROTO_L4_TYPE_IPV6 41
+#define ODP_PROTO_L4_TYPE_GRE 47
+#define ODP_PROTO_L4_TYPE_ESP 50
+#define ODP_PROTO_L4_TYPE_AH 51
+#define ODP_PROTO_L4_TYPE_ICMPV6 58
+#define ODP_PROTO_L4_TYPE_NO_NEXT 59
+#define ODP_PROTO_L4_TYPE_IPCOMP 108
+#define ODP_PROTO_L4_TYPE_SCTP 132
+#define ODP_PROTO_L4_TYPE_ROHC 142
+
typedef enum {
ODP_PACKET_GREEN = 0,
ODP_PACKET_YELLOW = 1,