int ftmod_ss7_shutdown_mtp3(void) { SnMngmt cntrl; Pst pst; /* initalize the post structure */ smPstInit(&pst); /* insert the destination Entity */ pst.dstEnt = ENTSN; /* initalize the control structure */ memset(&cntrl, 0x0, sizeof(SnMngmt)); /* initalize the control header */ smHdrInit(&cntrl.hdr); cntrl.hdr.msgType = TCNTRL; /* this is a control request */ cntrl.hdr.entId.ent = ENTSN; cntrl.hdr.entId.inst = S_INST; cntrl.hdr.elmId.elmnt = STGEN; cntrl.t.cntrl.action = ASHUTDOWN; /* Activate */ cntrl.t.cntrl.subAction = SAELMNT; /* specificed element */ return (sng_cntrl_mtp3(&pst, &cntrl)); }
int ftmod_ss7_lpr_mtp3link(uint32_t id) { SnMngmt cntrl; Pst pst; /* initalize the post structure */ smPstInit(&pst); /* insert the destination Entity */ pst.dstEnt = ENTSN; /* initalize the control structure */ memset(&cntrl, 0x0, sizeof(SnMngmt)); /* initalize the control header */ smHdrInit(&cntrl.hdr); cntrl.hdr.msgType = TCNTRL; /* this is a control request */ cntrl.hdr.entId.ent = ENTSN; cntrl.hdr.entId.inst = S_INST; cntrl.hdr.elmId.elmnt = STDLSAP; cntrl.hdr.elmId.elmntInst1 = g_ftdm_sngss7_data.cfg.mtp3Link[id].id; cntrl.t.cntrl.action = ACTION_LPR; /* Activate */ cntrl.t.cntrl.subAction = SAELMNT; /* specificed element */ return (sng_cntrl_mtp3(&pst, &cntrl)); }
int ftmod_ss7_uninhibit_mtp3link(uint32_t id) { SnMngmt cntrl; Pst pst; /* initalize the post structure */ smPstInit(&pst); /* insert the destination Entity */ pst.dstEnt = ENTSN; /* initalize the control structure */ memset(&cntrl, 0x0, sizeof(SnMngmt)); /* initalize the control header */ smHdrInit(&cntrl.hdr); cntrl.hdr.msgType = TCNTRL; /* this is a control request */ cntrl.hdr.entId.ent = ENTSN; cntrl.hdr.entId.inst = S_INST; cntrl.hdr.elmId.elmnt = STDLSAP; cntrl.hdr.elmId.elmntInst1 = id; /* the DSLAP to inhibit */ cntrl.t.cntrl.action = AUNINH; /* Inhibit */ cntrl.t.cntrl.subAction = SAELMNT; /* specificed element */ return (sng_cntrl_mtp3(&pst, &cntrl)); }
static int ftmod_ss7_enable_mtpLinkSet(int lnkSetId) { SnMngmt cntrl; Pst pst; /* initalize the post structure */ smPstInit(&pst); /* insert the destination Entity */ pst.dstEnt = ENTSN; /* initalize the control structure */ memset(&cntrl, 0x0, sizeof(SnMngmt)); /* initalize the control header */ smHdrInit(&cntrl.hdr); cntrl.hdr.msgType = TCNTRL; /* this is a control request */ cntrl.hdr.entId.ent = ENTSN; cntrl.hdr.entId.inst = S_INST; cntrl.hdr.elmId.elmnt = STLNKSET; cntrl.hdr.elmId.elmntInst1 = lnkSetId; /* this is the linkset to bind */ cntrl.t.cntrl.action = ABND_ENA; /* bind and activate */ cntrl.t.cntrl.subAction = SAELMNT; /* specificed element */ return (sng_cntrl_mtp3(&pst, &cntrl)); }
int ftmod_ss7_enable_grp_mtp3Link(uint32_t procId) { SnMngmt cntrl; Pst pst; /* initalize the post structure */ smPstInit(&pst); /* insert the destination Entity */ pst.dstEnt = ENTSN; /* initalize the control structure */ memset(&cntrl, 0x0, sizeof(SnMngmt)); /* initalize the control header */ smHdrInit(&cntrl.hdr); cntrl.hdr.msgType = TCNTRL; /* this is a control request */ cntrl.hdr.entId.ent = ENTSN; cntrl.hdr.entId.inst = S_INST; cntrl.hdr.elmId.elmnt = STGRDLSAP; /* group DLSAP */ cntrl.t.cntrl.ctlType.groupKey.dstProcId = procId; /* all SAPS to this ProcId */ cntrl.t.cntrl.action = ABND_ENA; /* bind and enable */ cntrl.t.cntrl.subAction = SAGR_DSTPROCID; /* specificed element */ return (sng_cntrl_mtp3(&pst, &cntrl)); }
int ftmod_ss7_enable_grp_mtp3Link(uint32_t procId) { SnMngmt cntrl; Pst pst; /* initalize the post structure */ smPstInit(&pst); /* insert the destination Entity */ pst.dstEnt = ENTSN; /* initalize the control structure */ memset(&cntrl, 0x0, sizeof(SnMngmt)); /* initalize the control header */ smHdrInit(&cntrl.hdr); cntrl.hdr.msgType = TCNTRL; /* this is a control request */ cntrl.hdr.entId.ent = ENTSN; cntrl.hdr.entId.inst = S_INST; cntrl.hdr.elmId.elmnt = STGRDLSAP; /* group DLSAP */ cntrl.t.cntrl.ctlType.groupKey.dstProcId = procId; /* all SAPS to this ProcId */ cntrl.t.cntrl.action = ABND_ENA; /* bind and enable */ cntrl.t.cntrl.subAction = SAGR_DSTPROCID; /* specificed element */ if (g_ftdm_sngss7_data.cfg.procId == procId) { SS7_DEBUG("Executing MTP3 cntrl command local pid =%i\n",procId); return (sng_cntrl_mtp3(&pst, &cntrl)); } else { SS7_WARN("Executing MTP3 cntrl command different local=%i target=%i\n", g_ftdm_sngss7_data.cfg.procId,procId); return (sng_cntrl_mtp3_nowait(&pst, &cntrl)); } }