diff options
| author | 卢文朋 <[email protected]> | 2021-09-13 02:12:29 +0000 |
|---|---|---|
| committer | luwenpeng <[email protected]> | 2021-09-15 16:58:01 +0800 |
| commit | ba21a53bb7c8bc5e70eae278b2fd238c2bcd1337 (patch) | |
| tree | f15571a0b8c096532be99e8a6858370c047a4b86 /common/include/decode_gtp.h | |
| parent | aa887fd382a4eb1b981280183a780649230d71e9 (diff) | |
TSG-7784 PacketAdapter支持CI自动构建RPM; 修改代码结构
Diffstat (limited to 'common/include/decode_gtp.h')
| -rw-r--r-- | common/include/decode_gtp.h | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/common/include/decode_gtp.h b/common/include/decode_gtp.h new file mode 100644 index 0000000..87d9fd9 --- /dev/null +++ b/common/include/decode_gtp.h @@ -0,0 +1,36 @@ +#ifndef _DECODE_GTP_H +#define _DECODE_GTP_H + +#ifdef __cpluscplus +extern "C" +{ +#endif + +#include "public.h" + + /* According to 3GPP TS 29.060. */ + typedef struct gtp1_header_s + { + uint8_t flags; + uint8_t type; + uint16_t length; + uint32_t tid; + } __attribute__((packed)) gtp1_header_t; + + typedef struct gtp_info_s + { + gtp1_header_t *hdr; + uint8_t *payload; + + uint32_t hdr_len; + uint32_t payload_len; + } gtp_info_t; + + int decode_gtp(gtp_info_t *packet, const uint8_t *data, uint32_t len); + void dump_gtp_info(uint32_t pkt_id, gtp_info_t *packet); + +#ifdef __cpluscplus +} +#endif + +#endif
\ No newline at end of file |
