libosmo-sigtran  1.9.0.4-dc82
Osmocom SIGTRAN library
xua_rkm.c File Reference
#include <string.h>
#include <arpa/inet.h>
#include <osmocom/core/logging.h>
#include <osmocom/core/linuxlist.h>
#include <osmocom/sigtran/xua_msg.h>
#include <osmocom/sigtran/osmo_ss7.h>
#include <osmocom/sigtran/protocol/m3ua.h>
#include "xua_internal.h"
#include "xua_as_fsm.h"
#include "xua_asp_fsm.h"

Macros

#define MAX_NEW_AS   16
 

Functions

static void msgb_push_m3ua_hdr (struct msgb *msg, uint8_t msg_class, uint8_t msg_type)
 
static int msgb_append_reg_res (struct msgb *msg, uint32_t local_rk_id, uint32_t status, uint32_t rctx)
 
static int msgb_append_dereg_res (struct msgb *msg, uint32_t status, uint32_t rctx)
 
static void xua_rkm_send_reg_req (struct osmo_ss7_asp *asp, const struct osmo_ss7_routing_key *rkey, enum osmo_ss7_as_traffic_mode traf_mode)
 
static void xua_rkm_send_dereg_req (struct osmo_ss7_asp *asp, uint32_t route_ctx)
 
static int handle_rkey_reg (struct osmo_ss7_asp *asp, struct xua_msg *inner, struct msgb *resp, struct osmo_ss7_as **newly_assigned_as, unsigned int max_nas_idx, unsigned int *nas_idx)
 
static int m3ua_rx_rkm_reg_req (struct osmo_ss7_asp *asp, struct xua_msg *xua)
 
static int handle_rkey_dereg (struct osmo_ss7_asp *asp, uint32_t rctx, struct msgb *resp)
 
static int m3ua_rx_rkm_dereg_req (struct osmo_ss7_asp *asp, struct xua_msg *xua)
 
static int handle_rkey_reg_resp (struct osmo_ss7_asp *asp, struct xua_msg *inner)
 
static int m3ua_rx_rkm_reg_rsp (struct osmo_ss7_asp *asp, struct xua_msg *xua)
 
static int handle_rkey_dereg_resp (struct osmo_ss7_asp *asp, struct xua_msg *inner)
 
static int m3ua_rx_rkm_dereg_rsp (struct osmo_ss7_asp *asp, struct xua_msg *xua)
 
int m3ua_rx_rkm (struct osmo_ss7_asp *asp, struct xua_msg *xua)
 
int osmo_xlm_sap_down (struct osmo_ss7_asp *asp, struct osmo_prim_hdr *oph)
 
void xua_rkm_cleanup_dyn_as_for_asp (struct osmo_ss7_asp *asp)
 

Variables

const struct value_string m3ua_rkm_reg_status_vals []
 
const struct value_string m3ua_rkm_dereg_status_vals []
 

Macro Definition Documentation

◆ MAX_NEW_AS

#define MAX_NEW_AS   16

Referenced by m3ua_rx_rkm_reg_req().

Function Documentation

◆ handle_rkey_dereg()

◆ handle_rkey_dereg_resp()

◆ handle_rkey_reg()

static int handle_rkey_reg ( struct osmo_ss7_asp asp,
struct xua_msg inner,
struct msgb *  resp,
struct osmo_ss7_as **  newly_assigned_as,
unsigned int  max_nas_idx,
unsigned int *  nas_idx 
)
static

◆ handle_rkey_reg_resp()

◆ m3ua_rx_rkm()

◆ m3ua_rx_rkm_dereg_req()

◆ m3ua_rx_rkm_dereg_rsp()

static int m3ua_rx_rkm_dereg_rsp ( struct osmo_ss7_asp asp,
struct xua_msg xua 
)
static

◆ m3ua_rx_rkm_reg_req()

◆ m3ua_rx_rkm_reg_rsp()

static int m3ua_rx_rkm_reg_rsp ( struct osmo_ss7_asp asp,
struct xua_msg xua 
)
static

◆ msgb_append_dereg_res()

static int msgb_append_dereg_res ( struct msgb *  msg,
uint32_t  status,
uint32_t  rctx 
)
static

◆ msgb_append_reg_res()

static int msgb_append_reg_res ( struct msgb *  msg,
uint32_t  local_rk_id,
uint32_t  status,
uint32_t  rctx 
)
static

◆ msgb_push_m3ua_hdr()

static void msgb_push_m3ua_hdr ( struct msgb *  msg,
uint8_t  msg_class,
uint8_t  msg_type 
)
static

◆ osmo_xlm_sap_down()

◆ xua_rkm_cleanup_dyn_as_for_asp()

◆ xua_rkm_send_dereg_req()

static void xua_rkm_send_dereg_req ( struct osmo_ss7_asp asp,
uint32_t  route_ctx 
)
static

◆ xua_rkm_send_reg_req()

Variable Documentation

◆ m3ua_rkm_dereg_status_vals

const struct value_string m3ua_rkm_dereg_status_vals[]
Initial value:
= {
{ M3UA_RKM_DEREG_SUCCESS, "SUCCSS" },
{ M3UA_RKM_DEREG_ERR_UNKNOWN, "Unknown Error" },
{ M3UA_RKM_DEREG_ERR_INVAL_RCTX, "Invalid Routing Context" },
{ M3UA_RKM_DEREG_ERR_PERM_DENIED, "Permission Denied" },
{ M3UA_RKM_DEREG_ERR_NOT_REGD, "Error: Not Registered" },
{ M3UA_RKM_DEREG_ERR_ASP_ACTIVE, "Error: ASP Active" },
{ 0, NULL }
}
Definition: m3ua.h:139
Definition: m3ua.h:141
Definition: m3ua.h:137
Definition: m3ua.h:140
Definition: m3ua.h:142
Definition: m3ua.h:138

Referenced by handle_rkey_dereg_resp(), and ss7_asp_lm_timer_name().

◆ m3ua_rkm_reg_status_vals

const struct value_string m3ua_rkm_reg_status_vals[]
Initial value:
= {
{ M3UA_RKM_REG_SUCCESS, "SUCCESS" },
{ M3UA_RKM_REG_ERR_UNKNOWN, "Unknown Error" },
{ M3UA_RKM_REG_ERR_INVAL_DPC, "Invalid Destination Pointcode" },
{ M3UA_RKM_REG_ERR_INVAL_NET_APPEAR, "Invalid Network Appearance" },
{ M3UA_RKM_REG_ERR_INVAL_RKEY, "Invalid Routing Key" },
{ M3UA_RKM_REG_ERR_PERM_DENIED, "Permission Denied" },
{ M3UA_RKM_REG_ERR_CANT_SUPP_UNQ_RT, "Cannot Support Unique Routing" },
{ M3UA_RKM_REG_ERR_RKEY_NOT_PROVD, "Routing Key Not Provided" },
{ M3UA_RKM_REG_ERR_INSUFF_RESRC, "Insufficient Resources" },
{ M3UA_RKM_REG_ERR_UNSUPP_RK_PARAM, "Unsupported Routing Key Parameter" },
{ M3UA_RKM_REG_ERR_UNSUPP_TRAF_MODE, "Unsupported Traffic Mode Type" },
{ M3UA_RKM_REG_ERR_RKEY_CHG_REFUSED, "Routing Key Change Refused" },
{ M3UA_RKM_REG_ERR_RKEY_ALRDY_REGD, "Routing Key Already Registered" },
{ 0, NULL }
}
Definition: m3ua.h:130
Definition: m3ua.h:124
Definition: m3ua.h:122
Definition: m3ua.h:128
Definition: m3ua.h:123
Definition: m3ua.h:126
Definition: m3ua.h:131
Definition: m3ua.h:133
Definition: m3ua.h:129
Definition: m3ua.h:132
Definition: m3ua.h:121
Definition: m3ua.h:127
Definition: m3ua.h:125

Referenced by handle_rkey_reg_resp(), and ss7_asp_lm_timer_name().