TSG-7784 PacketAdapter支持CI自动构建RPM; 修改代码结构

This commit is contained in:
卢文朋
2021-09-13 02:12:29 +00:00
committed by luwenpeng
parent aa887fd382
commit ba21a53bb7
35 changed files with 2878 additions and 915 deletions

View File

@@ -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