libe3 0.6.1
C++ library for E3AP RAN vendor integration
Loading...
Searching...
No Matches
e2sm_dapp_c.h File Reference

E2SM-DAPP information elements and their APER codec (C API). More...

#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include "libe3/error_codes.h"

Go to the source code of this file.

Classes

struct  libe3_e2sm_dapp_bytes_t
struct  libe3_e2sm_dapp_sub_item_t
struct  libe3_e2sm_dapp_sub_list_t
struct  libe3_e2sm_dapp_event_trigger_t
struct  libe3_e2sm_dapp_action_definition_t
struct  libe3_e2sm_dapp_ind_hdr_format1_t
struct  libe3_e2sm_dapp_ind_hdr_format2_t
struct  libe3_e2sm_dapp_ind_hdr_t
struct  libe3_e2sm_dapp_ind_msg_format1_t
struct  libe3_e2sm_dapp_ind_msg_format2_t
struct  libe3_e2sm_dapp_ind_msg_t
struct  libe3_e2sm_dapp_ctrl_hdr_t
struct  libe3_e2sm_dapp_ctrl_msg_t
struct  libe3_e2sm_dapp_ctrl_outcome_t
struct  libe3_e2sm_dapp_report_style_t
struct  libe3_e2sm_dapp_ctrl_style_t
struct  libe3_e2sm_dapp_ran_function_name_t
struct  libe3_e2sm_dapp_ran_function_definition_t

Enumerations

enum  libe3_e2sm_dapp_event_trigger_format_e { LIBE3_E2SM_DAPP_EVENT_TRIGGER_FORMAT_1 = 1 }
enum  libe3_e2sm_dapp_action_definition_format_e { LIBE3_E2SM_DAPP_ACTION_DEFINITION_FORMAT_1 = 1 }
enum  libe3_e2sm_dapp_ind_hdr_format_e { LIBE3_E2SM_DAPP_IND_HDR_FORMAT_1 = 1 , LIBE3_E2SM_DAPP_IND_HDR_FORMAT_2 = 2 }
enum  libe3_e2sm_dapp_ind_msg_format_e { LIBE3_E2SM_DAPP_IND_MSG_FORMAT_1 = 1 , LIBE3_E2SM_DAPP_IND_MSG_FORMAT_2 = 2 }
enum  libe3_e2sm_dapp_ctrl_hdr_format_e { LIBE3_E2SM_DAPP_CTRL_HDR_FORMAT_1 = 1 }
enum  libe3_e2sm_dapp_ctrl_msg_format_e { LIBE3_E2SM_DAPP_CTRL_MSG_FORMAT_1 = 1 }
enum  libe3_e2sm_dapp_ctrl_outcome_format_e { LIBE3_E2SM_DAPP_CTRL_OUTCOME_FORMAT_1 = 1 }

Functions

void libe3_e2sm_dapp_bytes_free (libe3_e2sm_dapp_bytes_t *b)
e3_error_t libe3_e2sm_dapp_encode_event_trigger (const libe3_e2sm_dapp_event_trigger_t *in, libe3_e2sm_dapp_bytes_t *out)
e3_error_t libe3_e2sm_dapp_decode_event_trigger (const uint8_t *buf, size_t len, libe3_e2sm_dapp_event_trigger_t *out)
void libe3_e2sm_dapp_free_event_trigger (libe3_e2sm_dapp_event_trigger_t *v)
e3_error_t libe3_e2sm_dapp_encode_action_definition (const libe3_e2sm_dapp_action_definition_t *in, libe3_e2sm_dapp_bytes_t *out)
e3_error_t libe3_e2sm_dapp_decode_action_definition (const uint8_t *buf, size_t len, libe3_e2sm_dapp_action_definition_t *out)
void libe3_e2sm_dapp_free_action_definition (libe3_e2sm_dapp_action_definition_t *v)
e3_error_t libe3_e2sm_dapp_encode_ind_hdr (const libe3_e2sm_dapp_ind_hdr_t *in, libe3_e2sm_dapp_bytes_t *out)
e3_error_t libe3_e2sm_dapp_decode_ind_hdr (const uint8_t *buf, size_t len, libe3_e2sm_dapp_ind_hdr_t *out)
void libe3_e2sm_dapp_free_ind_hdr (libe3_e2sm_dapp_ind_hdr_t *v)
e3_error_t libe3_e2sm_dapp_encode_ind_msg (const libe3_e2sm_dapp_ind_msg_t *in, libe3_e2sm_dapp_bytes_t *out)
e3_error_t libe3_e2sm_dapp_decode_ind_msg (const uint8_t *buf, size_t len, libe3_e2sm_dapp_ind_msg_t *out)
void libe3_e2sm_dapp_free_ind_msg (libe3_e2sm_dapp_ind_msg_t *v)
e3_error_t libe3_e2sm_dapp_encode_ctrl_hdr (const libe3_e2sm_dapp_ctrl_hdr_t *in, libe3_e2sm_dapp_bytes_t *out)
e3_error_t libe3_e2sm_dapp_decode_ctrl_hdr (const uint8_t *buf, size_t len, libe3_e2sm_dapp_ctrl_hdr_t *out)
void libe3_e2sm_dapp_free_ctrl_hdr (libe3_e2sm_dapp_ctrl_hdr_t *v)
e3_error_t libe3_e2sm_dapp_encode_ctrl_msg (const libe3_e2sm_dapp_ctrl_msg_t *in, libe3_e2sm_dapp_bytes_t *out)
e3_error_t libe3_e2sm_dapp_decode_ctrl_msg (const uint8_t *buf, size_t len, libe3_e2sm_dapp_ctrl_msg_t *out)
void libe3_e2sm_dapp_free_ctrl_msg (libe3_e2sm_dapp_ctrl_msg_t *v)
e3_error_t libe3_e2sm_dapp_encode_ctrl_outcome (const libe3_e2sm_dapp_ctrl_outcome_t *in, libe3_e2sm_dapp_bytes_t *out)
e3_error_t libe3_e2sm_dapp_decode_ctrl_outcome (const uint8_t *buf, size_t len, libe3_e2sm_dapp_ctrl_outcome_t *out)
void libe3_e2sm_dapp_free_ctrl_outcome (libe3_e2sm_dapp_ctrl_outcome_t *v)
e3_error_t libe3_e2sm_dapp_encode_ran_function_definition (const libe3_e2sm_dapp_ran_function_definition_t *in, libe3_e2sm_dapp_bytes_t *out)
e3_error_t libe3_e2sm_dapp_decode_ran_function_definition (const uint8_t *buf, size_t len, libe3_e2sm_dapp_ran_function_definition_t *out)
void libe3_e2sm_dapp_free_ran_function_definition (libe3_e2sm_dapp_ran_function_definition_t *v)

Detailed Description

E2SM-DAPP information elements and their APER codec (C API).

The C counterpart of e2sm_dapp.hpp, for RAN stacks written in C (flexric, and any stack that links libe3 from C). The structs carry the same information as the C++ types, with one change: every OPTIONAL field has an explicit has_* flag, and 0 is an ordinary value, never a stand-in for "absent".

Ownership:

  • Inputs to libe3_e2sm_dapp_encode_* belong to the caller and are only read.
  • libe3_e2sm_dapp_encode_* allocates out->data; release it with libe3_e2sm_dapp_bytes_free.
  • libe3_e2sm_dapp_decode_* allocates every pointer inside *out; release the whole struct with the matching libe3_e2sm_dapp_free_*. On failure *out is zeroed and nothing needs freeing.
  • Every free function zeroes the struct, so freeing twice is harmless.

Return codes are the values of e3_error_t. They are 0 on success, and E3_INVALID_PARAM, E3_ENCODE_FAILED, E3_DECODE_FAILED or E3_SM_ERROR_MEMORY on failure.

Built only when LIBE3_ENABLE_E2SM_DAPP is on (it needs LIBE3_ENABLE_ASN1).

SPDX-FileCopyrightText: Copyright (c) 2026 Northeastern University SPDX-License-Identifier: Apache-2.0

Definition in file e2sm_dapp_c.h.

Enumeration Type Documentation

◆ libe3_e2sm_dapp_action_definition_format_e

Formats of the action definition.

Enumerator
LIBE3_E2SM_DAPP_ACTION_DEFINITION_FORMAT_1 

Format 1.

Definition at line 80 of file e2sm_dapp_c.h.

◆ libe3_e2sm_dapp_ctrl_hdr_format_e

Formats of the ctrl hdr.

Enumerator
LIBE3_E2SM_DAPP_CTRL_HDR_FORMAT_1 

Format 1.

Definition at line 161 of file e2sm_dapp_c.h.

◆ libe3_e2sm_dapp_ctrl_msg_format_e

Formats of the ctrl msg.

Enumerator
LIBE3_E2SM_DAPP_CTRL_MSG_FORMAT_1 

Format 1.

Definition at line 179 of file e2sm_dapp_c.h.

◆ libe3_e2sm_dapp_ctrl_outcome_format_e

Formats of the ctrl outcome.

Enumerator
LIBE3_E2SM_DAPP_CTRL_OUTCOME_FORMAT_1 

Format 1.

Definition at line 192 of file e2sm_dapp_c.h.

◆ libe3_e2sm_dapp_event_trigger_format_e

Formats of the event trigger.

Enumerator
LIBE3_E2SM_DAPP_EVENT_TRIGGER_FORMAT_1 

Format 1.

Definition at line 68 of file e2sm_dapp_c.h.

◆ libe3_e2sm_dapp_ind_hdr_format_e

Formats of the ind hdr.

Enumerator
LIBE3_E2SM_DAPP_IND_HDR_FORMAT_1 

Format 1.

LIBE3_E2SM_DAPP_IND_HDR_FORMAT_2 

Format 2.

Definition at line 93 of file e2sm_dapp_c.h.

◆ libe3_e2sm_dapp_ind_msg_format_e

Formats of the ind msg.

Enumerator
LIBE3_E2SM_DAPP_IND_MSG_FORMAT_1 

Format 1.

LIBE3_E2SM_DAPP_IND_MSG_FORMAT_2 

Format 2.

Definition at line 136 of file e2sm_dapp_c.h.

Function Documentation

◆ libe3_e2sm_dapp_bytes_free()

void libe3_e2sm_dapp_bytes_free ( libe3_e2sm_dapp_bytes_t * b)

Release b->data and zero *b.

Parameters
bbytes to release, may be NULL

Definition at line 338 of file e2sm_dapp_c.cpp.

◆ libe3_e2sm_dapp_decode_action_definition()

e3_error_t libe3_e2sm_dapp_decode_action_definition ( const uint8_t * buf,
size_t len,
libe3_e2sm_dapp_action_definition_t * out )

Decode a action definition from APER bytes.

Parameters
bufbytes to decode
lennumber of bytes
outreceives the value; release it with libe3_e2sm_dapp_free_action_definition(). Zeroed on failure.
Returns
0 on success, an e3_error_t on failure

Definition at line 390 of file e2sm_dapp_c.cpp.

◆ libe3_e2sm_dapp_decode_ctrl_hdr()

e3_error_t libe3_e2sm_dapp_decode_ctrl_hdr ( const uint8_t * buf,
size_t len,
libe3_e2sm_dapp_ctrl_hdr_t * out )

Decode a control header from APER bytes.

Parameters
bufbytes to decode
lennumber of bytes
outreceives the value; release it with libe3_e2sm_dapp_free_ctrl_hdr(). Zeroed on failure.
Returns
0 on success, an e3_error_t on failure

Definition at line 531 of file e2sm_dapp_c.cpp.

◆ libe3_e2sm_dapp_decode_ctrl_msg()

e3_error_t libe3_e2sm_dapp_decode_ctrl_msg ( const uint8_t * buf,
size_t len,
libe3_e2sm_dapp_ctrl_msg_t * out )

Decode a control message from APER bytes.

Parameters
bufbytes to decode
lennumber of bytes
outreceives the value; release it with libe3_e2sm_dapp_free_ctrl_msg(). Zeroed on failure.
Returns
0 on success, an e3_error_t on failure

Definition at line 572 of file e2sm_dapp_c.cpp.

◆ libe3_e2sm_dapp_decode_ctrl_outcome()

e3_error_t libe3_e2sm_dapp_decode_ctrl_outcome ( const uint8_t * buf,
size_t len,
libe3_e2sm_dapp_ctrl_outcome_t * out )

Decode a control outcome from APER bytes.

Parameters
bufbytes to decode
lennumber of bytes
outreceives the value; release it with libe3_e2sm_dapp_free_ctrl_outcome(). Zeroed on failure.
Returns
0 on success, an e3_error_t on failure

Definition at line 618 of file e2sm_dapp_c.cpp.

◆ libe3_e2sm_dapp_decode_event_trigger()

e3_error_t libe3_e2sm_dapp_decode_event_trigger ( const uint8_t * buf,
size_t len,
libe3_e2sm_dapp_event_trigger_t * out )

Decode a event trigger from APER bytes.

Parameters
bufbytes to decode
lennumber of bytes
outreceives the value; release it with libe3_e2sm_dapp_free_event_trigger(). Zeroed on failure.
Returns
0 on success, an e3_error_t on failure

Definition at line 357 of file e2sm_dapp_c.cpp.

◆ libe3_e2sm_dapp_decode_ind_hdr()

e3_error_t libe3_e2sm_dapp_decode_ind_hdr ( const uint8_t * buf,
size_t len,
libe3_e2sm_dapp_ind_hdr_t * out )

Decode a indication header from APER bytes.

Parameters
bufbytes to decode
lennumber of bytes
outreceives the value; release it with libe3_e2sm_dapp_free_ind_hdr(). Zeroed on failure.
Returns
0 on success, an e3_error_t on failure

Definition at line 429 of file e2sm_dapp_c.cpp.

◆ libe3_e2sm_dapp_decode_ind_msg()

e3_error_t libe3_e2sm_dapp_decode_ind_msg ( const uint8_t * buf,
size_t len,
libe3_e2sm_dapp_ind_msg_t * out )

Decode a indication message from APER bytes.

Parameters
bufbytes to decode
lennumber of bytes
outreceives the value; release it with libe3_e2sm_dapp_free_ind_msg(). Zeroed on failure.
Returns
0 on success, an e3_error_t on failure

Definition at line 479 of file e2sm_dapp_c.cpp.

◆ libe3_e2sm_dapp_decode_ran_function_definition()

e3_error_t libe3_e2sm_dapp_decode_ran_function_definition ( const uint8_t * buf,
size_t len,
libe3_e2sm_dapp_ran_function_definition_t * out )

Decode a RAN function definition from APER bytes.

Parameters
bufbytes to decode
lennumber of bytes
outreceives the value; release it with libe3_e2sm_dapp_free_ran_function_definition(). Zeroed on failure.
Returns
0 on success, an e3_error_t on failure

Definition at line 710 of file e2sm_dapp_c.cpp.

◆ libe3_e2sm_dapp_encode_action_definition()

e3_error_t libe3_e2sm_dapp_encode_action_definition ( const libe3_e2sm_dapp_action_definition_t * in,
libe3_e2sm_dapp_bytes_t * out )

Encode a action definition as APER.

Parameters
invalue to encode, only read
outreceives the bytes; release them with libe3_e2sm_dapp_bytes_free()
Returns
0 on success, an e3_error_t on failure

Definition at line 378 of file e2sm_dapp_c.cpp.

◆ libe3_e2sm_dapp_encode_ctrl_hdr()

e3_error_t libe3_e2sm_dapp_encode_ctrl_hdr ( const libe3_e2sm_dapp_ctrl_hdr_t * in,
libe3_e2sm_dapp_bytes_t * out )

Encode a control header as APER.

Parameters
invalue to encode, only read
outreceives the bytes; release them with libe3_e2sm_dapp_bytes_free()
Returns
0 on success, an e3_error_t on failure

Definition at line 514 of file e2sm_dapp_c.cpp.

◆ libe3_e2sm_dapp_encode_ctrl_msg()

e3_error_t libe3_e2sm_dapp_encode_ctrl_msg ( const libe3_e2sm_dapp_ctrl_msg_t * in,
libe3_e2sm_dapp_bytes_t * out )

Encode a control message as APER.

Parameters
invalue to encode, only read
outreceives the bytes; release them with libe3_e2sm_dapp_bytes_free()
Returns
0 on success, an e3_error_t on failure

Definition at line 559 of file e2sm_dapp_c.cpp.

◆ libe3_e2sm_dapp_encode_ctrl_outcome()

e3_error_t libe3_e2sm_dapp_encode_ctrl_outcome ( const libe3_e2sm_dapp_ctrl_outcome_t * in,
libe3_e2sm_dapp_bytes_t * out )

Encode a control outcome as APER.

Parameters
invalue to encode, only read
outreceives the bytes; release them with libe3_e2sm_dapp_bytes_free()
Returns
0 on success, an e3_error_t on failure

Definition at line 596 of file e2sm_dapp_c.cpp.

◆ libe3_e2sm_dapp_encode_event_trigger()

e3_error_t libe3_e2sm_dapp_encode_event_trigger ( const libe3_e2sm_dapp_event_trigger_t * in,
libe3_e2sm_dapp_bytes_t * out )

Encode a event trigger as APER.

Parameters
invalue to encode, only read
outreceives the bytes; release them with libe3_e2sm_dapp_bytes_free()
Returns
0 on success, an e3_error_t on failure

Definition at line 347 of file e2sm_dapp_c.cpp.

◆ libe3_e2sm_dapp_encode_ind_hdr()

e3_error_t libe3_e2sm_dapp_encode_ind_hdr ( const libe3_e2sm_dapp_ind_hdr_t * in,
libe3_e2sm_dapp_bytes_t * out )

Encode a indication header as APER.

Parameters
invalue to encode, only read
outreceives the bytes; release them with libe3_e2sm_dapp_bytes_free()
Returns
0 on success, an e3_error_t on failure

Definition at line 412 of file e2sm_dapp_c.cpp.

◆ libe3_e2sm_dapp_encode_ind_msg()

e3_error_t libe3_e2sm_dapp_encode_ind_msg ( const libe3_e2sm_dapp_ind_msg_t * in,
libe3_e2sm_dapp_bytes_t * out )

Encode a indication message as APER.

Parameters
invalue to encode, only read
outreceives the bytes; release them with libe3_e2sm_dapp_bytes_free()
Returns
0 on success, an e3_error_t on failure

Definition at line 457 of file e2sm_dapp_c.cpp.

◆ libe3_e2sm_dapp_encode_ran_function_definition()

e3_error_t libe3_e2sm_dapp_encode_ran_function_definition ( const libe3_e2sm_dapp_ran_function_definition_t * in,
libe3_e2sm_dapp_bytes_t * out )

Encode a RAN function definition as APER.

Parameters
invalue to encode, only read
outreceives the bytes; release them with libe3_e2sm_dapp_bytes_free()
Returns
0 on success, an e3_error_t on failure

Definition at line 649 of file e2sm_dapp_c.cpp.

◆ libe3_e2sm_dapp_free_action_definition()

void libe3_e2sm_dapp_free_action_definition ( libe3_e2sm_dapp_action_definition_t * v)

Release everything a decode of a action definition allocated, and zero the struct. Freeing twice is harmless.

Parameters
vvalue to release, may be NULL

Definition at line 403 of file e2sm_dapp_c.cpp.

◆ libe3_e2sm_dapp_free_ctrl_hdr()

void libe3_e2sm_dapp_free_ctrl_hdr ( libe3_e2sm_dapp_ctrl_hdr_t * v)

Release everything a decode of a control header allocated, and zero the struct. Freeing twice is harmless.

Parameters
vvalue to release, may be NULL

Definition at line 550 of file e2sm_dapp_c.cpp.

◆ libe3_e2sm_dapp_free_ctrl_msg()

void libe3_e2sm_dapp_free_ctrl_msg ( libe3_e2sm_dapp_ctrl_msg_t * v)

Release everything a decode of a control message allocated, and zero the struct. Freeing twice is harmless.

Parameters
vvalue to release, may be NULL

Definition at line 586 of file e2sm_dapp_c.cpp.

◆ libe3_e2sm_dapp_free_ctrl_outcome()

void libe3_e2sm_dapp_free_ctrl_outcome ( libe3_e2sm_dapp_ctrl_outcome_t * v)

Release everything a decode of a control outcome allocated, and zero the struct. Freeing twice is harmless.

Parameters
vvalue to release, may be NULL

Definition at line 639 of file e2sm_dapp_c.cpp.

◆ libe3_e2sm_dapp_free_event_trigger()

void libe3_e2sm_dapp_free_event_trigger ( libe3_e2sm_dapp_event_trigger_t * v)

Release everything a decode of a event trigger allocated, and zero the struct. Freeing twice is harmless.

Parameters
vvalue to release, may be NULL

Definition at line 369 of file e2sm_dapp_c.cpp.

◆ libe3_e2sm_dapp_free_ind_hdr()

void libe3_e2sm_dapp_free_ind_hdr ( libe3_e2sm_dapp_ind_hdr_t * v)

Release everything a decode of a indication header allocated, and zero the struct. Freeing twice is harmless.

Parameters
vvalue to release, may be NULL

Definition at line 448 of file e2sm_dapp_c.cpp.

◆ libe3_e2sm_dapp_free_ind_msg()

void libe3_e2sm_dapp_free_ind_msg ( libe3_e2sm_dapp_ind_msg_t * v)

Release everything a decode of a indication message allocated, and zero the struct. Freeing twice is harmless.

Parameters
vvalue to release, may be NULL

Definition at line 503 of file e2sm_dapp_c.cpp.

◆ libe3_e2sm_dapp_free_ran_function_definition()

void libe3_e2sm_dapp_free_ran_function_definition ( libe3_e2sm_dapp_ran_function_definition_t * v)

Release everything a decode of a RAN function definition allocated, and zero the struct. Freeing twice is harmless.

Parameters
vvalue to release, may be NULL

Definition at line 768 of file e2sm_dapp_c.cpp.