libosmo-sigtran
0.10.0
Osmocom SIGTRAN library
|
@ XUA_ASPFSM_ROLE_ASP
Definition: xua_asp_fsm.h:40
@ XUA_ASP_E_SCTP_RESTART_IND
Definition: xua_asp_fsm.h:16
@ XUA_ASPFSM_ROLE_SG
Definition: xua_asp_fsm.h:41
enum osmo_ss7_asp_protocol proto
Definition: osmo_ss7.h:387
uint32_t xua_msg_get_u32(struct xua_msg *xua, uint16_t iei)
Definition: xua_msg.c:292
struct osmo_prim_hdr oph
Definition: sigtran_sap.h:67
struct osmo_timer_list pong_timer
Definition: xua_asp_fsm.c:746
struct osmo_ss7_as * as
pointer to Application Server
Definition: osmo_ss7.h:213
Definition: osmo_ss7.h:288
@ XUA_ASP_E_M_ASP_ACTIVE_REQ
Definition: xua_asp_fsm.h:11
int out_event
Definition: xua_asp_fsm.c:98
@ XUA_SAP_LM
Definition: sigtran_sap.h:9
static int get_fd_from_iafp(struct ipa_asp_fsm_priv *iafp)
Definition: xua_asp_fsm.c:756
@ M3UA_ERR_INVAL_ROUT_CTX
Definition: m3ua.h:171
static void xua_asp_fsm_inactive_onenter(struct osmo_fsm_inst *fi, uint32_t prev_state)
Definition: xua_asp_fsm.c:500
@ OSMO_SS7_ASP_PROT_IPA
Definition: osmo_ss7.h:274
static void ipa_asp_fsm_active(struct osmo_fsm_inst *fi, uint32_t event, void *data)
Definition: xua_asp_fsm.c:921
@ XUA_ASPAS_ASP_ACTIVE_IND
Definition: xua_as_fsm.h:8
@ M3UA_ERR_UNSUPP_TRAF_MOD_TYP
Definition: m3ua.h:151
struct osmo_fsm_inst * xua_asp_fsm_start(struct osmo_ss7_asp *asp, enum xua_asp_role role, int log_level)
Start a new ASP finite stae machine for given ASP.
Definition: xua_asp_fsm.c:689
struct osmo_fsm_inst * fi
AS FSM.
Definition: osmo_ss7.h:294
@ T_WAIT_ID_ACK
Definition: xua_asp_fsm.c:751
@ XUA_ASP_E_ASPSM_BEAT
Definition: xua_asp_fsm.h:28
struct osmo_ss7_route * osmo_ss7_route_create(struct osmo_ss7_route_table *rtbl, uint32_t dpc, uint32_t mask, const char *linkset_name)
Create a new route in the given routing table.
Definition: osmo_ss7.c:782
xua_asp_event
Definition: xua_asp_fsm.h:9
@ XUA_ASP_E_SCTP_COMM_DOWN_IND
Definition: xua_asp_fsm.h:15
struct xua_asp_fsm_priv::@34 t_ack
#define SUA_MGMT_ERR
Definition: sua.h:40
void xua_asp_send_xlm_prim_simple(struct osmo_ss7_asp *asp, enum osmo_xlm_prim_type prim_type, enum osmo_prim_operation op)
Definition: xua_asp_fsm.c:132
#define SUA_ASPSM_UP_ACK
Definition: sua.h:53
#define SUA_ASPTM_ACTIVE
Definition: sua.h:57
static void xua_asp_fsm_active_onenter(struct osmo_fsm_inst *fi, uint32_t prev_state)
Definition: xua_asp_fsm.c:579
static const struct osmo_fsm_state ipa_asp_states[]
Definition: xua_asp_fsm.c:984
xua_asp_state
Definition: xua_asp_fsm.h:3
@ IPA_ASP_E_ID_RESP
Definition: xua_asp_fsm.h:32
@ XUA_ASP_E_ASPTM_ASPIA
Definition: xua_asp_fsm.h:25
#define ENSURE_SG_OR_IPSP(fi, event)
Definition: xua_asp_fsm.c:324
@ IPA_ASP_S_WAIT_ID_ACK2
Definition: xua_asp_fsm.c:735
static void check_stop_t_ack(struct osmo_fsm_inst *fi, uint32_t event)
Definition: xua_asp_fsm.c:296
#define SUA_ASPSM_BEAT_ACK
Definition: sua.h:55
static void xua_asp_fsm_down(struct osmo_fsm_inst *fi, uint32_t event, void *data)
Definition: xua_asp_fsm.c:337
uint32_t pc
Definition: osmo_ss7.h:250
@ XUA_ASP_S_INACTIVE
Definition: xua_asp_fsm.h:5
@ T_WAIT_ID_GET
Definition: xua_asp_fsm.c:752
ipa_asp_state
Definition: xua_asp_fsm.c:727
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.c:1715
static void ipa_asp_fsm_wait_id_ack(struct osmo_fsm_inst *fi, uint32_t event, void *data)
Definition: xua_asp_fsm.c:902
int osmo_ss7_as_add_asp(struct osmo_ss7_as *as, const char *asp_name)
Add given ASP to given AS.
Definition: osmo_ss7.c:957
struct osmo_ss7_instance * inst
Definition: osmo_ss7.h:355
@ XUA_ASP_E_ASPSM_ASPDN_ACK
Definition: xua_asp_fsm.h:24
struct osmo_ss7_as::@25 cfg
uint8_t version
Definition: xua_types.h:32
struct osmo_ss7_route::@23 dest
static void xua_asp_fsm_down_onenter(struct osmo_fsm_inst *fi, uint32_t prev_state)
Definition: xua_asp_fsm.c:408
uint8_t data[0]
Definition: xua_types.h:5
#define S(x)
Definition: xua_asp_fsm.c:33
struct osmo_fsm_inst * xua_asp_fsm_start(struct osmo_ss7_asp *asp, enum xua_asp_role role, int log_level)
Start a new ASP finite stae machine for given ASP.
Definition: xua_asp_fsm.c:689
static void xua_asp_fsm_inactive(struct osmo_fsm_inst *fi, uint32_t event, void *data)
Definition: xua_asp_fsm.c:413
#define SUA_ASPSM_BEAT
Definition: sua.h:52
@ XUA_ASP_E_ASPTM_ASPAC_ACK
Definition: xua_asp_fsm.h:22
Definition: osmo_ss7.h:70
static void ipa_asp_fsm_wait_id_ack2(struct osmo_fsm_inst *fi, uint32_t event, void *data)
Definition: xua_asp_fsm.c:846
@ IPA_ASP_E_ID_GET
Definition: xua_asp_fsm.h:34
static int peer_send_error(struct osmo_fsm_inst *fi, uint32_t err_code)
Definition: xua_asp_fsm.c:233
static const struct value_string xua_asp_event_names[]
Definition: xua_asp_fsm.c:57
#define M3UA_IEI_HEARDBT_DATA
Definition: m3ua.h:69
struct osmo_stream_cli * client
osmo_stream / libosmo-netif handles
Definition: osmo_ss7.h:365
@ XUA_ASP_E_ASPTM_ASPIA_ACK
Definition: xua_asp_fsm.h:26
static void dispatch_to_all_as(struct osmo_fsm_inst *fi, uint32_t event)
Definition: xua_asp_fsm.c:394
static const uint32_t evt_ack_map[_NUM_XUA_ASP_E]
Definition: xua_asp_fsm.c:286
@ XUA_ASP_E_M_ASP_INACTIVE_REQ
Definition: xua_asp_fsm.h:13
@ OSMO_XLM_PRIM_M_ASP_INACTIVE
Definition: sigtran_sap.h:25
struct xua_msg_part * xua_msg_find_tag(const struct xua_msg *msg, uint16_t tag)
Definition: xua_msg.c:86
const struct osmo_xua_layer_manager * lm
Definition: osmo_ss7.h:375
osmo_xlm_prim_type
Definition: sigtran_sap.h:13
static void ipa_asp_fsm_wait_id_get(struct osmo_fsm_inst *fi, uint32_t event, void *data)
Definition: xua_asp_fsm.c:869
#define SUA_ASPSM_DOWN_ACK
Definition: sua.h:54
#define M3UA_IEI_TRAF_MODE_TYP
Definition: m3ua.h:70
static void ipa_pong_timer_cb(void *_fi)
Definition: xua_asp_fsm.c:964
@ IPA_ASP_S_ACTIVE
Definition: xua_asp_fsm.c:731
@ IPA_ASP_S_WAIT_ID_GET
Definition: xua_asp_fsm.c:733
@ M3UA_TMOD_OVERRIDE
Definition: m3ua.h:176
@ XUA_ASP_E_ASPSM_ASPDN
Definition: xua_asp_fsm.h:23
static void xua_asp_fsm_active(struct osmo_fsm_inst *fi, uint32_t event, void *data)
Definition: xua_asp_fsm.c:505
@ _NUM_XUA_ASP_E
Definition: xua_asp_fsm.h:36
ipa_asp_fsm_t
Definition: xua_asp_fsm.c:749
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.c:837
@ XUA_ASP_E_M_ASP_DOWN_REQ
Definition: xua_asp_fsm.h:12
#define SUA_IEI_ERR_CODE
Definition: sua.h:87
int xua_msg_copy_part(struct xua_msg *xua_out, uint16_t tag_out, const struct xua_msg *xua_in, uint16_t tag_in)
Definition: xua_msg.c:111
#define SUA_IEI_ASP_ID
Definition: sua.h:89
enum xua_asp_role role
Definition: xua_asp_fsm.c:91
static int ipa_asp_fsm_timer_cb(struct osmo_fsm_inst *fi)
Definition: xua_asp_fsm.c:974
@ XUA_ASP_E_ASPTM_ASPAC
Definition: xua_asp_fsm.h:21
#define SUA_ASPTM_ACTIVE_ACK
Definition: sua.h:59
char * name
Definition: osmo_ss7.h:385
#define SUA_ASPSM_DOWN
Definition: sua.h:51
char * name
Definition: osmo_ss7.h:300
@ OSMO_XLM_PRIM_M_ASP_DOWN
Definition: sigtran_sap.h:23
Definition: osmo_ss7.h:429
struct xua_common_hdr hdr
Definition: xua_msg.h:32
@ XUA_ASP_E_ASPSM_BEAT_ACK
Definition: xua_asp_fsm.h:29
void osmo_ss7_route_destroy(struct osmo_ss7_route *rt)
Destroy a given SS7 route.
Definition: osmo_ss7.c:821
@ XUA_ASPAS_ASP_INACTIVE_IND
Definition: xua_as_fsm.h:6
osmo_prim_cb prim_cb
Definition: osmo_ss7.h:432
struct osmo_fsm ipa_asp_fsm
Definition: xua_asp_fsm.c:1059
bool osmo_ss7_as_has_asp(struct osmo_ss7_as *as, struct osmo_ss7_asp *asp)
Determine if given AS contains ASP.
Definition: osmo_ss7.c:1037
@ XUA_ASP_S_ACTIVE
Definition: xua_asp_fsm.h:6
struct osmo_fsm_inst * fi
ASP FSM.
Definition: osmo_ss7.h:358
static void xua_asp_allstate(struct osmo_fsm_inst *fi, uint32_t event, void *data)
Definition: xua_asp_fsm.c:584
struct osmo_ss7_route_table * rtable_system
Definition: osmo_ss7.h:87
static void ipa_asp_fsm_cleanup(struct osmo_fsm_inst *fi, enum osmo_fsm_term_cause cause)
Definition: xua_asp_fsm.c:1036
@ XUA_ASP_E_SCTP_EST_IND
Definition: xua_asp_fsm.h:17
int xua_msg_add_u32(struct xua_msg *xua, uint16_t iei, uint32_t val)
Definition: xua_msg.c:280
uint32_t xua_msg_part_get_u32(struct xua_msg_part *part)
Definition: xua_msg.c:286
struct osmo_fsm ipa_asp_fsm
Definition: xua_asp_fsm.c:1059
@ XUA_ASPFSM_ROLE_IPSP
Definition: xua_asp_fsm.h:42
Definition: xua_asp_fsm.c:87
struct xua_msg * xua_msg_alloc(void)
Definition: xua_msg.c:44
struct llist_head as_list
list of osmo_ss7_as
Definition: osmo_ss7.h:76
struct osmo_fsm xua_asp_fsm
Definition: xua_asp_fsm.c:666
@ XUA_ASP_E_ASPSM_ASPUP_ACK
Definition: xua_asp_fsm.h:20
static void ipa_asp_allstate(struct osmo_fsm_inst *fi, uint32_t event, void *data)
Definition: xua_asp_fsm.c:931
uint32_t asp_id
Definition: osmo_ss7.h:371
@ M3UA_ERR_UNEXPECTED_MSG
Definition: m3ua.h:152
@ IPA_ASP_S_WAIT_ID_ACK
Definition: xua_asp_fsm.c:734
void xua_asp_send_xlm_prim(struct osmo_ss7_asp *asp, struct osmo_xlm_prim *prim)
Definition: xua_asp_fsm.c:117
#define ENSURE_ASP_OR_IPSP(fi, event)
Definition: xua_asp_fsm.c:311
@ M3UA_TMOD_BCAST
Definition: m3ua.h:178
struct llist_head list
entry in 'ref osmo_ss7_instance.as_list
Definition: osmo_ss7.h:290
Definition: xua_asp_fsm.c:737
#define SUA_MSGC_MGMT
Definition: sua.h:31
@ XUA_ASP_E_ASPSM_ASPUP
Definition: xua_asp_fsm.h:19
@ OSMO_XLM_PRIM_M_ASP_ACTIVE
Definition: sigtran_sap.h:24
static const struct osmo_fsm_state xua_asp_states[]
Definition: xua_asp_fsm.c:621
struct msgb * xua_to_msg(const int version, struct xua_msg *msg)
Definition: xua_msg.c:203
struct osmo_ss7_asp::@27 cfg
struct osmo_ss7_routing_key routing_key
Definition: osmo_ss7.h:303
static const struct value_string xua_asp_role_names[]
Definition: xua_asp_fsm.c:50
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.c:854
struct osmo_timer_list timer
Definition: xua_asp_fsm.c:97
#define SUA_VERSION
Definition: sua.h:26
struct osmo_ss7_route * osmo_ss7_route_find_dpc_mask(struct osmo_ss7_route_table *rtbl, uint32_t dpc, uint32_t mask)
Find a SS7 route for given destination point code + mask in given table.
Definition: osmo_ss7.c:728
struct osmo_ss7_asp * asp
Definition: xua_asp_fsm.c:89
struct osmo_fsm xua_asp_fsm
Definition: xua_asp_fsm.c:666
static void send_xlm_prim_simple(struct osmo_fsm_inst *fi, enum osmo_xlm_prim_type prim_type, enum osmo_prim_operation op)
Definition: xua_asp_fsm.c:142
struct ipaccess_unit * ipa_unit
Definition: xua_asp_fsm.c:744
static int xua_asp_fsm_timer_cb(struct osmo_fsm_inst *fi)
Definition: xua_asp_fsm.c:607
Definition: osmo_ss7.h:201
#define SUA_ASPSM_UP
Definition: sua.h:50
xua_asp_role
Definition: xua_asp_fsm.h:39
@ IPA_ASP_E_ID_ACK
Definition: xua_asp_fsm.h:33
void xua_msg_free(struct xua_msg *msg)
Definition: xua_msg.c:56
struct osmo_ss7_asp * asp
Definition: xua_asp_fsm.c:739
struct osmo_stream_srv * server
Definition: osmo_ss7.h:366
@ M3UA_TMOD_LOADSHARE
Definition: m3ua.h:177
#define SUA_ASPTM_INACTIVE_ACK
Definition: sua.h:60
#define LOGPASP(asp, subsys, level, fmt, args ...)
Definition: osmo_ss7.h:422
@ OSMO_XLM_PRIM_M_ASP_UP
Definition: sigtran_sap.h:22
#define XUA_T_ACK_SEC
Definition: xua_asp_fsm.c:45
@ T_WAIT_ID_RESP
Definition: xua_asp_fsm.c:750
struct osmo_xlm_prim * xua_xlm_prim_alloc(enum osmo_xlm_prim_type prim_type, enum osmo_prim_operation op)
Definition: xua_asp_fsm.c:102
@ IPA_ASP_S_WAIT_ID_RESP
Definition: xua_asp_fsm.c:732
Definition: osmo_ss7.h:352
#define SUA_MSGC_ASPSM
Definition: sua.h:33
bool asp_id_present
Definition: osmo_ss7.h:372
@ IPA_ASP_S_DOWN
Definition: xua_asp_fsm.c:730
#define SUA_ASPTM_INACTIVE
Definition: sua.h:58
Definition: sigtran_sap.h:66
static struct osmo_fsm_inst * ipa_asp_fsm_start(struct osmo_ss7_asp *asp, enum xua_asp_role role, int log_level)
Start a new ASP finite stae machine for given ASP.
Definition: xua_asp_fsm.c:1080
@ XUA_ASP_S_DOWN
Definition: xua_asp_fsm.h:4
static void ipa_asp_fsm_active_onenter(struct osmo_fsm_inst *fi, uint32_t prev_state)
Definition: xua_asp_fsm.c:958
static void xua_t_ack_cb(void *data)
Definition: xua_asp_fsm.c:252
static void ipa_asp_fsm_wait_id_resp(struct osmo_fsm_inst *fi, uint32_t event, void *data)
Definition: xua_asp_fsm.c:795
static int peer_send_and_start_t_ack(struct osmo_fsm_inst *fi, int out_event)
Definition: xua_asp_fsm.c:267
char * osmo_xlm_prim_name(struct osmo_prim_hdr *oph)
Definition: sccp_sap.c:81
enum xua_asp_role role
Definition: xua_asp_fsm.c:741
struct osmo_ss7_instance * inst
Definition: osmo_ss7.h:291
@ XUA_ASP_E_M_ASP_UP_REQ
Definition: xua_asp_fsm.h:10
#define SUA_MSGC_ASPTM
Definition: sua.h:34
void osmo_ss7_asp_disconnect(struct osmo_ss7_asp *asp)
Definition: osmo_ss7.c:1753
static void ipa_asp_fsm_down(struct osmo_fsm_inst *fi, uint32_t event, void *data)
Definition: xua_asp_fsm.c:772
static int peer_send(struct osmo_fsm_inst *fi, int out_event, struct xua_msg *in)
Definition: xua_asp_fsm.c:152
@ XUA_ASPAS_ASP_DOWN_IND
Definition: xua_as_fsm.h:7
static void xua_asp_fsm_cleanup(struct osmo_fsm_inst *fi, enum osmo_fsm_term_cause cause)
Definition: xua_asp_fsm.c:614
#define M3UA_IEI_ROUTE_CTX
Definition: m3ua.h:67
#define XUA_HDR(class, type)
Definition: xua_msg.h:25