libosmo-sigtran 2.2.1.56-7580 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>
10#include <osmocom/sigtran/sccp_sap.h>
11#include <osmocom/sigtran/osmo_ss7.h>
12#include <osmocom/sigtran/protocol/mtp.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;
21 struct osmo_sccp_addr_entry {
22 struct llist_head list;
23 struct llist_head list_global;
24 struct osmo_ss7_instance *inst;
25 char name[32];
26 struct osmo_sccp_addr addr;
27};
28 struct osmo_sccp_addr_entry *addr_entry_by_name_local(const char *name,
29 const struct osmo_ss7_instance *inst);
30 struct osmo_sccp_addr_entry *addr_entry_by_name_global(const char *name);
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 */
39 int sccp_scrc_rx_scoc_conn_msg(struct osmo_sccp_instance *inst,
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 */
46 int scrc_rx_mtp_xfer_ind_xua(struct osmo_sccp_instance *inst,
47 struct xua_msg *xua);
48
49/* Message from SCRC -> SCOC */
50 void sccp_scoc_rx_from_scrc(struct osmo_sccp_instance *inst,
51 struct xua_msg *xua);
52 void sccp_scoc_rx_scrc_rout_fail(struct osmo_sccp_instance *inst,
53 struct xua_msg *xua, uint32_t cause);
54
55/* Message from SCRC -> SCLC */
56 int sccp_sclc_rx_from_scrc(struct osmo_sccp_instance *inst,
57 struct xua_msg *xua);
58 void sccp_sclc_rx_scrc_rout_fail(struct osmo_sccp_instance *inst,
59 struct xua_msg *xua, uint32_t cause);
60
61/* Route Failure from SCRX -> SCOC or SCLC */
62 void sccp_rout_fail_enqueue(struct osmo_sccp_instance *inst, const struct xua_msg *xua, uint32_t cause, bool scoc);
63
64/* SCU -> SCLC */
65 int sccp_sclc_user_sap_down(struct osmo_sccp_user *scu, struct osmo_prim_hdr *oph);
66 int sccp_sclc_user_sap_down_nofree(struct osmo_sccp_user *scu, struct osmo_prim_hdr *oph);
67
68 struct msgb *sccp_msgb_alloc(const char *name);
69
70 void osmo_sccp_vty_write_cs7_node(struct vty *vty, const char *indent, struct osmo_sccp_instance *inst);
71
72/* Local Broadcast (LBCS) */
73 void sccp_lbcs_local_bcast_pcstate(struct osmo_sccp_instance *inst,
74 const struct osmo_scu_pcstate_param *pcstate);
75 void sccp_lbcs_local_bcast_state(struct osmo_sccp_instance *inst,
76 const struct osmo_scu_state_param *state);
77
78/* SCCP Management (SCMG) */
79 void sccp_scmg_rx_ssn_allowed(struct osmo_sccp_instance *inst, uint32_t dpc, uint32_t ssn, uint32_t smi);
80 void sccp_scmg_rx_ssn_prohibited(struct osmo_sccp_instance *inst, uint32_t dpc, uint32_t ssn, uint32_t smi);
81 void sccp_scmg_rx_mtp_pause(struct osmo_sccp_instance *inst, uint32_t dpc);
82 void sccp_scmg_rx_mtp_resume(struct osmo_sccp_instance *inst, uint32_t dpc);
83 void sccp_scmg_rx_mtp_status(struct osmo_sccp_instance *inst, uint32_t dpc, enum mtp_unavail_cause cause, uint8_t cong_level);
84 int sccp_scmg_init(struct osmo_sccp_instance *inst);
dpc
uint32_t dpc
Definition: m3ua.h:1
mtp.h
mtp_unavail_cause
mtp_unavail_cause
Definition: mtp.h:49
osmo_ss7.h
osmo_sccp_vty_write_cs7_node
void osmo_sccp_vty_write_cs7_node(struct vty *vty, const char *indent, struct osmo_sccp_instance *inst)
Definition: sccp_vty.c:298
sccp_sclc_rx_scrc_rout_fail
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:354
sccp_address_book_global
struct llist_head sccp_address_book_global
sccp_scmg_rx_ssn_allowed
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
sccp_scrc_rx_scoc_conn_msg
int sccp_scrc_rx_scoc_conn_msg(struct osmo_sccp_instance *inst, struct xua_msg *xua)
Definition: sccp_scrc.c:447
sccp_msgb_alloc
struct msgb * sccp_msgb_alloc(const char *name)
Definition: sua.c:67
addr_entry_by_name_local
struct osmo_sccp_addr_entry * addr_entry_by_name_local(const char *name, const struct osmo_ss7_instance *inst)
Definition: ss7_instance.c:747
sccp_scmg_rx_mtp_status
void sccp_scmg_rx_mtp_status(struct osmo_sccp_instance *inst, uint32_t dpc, enum mtp_unavail_cause cause, uint8_t cong_level)
Definition: sccp_scmg.c:129
scrc_rx_mtp_xfer_ind_xua
int scrc_rx_mtp_xfer_ind_xua(struct osmo_sccp_instance *inst, struct xua_msg *xua)
Definition: sccp_scrc.c:535
sccp_sclc_user_sap_down
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
addr_entry_by_name_global
struct osmo_sccp_addr_entry * addr_entry_by_name_global(const char *name)
Definition: ss7_instance.c:765
sccp_sclc_user_sap_down_nofree
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
sccp_scmg_rx_ssn_prohibited
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
sccp_scmg_rx_mtp_pause
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
DSCCP
int DSCCP
sccp_scmg_init
int sccp_scmg_init(struct osmo_sccp_instance *inst)
Definition: sccp_scmg.c:331
sccp_scoc_rx_from_scrc
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
sccp_sclc_rx_from_scrc
int sccp_sclc_rx_from_scrc(struct osmo_sccp_instance *inst, struct xua_msg *xua)
SCRC -> SCLC (connectionless message)
Definition: sccp_sclc.c:317
sccp_scrc_rx_sclc_msg
int sccp_scrc_rx_sclc_msg(struct osmo_sccp_instance *inst, struct xua_msg *xua)
Definition: sccp_scrc.c:475
sccp_scoc_rx_scrc_rout_fail
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
sccp_find_conn_by_id
struct sccp_connection * sccp_find_conn_by_id(const struct osmo_sccp_instance *inst, uint32_t id)
Definition: sccp_scoc.c:93
sccp_scmg_rx_mtp_resume
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
sccp_lbcs_local_bcast_state
void sccp_lbcs_local_bcast_state(struct osmo_sccp_instance *inst, const struct osmo_scu_state_param *state)
Definition: sccp_lbcs.c:57
sccp_lbcs_local_bcast_pcstate
void sccp_lbcs_local_bcast_pcstate(struct osmo_sccp_instance *inst, const struct osmo_scu_pcstate_param *pcstate)
Definition: sccp_lbcs.c:41
sccp_rout_fail_enqueue
void sccp_rout_fail_enqueue(struct osmo_sccp_instance *inst, const struct xua_msg *xua, uint32_t cause, bool scoc)
Definition: sccp_instance.c:233
sccp_sap.h
smi
uint8_t smi
Definition: sccp_scmg.h:3
osmo_sccp_addr_entry
Definition: sccp_internal.h:21
osmo_sccp_addr_entry::inst
struct osmo_ss7_instance * inst
Definition: sccp_internal.h:24
osmo_sccp_addr_entry::name
char name[32]
Definition: sccp_internal.h:25
osmo_sccp_addr_entry::list
struct llist_head list
Definition: sccp_internal.h:22
osmo_sccp_addr_entry::list_global
struct llist_head list_global
Definition: sccp_internal.h:23
osmo_sccp_addr_entry::addr
struct osmo_sccp_addr addr
Definition: sccp_internal.h:26
osmo_sccp_addr
Definition: sccp_sap.h:183
osmo_sccp_instance
Definition: sccp_instance.h:47
osmo_sccp_user
Definition: sccp_user.h:12
osmo_scu_pcstate_param
Definition: sccp_sap.h:275
osmo_scu_state_param
Definition: sccp_sap.h:267
osmo_ss7_instance
Definition: ss7_instance.h:45
sccp_connection
Definition: sccp_connection.h:10
sccp_connection::inst
struct osmo_sccp_instance * inst
Definition: sccp_connection.h:14
xua_msg
Definition: xua_msg.h:31
ssn
uint8_t ssn
Definition: tcap_as_loadshare.c:3