diff options
Diffstat (limited to 'helper')
-rw-r--r-- | helper/Makefile.am | 1 | ||||
-rw-r--r-- | helper/include/odp/helper/gtp.h | 38 | ||||
-rw-r--r-- | helper/include/odp/helper/odph_api.h | 1 |
3 files changed, 40 insertions, 0 deletions
diff --git a/helper/Makefile.am b/helper/Makefile.am index aa645cc8e..858ad9b9d 100644 --- a/helper/Makefile.am +++ b/helper/Makefile.am @@ -15,6 +15,7 @@ helperinclude_HEADERS = \ include/odp/helper/chksum.h\ include/odp/helper/odph_debug.h \ include/odp/helper/eth.h\ + include/odp/helper/gtp.h\ include/odp/helper/icmp.h\ include/odp/helper/ip.h\ include/odp/helper/ipsec.h\ diff --git a/helper/include/odp/helper/gtp.h b/helper/include/odp/helper/gtp.h new file mode 100644 index 000000000..d542dc6b3 --- /dev/null +++ b/helper/include/odp/helper/gtp.h @@ -0,0 +1,38 @@ +/* SPDX-License-Identifier: BSD-3-Clause + * Copyright(C) 2020 Marvell. + */ +/** + * @file + * + * ODP GTP header + */ +#ifndef _ODPH_GTP_H_ +#define _ODPH_GTP_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +#include <odp_api.h> + +/** + * Simplified GTP protocol header. + * Contains 8-bit gtp_hdr_info, 8-bit msg_type, + * 16-bit plen, 32-bit teid. + * No optional fields and next extension header. + */ +typedef struct ODP_PACKED { + uint8_t gtp_hdr_info; /**< GTP header info */ + uint8_t msg_type; /**< GTP message type */ + odp_u16be_t plen; /**< Total payload length */ + odp_u32be_t teid; /**< Tunnel endpoint ID */ +} odph_gtphdr_t; + +/** GTP header length */ +#define ODP_GTP_HLEN sizeof(odph_gtphdr_t) + +#ifdef __cplusplus +} +#endif + +#endif /* ODP_GTP_H_ */ diff --git a/helper/include/odp/helper/odph_api.h b/helper/include/odp/helper/odph_api.h index 921914aa2..8e0bf8eb3 100644 --- a/helper/include/odp/helper/odph_api.h +++ b/helper/include/odp/helper/odph_api.h @@ -22,6 +22,7 @@ extern "C" { #include <odp/helper/chksum.h> #include <odp/helper/odph_cuckootable.h> #include <odp/helper/eth.h> +#include <odp/helper/gtp.h> #include <odp/helper/odph_hashtable.h> #include <odp/helper/icmp.h> #include <odp/helper/ip.h> |