anjana_sreekumar@infosys.com | 991c206 | 2020-01-08 11:42:57 +0530 | [diff] [blame^] | 1 | #ifndef __GtpStackWrappers_H |
| 2 | #define __GtpStackWrappers_H |
| 3 | |
| 4 | #ifdef __cplusplus |
| 5 | extern "C" { |
| 6 | #endif |
| 7 | #include <stdint.h> |
| 8 | #include "msgClasses/gtpV2MsgDataTypes.h" |
| 9 | |
| 10 | typedef struct GtpV2Stack GtpV2Stack; |
| 11 | typedef struct MsgBuffer MsgBuffer; |
| 12 | |
| 13 | GtpV2Stack* createGtpV2Stack(); |
| 14 | MsgBuffer* createMsgBuffer(uint16_t size); |
| 15 | |
| 16 | void* MsgBuffer_getDataPointer(MsgBuffer* buf_p); |
| 17 | |
| 18 | uint16_t MsgBuffer_getBufLen(MsgBuffer* buf_p); |
| 19 | |
| 20 | void MsgBuffer_reset(MsgBuffer* buf_p); |
| 21 | |
| 22 | bool MsgBuffer_writeBytes(MsgBuffer* msgBuf_p, Uint8* data, Uint16 size, bool append); |
| 23 | |
| 24 | void MsgBuffer_rewind(MsgBuffer* msgBuf_p); |
| 25 | |
| 26 | void MsgBuffer_free(MsgBuffer* buf_p); |
| 27 | |
| 28 | bool GtpV2Stack_decodeMessageHeader(GtpV2Stack* stack_p, |
| 29 | GtpV2MessageHeader* hdr_p, |
| 30 | MsgBuffer* msgBuf_p); |
| 31 | |
| 32 | bool GtpV2Stack_decodeMessage(GtpV2Stack* stack_p, |
| 33 | GtpV2MessageHeader* msgHeader_p, |
| 34 | MsgBuffer* buffer_p, |
| 35 | void* data_p); |
| 36 | |
| 37 | bool GtpV2Stack_buildGtpV2Message(GtpV2Stack* stack_p, |
| 38 | MsgBuffer* buf_p, |
| 39 | GtpV2MessageHeader* hdr_p, |
| 40 | void* data_p); |
| 41 | |
| 42 | #ifdef __cplusplus |
| 43 | } |
| 44 | #endif |
| 45 | #endif |