Loading...
Searching...
No Matches
osmo_ss7.h
Go to the documentation of this file.
#pragma once
#include <stdint.h>
#include <stdbool.h>
#include <osmocom/core/linuxlist.h>
#include <osmocom/core/utils.h>
#include <osmocom/core/fsm.h>
#include <osmocom/core/msgb.h>
#include <osmocom/core/prim.h>
#include <osmocom/core/socket.h>
#include <osmocom/core/rate_ctr.h>
struct osmo_ss7_instance;
extern struct llist_head osmo_ss7_instances;
/* Get an entry pointer from a list item in osmo_ss7_instances: */
struct osmo_ss7_instance *osmo_ss7_instances_llist_entry(struct llist_head *list);
int osmo_ss7_init(void);
/* All known point-code formats have a length of or below 24 bit.
* A point-code value exceeding that is used to indicate an unset PC. */
#define OSMO_SS7_PC_INVALID 0xffffffff
static inline bool osmo_ss7_pc_is_valid(uint32_t pc)
{
return pc <= 0x00ffffff;
}
/***********************************************************************
* xUA Servers
***********************************************************************/
struct osmo_xua_layer_manager;
struct osmo_xua_server;
/***********************************************************************
* SS7 Instances
***********************************************************************/
struct osmo_ss7_pc_fmt;
struct osmo_ss7_instance;
struct osmo_ss7_instance *osmo_ss7_instance_find(uint32_t id);
struct osmo_ss7_instance *
osmo_ss7_instance_find_or_create(void *ctx, uint32_t id);
void osmo_ss7_instance_destroy(struct osmo_ss7_instance *inst);
uint32_t osmo_ss7_instance_get_id(const struct osmo_ss7_instance *inst);
const char *osmo_ss7_instance_get_name(const struct osmo_ss7_instance *inst);
int osmo_ss7_instance_set_pc_fmt(struct osmo_ss7_instance *inst,
uint8_t c0, uint8_t c1, uint8_t c2);
const struct osmo_ss7_pc_fmt *
osmo_ss7_instance_get_pc_fmt(const struct osmo_ss7_instance *inst);
uint32_t osmo_ss7_instance_get_primary_pc(const struct osmo_ss7_instance *inst);
struct osmo_sccp_instance *osmo_ss7_ensure_sccp(struct osmo_ss7_instance *inst);
struct osmo_sccp_instance *osmo_ss7_get_sccp(const struct osmo_ss7_instance *inst);
int osmo_ss7_find_free_rctx(struct osmo_ss7_instance *inst);
bool osmo_ss7_pc_is_local(const struct osmo_ss7_instance *inst, uint32_t pc);
int osmo_ss7_pointcode_parse(const struct osmo_ss7_instance *inst, const char *str);
int osmo_ss7_pointcode_parse_mask_or_len(const struct osmo_ss7_instance *inst, const char *in);
const char *osmo_ss7_pointcode_print_buf(char *buf, size_t buf_len, const struct osmo_ss7_instance *inst, uint32_t pc);
const char *osmo_ss7_pointcode_print(const struct osmo_ss7_instance *inst, uint32_t pc);
const char *osmo_ss7_pointcode_print2(const struct osmo_ss7_instance *inst, uint32_t pc);
uint8_t osmo_ss7_pc_width(const struct osmo_ss7_pc_fmt *pc_fmt);
uint32_t osmo_ss7_pc_normalize(const struct osmo_ss7_pc_fmt *pc_fmt, uint32_t pc);
/***********************************************************************
* MTP Users (Users of MTP, such as SCCP or ISUP)
***********************************************************************/
struct osmo_ss7_user;
struct osmo_mtp_prim;
struct osmo_ss7_user *osmo_ss7_user_create(struct osmo_ss7_instance *inst, const char *name);
void osmo_ss7_user_destroy(struct osmo_ss7_user *user);
struct osmo_ss7_instance *osmo_ss7_user_get_instance(const struct osmo_ss7_user *user);
void osmo_ss7_user_set_prim_cb(struct osmo_ss7_user *user, osmo_prim_cb prim_cb);
void osmo_ss7_user_set_priv(struct osmo_ss7_user *user, void *priv);
void *osmo_ss7_user_get_priv(const struct osmo_ss7_user *user);
int osmo_ss7_user_register(struct osmo_ss7_instance *inst, uint8_t service_ind,
struct osmo_ss7_user *user);
int osmo_ss7_user_unregister(struct osmo_ss7_instance *inst, uint8_t service_ind,
struct osmo_ss7_user *user);
/* SS7 User wants to issue MTP-TRANSFER.req */
int osmo_ss7_user_mtp_xfer_req(struct osmo_ss7_instance *inst,
struct osmo_mtp_prim *omp);
/***********************************************************************
* SCCP Instance
***********************************************************************/
struct osmo_sccp_instance;
void osmo_sccp_set_max_optional_data(struct osmo_sccp_instance *inst, int val);
/***********************************************************************
* SS7 Links
***********************************************************************/
struct osmo_ss7_link;
/***********************************************************************
* SS7 Linksets
***********************************************************************/
struct osmo_ss7_linkset;
/***********************************************************************
* SS7 Routes
***********************************************************************/
struct osmo_ss7_route;
struct osmo_ss7_route *
osmo_ss7_route_lookup(struct osmo_ss7_instance *inst, uint32_t dpc);
const char *osmo_ss7_route_print(const struct osmo_ss7_route *rt);
const char *osmo_ss7_route_name(struct osmo_ss7_route *rt, bool list_asps);
struct osmo_ss7_as *
osmo_ss7_route_get_dest_as(struct osmo_ss7_route *rt);
/***********************************************************************
* SS7 Routing key
***********************************************************************/
struct osmo_ss7_routing_key {
uint32_t context;
uint32_t l_rk_id;
uint32_t pc;
uint8_t si;
uint32_t ssn;
/* FIXME: more complex routing keys */
};
/***********************************************************************
* SS7 ASP Protocols
***********************************************************************/
enum osmo_ss7_asp_protocol {
OSMO_SS7_ASP_PROT_NONE,
OSMO_SS7_ASP_PROT_SUA,
OSMO_SS7_ASP_PROT_M3UA,
OSMO_SS7_ASP_PROT_IPA,
_NUM_OSMO_SS7_ASP_PROT
};
extern struct value_string osmo_ss7_asp_protocol_vals[];
static inline const char *
osmo_ss7_asp_protocol_name(enum osmo_ss7_asp_protocol mode)
{
return get_value_string(osmo_ss7_asp_protocol_vals, mode);
}
int osmo_ss7_asp_protocol_port(enum osmo_ss7_asp_protocol prot);
/***********************************************************************
* SS7 AS Traffic Mode
***********************************************************************/
enum osmo_ss7_as_traffic_mode {
OSMO_SS7_AS_TMOD_OVERRIDE = 0, /* default */
OSMO_SS7_AS_TMOD_BCAST,
OSMO_SS7_AS_TMOD_LOADSHARE,
OSMO_SS7_AS_TMOD_ROUNDROBIN,
_NUM_OSMO_SS7_ASP_TMOD
};
extern struct value_string osmo_ss7_as_traffic_mode_vals[];
static inline const char *
osmo_ss7_as_traffic_mode_name(enum osmo_ss7_as_traffic_mode mode)
{
return get_value_string(osmo_ss7_as_traffic_mode_vals, mode);
}
enum osmo_ss7_as_traffic_mode osmo_ss7_tmode_from_xua(uint32_t in);
int osmo_ss7_tmode_to_xua(enum osmo_ss7_as_traffic_mode tmod);
/***********************************************************************
* SS7 Application Servers
***********************************************************************/
struct osmo_ss7_as;
struct osmo_ss7_asp;
struct osmo_ss7_as *
osmo_ss7_as_find_by_name(struct osmo_ss7_instance *inst, const char *name);
struct osmo_ss7_as *
osmo_ss7_as_find_by_rctx(struct osmo_ss7_instance *inst, uint32_t rctx);
struct osmo_ss7_as *
osmo_ss7_as_find_by_l_rk_id(struct osmo_ss7_instance *inst, uint32_t l_rk_id);
struct osmo_ss7_as *osmo_ss7_as_find_by_proto(struct osmo_ss7_instance *inst,
enum osmo_ss7_asp_protocol proto);
struct osmo_ss7_as *
osmo_ss7_as_find_or_create(struct osmo_ss7_instance *inst, const char *name,
enum osmo_ss7_asp_protocol proto);
enum osmo_ss7_asp_protocol osmo_ss7_as_get_asp_protocol(const struct osmo_ss7_as *as);
int osmo_ss7_as_add_asp(struct osmo_ss7_as *as, const char *asp_name);
int osmo_ss7_as_del_asp(struct osmo_ss7_as *as, const char *asp_name);
void osmo_ss7_as_destroy(struct osmo_ss7_as *as);
bool osmo_ss7_as_has_asp(const struct osmo_ss7_as *as,
const struct osmo_ss7_asp *asp);
struct osmo_ss7_asp *osmo_ss7_as_select_asp(struct osmo_ss7_as *as);
bool osmo_ss7_as_down(const struct osmo_ss7_as *as);
bool osmo_ss7_as_active(const struct osmo_ss7_as *as);
bool osmo_ss7_as_tmode_compatible_xua(struct osmo_ss7_as *as, uint32_t m3ua_tmt);
/***********************************************************************
* SS7 Application Server Processes
***********************************************************************/
enum osmo_ss7_asp_admin_state {
OSMO_SS7_ASP_ADM_S_SHUTDOWN,
OSMO_SS7_ASP_ADM_S_BLOCKED,
OSMO_SS7_ASP_ADM_S_ENABLED,
};
enum osmo_ss7_asp_role {
OSMO_SS7_ASP_ROLE_ASP,
OSMO_SS7_ASP_ROLE_SG,
OSMO_SS7_ASP_ROLE_IPSP,
};
extern const struct value_string osmo_ss7_asp_role_names[];
struct osmo_ss7_asp;
#define OSMO_SS7_ASP_QUIRK_NO_NOTIFY 0x00000001
#define OSMO_SS7_ASP_QUIRK_DAUD_IN_ASP 0x00000002
#define OSMO_SS7_ASP_QUIRK_SNM_INACTIVE 0x00000004
struct osmo_ss7_asp *
osmo_ss7_asp_find_by_name(struct osmo_ss7_instance *inst, const char *name);
struct osmo_ss7_asp *
osmo_ss7_asp_find_by_proto(struct osmo_ss7_as *as,
enum osmo_ss7_asp_protocol proto);
struct osmo_ss7_asp *
osmo_ss7_asp_find(struct osmo_ss7_instance *inst, const char *name,
uint16_t remote_port, uint16_t local_port,
enum osmo_ss7_asp_protocol proto)
OSMO_DEPRECATED("Use osmo_ss7_asp_find2() instead");
struct osmo_ss7_asp *
osmo_ss7_asp_find2(struct osmo_ss7_instance *inst, const char *name,
uint16_t remote_port, uint16_t local_port,
int trans_proto, enum osmo_ss7_asp_protocol proto);
struct osmo_ss7_asp *
osmo_ss7_asp_find_or_create(struct osmo_ss7_instance *inst, const char *name,
uint16_t remote_port, uint16_t local_port,
enum osmo_ss7_asp_protocol proto)
OSMO_DEPRECATED("Use osmo_ss7_asp_find_or_create2() instead");
struct osmo_ss7_asp *
osmo_ss7_asp_find_or_create2(struct osmo_ss7_instance *inst, const char *name,
uint16_t remote_port, uint16_t local_port,
int trans_proto, enum osmo_ss7_asp_protocol proto);
void osmo_ss7_asp_disconnect(struct osmo_ss7_asp *asp);
void osmo_ss7_asp_destroy(struct osmo_ss7_asp *asp);
int osmo_ss7_asp_send(struct osmo_ss7_asp *asp, struct msgb *msg);
int osmo_ss7_asp_restart(struct osmo_ss7_asp *asp);
int osmo_ss7_asp_use_default_lm(struct osmo_ss7_asp *asp, int log_level);
bool osmo_ss7_asp_active(const struct osmo_ss7_asp *asp);
int osmo_ss7_asp_get_log_subsys(const struct osmo_ss7_asp *asp);
const char *osmo_ss7_asp_get_name(const struct osmo_ss7_asp *asp);
enum osmo_ss7_asp_protocol osmo_ss7_asp_get_proto(const struct osmo_ss7_asp *asp);
int osmo_ss7_asp_get_trans_proto(const struct osmo_ss7_asp *asp);
typedef int osmo_ss7_asp_rx_unknown_cb(struct osmo_ss7_asp *asp, int ppid_mux, struct msgb *msg);
void osmo_ss7_register_rx_unknown_cb(osmo_ss7_asp_rx_unknown_cb *cb);
/***********************************************************************
* Simple Client
***********************************************************************/
struct osmo_sccp_instance *
osmo_sccp_simple_client(void *ctx, const char *name, uint32_t default_pc,
enum osmo_ss7_asp_protocol prot, int default_local_port,
const char *default_local_ip, int default_remote_port,
const char *default_remote_ip);
struct osmo_sccp_instance *
osmo_sccp_simple_client_on_ss7_id(void *ctx, uint32_t ss7_id, const char *name,
uint32_t default_pc,
enum osmo_ss7_asp_protocol prot,
int default_local_port,
const char *default_local_ip,
int default_remote_port,
const char *default_remote_ip);
/***********************************************************************
* Simple Server
***********************************************************************/
struct osmo_sccp_instance *
osmo_sccp_simple_server(void *ctx, uint32_t pc,
enum osmo_ss7_asp_protocol prot, int local_port,
const char *local_ip);
struct osmo_sccp_instance *
osmo_sccp_simple_server_on_ss7_id(void *ctx, uint32_t ss7_id, uint32_t pc,
enum osmo_ss7_asp_protocol prot,
int local_port, const char *local_ip);
struct osmo_sccp_instance *
osmo_sccp_simple_server_add_clnt(struct osmo_sccp_instance *inst,
enum osmo_ss7_asp_protocol prot,
const char *name, uint32_t pc,
int local_port, int remote_port,
const char *remote_ip);
/* VTY related */
struct vty;
void osmo_ss7_vty_init_asp(void *ctx);
void osmo_ss7_vty_init_sg(void *ctx);
int osmo_ss7_vty_go_parent(struct vty *vty);
int osmo_ss7_is_config_node(struct vty *vty, int node);
dpc
uint32_t dpc
Definition m3ua.h:1
osmo_ss7_route_get_dest_as
struct osmo_ss7_as * osmo_ss7_route_get_dest_as(struct osmo_ss7_route *rt)
Get destination AS of route.
Definition osmo_ss7_route.c:311
osmo_ss7_as_add_asp
int osmo_ss7_as_add_asp(struct osmo_ss7_as *as, const char *asp_name)
Add given ASP to given AS.
Definition osmo_ss7_as.c:113
osmo_ss7_as_find_by_name
struct osmo_ss7_as * osmo_ss7_as_find_by_name(struct osmo_ss7_instance *inst, const char *name)
Find Application Server by given name.
Definition osmo_ss7_instance.c:214
osmo_ss7_pointcode_parse_mask_or_len
int osmo_ss7_pointcode_parse_mask_or_len(const struct osmo_ss7_instance *inst, const char *in)
Definition osmo_ss7_instance.c:587
osmo_sccp_set_max_optional_data
void osmo_sccp_set_max_optional_data(struct osmo_sccp_instance *inst, int val)
Adjust the upper bound for the optional data length (the payload) for CR, CC, CREF and RLSD messages.
Definition sccp_user.c:895
osmo_ss7_pc_is_local
bool osmo_ss7_pc_is_local(const struct osmo_ss7_instance *inst, uint32_t pc)
Definition osmo_ss7_instance.c:172
osmo_ss7_asp_get_trans_proto
int osmo_ss7_asp_get_trans_proto(const struct osmo_ss7_asp *asp)
Get the transport proto of a given ASP.
Definition osmo_ss7_asp.c:1230
osmo_ss7_user_get_priv
void * osmo_ss7_user_get_priv(const struct osmo_ss7_user *user)
Definition osmo_ss7_user.c:69
osmo_ss7_vty_init_sg
void osmo_ss7_vty_init_sg(void *ctx)
Definition osmo_ss7_vty.c:3116
osmo_ss7_instance_get_primary_pc
uint32_t osmo_ss7_instance_get_primary_pc(const struct osmo_ss7_instance *inst)
Definition osmo_ss7_instance.c:122
osmo_ss7_user_register
int osmo_ss7_user_register(struct osmo_ss7_instance *inst, uint8_t service_ind, struct osmo_ss7_user *user)
Register a MTP user for a given service indicator.
Definition osmo_ss7_user.c:79
osmo_ss7_pc_is_valid
static bool osmo_ss7_pc_is_valid(uint32_t pc)
Definition osmo_ss7.h:25
osmo_ss7_route_name
const char * osmo_ss7_route_name(struct osmo_ss7_route *rt, bool list_asps)
Return human readable representation of the route, in a static buffer.
Definition osmo_ss7_hmrt.c:156
osmo_ss7_user_create
struct osmo_ss7_user * osmo_ss7_user_create(struct osmo_ss7_instance *inst, const char *name)
Definition osmo_ss7_user.c:37
osmo_ss7_pointcode_parse
int osmo_ss7_pointcode_parse(const struct osmo_ss7_instance *inst, const char *str)
Definition osmo_ss7_instance.c:515
osmo_sccp_simple_client_on_ss7_id
struct osmo_sccp_instance * osmo_sccp_simple_client_on_ss7_id(void *ctx, uint32_t ss7_id, const char *name, uint32_t default_pc, enum osmo_ss7_asp_protocol prot, int default_local_port, const char *default_local_ip, int default_remote_port, const char *default_remote_ip)
request an sccp client instance
Definition sccp_user.c:507
osmo_ss7_instance_get_id
uint32_t osmo_ss7_instance_get_id(const struct osmo_ss7_instance *inst)
Definition osmo_ss7_instance.c:112
osmo_ss7_as_find_by_proto
struct osmo_ss7_as * osmo_ss7_as_find_by_proto(struct osmo_ss7_instance *inst, enum osmo_ss7_asp_protocol proto)
Find Application Server (AS) by given protocol.
Definition osmo_ss7_instance.c:266
osmo_ss7_asp_find_by_name
struct osmo_ss7_asp * osmo_ss7_asp_find_by_name(struct osmo_ss7_instance *inst, const char *name)
Definition osmo_ss7_instance.c:326
osmo_ss7_asp_protocol
osmo_ss7_asp_protocol
Definition osmo_ss7.h:153
OSMO_SS7_ASP_PROT_SUA
@ OSMO_SS7_ASP_PROT_SUA
Definition osmo_ss7.h:155
OSMO_SS7_ASP_PROT_NONE
@ OSMO_SS7_ASP_PROT_NONE
Definition osmo_ss7.h:154
OSMO_SS7_ASP_PROT_IPA
@ OSMO_SS7_ASP_PROT_IPA
Definition osmo_ss7.h:157
OSMO_SS7_ASP_PROT_M3UA
@ OSMO_SS7_ASP_PROT_M3UA
Definition osmo_ss7.h:156
_NUM_OSMO_SS7_ASP_PROT
@ _NUM_OSMO_SS7_ASP_PROT
Definition osmo_ss7.h:158
osmo_ss7_asp_protocol_vals
struct value_string osmo_ss7_asp_protocol_vals[]
Definition osmo_ss7_asp.c:119
osmo_ss7_as_traffic_mode_vals
struct value_string osmo_ss7_as_traffic_mode_vals[]
Definition osmo_ss7_as.c:49
osmo_ss7_tmode_to_xua
int osmo_ss7_tmode_to_xua(enum osmo_ss7_as_traffic_mode tmod)
Definition osmo_ss7.c:190
osmo_ss7_as_find_by_l_rk_id
struct osmo_ss7_as * osmo_ss7_as_find_by_l_rk_id(struct osmo_ss7_instance *inst, uint32_t l_rk_id)
Find Application Server by given local routing key ID.
Definition osmo_ss7_instance.c:248
osmo_ss7_asp_get_proto
enum osmo_ss7_asp_protocol osmo_ss7_asp_get_proto(const struct osmo_ss7_asp *asp)
Get the proto of a given ASP.
Definition osmo_ss7_asp.c:1221
osmo_ss7_as_select_asp
struct osmo_ss7_asp * osmo_ss7_as_select_asp(struct osmo_ss7_as *as)
Select an AS to transmit a message, according to AS configuration and ASP availability.
Definition osmo_ss7_as.c:281
osmo_ss7_user_unregister
int osmo_ss7_user_unregister(struct osmo_ss7_instance *inst, uint8_t service_ind, struct osmo_ss7_user *user)
Unregister a MTP user for a given service indicator.
Definition osmo_ss7_user.c:103
osmo_ss7_asp_role
osmo_ss7_asp_role
Definition osmo_ss7.h:238
OSMO_SS7_ASP_ROLE_SG
@ OSMO_SS7_ASP_ROLE_SG
Definition osmo_ss7.h:240
OSMO_SS7_ASP_ROLE_ASP
@ OSMO_SS7_ASP_ROLE_ASP
Definition osmo_ss7.h:239
OSMO_SS7_ASP_ROLE_IPSP
@ OSMO_SS7_ASP_ROLE_IPSP
Definition osmo_ss7.h:241
osmo_ss7_asp_send
int osmo_ss7_asp_send(struct osmo_ss7_asp *asp, struct msgb *msg)
send a fully encoded msgb via a given ASP
Definition osmo_ss7_asp.c:1113
osmo_ss7_user_get_instance
struct osmo_ss7_instance * osmo_ss7_user_get_instance(const struct osmo_ss7_user *user)
Definition osmo_ss7_user.c:54
osmo_ss7_instance_destroy
void osmo_ss7_instance_destroy(struct osmo_ss7_instance *inst)
Destroy a SS7 Instance.
Definition osmo_ss7_instance.c:89
osmo_ss7_route_print
const char * osmo_ss7_route_print(const struct osmo_ss7_route *rt)
Definition osmo_ss7_route.c:283
osmo_ss7_user_set_priv
void osmo_ss7_user_set_priv(struct osmo_ss7_user *user, void *priv)
Definition osmo_ss7_user.c:64
osmo_ss7_get_sccp
struct osmo_sccp_instance * osmo_ss7_get_sccp(const struct osmo_ss7_instance *inst)
Get the SCCP instance, if present.
Definition osmo_ss7_instance.c:167
osmo_sccp_simple_server_on_ss7_id
struct osmo_sccp_instance * osmo_sccp_simple_server_on_ss7_id(void *ctx, uint32_t ss7_id, uint32_t pc, enum osmo_ss7_asp_protocol prot, int local_port, const char *local_ip)
Definition sccp_user.c:762
osmo_ss7_asp_rx_unknown_cb
int osmo_ss7_asp_rx_unknown_cb(struct osmo_ss7_asp *asp, int ppid_mux, struct msgb *msg)
Weak function to handle payload for unknown/unsupported PPID or IPA StreamID.
Definition osmo_ss7.h:297
osmo_ss7_asp_role_names
const struct value_string osmo_ss7_asp_role_names[]
Definition osmo_ss7_asp.c:127
osmo_ss7_as_find_by_rctx
struct osmo_ss7_as * osmo_ss7_as_find_by_rctx(struct osmo_ss7_instance *inst, uint32_t rctx)
Find Application Server by given routing context.
Definition osmo_ss7_instance.c:231
osmo_ss7_asp_admin_state
osmo_ss7_asp_admin_state
Definition osmo_ss7.h:229
OSMO_SS7_ASP_ADM_S_SHUTDOWN
@ OSMO_SS7_ASP_ADM_S_SHUTDOWN
no SCTP association with peer
Definition osmo_ss7.h:231
OSMO_SS7_ASP_ADM_S_BLOCKED
@ OSMO_SS7_ASP_ADM_S_BLOCKED
SCP association, but reject ASP-ACTIVE.
Definition osmo_ss7.h:233
OSMO_SS7_ASP_ADM_S_ENABLED
@ OSMO_SS7_ASP_ADM_S_ENABLED
in normal operation
Definition osmo_ss7.h:235
osmo_ss7_pc_normalize
uint32_t osmo_ss7_pc_normalize(const struct osmo_ss7_pc_fmt *pc_fmt, uint32_t pc)
Definition osmo_ss7.c:95
osmo_ss7_asp_protocol_port
int osmo_ss7_asp_protocol_port(enum osmo_ss7_asp_protocol prot)
Definition osmo_ss7_asp.c:178
osmo_ss7_asp_find2
struct osmo_ss7_asp * osmo_ss7_asp_find2(struct osmo_ss7_instance *inst, const char *name, uint16_t remote_port, uint16_t local_port, int trans_proto, enum osmo_ss7_asp_protocol proto)
Definition osmo_ss7_instance.c:357
osmo_ss7_user_mtp_xfer_req
int osmo_ss7_user_mtp_xfer_req(struct osmo_ss7_instance *inst, struct osmo_mtp_prim *omp)
Definition osmo_ss7_hmrt.c:296
osmo_ss7_as_active
bool osmo_ss7_as_active(const struct osmo_ss7_as *as)
Determine if given AS is in the active state.
Definition osmo_ss7_as.c:205
osmo_ss7_asp_destroy
void osmo_ss7_asp_destroy(struct osmo_ss7_asp *asp)
Definition osmo_ss7_asp.c:576
osmo_ss7_ensure_sccp
struct osmo_sccp_instance * osmo_ss7_ensure_sccp(struct osmo_ss7_instance *inst)
Allocate an SCCP instance, if not present yet.
Definition osmo_ss7_instance.c:153
osmo_ss7_as_down
bool osmo_ss7_as_down(const struct osmo_ss7_as *as)
Determine if given AS is in the down state.
Definition osmo_ss7_as.c:215
osmo_ss7_route_lookup
struct osmo_ss7_route * osmo_ss7_route_lookup(struct osmo_ss7_instance *inst, uint32_t dpc)
Find a SS7 route for given destination point code in given SS7.
Definition osmo_ss7_route.c:300
osmo_ss7_as_traffic_mode
osmo_ss7_as_traffic_mode
Definition osmo_ss7.h:175
OSMO_SS7_AS_TMOD_OVERRIDE
@ OSMO_SS7_AS_TMOD_OVERRIDE
Definition osmo_ss7.h:176
_NUM_OSMO_SS7_ASP_TMOD
@ _NUM_OSMO_SS7_ASP_TMOD
Definition osmo_ss7.h:180
OSMO_SS7_AS_TMOD_ROUNDROBIN
@ OSMO_SS7_AS_TMOD_ROUNDROBIN
Definition osmo_ss7.h:179
OSMO_SS7_AS_TMOD_BCAST
@ OSMO_SS7_AS_TMOD_BCAST
Definition osmo_ss7.h:177
OSMO_SS7_AS_TMOD_LOADSHARE
@ OSMO_SS7_AS_TMOD_LOADSHARE
Definition osmo_ss7.h:178
osmo_ss7_asp_find_or_create
struct osmo_ss7_asp * osmo_ss7_asp_find_or_create(struct osmo_ss7_instance *inst, const char *name, uint16_t remote_port, uint16_t local_port, enum osmo_ss7_asp_protocol proto) OSMO_DEPRECATED("Use osmo_ss7_asp_find_or_create2() instead")
Definition osmo_ss7_instance.c:413
osmo_sccp_simple_server_add_clnt
struct osmo_sccp_instance * osmo_sccp_simple_server_add_clnt(struct osmo_sccp_instance *inst, enum osmo_ss7_asp_protocol prot, const char *name, uint32_t pc, int local_port, int remote_port, const char *remote_ip)
Definition sccp_user.c:815
osmo_ss7_asp_active
bool osmo_ss7_asp_active(const struct osmo_ss7_asp *asp)
Definition osmo_ss7_asp.c:723
osmo_ss7_instances
struct llist_head osmo_ss7_instances
osmo_ss7_asp_restart
int osmo_ss7_asp_restart(struct osmo_ss7_asp *asp)
Definition osmo_ss7_asp.c:614
osmo_ss7_instance_find_or_create
struct osmo_ss7_instance * osmo_ss7_instance_find_or_create(void *ctx, uint32_t id)
Find or create a SS7 Instance.
Definition osmo_ss7.c:126
osmo_ss7_pointcode_print2
const char * osmo_ss7_pointcode_print2(const struct osmo_ss7_instance *inst, uint32_t pc)
Definition osmo_ss7_instance.c:581
osmo_ss7_pc_width
uint8_t osmo_ss7_pc_width(const struct osmo_ss7_pc_fmt *pc_fmt)
Definition osmo_ss7.c:87
osmo_ss7_pointcode_print_buf
const char * osmo_ss7_pointcode_print_buf(char *buf, size_t buf_len, const struct osmo_ss7_instance *inst, uint32_t pc)
Definition osmo_ss7_instance.c:549
osmo_ss7_init
int osmo_ss7_init(void)
Definition osmo_ss7.c:164
osmo_ss7_register_rx_unknown_cb
void osmo_ss7_register_rx_unknown_cb(osmo_ss7_asp_rx_unknown_cb *cb)
Register a call-back function for unknown SCTP PPID / IPA Stream ID.
Definition osmo_ss7_asp.c:1170
osmo_ss7_user_set_prim_cb
void osmo_ss7_user_set_prim_cb(struct osmo_ss7_user *user, osmo_prim_cb prim_cb)
Definition osmo_ss7_user.c:59
osmo_ss7_user_destroy
void osmo_ss7_user_destroy(struct osmo_ss7_user *user)
Definition osmo_ss7_user.c:49
osmo_ss7_as_get_asp_protocol
enum osmo_ss7_asp_protocol osmo_ss7_as_get_asp_protocol(const struct osmo_ss7_as *as)
Get asp_protocol configuration of a given AS.
Definition osmo_ss7_as.c:104
osmo_ss7_instance_get_pc_fmt
const struct osmo_ss7_pc_fmt * osmo_ss7_instance_get_pc_fmt(const struct osmo_ss7_instance *inst)
Definition osmo_ss7_instance.c:146
osmo_ss7_asp_find_or_create2
struct osmo_ss7_asp * osmo_ss7_asp_find_or_create2(struct osmo_ss7_instance *inst, const char *name, uint16_t remote_port, uint16_t local_port, int trans_proto, enum osmo_ss7_asp_protocol proto)
Definition osmo_ss7_instance.c:391
osmo_sccp_simple_server
struct osmo_sccp_instance * osmo_sccp_simple_server(void *ctx, uint32_t pc, enum osmo_ss7_asp_protocol prot, int local_port, const char *local_ip)
Definition sccp_user.c:806
osmo_sccp_simple_client
struct osmo_sccp_instance * osmo_sccp_simple_client(void *ctx, const char *name, uint32_t default_pc, enum osmo_ss7_asp_protocol prot, int default_local_port, const char *default_local_ip, int default_remote_port, const char *default_remote_ip)
request an sccp client instance
Definition sccp_user.c:741
osmo_ss7_vty_go_parent
int osmo_ss7_vty_go_parent(struct vty *vty)
Definition osmo_ss7_vty.c:2922
osmo_ss7_as_has_asp
bool osmo_ss7_as_has_asp(const struct osmo_ss7_as *as, const struct osmo_ss7_asp *asp)
Determine if given AS contains ASP.
Definition osmo_ss7_as.c:189
osmo_ss7_is_config_node
int osmo_ss7_is_config_node(struct vty *vty, int node)
Definition osmo_ss7_vty.c:2976
osmo_ss7_asp_protocol_name
static const char * osmo_ss7_asp_protocol_name(enum osmo_ss7_asp_protocol mode)
Definition osmo_ss7.h:163
osmo_ss7_instance_find
struct osmo_ss7_instance * osmo_ss7_instance_find(uint32_t id)
Find a SS7 Instance with given ID.
Definition osmo_ss7.c:109
osmo_ss7_as_del_asp
int osmo_ss7_as_del_asp(struct osmo_ss7_as *as, const char *asp_name)
Delete given ASP from given AS.
Definition osmo_ss7_as.c:144
osmo_ss7_pointcode_print
const char * osmo_ss7_pointcode_print(const struct osmo_ss7_instance *inst, uint32_t pc)
Definition osmo_ss7_instance.c:573
osmo_ss7_asp_find_by_proto
struct osmo_ss7_asp * osmo_ss7_asp_find_by_proto(struct osmo_ss7_as *as, enum osmo_ss7_asp_protocol proto)
Find an ASP that matches the given ASP protocol (xUA variant).
Definition osmo_ss7_instance.c:343
osmo_ss7_find_free_rctx
int osmo_ss7_find_free_rctx(struct osmo_ss7_instance *inst)
Definition osmo_ss7_instance.c:183
osmo_ss7_as_traffic_mode_name
static const char * osmo_ss7_as_traffic_mode_name(enum osmo_ss7_as_traffic_mode mode)
Definition osmo_ss7.h:186
osmo_ss7_asp_get_name
const char * osmo_ss7_asp_get_name(const struct osmo_ss7_asp *asp)
Get the name of a given ASP.
Definition osmo_ss7_asp.c:1212
osmo_ss7_instance_set_pc_fmt
int osmo_ss7_instance_set_pc_fmt(struct osmo_ss7_instance *inst, uint8_t c0, uint8_t c1, uint8_t c2)
Set the point code format used in given SS7 instance.
Definition osmo_ss7_instance.c:128
osmo_ss7_as_find_or_create
struct osmo_ss7_as * osmo_ss7_as_find_or_create(struct osmo_ss7_instance *inst, const char *name, enum osmo_ss7_asp_protocol proto)
Find or Create Application Server.
Definition osmo_ss7_instance.c:300
osmo_ss7_as_tmode_compatible_xua
bool osmo_ss7_as_tmode_compatible_xua(struct osmo_ss7_as *as, uint32_t m3ua_tmt)
Definition osmo_ss7_as.c:309
osmo_ss7_asp_find
struct osmo_ss7_asp * osmo_ss7_asp_find(struct osmo_ss7_instance *inst, const char *name, uint16_t remote_port, uint16_t local_port, enum osmo_ss7_asp_protocol proto) OSMO_DEPRECATED("Use osmo_ss7_asp_find2() instead")
Definition osmo_ss7_instance.c:379
osmo_ss7_asp_get_log_subsys
int osmo_ss7_asp_get_log_subsys(const struct osmo_ss7_asp *asp)
Get the logging subsystem for a given ASP.
Definition osmo_ss7_asp.c:1196
osmo_ss7_asp_disconnect
void osmo_ss7_asp_disconnect(struct osmo_ss7_asp *asp)
Definition osmo_ss7_asp.c:1158
osmo_ss7_tmode_from_xua
enum osmo_ss7_as_traffic_mode osmo_ss7_tmode_from_xua(uint32_t in)
Definition osmo_ss7.c:204
osmo_ss7_asp_use_default_lm
int osmo_ss7_asp_use_default_lm(struct osmo_ss7_asp *asp, int log_level)
Definition xua_default_lm_fsm.c:416
osmo_ss7_vty_init_asp
void osmo_ss7_vty_init_asp(void *ctx)
Definition osmo_ss7_vty.c:3110
osmo_ss7_instance_get_name
const char * osmo_ss7_instance_get_name(const struct osmo_ss7_instance *inst)
Definition osmo_ss7_instance.c:117
osmo_ss7_instances_llist_entry
struct osmo_ss7_instance * osmo_ss7_instances_llist_entry(struct llist_head *list)
Definition osmo_ss7.c:68
osmo_ss7_as_destroy
void osmo_ss7_as_destroy(struct osmo_ss7_as *as)
Destroy given Application Server.
Definition osmo_ss7_as.c:168
osmo_mtp_prim
Definition mtp_sap.h:56
osmo_sccp_instance
Definition sccp_internal.h:39
osmo_ss7_as
Definition ss7_as.h:31
osmo_ss7_as::name
char * name
Definition ss7_as.h:49
osmo_ss7_as::proto
enum osmo_ss7_asp_protocol proto
Definition ss7_as.h:51
osmo_ss7_as::inst
struct osmo_ss7_instance * inst
Definition ss7_as.h:34
osmo_ss7_asp
Definition ss7_asp.h:28
osmo_ss7_asp::proto
enum osmo_ss7_asp_protocol proto
Definition ss7_asp.h:69
osmo_ss7_asp::inst
struct osmo_ss7_instance * inst
Definition ss7_asp.h:31
osmo_ss7_asp::name
char * name
Definition ss7_asp.h:67
osmo_ss7_asp::trans_proto
int trans_proto
The underlaying transport protocol (one of IPPROTO_*)
Definition ss7_asp.h:96
osmo_ss7_instance
Definition ss7_instance.h:20
osmo_ss7_instance::user
const struct osmo_ss7_user * user[16]
Definition ss7_instance.h:35
osmo_ss7_instance::list
struct llist_head list
member of global list of instances
Definition ss7_instance.h:22
osmo_ss7_link
Definition ss7_link.h:19
osmo_ss7_linkset
Definition ss7_linkset.h:13
osmo_ss7_pc_fmt
Definition ss7_instance.h:15
osmo_ss7_route
Definition ss7_route.h:17
osmo_ss7_routing_key
Definition osmo_ss7.h:138
osmo_ss7_routing_key::si
uint8_t si
Definition osmo_ss7.h:143
osmo_ss7_routing_key::context
uint32_t context
Definition osmo_ss7.h:139
osmo_ss7_routing_key::l_rk_id
uint32_t l_rk_id
Definition osmo_ss7.h:140
osmo_ss7_routing_key::ssn
uint32_t ssn
Definition osmo_ss7.h:144
osmo_ss7_routing_key::pc
uint32_t pc
Definition osmo_ss7.h:142
osmo_ss7_user
Definition ss7_user.h:13
osmo_ss7_user::name
const char * name
Definition ss7_user.h:17
osmo_ss7_user::inst
struct osmo_ss7_instance * inst
Definition ss7_user.h:15
osmo_xua_layer_manager
Definition ss7_xua_srv.h:18
osmo_xua_server
Definition ss7_xua_srv.h:22