24 #include <osmocom/core/prim.h> 27 #include <netinet/in.h> 49 #define OSMO_SCCP_ADDR_T_GT 0x0001 50 #define OSMO_SCCP_ADDR_T_PC 0x0002 51 #define OSMO_SCCP_ADDR_T_SSN 0x0004 52 #define OSMO_SCCP_ADDR_T_IPv4 0x0008 53 #define OSMO_SCCP_ADDR_T_IPv6 0x0010 54 #define OSMO_SCCP_ADDR_T_MASK 0x001f 169 #define OSMO_SCCP_SSN_SMLC_BSSAP OSMO_SCCP_SSN_SMLC_BSSAP_LE 274 struct osmo_prim_hdr oph;
287 #define msgb_scu_prim(msg) ((struct osmo_scu_prim *)(msg)->l1h) Definition: sccp_sap.h:41
Definition: sccp_sap.h:85
Definition: sccp_sap.h:45
Definition: sccp_sap.h:136
Definition: sccp_sap.h:42
Definition: sccp_sap.h:75
Definition: sccp_sap.h:58
Definition: sccp_sap.h:116
uint32_t return_option
Definition: sccp_sap.h:243
void osmo_sccp_user_unbind(struct osmo_sccp_user *scu)
Unbind a given SCCP user.
Definition: sccp_user.c:150
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:350
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:372
Definition: sccp_sap.h:119
Definition: sccp_sap.h:84
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:432
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:2243
uint32_t conn_id
Definition: sccp_sap.h:210
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:222
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:1939
Definition: sccp_sap.h:197
Definition: sccp_sap.h:44
Definition: sccp_sap.h:113
Definition: sccp_sap.h:100
Definition: sccp_sap.h:239
Definition: sccp_sap.h:46
static const char * osmo_sccp_sp_status_name(enum osmo_sccp_sp_status val)
Definition: sccp_sap.h:148
Definition: sccp_sap.h:129
uint32_t presence
Definition: sccp_sap.h:184
char * name
human-readable name of this user
Definition: sccp_internal.h:64
Definition: sccp_sap.h:125
Definition: sccp_sap.h:114
Definition: sccp_sap.h:157
static const char * osmo_sccp_gti_name(enum osmo_sccp_gti val)
Definition: sccp_sap.h:79
Definition: sccp_sap.h:91
Definition: sccp_sap.h:132
uint32_t conn_id
Definition: sccp_sap.h:204
osmo_scu_prim_type
SCCP-User primitives as per Q.711.
Definition: sccp_sap.h:32
Definition: sccp_sap.h:120
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:307
static const char * osmo_sccp_ssn_name(enum osmo_sccp_ssn val)
Definition: sccp_sap.h:172
void * osmo_sccp_get_priv(struct osmo_sccp_instance *sccp)
Definition: sccp_user.c:278
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:287
uint16_t ssn
SSN and/or point code to which we are bound.
Definition: sccp_internal.h:67
Definition: sccp_internal.h:37
Definition: sccp_sap.h:273
Definition: sccp_sap.h:108
uint32_t pc
Definition: sccp_sap.h:187
osmo_sccp_rem_sccp_status
Definition: sccp_sap.h:154
const struct value_string osmo_scu_prim_type_names[]
Definition: sccp_sap.c:28
Definition: sccp_sap.h:60
uint32_t cause
Definition: sccp_sap.h:252
Definition: sccp_sap.h:97
osmo_prim_cb prim_cb
Definition: sccp_internal.h:74
uint32_t affected_pc
Definition: sccp_sap.h:267
Definition: sccp_sap.h:159
const struct value_string osmo_sccp_rem_sccp_status_names[]
Definition: sccp_sap.c:130
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:1882
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:129
Definition: sccp_sap.h:155
uint32_t importance
Definition: sccp_sap.h:253
void * priv
Definition: sccp_internal.h:49
static const char * osmo_scu_prim_type_name(enum osmo_scu_prim_type val)
Definition: sccp_sap.h:290
int osmo_sccp_instance_next_conn_id(struct osmo_sccp_instance *sccp)
Definition: sccp_scoc.c:495
osmo_sccp_gti
Definition: sccp_sap.h:70
Definition: sccp_sap.h:101
Definition: sccp_sap.h:123
Definition: sccp_sap.h:87
Definition: sccp_sap.h:36
static const char * osmo_sccp_rem_sccp_status_name(enum osmo_sccp_rem_sccp_status val)
Definition: sccp_sap.h:163
Definition: sccp_sap.h:135
uint32_t importance
Definition: sccp_sap.h:211
Definition: sccp_sap.h:216
uint8_t gti
Definition: sccp_sap.h:176
Definition: sccp_sap.h:218
Definition: sccp_sap.h:99
bool user_in_service
Definition: sccp_sap.h:261
Definition: sccp_sap.h:124
Definition: sccp_sap.h:158
osmo_sccp_originator
Definition: sccp_sap.h:215
uint32_t conn_id
Definition: sccp_sap.h:235
void osmo_sccp_user_set_priv(struct osmo_sccp_user *scu, void *priv)
Definition: sccp_user.c:160
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:2261
void osmo_sccp_vty_init(void)
Definition: sccp_vty.c:284
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:901
uint32_t nai
Definition: sccp_sap.h:179
uint32_t affected_ssn
Definition: sccp_sap.h:260
osmo_sccp_ssn
Definition: sccp_sap.h:106
uint32_t npi
Definition: sccp_sap.h:178
Definition: sccp_sap.h:88
Definition: sccp_sap.h:110
Definition: sccp_sap.h:111
uint32_t conn_id
Definition: sccp_sap.h:226
Definition: sccp_sap.h:142
Definition: sccp_sap.h:115
Definition: sccp_sap.h:266
Definition: sccp_sap.h:34
Definition: sccp_sap.h:127
uint32_t restricted_importance_level
Definition: sccp_sap.h:268
const struct value_string osmo_sccp_ssn_names[]
Definition: sccp_sap.c:139
Definition: sccp_internal.h:58
Definition: sccp_sap.h:126
Definition: sccp_sap.h:144
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:911
Definition: sccp_sap.h:143
struct osmo_ss7_instance * ss7
Definition: sccp_internal.h:48
Definition: sccp_sap.h:89
void osmo_sccp_set_priv(struct osmo_sccp_instance *sccp, void *priv)
Definition: sccp_user.c:273
Definition: sccp_sap.h:128
Definition: sccp_sap.h:134
Definition: sccp_sap.h:118
char digits[32]
Definition: sccp_sap.h:180
Definition: sccp_sap.h:98
Definition: sccp_sap.h:112
osmo_sccp_routing_ind
Definition: sccp_sap.h:57
const struct value_string osmo_sccp_gti_names[]
Definition: sccp_sap.c:114
char * name
Definition: osmo_ss7.h:96
void osmo_sccp_instance_destroy(struct osmo_sccp_instance *inst)
Definition: sccp_user.c:258
Definition: sccp_sap.h:72
uint32_t ssn_multiplicity_ind
Definition: sccp_sap.h:262
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:468
char * osmo_scu_prim_name(const struct osmo_prim_hdr *oph)
Definition: sccp_sap.c:46
uint32_t importance
Definition: sccp_sap.h:227
Definition: sccp_sap.h:121
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:141
Definition: sccp_sap.h:217
Definition: sccp_sap.h:183
Definition: sccp_sap.h:258
osmo_sccp_nai
Definition: sccp_sap.h:96
Definition: sccp_sap.h:175
Definition: sccp_sap.h:74
Definition: sccp_sap.h:39
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:2221
uint32_t cause
Definition: sccp_sap.h:225
Definition: sccp_sap.h:249
struct osmo_sccp_instance * sccp
Definition: osmo_ss7.h:92
const struct value_string osmo_sccp_routing_ind_names[]
Definition: sccp_sap.c:106
Definition: sccp_sap.h:86
Definition: sccp_sap.h:61
uint8_t data[0]
Definition: xua_types.h:72
static const char * osmo_sccp_routing_ind_name(enum osmo_sccp_routing_ind val)
Definition: sccp_sap.h:65
Definition: osmo_ss7.h:73
Definition: sccp_sap.h:59
uint32_t importance
Definition: sccp_sap.h:244
uint32_t cause
Definition: sccp_sap.h:234
Definition: sccp_sap.h:137
osmo_sccp_npi
Definition: sccp_sap.h:83
Definition: sccp_sap.h:130
Definition: sccp_sap.h:222
uint32_t pc
Definition: sccp_internal.h:68
const struct value_string osmo_sccp_sp_status_names[]
Definition: sccp_sap.c:123
Definition: sccp_sap.h:35
Definition: sccp_sap.h:37
int osmo_scu_prim_hdr_name_buf(char *buf, size_t buflen, const struct osmo_prim_hdr *oph)
Definition: sccp_sap.c:52
void * osmo_sccp_user_get_priv(struct osmo_sccp_user *scu)
Definition: sccp_user.c:165
Definition: sccp_sap.h:156
char * osmo_scu_prim_hdr_name_c(void *ctx, const struct osmo_prim_hdr *oph)
Definition: sccp_sap.c:67
uint32_t sccp_class
Definition: sccp_sap.h:202
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:82
uint32_t affected_pc
Definition: sccp_sap.h:259
osmo_sccp_sp_status
Definition: sccp_sap.h:141
Definition: sccp_sap.h:90
Definition: sccp_sap.h:209
Definition: sccp_sap.h:71
Definition: sccp_sap.h:232
uint32_t importance
Definition: sccp_sap.h:203
Definition: sccp_sap.h:109
uint32_t ssn
Definition: sccp_sap.h:188
uint32_t in_sequence_control
Definition: sccp_sap.h:242
Definition: sccp_sap.h:133
Definition: sccp_sap.h:92
Definition: sccp_sap.h:38
Definition: sccp_sap.h:73
uint8_t tt
Definition: sccp_sap.h:177