libosmo-sigtran  1.9.0.4-dc82
Osmocom SIGTRAN library
xua_msg.h File Reference
#include "xua_types.h"
#include <osmocom/core/linuxlist.h>
#include <osmocom/sigtran/mtp_sap.h>

Go to the source code of this file.

Data Structures

struct  xua_msg
 
struct  xua_msg_part
 
struct  xua_msg_class
 
struct  xua_dialect
 
struct  xua_msg_event_map
 

Macros

#define XUA_HDR(class, type)   ((struct xua_common_hdr) { .spare = 0, .msg_class = (class), .msg_type = (type) })
 

Functions

void osmo_xua_msg_tall_ctx_init (void *ctx)
 
struct xua_msgxua_msg_alloc (void)
 
void xua_msg_free (struct xua_msg *msg)
 
int xua_msg_add_data (struct xua_msg *msg, uint16_t tag, uint16_t len, const uint8_t *dat)
 
struct xua_msg_partxua_msg_find_tag (const struct xua_msg *msg, uint16_t tag)
 
int xua_msg_free_tag (struct xua_msg *xua, uint16_t tag)
 
int xua_msg_copy_part (struct xua_msg *xua_out, uint16_t tag_out, const struct xua_msg *xua_in, uint16_t tag_in)
 
struct xua_msgxua_from_msg (const int version, uint16_t len, uint8_t *data)
 
struct msgb * xua_to_msg (const int version, struct xua_msg *msg)
 
struct xua_msgxua_from_nested (struct xua_msg_part *outer)
 
int msgb_t16l16vp_put (struct msgb *msg, uint16_t tag, uint16_t len, const uint8_t *data)
 
int msgb_t16l16vp_put_u32 (struct msgb *msg, uint16_t tag, uint32_t val)
 
int xua_msg_add_u32 (struct xua_msg *xua, uint16_t iei, uint32_t val)
 
uint32_t xua_msg_part_get_u32 (const struct xua_msg_part *part)
 
uint32_t xua_msg_get_u32 (const struct xua_msg *xua, uint16_t iei)
 
const uint32_t * xua_msg_get_u32p (const struct xua_msg *xua, uint16_t iei, uint32_t *out)
 
const char * xua_msg_part_get_str (const struct xua_msg_part *part)
 
const char * xua_msg_get_str (const struct xua_msg *xua, uint16_t iei)
 
int xua_msg_get_len (const struct xua_msg *xua, uint16_t iei)
 
void xua_part_add_gt (struct msgb *msg, const struct osmo_sccp_gt *gt)
 
int xua_msg_add_sccp_addr (struct xua_msg *xua, uint16_t iei, const struct osmo_sccp_addr *addr)
 
const char * xua_class_msg_name (const struct xua_msg_class *xmc, uint16_t msg_type)
 
const char * xua_class_iei_name (const struct xua_msg_class *xmc, uint16_t iei)
 
char * xua_hdr_dump (struct xua_msg *xua, const struct xua_dialect *dialect)
 
char * xua_msg_dump (struct xua_msg *xua, const struct xua_dialect *dialect)
 
int xua_dialect_check_all_mand_ies (const struct xua_dialect *dialect, struct xua_msg *xua)
 
int xua_msg_event_map (const struct xua_msg *xua, const struct xua_msg_event_map *maps, unsigned int num_maps)
 Map from a xua_msg (class+type) to an event. More...
 

Variables

const struct xua_dialect xua_dialect_sua
 
const struct xua_dialect xua_dialect_m3ua
 

Macro Definition Documentation

◆ XUA_HDR

Function Documentation

◆ msgb_t16l16vp_put()

int msgb_t16l16vp_put ( struct msgb *  msg,
uint16_t  tag,
uint16_t  len,
const uint8_t *  data 
)

◆ msgb_t16l16vp_put_u32()

int msgb_t16l16vp_put_u32 ( struct msgb *  msg,
uint16_t  tag,
uint32_t  val 
)

◆ osmo_xua_msg_tall_ctx_init()

void osmo_xua_msg_tall_ctx_init ( void *  ctx)

References tall_xua.

◆ xua_class_iei_name()

const char* xua_class_iei_name ( const struct xua_msg_class xmc,
uint16_t  iei 
)

◆ xua_class_msg_name()

const char* xua_class_msg_name ( const struct xua_msg_class xmc,
uint16_t  msg_type 
)

◆ xua_dialect_check_all_mand_ies()

◆ xua_from_msg()

struct xua_msg* xua_from_msg ( const int  version,
uint16_t  len,
uint8_t *  data 
)

◆ xua_from_nested()

◆ xua_hdr_dump()

◆ xua_msg_add_data()

◆ xua_msg_add_sccp_addr()

◆ xua_msg_add_u32()

◆ xua_msg_alloc()

◆ xua_msg_copy_part()

int xua_msg_copy_part ( struct xua_msg xua_out,
uint16_t  tag_out,
const struct xua_msg xua_in,
uint16_t  tag_in 
)

◆ xua_msg_dump()

◆ xua_msg_event_map()

int xua_msg_event_map ( const struct xua_msg xua,
const struct xua_msg_event_map maps,
unsigned int  num_maps 
)

Map from a xua_msg (class+type) to an event.

Parameters
[in]xuaxUA message which is to be mapped
[in]mapsTable containing msg type+class -> event maps [aram[in] num_maps number of entries in maps
Returns
event >= 0; negative on error (no map found)

References xua_msg_event_map::event, xua_msg::hdr, xua_common_hdr::msg_class, xua_msg_event_map::msg_class, xua_common_hdr::msg_type, and xua_msg_event_map::msg_type.

Referenced by m3ua_rx_asp(), sccp_scoc_rx_from_scrc(), and sua_rx_asp().

◆ xua_msg_find_tag()

◆ xua_msg_free()

◆ xua_msg_free_tag()

int xua_msg_free_tag ( struct xua_msg xua,
uint16_t  tag 
)

◆ xua_msg_get_len()

int xua_msg_get_len ( const struct xua_msg xua,
uint16_t  iei 
)

◆ xua_msg_get_str()

const char* xua_msg_get_str ( const struct xua_msg xua,
uint16_t  iei 
)

◆ xua_msg_get_u32()

◆ xua_msg_get_u32p()

const uint32_t* xua_msg_get_u32p ( const struct xua_msg xua,
uint16_t  iei,
uint32_t *  out 
)

◆ xua_msg_part_get_str()

const char* xua_msg_part_get_str ( const struct xua_msg_part part)

References xua_msg_part::dat, and xua_msg_part::len.

Referenced by xua_msg_get_str().

◆ xua_msg_part_get_u32()

◆ xua_part_add_gt()

void xua_part_add_gt ( struct msgb *  msg,
const struct osmo_sccp_gt gt 
)

◆ xua_to_msg()

Variable Documentation

◆ xua_dialect_m3ua

const struct xua_dialect xua_dialect_m3ua

◆ xua_dialect_sua