diff mbox series

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

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

Commit Message

Github ODP bot Feb. 7, 2018, 12:59 p.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: 86fcf3650d33f5dd82712dda131fb8ca66a3bdf8
 **/
 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
  *