WIP: SGs Interface initial code

Change-Id: I73359925fc1ca72b33a1466e6ac41307f2f0b11d
This commit is contained in:
Harald Welte 2018-10-08 23:40:12 +02:00
parent f6400737f9
commit 7d04de456d
7 changed files with 1292 additions and 0 deletions

View File

@ -21,5 +21,6 @@ enum {
DVLR, DVLR,
DIUCS, DIUCS,
DBSSAP, DBSSAP,
DSGS,
Debug_LastEntry, Debug_LastEntry,
}; };

View File

@ -23,6 +23,7 @@ enum bsc_vty_node {
SMPP_NODE, SMPP_NODE,
SMPP_ESME_NODE, SMPP_ESME_NODE,
HLR_NODE, HLR_NODE,
CFG_SGS_NODE,
}; };
int bsc_vty_init_extra(void); int bsc_vty_init_extra(void);

View File

@ -51,6 +51,7 @@ libmsc_a_SOURCES = \
osmo_msc.c \ osmo_msc.c \
ctrl_commands.c \ ctrl_commands.c \
subscr_conn.c \ subscr_conn.c \
sgs_iface.c \
$(NULL) $(NULL)
if BUILD_IU if BUILD_IU
libmsc_a_SOURCES += \ libmsc_a_SOURCES += \

View File

@ -1389,6 +1389,8 @@ static int config_write_hlr(struct vty *vty)
return CMD_SUCCESS; return CMD_SUCCESS;
} }
extern void sgs_vty_init(void);
void msc_vty_init(struct gsm_network *msc_network) void msc_vty_init(struct gsm_network *msc_network)
{ {
OSMO_ASSERT(gsmnet == NULL); OSMO_ASSERT(gsmnet == NULL);
@ -1427,6 +1429,7 @@ void msc_vty_init(struct gsm_network *msc_network)
#ifdef BUILD_IU #ifdef BUILD_IU
ranap_iu_vty_init(MSC_NODE, &msc_network->iu.rab_assign_addr_enc); ranap_iu_vty_init(MSC_NODE, &msc_network->iu.rab_assign_addr_enc);
#endif #endif
sgs_vty_init();
osmo_fsm_vty_add_cmds(); osmo_fsm_vty_add_cmds();
osmo_signal_register_handler(SS_SCALL, scall_cbfn, NULL); osmo_signal_register_handler(SS_SCALL, scall_cbfn, NULL);

1274
src/libmsc/sgs_iface.c Normal file

File diff suppressed because it is too large Load Diff

View File

@ -12,6 +12,7 @@ AM_CFLAGS = \
$(LIBOSMOVTY_CFLAGS) \ $(LIBOSMOVTY_CFLAGS) \
$(LIBOSMOCTRL_CFLAGS) \ $(LIBOSMOCTRL_CFLAGS) \
$(LIBOSMOABIS_CFLAGS) \ $(LIBOSMOABIS_CFLAGS) \
$(LIBOSMONETIF_CFLAGS) \
$(LIBSMPP34_CFLAGS) \ $(LIBSMPP34_CFLAGS) \
$(LIBOSMORANAP_CFLAGS) \ $(LIBOSMORANAP_CFLAGS) \
$(LIBASN1C_CFLAGS) \ $(LIBASN1C_CFLAGS) \
@ -40,11 +41,13 @@ osmo_msc_LDADD = \
$(LIBOSMOCORE_LIBS) \ $(LIBOSMOCORE_LIBS) \
$(LIBOSMOCTRL_LIBS) \ $(LIBOSMOCTRL_LIBS) \
$(LIBOSMOABIS_LIBS) \ $(LIBOSMOABIS_LIBS) \
$(LIBOSMONETIF_LIBS) \
$(LIBSMPP34_LIBS) \ $(LIBSMPP34_LIBS) \
$(LIBOSMOSIGTRAN_LIBS) \ $(LIBOSMOSIGTRAN_LIBS) \
$(LIBOSMOMGCPCLIENT_LIBS) \ $(LIBOSMOMGCPCLIENT_LIBS) \
$(LIBOSMOGSUPCLIENT_LIBS) \ $(LIBOSMOGSUPCLIENT_LIBS) \
-ldbi \ -ldbi \
-lsctp \
$(NULL) $(NULL)
if BUILD_IU if BUILD_IU
osmo_msc_LDADD += \ osmo_msc_LDADD += \

View File

@ -493,6 +493,12 @@ static const struct log_info_cat msc_default_categories[] = {
.description = "BSSAP Protocol (A Interface)", .description = "BSSAP Protocol (A Interface)",
.enabled = 1, .loglevel = LOGL_NOTICE, .enabled = 1, .loglevel = LOGL_NOTICE,
}, },
[DSGS] = {
.name = "DSGS",
.description = "SGs Interface (SGsAP)",
.enabled = 1, .loglevel = LOGL_NOTICE,
},
}; };
@ -517,6 +523,8 @@ extern void *tall_gsms_ctx;
extern void *tall_call_ctx; extern void *tall_call_ctx;
extern void *tall_trans_ctx; extern void *tall_trans_ctx;
extern void *sgs_init(void *ctx);
int main(int argc, char **argv) int main(int argc, char **argv)
{ {
int rc; int rc;
@ -570,6 +578,7 @@ int main(int argc, char **argv)
if (smpp_openbsc_alloc_init(tall_msc_ctx) < 0) if (smpp_openbsc_alloc_init(tall_msc_ctx) < 0)
return -1; return -1;
#endif #endif
sgs_init(tall_msc_ctx);
rc = vty_read_config_file(msc_cmdline_config.config_file, NULL); rc = vty_read_config_file(msc_cmdline_config.config_file, NULL);
if (rc < 0) { if (rc < 0) {