libosmo-sigtran  2.1.0.140-12dd.202507072026
Osmocom SIGTRAN library
sccp_internal.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <inttypes.h>
4 
5 #include <osmocom/core/fsm.h>
6 #include <osmocom/core/prim.h>
7 #include <osmocom/core/linuxlist.h>
8 #include <osmocom/core/linuxrbtree.h>
9 #include <osmocom/core/tdef.h>
13 
14 #define SCCP_STR "Signalling Connection Control Part\n"
15 
16 struct osmo_sccp_instance;
17 struct osmo_sccp_user;
18 
19 /* SCCP addressbook */
20 extern struct llist_head sccp_address_book_global;
22  struct llist_head list;
23  struct llist_head list_global;
25  char name[32];
26  struct osmo_sccp_addr addr;
27 };
29  const struct osmo_ss7_instance *inst);
31 
32 extern int DSCCP;
33 
34 struct xua_msg;
35 
36 struct sccp_connection *sccp_find_conn_by_id(const struct osmo_sccp_instance *inst, uint32_t id);
37 
38 /* Message from SCOC -> SCRC */
40  struct xua_msg *xua);
41 
42 /* Message from SCLC -> SCRC */
43 int sccp_scrc_rx_sclc_msg(struct osmo_sccp_instance *inst, struct xua_msg *xua);
44 
45 /* Message from MTP (SUA) -> SCRC */
47  struct xua_msg *xua);
48 
49 /* Message from SCRC -> SCOC */
51  struct xua_msg *xua);
53  struct xua_msg *xua, uint32_t cause);
54 
55 /* Message from SCRC -> SCLC */
57  struct xua_msg *xua);
59  struct xua_msg *xua, uint32_t cause);
60 
61 /* SCU -> SCLC */
62 int sccp_sclc_user_sap_down(struct osmo_sccp_user *scu, struct osmo_prim_hdr *oph);
63 int sccp_sclc_user_sap_down_nofree(struct osmo_sccp_user *scu, struct osmo_prim_hdr *oph);
64 
65 struct msgb *sccp_msgb_alloc(const char *name);
66 
67 void osmo_sccp_vty_write_cs7_node(struct vty *vty, const char *indent, struct osmo_sccp_instance *inst);
68 
69 /* Local Broadcast (LBCS) */
71  const struct osmo_scu_pcstate_param *pcstate);
73  const struct osmo_scu_state_param *state);
74 
75 /* SCCP Management (SCMG) */
76 void sccp_scmg_rx_ssn_allowed(struct osmo_sccp_instance *inst, uint32_t dpc, uint32_t ssn, uint32_t smi);
77 void sccp_scmg_rx_ssn_prohibited(struct osmo_sccp_instance *inst, uint32_t dpc, uint32_t ssn, uint32_t smi);
78 void sccp_scmg_rx_mtp_pause(struct osmo_sccp_instance *inst, uint32_t dpc);
79 void sccp_scmg_rx_mtp_resume(struct osmo_sccp_instance *inst, uint32_t dpc);
80 void sccp_scmg_rx_mtp_status(struct osmo_sccp_instance *inst, uint32_t dpc, enum mtp_unavail_cause cause);
uint32_t dpc
Definition: m3ua.h:1
mtp_unavail_cause
Definition: mtp.h:28
void osmo_sccp_vty_write_cs7_node(struct vty *vty, const char *indent, struct osmo_sccp_instance *inst)
Definition: sccp_vty.c:298
void sccp_sclc_rx_scrc_rout_fail(struct osmo_sccp_instance *inst, struct xua_msg *xua, uint32_t cause)
SCRC -> SCLC (Routing Failure.
Definition: sccp_sclc.c:394
struct llist_head sccp_address_book_global
void sccp_scmg_rx_ssn_allowed(struct osmo_sccp_instance *inst, uint32_t dpc, uint32_t ssn, uint32_t smi)
Definition: sccp_scmg.c:43
struct sccp_connection * sccp_find_conn_by_id(const struct osmo_sccp_instance *inst, uint32_t id)
Definition: sccp_scoc.c:93
int sccp_scrc_rx_scoc_conn_msg(struct osmo_sccp_instance *inst, struct xua_msg *xua)
Definition: sccp_scrc.c:452
int scrc_rx_mtp_xfer_ind_xua(struct osmo_sccp_instance *inst, struct xua_msg *xua)
Definition: sccp_scrc.c:540
void sccp_scmg_rx_mtp_status(struct osmo_sccp_instance *inst, uint32_t dpc, enum mtp_unavail_cause cause)
Definition: sccp_scmg.c:128
int sccp_sclc_user_sap_down(struct osmo_sccp_user *scu, struct osmo_prim_hdr *oph)
Main entrance function for primitives from SCCP User.
Definition: sccp_sclc.c:176
int sccp_sclc_user_sap_down_nofree(struct osmo_sccp_user *scu, struct osmo_prim_hdr *oph)
Main entrance function for primitives from SCCP User.
Definition: sccp_sclc.c:153
void sccp_scmg_rx_ssn_prohibited(struct osmo_sccp_instance *inst, uint32_t dpc, uint32_t ssn, uint32_t smi)
Definition: sccp_scmg.c:61
void sccp_scmg_rx_mtp_pause(struct osmo_sccp_instance *inst, uint32_t dpc)
brief MTP -> SNM (MTP-PAUSE.ind) - inability to providing MTP service Q.714 5.2.2
Definition: sccp_scmg.c:82
int DSCCP
int sccp_scmg_init(struct osmo_sccp_instance *inst)
Definition: sccp_scmg.c:315
void sccp_scoc_rx_from_scrc(struct osmo_sccp_instance *inst, struct xua_msg *xua)
Main entrance function for primitives from the SCRC (Routing Control)
Definition: sccp_scoc.c:747
int sccp_sclc_rx_from_scrc(struct osmo_sccp_instance *inst, struct xua_msg *xua)
SCRC -> SCLC (connectionless message)
Definition: sccp_sclc.c:317
int sccp_scrc_rx_sclc_msg(struct osmo_sccp_instance *inst, struct xua_msg *xua)
Definition: sccp_scrc.c:480
void sccp_scoc_rx_scrc_rout_fail(struct osmo_sccp_instance *inst, struct xua_msg *xua, uint32_t cause)
SCOC: Receive SCRC Routing Failure.
Definition: sccp_scoc.c:500
void sccp_scmg_rx_mtp_resume(struct osmo_sccp_instance *inst, uint32_t dpc)
brief MTP -> SNM (MTP-RESUME.ind) - ability of providing the MTP service Q.714 5.2....
Definition: sccp_scmg.c:105
void sccp_lbcs_local_bcast_state(struct osmo_sccp_instance *inst, const struct osmo_scu_state_param *state)
Definition: sccp_lbcs.c:57
void sccp_lbcs_local_bcast_pcstate(struct osmo_sccp_instance *inst, const struct osmo_scu_pcstate_param *pcstate)
Definition: sccp_lbcs.c:41
struct osmo_sccp_addr_entry * addr_entry_by_name_global(const char *name)
Definition: ss7_instance.c:710
struct msgb * sccp_msgb_alloc(const char *name)
Definition: sua.c:67
struct osmo_sccp_addr_entry * addr_entry_by_name_local(const char *name, const struct osmo_ss7_instance *inst)
Definition: ss7_instance.c:692
uint8_t smi
Definition: sccp_scmg.h:3
Definition: sccp_internal.h:21
struct osmo_ss7_instance * inst
Definition: sccp_internal.h:24
char name[32]
Definition: sccp_internal.h:25
struct llist_head list
Definition: sccp_internal.h:22
struct llist_head list_global
Definition: sccp_internal.h:23
struct osmo_sccp_addr addr
Definition: sccp_internal.h:26
Definition: sccp_sap.h:183
Definition: sccp_instance.h:39
Definition: sccp_user.h:12
Definition: sccp_sap.h:273
Definition: sccp_sap.h:265
Definition: ss7_instance.h:21
Definition: sccp_connection.h:10
struct osmo_sccp_instance * inst
Definition: sccp_connection.h:14
Definition: xua_msg.h:31