aboutsummaryrefslogtreecommitdiff
path: root/include/odp/api/spec/packet.h
diff options
context:
space:
mode:
authorPetri Savolainen <petri.savolainen@linaro.org>2018-08-09 10:59:25 +0300
committerMaxim Uvarov <maxim.uvarov@linaro.org>2018-11-28 17:16:38 +0300
commite49af8a47be1f267a9d0a50066f9b7ba2f8bd774 (patch)
treef1879ff042d7b7dc8a9c229708bfd7766f74f5ae /include/odp/api/spec/packet.h
parente06d1f6cfb34e13b6a3bc81220f07c1207c04248 (diff)
api: packet: add subtype call
This call is useful when packet subtype needs to be checked sometime after an event has been converted into a packet. The first application stage (receiving and converting events) does not have to record packet subtype for following application stages that process only packets, not events. Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Diffstat (limited to 'include/odp/api/spec/packet.h')
-rw-r--r--include/odp/api/spec/packet.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/odp/api/spec/packet.h b/include/odp/api/spec/packet.h
index 66665e121..78e519ac3 100644
--- a/include/odp/api/spec/packet.h
+++ b/include/odp/api/spec/packet.h
@@ -224,6 +224,19 @@ typedef enum odp_packet_chksum_status_t {
} odp_packet_chksum_status_t;
+/**
+ * Event subtype of a packet
+ *
+ * Returns the subtype of a packet event. Subtype tells if the packet contains
+ * only basic metadata (ODP_EVENT_PACKET_BASIC) or in addition to that some
+ * specific metadata (e.g. ODP_EVENT_PACKET_CRYPTO or ODP_EVENT_PACKET_IPSEC).
+ *
+ * @param packet Packet handle
+ *
+ * @return Packet subtype
+ */
+odp_event_subtype_t odp_packet_subtype(odp_packet_t packet);
+
/*
*
* Alloc and free