Loading...
Searching...
No Matches
sccp_sap.h
Go to the documentation of this file.
#pragma once
/* SCCP User SAP description */
/* (C) 2015-2017 by Harald Welte <laforge@gnumonks.org>
* All Rights Reserved
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#include <stdint.h>
#include <osmocom/core/prim.h>
#include <osmocom/sigtran/sigtran_sap.h>
#include <netinet/in.h>
/* detailed coding of primitives at the SAP_SCCP_USER */
enum osmo_scu_prim_type {
/* connection oriented, 6.1.1 */
OSMO_SCU_PRIM_N_CONNECT,
OSMO_SCU_PRIM_N_DATA,
OSMO_SCU_PRIM_N_EXPEDITED_DATA,
OSMO_SCU_PRIM_N_DISCONNECT,
OSMO_SCU_PRIM_N_RESET,
OSMO_SCU_PRIM_N_INFORM,
/* connectionless, 6.2.2 */
OSMO_SCU_PRIM_N_UNITDATA,
OSMO_SCU_PRIM_N_NOTICE,
/* management */
OSMO_SCU_PRIM_N_COORD,
OSMO_SCU_PRIM_N_STATE,
OSMO_SCU_PRIM_N_PCSTATE,
};
#define OSMO_SCCP_ADDR_T_GT 0x0001 /* global title */
#define OSMO_SCCP_ADDR_T_PC 0x0002 /* signalling point code */
#define OSMO_SCCP_ADDR_T_SSN 0x0004 /* subsystem number */
#define OSMO_SCCP_ADDR_T_IPv4 0x0008
#define OSMO_SCCP_ADDR_T_IPv6 0x0010
#define OSMO_SCCP_ADDR_T_MASK 0x001f
/* Q.713 3.4.1 + RFC 3868 3.10.2.3 */
enum osmo_sccp_routing_ind {
OSMO_SCCP_RI_NONE,
OSMO_SCCP_RI_GT,
OSMO_SCCP_RI_SSN_PC,
OSMO_SCCP_RI_SSN_IP,
};
extern const struct value_string osmo_sccp_routing_ind_names[];
static inline const char *osmo_sccp_routing_ind_name(enum osmo_sccp_routing_ind val)
{ return get_value_string(osmo_sccp_routing_ind_names, val); }
/* Q.713 3.4.1 + RFC 3868 3.10.2.3 */
enum osmo_sccp_gti {
OSMO_SCCP_GTI_NO_GT,
OSMO_SCCP_GTI_NAI_ONLY,
OSMO_SCCP_GTI_TT_ONLY,
OSMO_SCCP_GTI_TT_NPL_ENC,
OSMO_SCCP_GTI_TT_NPL_ENC_NAI,
};
extern const struct value_string osmo_sccp_gti_names[];
static inline const char *osmo_sccp_gti_name(enum osmo_sccp_gti val)
{ return get_value_string(osmo_sccp_gti_names, val); }
/* RFC 3868 3.10.2.3 */
enum osmo_sccp_npi {
OSMO_SCCP_NPI_UNKNOWN = 0,
OSMO_SCCP_NPI_E164_ISDN = 1,
OSMO_SCCP_NPI_GEERIC = 2,
OSMO_SCCP_NPI_X121_DATA = 3,
OSMO_SCCP_NPI_F69_TELEX = 4,
OSMO_SCCP_NPI_E210_MARITIME = 5,
OSMO_SCCP_NPI_E212_LAND = 6,
OSMO_SCCP_NPI_E214_ISDN_MOBILE = 7,
OSMO_SCCP_NPI_PRIVATE = 14,
};
/* Q.713 3.4.2.3.1 + RFC 3868 3.10.2.3 */
enum osmo_sccp_nai {
OSMO_SCCP_NAI_UNKNOWN = 0,
OSMO_SCCP_NAI_SUBSCR = 1,
OSMO_SCCP_NAI_RES_NAT_USE = 2,
OSMO_SCCP_NAI_NATL = 3,
OSMO_SCCP_NAI_INTL = 4,
/* 5.. 255: Spare */
};
/* Q.713 3.4.2.2 */
enum osmo_sccp_ssn {
/* globally standardised for GSM/UMTS: 1-31 */
OSMO_SCCP_SSN_MGMT = 1,
OSMO_SCCP_SSN_ISUP = 3,
OSMO_SCCP_SSN_OMAP = 4,
OSMO_SCCP_SSN_MAP = 5,
OSMO_SCCP_SSN_HLR = 6,
OSMO_SCCP_SSN_VLR = 7,
OSMO_SCCP_SSN_MSC = 8,
OSMO_SCCP_SSN_EIR = 9,
OSMO_SCCP_SSN_AUC = 0x0a,
/* Q.713 */
OSMO_SCCP_SSN_ISDN_SS = 0x0b,
OSMO_SCCP_SSN_RES_INTL = 0x0c,
OSMO_SCCP_SSN_BISDN = 0x0d,
OSMO_SCCP_SSN_TC_TEST = 0x0e,
/* national network SSN for wihin and between GSM/UMTS: 129-150 */
OSMO_SCCP_SSN_RANAP = 142,
OSMO_SCCP_SSN_RNSAP = 143,
OSMO_SCCP_SSN_GMLC_MAP = 145,
OSMO_SCCP_SSN_CAP = 146,
OSMO_SCCP_SSN_gsmSCF_MAP = 147,
OSMO_SCCP_SSN_SIWF_MAP = 148,
OSMO_SCCP_SSN_SGSN_MAP = 149,
OSMO_SCCP_SSN_GGSN_MAP = 150,
/* national network SSN within GSM/UMTS: 32-128 + 151-254 */
OSMO_SCCP_SSN_PCAP = 249,
OSMO_SCCP_SSN_BSC_BSSAP_LE = 250,
OSMO_SCCP_SSN_MSC_BSSAP_LE = 251,
OSMO_SCCP_SSN_SMLC_BSSAP_LE = 252,
OSMO_SCCP_SSN_BSS_OAM = 253,
OSMO_SCCP_SSN_BSSAP = 254,
};
/* Q.711 6.3.2.2.5 Signalling point status */
enum osmo_sccp_sp_status {
OSMO_SCCP_SP_S_INACCESSIBLE = 1,
OSMO_SCCP_SP_S_CONGESTED = 2,
OSMO_SCCP_SP_S_ACCESSIBLE = 3,
};
extern const struct value_string osmo_sccp_sp_status_names[];
static inline const char *osmo_sccp_sp_status_name(enum osmo_sccp_sp_status val)
{
return get_value_string(osmo_sccp_sp_status_names, val);
}
/* Q.711 6.3.2.2.6 Remote SCCP status */
enum osmo_sccp_rem_sccp_status {
OSMO_SCCP_REM_SCCP_S_AVAILABLE = 1,
OSMO_SCCP_REM_SCCP_S_UNAVAILABLE_UNKNOWN = 2,
OSMO_SCCP_REM_SCCP_S_UNEQUIPPED = 3,
OSMO_SCCP_REM_SCCP_S_INACCESSIBLE = 4,
OSMO_SCCP_REM_SCCP_S_CONGESTED = 5,
};
extern const struct value_string osmo_sccp_rem_sccp_status_names[];
static inline const char *osmo_sccp_rem_sccp_status_name(enum osmo_sccp_rem_sccp_status val)
{
return get_value_string(osmo_sccp_rem_sccp_status_names, val);
}
/* legacy shim for name change */
#define OSMO_SCCP_SSN_SMLC_BSSAP OSMO_SCCP_SSN_SMLC_BSSAP_LE
extern const struct value_string osmo_sccp_ssn_names[];
static inline const char *osmo_sccp_ssn_name(enum osmo_sccp_ssn val)
{ return get_value_string(osmo_sccp_ssn_names, val); }
struct osmo_sccp_gt {
uint8_t gti;
uint8_t tt;
uint32_t npi;
uint32_t nai;
char digits[32];
};
struct osmo_sccp_addr {
uint32_t presence;
enum osmo_sccp_routing_ind ri;
struct osmo_sccp_gt gt;
uint32_t pc;
uint32_t ssn;
union {
struct in_addr v4;
struct in6_addr v6;
} ip;
/* we don't do hostnames */
};
/* OSMO_SCU_PRIM_N_CONNECT */
struct osmo_scu_connect_param {
struct osmo_sccp_addr called_addr;
struct osmo_sccp_addr calling_addr;
struct osmo_sccp_addr responding_addr;
//struct osmo_sccp_qos_pars qos_pars;
uint32_t sccp_class;
uint32_t importance;
uint32_t conn_id;
/* user data */
};
/* OSMO_SCU_PRIM_N_DATA / OSMO_SCU_PRIM_N_EXPEDITED_DATA */
struct osmo_scu_data_param {
uint32_t conn_id;
uint32_t importance;
/* user data */
};
enum osmo_sccp_originator {
OSMO_SCCP_ORIG_NS_PROVIDER,
OSMO_SCCP_ORIG_NS_USER,
OSMO_SCCP_ORIG_UNDEFINED,
};
/* OSMO_SCU_PRIM_N_DISCONNECT */
struct osmo_scu_disconn_param {
enum osmo_sccp_originator originator;
struct osmo_sccp_addr responding_addr;
uint32_t cause;
uint32_t conn_id;
uint32_t importance;
/* user data */
};
/* OSMO_SCU_PRIM_N_RESET */
struct osmo_scu_reset_param {
enum osmo_sccp_originator originator;
uint32_t cause;
uint32_t conn_id;
};
/* OSMO_SCU_PRIM_N_UNITDATA */
struct osmo_scu_unitdata_param {
struct osmo_sccp_addr called_addr;
struct osmo_sccp_addr calling_addr;
uint32_t in_sequence_control;
uint32_t return_option;
uint32_t importance;
/* user data */
};
/* OSMO_SCU_PRIM_N_NOTICE */
struct osmo_scu_notice_param {
struct osmo_sccp_addr called_addr;
struct osmo_sccp_addr calling_addr;
uint32_t cause;
uint32_t importance;
/* user data */
};
/* OSMO_SCU_PRIM_N_STATE */
struct osmo_scu_state_param {
uint32_t affected_pc;
uint32_t affected_ssn;
bool user_in_service; /* true: UIS; false: UOS */
uint32_t ssn_multiplicity_ind;
};
/* OSMO_SCU_PRIM_N_PCSTATE */
struct osmo_scu_pcstate_param {
uint32_t affected_pc;
uint32_t restricted_importance_level;
enum osmo_sccp_sp_status sp_status;
enum osmo_sccp_rem_sccp_status remote_sccp_status;
};
struct osmo_scu_prim {
struct osmo_prim_hdr oph;
union {
struct osmo_scu_connect_param connect;
struct osmo_scu_data_param data;
struct osmo_scu_disconn_param disconnect;
struct osmo_scu_reset_param reset;
struct osmo_scu_unitdata_param unitdata;
struct osmo_scu_notice_param notice;
struct osmo_scu_state_param state;
struct osmo_scu_pcstate_param pcstate;
} u;
};
#define msgb_scu_prim(msg) ((struct osmo_scu_prim *)(msg)->l1h)
extern const struct value_string osmo_scu_prim_type_names[];
static inline const char *osmo_scu_prim_type_name(enum osmo_scu_prim_type val)
{
return get_value_string(osmo_scu_prim_type_names, val);
}
int osmo_scu_prim_hdr_name_buf(char *buf, size_t buflen, const struct osmo_prim_hdr *oph);
char *osmo_scu_prim_hdr_name_c(void *ctx, const struct osmo_prim_hdr *oph);
char *osmo_scu_prim_name(const struct osmo_prim_hdr *oph);
struct osmo_ss7_instance;
struct osmo_sccp_instance;
struct osmo_sccp_user;
void osmo_sccp_vty_init(void);
struct osmo_sccp_instance *osmo_sccp_instance_create(struct osmo_ss7_instance *ss7, void *priv);
void osmo_sccp_instance_destroy(struct osmo_sccp_instance *inst);
struct osmo_ss7_instance *osmo_sccp_get_ss7(const struct osmo_sccp_instance *sccp);
struct osmo_sccp_instance *osmo_sccp_get_sccp(const struct osmo_sccp_user *scu);
void osmo_sccp_set_priv(struct osmo_sccp_instance *sccp, void *priv);
void *osmo_sccp_get_priv(struct osmo_sccp_instance *sccp);
void osmo_sccp_user_unbind(struct osmo_sccp_user *scu);
void osmo_sccp_user_set_priv(struct osmo_sccp_user *scu, void *priv);
void *osmo_sccp_user_get_priv(struct osmo_sccp_user *scu);
struct osmo_sccp_user *osmo_sccp_user_bind_pc(struct osmo_sccp_instance *inst, const char *name,
osmo_prim_cb prim_cb, uint16_t ssn, uint32_t pc);
struct osmo_sccp_user *osmo_sccp_user_bind(struct osmo_sccp_instance *inst, const char *name,
osmo_prim_cb prim_cb, uint16_t ssn);
struct osmo_sccp_user *osmo_sccp_user_find(struct osmo_sccp_instance *inst, uint16_t ssn, uint32_t pc);
int osmo_sccp_user_sap_down(struct osmo_sccp_user *scu, struct osmo_prim_hdr *oph);
int osmo_sccp_user_sap_down_nofree(struct osmo_sccp_user *scu, struct osmo_prim_hdr *oph);
struct osmo_ss7_instance *osmo_sccp_addr_by_name(struct osmo_sccp_addr *dest_addr, const char *name);
int osmo_sccp_addr_by_name_local(struct osmo_sccp_addr *dest_addr, const char *name,
const struct osmo_ss7_instance *inst);
const char *osmo_sccp_name_by_addr(const struct osmo_sccp_addr *addr);
void osmo_sccp_local_addr_by_instance(struct osmo_sccp_addr *dest_addr,
const struct osmo_sccp_instance *inst,
uint32_t ssn);
bool osmo_sccp_check_addr(struct osmo_sccp_addr *addr, uint32_t presence);
int osmo_sccp_addr_cmp(const struct osmo_sccp_addr *a, const struct osmo_sccp_addr *b, uint32_t presence_criteria);
int osmo_sccp_addr_ri_cmp(const struct osmo_sccp_addr *a, const struct osmo_sccp_addr *b);
int osmo_sccp_gt_cmp(const struct osmo_sccp_gt *a, const struct osmo_sccp_gt *b);
const char *osmo_sccp_user_name(struct osmo_sccp_user *scu);
int osmo_sccp_instance_next_conn_id(struct osmo_sccp_instance *sccp);
osmo_scu_prim_type
osmo_scu_prim_type
SCCP-User primitives as per Q.711.
Definition sccp_sap.h:32
OSMO_SCU_PRIM_N_CONNECT
@ OSMO_SCU_PRIM_N_CONNECT
Definition sccp_sap.h:34
OSMO_SCU_PRIM_N_NOTICE
@ OSMO_SCU_PRIM_N_NOTICE
Definition sccp_sap.h:42
OSMO_SCU_PRIM_N_INFORM
@ OSMO_SCU_PRIM_N_INFORM
Definition sccp_sap.h:39
OSMO_SCU_PRIM_N_RESET
@ OSMO_SCU_PRIM_N_RESET
Definition sccp_sap.h:38
OSMO_SCU_PRIM_N_UNITDATA
@ OSMO_SCU_PRIM_N_UNITDATA
Definition sccp_sap.h:41
OSMO_SCU_PRIM_N_PCSTATE
@ OSMO_SCU_PRIM_N_PCSTATE
Definition sccp_sap.h:46
OSMO_SCU_PRIM_N_EXPEDITED_DATA
@ OSMO_SCU_PRIM_N_EXPEDITED_DATA
Definition sccp_sap.h:36
OSMO_SCU_PRIM_N_STATE
@ OSMO_SCU_PRIM_N_STATE
Definition sccp_sap.h:45
OSMO_SCU_PRIM_N_DISCONNECT
@ OSMO_SCU_PRIM_N_DISCONNECT
Definition sccp_sap.h:37
OSMO_SCU_PRIM_N_DATA
@ OSMO_SCU_PRIM_N_DATA
Definition sccp_sap.h:35
OSMO_SCU_PRIM_N_COORD
@ OSMO_SCU_PRIM_N_COORD
Definition sccp_sap.h:44
osmo_sccp_npi
osmo_sccp_npi
Definition sccp_sap.h:83
OSMO_SCCP_NPI_F69_TELEX
@ OSMO_SCCP_NPI_F69_TELEX
Definition sccp_sap.h:88
OSMO_SCCP_NPI_E214_ISDN_MOBILE
@ OSMO_SCCP_NPI_E214_ISDN_MOBILE
Definition sccp_sap.h:91
OSMO_SCCP_NPI_GEERIC
@ OSMO_SCCP_NPI_GEERIC
Definition sccp_sap.h:86
OSMO_SCCP_NPI_E210_MARITIME
@ OSMO_SCCP_NPI_E210_MARITIME
Definition sccp_sap.h:89
OSMO_SCCP_NPI_X121_DATA
@ OSMO_SCCP_NPI_X121_DATA
Definition sccp_sap.h:87
OSMO_SCCP_NPI_E212_LAND
@ OSMO_SCCP_NPI_E212_LAND
Definition sccp_sap.h:90
OSMO_SCCP_NPI_E164_ISDN
@ OSMO_SCCP_NPI_E164_ISDN
Definition sccp_sap.h:85
OSMO_SCCP_NPI_UNKNOWN
@ OSMO_SCCP_NPI_UNKNOWN
Definition sccp_sap.h:84
OSMO_SCCP_NPI_PRIVATE
@ OSMO_SCCP_NPI_PRIVATE
Definition sccp_sap.h:92
osmo_sccp_user_sap_down_nofree
int osmo_sccp_user_sap_down_nofree(struct osmo_sccp_user *scu, struct osmo_prim_hdr *oph)
Main entrance function for primitives from SCCP User.
Definition sccp_scoc.c:1883
osmo_sccp_ssn_name
static const char * osmo_sccp_ssn_name(enum osmo_sccp_ssn val)
Definition sccp_sap.h:172
osmo_sccp_user_set_priv
void osmo_sccp_user_set_priv(struct osmo_sccp_user *scu, void *priv)
Definition sccp_user.c:165
osmo_scu_prim_hdr_name_c
char * osmo_scu_prim_hdr_name_c(void *ctx, const struct osmo_prim_hdr *oph)
Definition sccp_sap.c:67
osmo_sccp_sp_status_names
const struct value_string osmo_sccp_sp_status_names[]
Definition sccp_sap.c:123
osmo_sccp_get_sccp
struct osmo_sccp_instance * osmo_sccp_get_sccp(const struct osmo_sccp_user *scu)
get the SCCP instance that is related to the given sccp user
Definition sccp_user.c:917
osmo_sccp_originator
osmo_sccp_originator
Definition sccp_sap.h:215
OSMO_SCCP_ORIG_NS_USER
@ OSMO_SCCP_ORIG_NS_USER
Definition sccp_sap.h:217
OSMO_SCCP_ORIG_NS_PROVIDER
@ OSMO_SCCP_ORIG_NS_PROVIDER
Definition sccp_sap.h:216
OSMO_SCCP_ORIG_UNDEFINED
@ OSMO_SCCP_ORIG_UNDEFINED
Definition sccp_sap.h:218
osmo_sccp_instance_destroy
void osmo_sccp_instance_destroy(struct osmo_sccp_instance *inst)
Definition sccp_user.c:262
osmo_sccp_user_find
struct osmo_sccp_user * osmo_sccp_user_find(struct osmo_sccp_instance *inst, uint16_t ssn, uint32_t pc)
Find a SCCP User registered for given PC+SSN or SSN only.
Definition sccp_user.c:87
osmo_sccp_rem_sccp_status_names
const struct value_string osmo_sccp_rem_sccp_status_names[]
Definition sccp_sap.c:130
osmo_sccp_check_addr
bool osmo_sccp_check_addr(struct osmo_sccp_addr *addr, uint32_t presence)
check whether a given SCCP-Address is consistent.
Definition sccp_user.c:313
osmo_sccp_sp_status_name
static const char * osmo_sccp_sp_status_name(enum osmo_sccp_sp_status val)
Definition sccp_sap.h:148
osmo_sccp_gti
osmo_sccp_gti
Definition sccp_sap.h:70
OSMO_SCCP_GTI_TT_NPL_ENC_NAI
@ OSMO_SCCP_GTI_TT_NPL_ENC_NAI
Definition sccp_sap.h:75
OSMO_SCCP_GTI_NAI_ONLY
@ OSMO_SCCP_GTI_NAI_ONLY
Definition sccp_sap.h:72
OSMO_SCCP_GTI_TT_ONLY
@ OSMO_SCCP_GTI_TT_ONLY
Definition sccp_sap.h:73
OSMO_SCCP_GTI_TT_NPL_ENC
@ OSMO_SCCP_GTI_TT_NPL_ENC
Definition sccp_sap.h:74
OSMO_SCCP_GTI_NO_GT
@ OSMO_SCCP_GTI_NO_GT
Definition sccp_sap.h:71
osmo_scu_prim_hdr_name_buf
int osmo_scu_prim_hdr_name_buf(char *buf, size_t buflen, const struct osmo_prim_hdr *oph)
Definition sccp_sap.c:52
osmo_sccp_addr_by_name
struct osmo_ss7_instance * osmo_sccp_addr_by_name(struct osmo_sccp_addr *dest_addr, const char *name)
Lookup an SCCP address from the addressbook by its name.
Definition osmo_ss7_vty.c:2294
osmo_sccp_gt_cmp
int osmo_sccp_gt_cmp(const struct osmo_sccp_gt *a, const struct osmo_sccp_gt *b)
Compare two SCCP Global Titles.
Definition sccp_user.c:356
osmo_sccp_routing_ind_name
static const char * osmo_sccp_routing_ind_name(enum osmo_sccp_routing_ind val)
Definition sccp_sap.h:65
osmo_sccp_routing_ind
osmo_sccp_routing_ind
Definition sccp_sap.h:57
OSMO_SCCP_RI_GT
@ OSMO_SCCP_RI_GT
Definition sccp_sap.h:59
OSMO_SCCP_RI_NONE
@ OSMO_SCCP_RI_NONE
Definition sccp_sap.h:58
OSMO_SCCP_RI_SSN_PC
@ OSMO_SCCP_RI_SSN_PC
Definition sccp_sap.h:60
OSMO_SCCP_RI_SSN_IP
@ OSMO_SCCP_RI_SSN_IP
Definition sccp_sap.h:61
osmo_sccp_get_priv
void * osmo_sccp_get_priv(struct osmo_sccp_instance *sccp)
Definition sccp_user.c:284
osmo_sccp_user_bind_pc
struct osmo_sccp_user * osmo_sccp_user_bind_pc(struct osmo_sccp_instance *inst, const char *name, osmo_prim_cb prim_cb, uint16_t ssn, uint32_t pc)
Bind a given SCCP User to a given SSN+PC.
Definition sccp_user.c:134
osmo_sccp_rem_sccp_status_name
static const char * osmo_sccp_rem_sccp_status_name(enum osmo_sccp_rem_sccp_status val)
Definition sccp_sap.h:163
osmo_sccp_gti_name
static const char * osmo_sccp_gti_name(enum osmo_sccp_gti val)
Definition sccp_sap.h:79
osmo_sccp_ssn_names
const struct value_string osmo_sccp_ssn_names[]
Definition sccp_sap.c:139
osmo_sccp_addr_by_name_local
int osmo_sccp_addr_by_name_local(struct osmo_sccp_addr *dest_addr, const char *name, const struct osmo_ss7_instance *inst)
Lookup an SCCP address from the addressbook of a specific instance by its name.
Definition osmo_ss7_vty.c:2316
osmo_sccp_vty_init
void osmo_sccp_vty_init(void)
Definition sccp_vty.c:285
osmo_sccp_get_ss7
struct osmo_ss7_instance * osmo_sccp_get_ss7(const struct osmo_sccp_instance *sccp)
get the SS7 instance that is related to the given SCCP instance
Definition sccp_user.c:907
osmo_sccp_user_get_priv
void * osmo_sccp_user_get_priv(struct osmo_sccp_user *scu)
Definition sccp_user.c:170
osmo_sccp_routing_ind_names
const struct value_string osmo_sccp_routing_ind_names[]
Definition sccp_sap.c:106
osmo_sccp_user_sap_down
int osmo_sccp_user_sap_down(struct osmo_sccp_user *scu, struct osmo_prim_hdr *oph)
Main entrance function for primitives from SCCP User.
Definition sccp_scoc.c:1940
osmo_sccp_set_priv
void osmo_sccp_set_priv(struct osmo_sccp_instance *sccp, void *priv)
Definition sccp_user.c:279
osmo_sccp_instance_create
struct osmo_sccp_instance * osmo_sccp_instance_create(struct osmo_ss7_instance *ss7, void *priv)
create a SCCP Instance and register it as user with SS7 inst
Definition sccp_user.c:227
osmo_scu_prim_type_name
static const char * osmo_scu_prim_type_name(enum osmo_scu_prim_type val)
Definition sccp_sap.h:290
osmo_sccp_user_bind
struct osmo_sccp_user * osmo_sccp_user_bind(struct osmo_sccp_instance *inst, const char *name, osmo_prim_cb prim_cb, uint16_t ssn)
Bind a given SCCP User to a given SSN (at any PC)
Definition sccp_user.c:146
osmo_sccp_name_by_addr
const char * osmo_sccp_name_by_addr(const struct osmo_sccp_addr *addr)
Reverse lookup the lookup-name of a specified SCCP address.
Definition osmo_ss7_vty.c:2334
osmo_sccp_ssn
osmo_sccp_ssn
Definition sccp_sap.h:106
OSMO_SCCP_SSN_BSC_BSSAP_LE
@ OSMO_SCCP_SSN_BSC_BSSAP_LE
Definition sccp_sap.h:133
OSMO_SCCP_SSN_ISUP
@ OSMO_SCCP_SSN_ISUP
Definition sccp_sap.h:109
OSMO_SCCP_SSN_RES_INTL
@ OSMO_SCCP_SSN_RES_INTL
Definition sccp_sap.h:119
OSMO_SCCP_SSN_MSC_BSSAP_LE
@ OSMO_SCCP_SSN_MSC_BSSAP_LE
Definition sccp_sap.h:134
OSMO_SCCP_SSN_HLR
@ OSMO_SCCP_SSN_HLR
Definition sccp_sap.h:112
OSMO_SCCP_SSN_SGSN_MAP
@ OSMO_SCCP_SSN_SGSN_MAP
Definition sccp_sap.h:129
OSMO_SCCP_SSN_VLR
@ OSMO_SCCP_SSN_VLR
Definition sccp_sap.h:113
OSMO_SCCP_SSN_RANAP
@ OSMO_SCCP_SSN_RANAP
Definition sccp_sap.h:123
OSMO_SCCP_SSN_gsmSCF_MAP
@ OSMO_SCCP_SSN_gsmSCF_MAP
Definition sccp_sap.h:127
OSMO_SCCP_SSN_MSC
@ OSMO_SCCP_SSN_MSC
Definition sccp_sap.h:114
OSMO_SCCP_SSN_GMLC_MAP
@ OSMO_SCCP_SSN_GMLC_MAP
Definition sccp_sap.h:125
OSMO_SCCP_SSN_BSSAP
@ OSMO_SCCP_SSN_BSSAP
Definition sccp_sap.h:137
OSMO_SCCP_SSN_ISDN_SS
@ OSMO_SCCP_SSN_ISDN_SS
Definition sccp_sap.h:118
OSMO_SCCP_SSN_SMLC_BSSAP_LE
@ OSMO_SCCP_SSN_SMLC_BSSAP_LE
Definition sccp_sap.h:135
OSMO_SCCP_SSN_MAP
@ OSMO_SCCP_SSN_MAP
Definition sccp_sap.h:111
OSMO_SCCP_SSN_GGSN_MAP
@ OSMO_SCCP_SSN_GGSN_MAP
Definition sccp_sap.h:130
OSMO_SCCP_SSN_EIR
@ OSMO_SCCP_SSN_EIR
Definition sccp_sap.h:115
OSMO_SCCP_SSN_CAP
@ OSMO_SCCP_SSN_CAP
Definition sccp_sap.h:126
OSMO_SCCP_SSN_TC_TEST
@ OSMO_SCCP_SSN_TC_TEST
Definition sccp_sap.h:121
OSMO_SCCP_SSN_RNSAP
@ OSMO_SCCP_SSN_RNSAP
Definition sccp_sap.h:124
OSMO_SCCP_SSN_PCAP
@ OSMO_SCCP_SSN_PCAP
Definition sccp_sap.h:132
OSMO_SCCP_SSN_AUC
@ OSMO_SCCP_SSN_AUC
Definition sccp_sap.h:116
OSMO_SCCP_SSN_OMAP
@ OSMO_SCCP_SSN_OMAP
Definition sccp_sap.h:110
OSMO_SCCP_SSN_BISDN
@ OSMO_SCCP_SSN_BISDN
Definition sccp_sap.h:120
OSMO_SCCP_SSN_BSS_OAM
@ OSMO_SCCP_SSN_BSS_OAM
Definition sccp_sap.h:136
OSMO_SCCP_SSN_SIWF_MAP
@ OSMO_SCCP_SSN_SIWF_MAP
Definition sccp_sap.h:128
OSMO_SCCP_SSN_MGMT
@ OSMO_SCCP_SSN_MGMT
Definition sccp_sap.h:108
osmo_sccp_nai
osmo_sccp_nai
Definition sccp_sap.h:96
OSMO_SCCP_NAI_SUBSCR
@ OSMO_SCCP_NAI_SUBSCR
Definition sccp_sap.h:98
OSMO_SCCP_NAI_INTL
@ OSMO_SCCP_NAI_INTL
Definition sccp_sap.h:101
OSMO_SCCP_NAI_UNKNOWN
@ OSMO_SCCP_NAI_UNKNOWN
Definition sccp_sap.h:97
OSMO_SCCP_NAI_RES_NAT_USE
@ OSMO_SCCP_NAI_RES_NAT_USE
Definition sccp_sap.h:99
OSMO_SCCP_NAI_NATL
@ OSMO_SCCP_NAI_NATL
Definition sccp_sap.h:100
osmo_sccp_rem_sccp_status
osmo_sccp_rem_sccp_status
Definition sccp_sap.h:154
OSMO_SCCP_REM_SCCP_S_UNEQUIPPED
@ OSMO_SCCP_REM_SCCP_S_UNEQUIPPED
Definition sccp_sap.h:157
OSMO_SCCP_REM_SCCP_S_CONGESTED
@ OSMO_SCCP_REM_SCCP_S_CONGESTED
Definition sccp_sap.h:159
OSMO_SCCP_REM_SCCP_S_INACCESSIBLE
@ OSMO_SCCP_REM_SCCP_S_INACCESSIBLE
Definition sccp_sap.h:158
OSMO_SCCP_REM_SCCP_S_AVAILABLE
@ OSMO_SCCP_REM_SCCP_S_AVAILABLE
Definition sccp_sap.h:155
OSMO_SCCP_REM_SCCP_S_UNAVAILABLE_UNKNOWN
@ OSMO_SCCP_REM_SCCP_S_UNAVAILABLE_UNKNOWN
Definition sccp_sap.h:156
osmo_sccp_local_addr_by_instance
void osmo_sccp_local_addr_by_instance(struct osmo_sccp_addr *dest_addr, const struct osmo_sccp_instance *inst, uint32_t ssn)
derive a basic local SCCP-Address from a given SCCP instance.
Definition sccp_user.c:293
osmo_scu_prim_name
char * osmo_scu_prim_name(const struct osmo_prim_hdr *oph)
Definition sccp_sap.c:46
osmo_sccp_user_name
const char * osmo_sccp_user_name(struct osmo_sccp_user *scu)
Compose a human readable string to describe the SCCP user's connection.
Definition sccp_user.c:474
osmo_sccp_sp_status
osmo_sccp_sp_status
Definition sccp_sap.h:141
OSMO_SCCP_SP_S_CONGESTED
@ OSMO_SCCP_SP_S_CONGESTED
Definition sccp_sap.h:143
OSMO_SCCP_SP_S_INACCESSIBLE
@ OSMO_SCCP_SP_S_INACCESSIBLE
Definition sccp_sap.h:142
OSMO_SCCP_SP_S_ACCESSIBLE
@ OSMO_SCCP_SP_S_ACCESSIBLE
Definition sccp_sap.h:144
osmo_sccp_addr_cmp
int osmo_sccp_addr_cmp(const struct osmo_sccp_addr *a, const struct osmo_sccp_addr *b, uint32_t presence_criteria)
Compare two SCCP addresses by given presence criteria.
Definition sccp_user.c:378
osmo_sccp_gti_names
const struct value_string osmo_sccp_gti_names[]
Definition sccp_sap.c:114
osmo_sccp_user_unbind
void osmo_sccp_user_unbind(struct osmo_sccp_user *scu)
Unbind a given SCCP user.
Definition sccp_user.c:155
osmo_sccp_instance_next_conn_id
int osmo_sccp_instance_next_conn_id(struct osmo_sccp_instance *sccp)
Definition sccp_scoc.c:496
osmo_scu_prim_type_names
const struct value_string osmo_scu_prim_type_names[]
Definition sccp_sap.c:28
osmo_sccp_addr_ri_cmp
int osmo_sccp_addr_ri_cmp(const struct osmo_sccp_addr *a, const struct osmo_sccp_addr *b)
Compare the routing information of two SCCP addresses.
Definition sccp_user.c:438
sigtran_sap.h
osmo_sccp_addr
Definition sccp_sap.h:183
osmo_sccp_addr::pc
uint32_t pc
Definition sccp_sap.h:187
osmo_sccp_addr::ip
union osmo_sccp_addr::@19 ip
osmo_sccp_addr::ssn
uint32_t ssn
Definition sccp_sap.h:188
osmo_sccp_addr::ri
enum osmo_sccp_routing_ind ri
Definition sccp_sap.h:185
osmo_sccp_addr::gt
struct osmo_sccp_gt gt
Definition sccp_sap.h:186
osmo_sccp_addr::presence
uint32_t presence
Definition sccp_sap.h:184
osmo_sccp_gt
Definition sccp_sap.h:175
osmo_sccp_gt::gti
uint8_t gti
Definition sccp_sap.h:176
osmo_sccp_gt::nai
uint32_t nai
Definition sccp_sap.h:179
osmo_sccp_gt::npi
uint32_t npi
Definition sccp_sap.h:178
osmo_sccp_gt::digits
char digits[32]
Definition sccp_sap.h:180
osmo_sccp_gt::tt
uint8_t tt
Definition sccp_sap.h:177
osmo_sccp_instance
Definition sccp_internal.h:39
osmo_sccp_instance::ss7
struct osmo_ss7_instance * ss7
Definition sccp_internal.h:50
osmo_sccp_instance::priv
void * priv
Definition sccp_internal.h:51
osmo_sccp_user
Definition sccp_internal.h:60
osmo_sccp_user::inst
struct osmo_sccp_instance * inst
pointer back to SCCP instance
Definition sccp_internal.h:64
osmo_sccp_user::pc
uint32_t pc
Definition sccp_internal.h:70
osmo_sccp_user::ssn
uint16_t ssn
SSN and/or point code to which we are bound.
Definition sccp_internal.h:69
osmo_sccp_user::name
char * name
human-readable name of this user
Definition sccp_internal.h:66
osmo_sccp_user::prim_cb
osmo_prim_cb prim_cb
Definition sccp_internal.h:76
osmo_scu_connect_param
Definition sccp_sap.h:197
osmo_scu_connect_param::calling_addr
struct osmo_sccp_addr calling_addr
Definition sccp_sap.h:199
osmo_scu_connect_param::responding_addr
struct osmo_sccp_addr responding_addr
Definition sccp_sap.h:200
osmo_scu_connect_param::sccp_class
uint32_t sccp_class
Definition sccp_sap.h:202
osmo_scu_connect_param::importance
uint32_t importance
Definition sccp_sap.h:203
osmo_scu_connect_param::called_addr
struct osmo_sccp_addr called_addr
Definition sccp_sap.h:198
osmo_scu_connect_param::conn_id
uint32_t conn_id
Definition sccp_sap.h:204
osmo_scu_data_param
Definition sccp_sap.h:209
osmo_scu_data_param::importance
uint32_t importance
Definition sccp_sap.h:211
osmo_scu_data_param::conn_id
uint32_t conn_id
Definition sccp_sap.h:210
osmo_scu_disconn_param
Definition sccp_sap.h:222
osmo_scu_disconn_param::conn_id
uint32_t conn_id
Definition sccp_sap.h:226
osmo_scu_disconn_param::originator
enum osmo_sccp_originator originator
Definition sccp_sap.h:223
osmo_scu_disconn_param::importance
uint32_t importance
Definition sccp_sap.h:227
osmo_scu_disconn_param::responding_addr
struct osmo_sccp_addr responding_addr
Definition sccp_sap.h:224
osmo_scu_disconn_param::cause
uint32_t cause
Definition sccp_sap.h:225
osmo_scu_notice_param
Definition sccp_sap.h:249
osmo_scu_notice_param::called_addr
struct osmo_sccp_addr called_addr
Definition sccp_sap.h:250
osmo_scu_notice_param::cause
uint32_t cause
Definition sccp_sap.h:252
osmo_scu_notice_param::importance
uint32_t importance
Definition sccp_sap.h:253
osmo_scu_notice_param::calling_addr
struct osmo_sccp_addr calling_addr
Definition sccp_sap.h:251
osmo_scu_pcstate_param
Definition sccp_sap.h:266
osmo_scu_pcstate_param::restricted_importance_level
uint32_t restricted_importance_level
Definition sccp_sap.h:268
osmo_scu_pcstate_param::remote_sccp_status
enum osmo_sccp_rem_sccp_status remote_sccp_status
Definition sccp_sap.h:270
osmo_scu_pcstate_param::affected_pc
uint32_t affected_pc
Definition sccp_sap.h:267
osmo_scu_pcstate_param::sp_status
enum osmo_sccp_sp_status sp_status
Definition sccp_sap.h:269
osmo_scu_prim
Definition sccp_sap.h:273
osmo_scu_prim::oph
struct osmo_prim_hdr oph
Definition sccp_sap.h:274
osmo_scu_prim::u
union osmo_scu_prim::@20 u
osmo_scu_reset_param
Definition sccp_sap.h:232
osmo_scu_reset_param::conn_id
uint32_t conn_id
Definition sccp_sap.h:235
osmo_scu_reset_param::cause
uint32_t cause
Definition sccp_sap.h:234
osmo_scu_reset_param::originator
enum osmo_sccp_originator originator
Definition sccp_sap.h:233
osmo_scu_state_param
Definition sccp_sap.h:258
osmo_scu_state_param::ssn_multiplicity_ind
uint32_t ssn_multiplicity_ind
Definition sccp_sap.h:262
osmo_scu_state_param::affected_ssn
uint32_t affected_ssn
Definition sccp_sap.h:260
osmo_scu_state_param::user_in_service
bool user_in_service
Definition sccp_sap.h:261
osmo_scu_state_param::affected_pc
uint32_t affected_pc
Definition sccp_sap.h:259
osmo_scu_unitdata_param
Definition sccp_sap.h:239
osmo_scu_unitdata_param::return_option
uint32_t return_option
Definition sccp_sap.h:243
osmo_scu_unitdata_param::in_sequence_control
uint32_t in_sequence_control
Definition sccp_sap.h:242
osmo_scu_unitdata_param::called_addr
struct osmo_sccp_addr called_addr
Definition sccp_sap.h:240
osmo_scu_unitdata_param::calling_addr
struct osmo_sccp_addr calling_addr
Definition sccp_sap.h:241
osmo_scu_unitdata_param::importance
uint32_t importance
Definition sccp_sap.h:244
osmo_ss7_instance
Definition ss7_instance.h:20
osmo_ss7_instance::sccp
struct osmo_sccp_instance * sccp
Definition ss7_instance.h:39
osmo_ss7_instance::name
char * name
Definition ss7_instance.h:43
data
uint8_t data[0]
Definition xua_types.h:5