libosmo-sigtran 2.3.0.61-fb14d
Osmocom SIGTRAN library
mtp_sap.h File Reference
#include <stdint.h>
#include <osmocom/core/prim.h>
#include <osmocom/sigtran/sigtran_sap.h>

Go to the source code of this file.

Data Structures

struct  osmo_mtp_transfer_param
 
struct  osmo_mtp_pause_param
 
struct  osmo_mtp_resume_param
 
struct  osmo_mtp_status_param
 
struct  osmo_mtp_prim
 

Macros

#define MTP_SIO_EXT(service, net_ind, mp)
 
#define MTP_SIO(service, net_ind)   MTP_SIO_EXT(service, net_ind, 0)
 
#define MTP_SIO_NI(sio)   (((sio) >> 6) & 0x3)
 
#define MTP_SIO_MP(sio)   (((sio) >> 4) & 0x3)
 
#define MTP_SIO_SI(sio)   ((sio) & 0xf)
 
#define msgb_mtp_prim(msg)   ((struct osmo_mtp_prim *)(msg)->l1h)
 

Enumerations

enum  osmo_mtp_prim_type { OSMO_MTP_PRIM_TRANSFER , OSMO_MTP_PRIM_PAUSE , OSMO_MTP_PRIM_RESUME , OSMO_MTP_PRIM_STATUS }
 

Functions

static const char * osmo_mtp_prim_type_name (enum osmo_mtp_prim_type val)
 
char * osmo_mtp_prim_name (const struct osmo_prim_hdr *oph)
 
struct osmo_mtp_prim * osmo_mtp_prim_xfer_req_prepend (const struct osmo_mtp_transfer_param *param, struct msgb *msg)
 Wrap MTP payload into an MTP-TRANSFER.req primitive. More...
 

Variables

const struct value_string osmo_mtp_prim_type_names []
 

Macro Definition Documentation

◆ msgb_mtp_prim

#define msgb_mtp_prim (   msg)    ((struct osmo_mtp_prim *)(msg)->l1h)

◆ MTP_SIO

#define MTP_SIO (   service,
  net_ind 
)    MTP_SIO_EXT(service, net_ind, 0)

◆ MTP_SIO_EXT

#define MTP_SIO_EXT (   service,
  net_ind,
  mp 
)
Value:
((((net_ind) & 0x3) << 6) | \
(((mp) & 0x3) << 4) | \
((service) & 0xf))
uint8_t mp
Definition: m3ua.h:4

◆ MTP_SIO_MP

#define MTP_SIO_MP (   sio)    (((sio) >> 4) & 0x3)

◆ MTP_SIO_NI

#define MTP_SIO_NI (   sio)    (((sio) >> 6) & 0x3)

◆ MTP_SIO_SI

#define MTP_SIO_SI (   sio)    ((sio) & 0xf)

Enumeration Type Documentation

◆ osmo_mtp_prim_type

Enumerator
OSMO_MTP_PRIM_TRANSFER 
OSMO_MTP_PRIM_PAUSE 
OSMO_MTP_PRIM_RESUME 
OSMO_MTP_PRIM_STATUS 

Function Documentation

◆ osmo_mtp_prim_name()

char * osmo_mtp_prim_name ( const struct osmo_prim_hdr *  oph)

◆ osmo_mtp_prim_type_name()

static const char * osmo_mtp_prim_type_name ( enum osmo_mtp_prim_type  val)
inlinestatic

◆ osmo_mtp_prim_xfer_req_prepend()

struct osmo_mtp_prim * osmo_mtp_prim_xfer_req_prepend ( const struct osmo_mtp_transfer_param *  param,
struct msgb *  msg 
)

Wrap MTP payload into an MTP-TRANSFER.req primitive.

Parameters
[in]paramMTP-TRANSFER.req params to copy to the primitive (Optional, can be NULL)
[in]msgmsgb containing MTP payload and where primitive will be prepended
Returns
return MTP-TRANSFER.req prepended to msgb

References MTP_SAP_USER, osmo_mtp_prim::oph, OSMO_MTP_PRIM_TRANSFER, osmo_mtp_prim::transfer, and osmo_mtp_prim::u.

Referenced by sua2sccp_tx_m3ua().

Variable Documentation

◆ osmo_mtp_prim_type_names

const struct value_string osmo_mtp_prim_type_names[]
extern

Referenced by osmo_mtp_prim_type_name().