diff options
author | Kiran Kumar K <kirankumark@marvell.com> | 2020-10-05 09:29:13 +0530 |
---|---|---|
committer | Petri Savolainen <petri.savolainen@nokia.com> | 2020-12-21 12:42:26 +0200 |
commit | 3f618a250a69c95b9a4b6594a76e1841b1c00765 (patch) | |
tree | 8775ac6de94c5da7401efa7114aa3c3c7b40b7f5 /helper | |
parent | c86a4edb62eb7695a99f9e4c0f0cf0334957d229 (diff) |
helper: add odph_igmp header description
Adds IGMP header description struct odph_igmphdr_t in helper directory.
This structure is used for accessing IGMP header information from the
packet.
Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
Signed-off-by: Satheesh Paul <psatheesh@marvell.com>
Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com>
Diffstat (limited to 'helper')
-rw-r--r-- | helper/Makefile.am | 1 | ||||
-rw-r--r-- | helper/include/odp/helper/igmp.h | 39 | ||||
-rw-r--r-- | helper/include/odp/helper/ip.h | 1 | ||||
-rw-r--r-- | helper/include/odp/helper/odph_api.h | 1 |
4 files changed, 42 insertions, 0 deletions
diff --git a/helper/Makefile.am b/helper/Makefile.am index 858ad9b9d..e87b16c77 100644 --- a/helper/Makefile.am +++ b/helper/Makefile.am @@ -17,6 +17,7 @@ helperinclude_HEADERS = \ include/odp/helper/eth.h\ include/odp/helper/gtp.h\ include/odp/helper/icmp.h\ + include/odp/helper/igmp.h\ include/odp/helper/ip.h\ include/odp/helper/ipsec.h\ include/odp/helper/odph_api.h\ diff --git a/helper/include/odp/helper/igmp.h b/helper/include/odp/helper/igmp.h new file mode 100644 index 000000000..5cff41aab --- /dev/null +++ b/helper/include/odp/helper/igmp.h @@ -0,0 +1,39 @@ +/* SPDX-License-Identifier: BSD-3-Clause + * Copyright(C) 2020 Marvell. + */ + +/** + * @file + * + * ODP IGMP header + */ +#ifndef _ODPH_IGMP_H_ +#define _ODPH_IGMP_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +#include <odp_api.h> + +/** + * Simplified IGMP protocol header. + * Contains 8-bit type, 8-bit code, + * 16-bit csum, 32-bit group. + * No optional fields and next extension header. + */ +typedef struct ODP_PACKED { + uint8_t type; /** Message Type */ + uint8_t code; /** Max response code */ + odp_u16be_t csum; /** Checksum */ + odp_u32be_t group; /** Group address */ +} odph_igmphdr_t; + +/** IGMP header length */ +#define ODP_IGMP_HLEN sizeof(odph_igmphdr_t) + +#ifdef __cplusplus +} +#endif + +#endif /* ODP_IGMP_H_ */ diff --git a/helper/include/odp/helper/ip.h b/helper/include/odp/helper/ip.h index b5bfed78c..3fac438f1 100644 --- a/helper/include/odp/helper/ip.h +++ b/helper/include/odp/helper/ip.h @@ -252,6 +252,7 @@ typedef struct ODP_PACKED { * @{*/ #define ODPH_IPPROTO_HOPOPTS 0x00 /**< IPv6 hop-by-hop options */ #define ODPH_IPPROTO_ICMPV4 0x01 /**< Internet Control Message Protocol (1) */ +#define ODPH_IPPROTO_IGMP 0x02 /**< Internet Group Message Protocol (1) */ #define ODPH_IPPROTO_TCP 0x06 /**< Transmission Control Protocol (6) */ #define ODPH_IPPROTO_UDP 0x11 /**< User Datagram Protocol (17) */ #define ODPH_IPPROTO_ROUTE 0x2B /**< IPv6 Routing header (43) */ diff --git a/helper/include/odp/helper/odph_api.h b/helper/include/odp/helper/odph_api.h index 8e0bf8eb3..f3bcde208 100644 --- a/helper/include/odp/helper/odph_api.h +++ b/helper/include/odp/helper/odph_api.h @@ -25,6 +25,7 @@ extern "C" { #include <odp/helper/gtp.h> #include <odp/helper/odph_hashtable.h> #include <odp/helper/icmp.h> +#include <odp/helper/igmp.h> #include <odp/helper/ip.h> #include <odp/helper/ipsec.h> #include <odp/helper/odph_lineartable.h> |