memory leak issues fixed
[ric-app/rc.git] / e2ap / wrapper.h
1 #ifndef _WRAPPER_H_
2 #define _WRAPPER_H_
3
4 #include "RICcontrolRequest.h"
5 #include "E2AP-PDU.h"
6 #include "InitiatingMessage.h"
7 #include "SuccessfulOutcome.h"
8 #include "UnsuccessfulOutcome.h"
9 #include "ProtocolIE-Container.h"
10 #include "ProtocolIE-Field.h"
11 #include "RICactionDefinition.h"
12 #include "RICsubsequentAction.h"
13 //#include "CauseRIC.h"
14
15 typedef struct RICControlAcknowledgeMsg {
16         long requestorID;
17         long instanceID;
18         long ranfunctionID;
19         uint8_t *callProcessID;
20         size_t callProcessIDSize;
21         uint8_t *ricControlOutCome;
22         size_t ricControlOutComeSize;
23 }RICControlAcknowledge;
24
25 typedef struct RICControlFailureMsg {
26         long requestorID;
27         long instanceID;
28         long ranfunctionID;
29         uint8_t *callProcessID;
30         size_t callProcessIDSize;
31         uint8_t *ricControlOutCome;
32         size_t ricControlOutComeSize;
33         int     causeType;
34         long    causeValue;
35
36 }RICControlFailure;
37
38 size_t encode_E2AP_PDU(E2AP_PDU_t* pdu, void* buffer, size_t buf_size);
39 E2AP_PDU_t* decode_E2AP_PDU(const void* buffer, size_t buf_size);
40
41 /* RICcontrol */
42 ssize_t e2ap_encode_ric_control_request_message(void *buffer, size_t buf_size, long ricRequestorID, long ricRequestSequenceNumber, long ranFunctionID, void *ricControlHdr, size_t ricControlHdrSize, void *ricControlMsg, size_t ricControlMsgSize);
43
44 RICControlAcknowledge* e2ap_decode_ric_control_acknowledge_message(void *buffer, size_t buf_size);
45 void e2ap_free_decoded_ric_control_ack(RICControlAcknowledge* msg);
46
47 RICControlFailure* e2ap_decode_ric_control_failure_message(void *buffer, size_t buf_size);
48 void e2ap_free_decoded_ric_control_failure(RICControlFailure* msg);
49 #endif /* _WRAPPER_H_ */