diff mbox series

[API-NEXT,v1,3/14] api: packet: add setters for packet L3/L4 type

Message ID 1518001208-29529-4-git-send-email-odpbot@yandex.ru
State Superseded
Headers show
Series [API-NEXT,v1,1/14] linux-gen: packet: implement packet l3/l4 proto types | expand

Commit Message

Github ODP bot Feb. 7, 2018, 10:59 a.m. UTC
From: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org>


Add API calls to set packet L3/L4 types.

Signed-off-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org>

---
/** Email created from pull request 457 (lumag:packet-types)
 ** https://github.com/Linaro/odp/pull/457
 ** Patch: https://github.com/Linaro/odp/pull/457.patch
 ** Base sha: e1175d5a69c65bb465022c9f1381c40fdb5c4069
 ** Merge commit sha: 802ddfc5ea6f47a8935993bf6f8c1675a4c94930
 **/
 include/odp/api/spec/packet.h | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
diff mbox series

Patch

diff --git a/include/odp/api/spec/packet.h b/include/odp/api/spec/packet.h
index 4be515c7b..95689362f 100644
--- a/include/odp/api/spec/packet.h
+++ b/include/odp/api/spec/packet.h
@@ -1626,6 +1626,16 @@  int odp_packet_l4_offset_set(odp_packet_t pkt, uint32_t offset);
  */
 odp_proto_l3_type_t odp_packet_l3_type(odp_packet_t pkt);
 
+/**
+ * Set Layer 3 protocol type
+ *
+ * Set layer 3 protocol type. Initial type value is ODP_PROTO_L3_TYPE_NONE.
+ *
+ * @param      pkt      Packet handle
+ * @param      val      Layer 3 protocol type
+ */
+void odp_packet_l3_type_set(odp_packet_t pkt, odp_proto_l3_type_t val);
+
 /**
  * Layer 4 protocol type
  *
@@ -1637,6 +1647,16 @@  odp_proto_l3_type_t odp_packet_l3_type(odp_packet_t pkt);
  */
 odp_proto_l4_type_t odp_packet_l4_type(odp_packet_t pkt);
 
+/**
+ * Set Layer 4 protocol type
+ *
+ * Set layer 4 protocol type. Initial type value is ODP_PROTO_L4_TYPE_NONE.
+ *
+ * @param      pkt      Packet handle
+ * @param      val      Layer 4 protocol type
+ */
+void odp_packet_l4_type_set(odp_packet_t pkt, odp_proto_l4_type_t val);
+
 /**
  * Layer 3 checksum check status
  *