int ftmod_ss7_deactivate2_mtplinkSet(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 = STLNKSET; cntrl.hdr.elmId.elmntInst1 = g_ftdm_sngss7_data.cfg.mtpLinkSet[id].id; cntrl.t.cntrl.action = ADEACTLNKSET_L2; /* 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)); }
int ftmod_ss7_unbind_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 = AUBND_DIS; /* unbind and disable */ cntrl.t.cntrl.subAction = SAELMNT; /* specificed element */ return (sng_cntrl_mtp3(&pst, &cntrl)); }
static int ftmod_ss7_enable_nsap(int suId) { SiMngmt cntrl; Pst pst; /* initalize the post structure */ smPstInit(&pst); /* insert the destination Entity */ pst.dstEnt = ENTSI; /* initalize the control structure */ memset(&cntrl, 0x0, sizeof(SiMngmt)); /* initalize the control header */ smHdrInit(&cntrl.hdr); cntrl.hdr.msgType = TCNTRL; /* this is a control request */ cntrl.hdr.entId.ent = ENTSI; cntrl.hdr.entId.inst = S_INST; cntrl.hdr.elmId.elmnt = STNSAP; cntrl.t.cntrl.s.siElmnt.elmntId.sapId = suId; cntrl.t.cntrl.s.siElmnt.elmntParam.nsap.nsapType = SAP_MTP; cntrl.t.cntrl.action = ABND_ENA; /* bind and activate */ cntrl.t.cntrl.subAction = SAELMNT; /* specificed element */ return (sng_cntrl_isup(&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_isup_intf_sta(uint32_t id, uint8_t *status) { SiMngmt sta; SiMngmt cfm; Pst pst; int ret; memset(&sta, 0x0, sizeof(sta)); /* initalize the post structure */ smPstInit(&pst); /* insert the destination Entity */ pst.dstEnt = ENTSI; /* check the for the correct ProcId and make sure it goes to the right system */ if (g_ftdm_sngss7_data.cfg.procId != 1) { pst.dstProcId = 1; } /* request the status of an inftId */ sta.hdr.entId.ent = ENTSI; sta.hdr.entId.inst = S_INST; sta.hdr.msgType = TSSTA; sta.hdr.elmId.elmnt = SI_STINTF; sta.t.ssta.elmntId.intfId = id; ret = sng_sta_isup(&pst, &sta, &cfm); *status = cfm.t.ssta.cfm.s.intf.state; return(ret); }
int ftmod_ss7_unblock_isup_ckt(uint32_t cktId) { SiMngmt cntrl; Pst pst; /* initalize the post structure */ smPstInit(&pst); /* insert the destination Entity */ pst.dstEnt = ENTSI; /* initalize the control structure */ memset(&cntrl, 0x0, sizeof(SiMngmt)); /* initalize the control header */ smHdrInit(&cntrl.hdr); cntrl.hdr.msgType = TCNTRL; /* this is a control request */ cntrl.hdr.entId.ent = ENTSI; cntrl.hdr.entId.inst = S_INST; cntrl.hdr.elmId.elmnt = STICIR; cntrl.t.cntrl.s.siElmnt.elmntId.circuit = cktId; cntrl.t.cntrl.s.siElmnt.elmntParam.cir.flag = LSI_CNTRL_CIR_FORCE; cntrl.t.cntrl.action = AENA; /* unblock via UBL */ cntrl.t.cntrl.subAction = SAELMNT; /* specificed element */ return (sng_cntrl_isup(&pst, &cntrl)); }
int ftmod_ss7_disable_grp_mtp2Link(uint32_t procId) { SdMngmt cntrl; Pst pst; /* initalize the post structure */ smPstInit(&pst); /* insert the destination Entity */ pst.dstEnt = ENTSD; /* initalize the control structure */ memset(&cntrl, 0x0, sizeof(cntrl)); /* initalize the control header */ smHdrInit(&cntrl.hdr); cntrl.hdr.msgType = TCNTRL; /* this is a control request */ cntrl.hdr.entId.ent = ENTSD; cntrl.hdr.entId.inst = S_INST; cntrl.hdr.elmId.elmnt = STGRNSAP; /* group NSAP */ cntrl.t.cntrl.par.dstProcId = procId; /* all SAPS to this ProcId */ cntrl.t.cntrl.action = AUBND_DIS; /* disable and unbind */ cntrl.t.cntrl.subAction = SAGR_DSTPROCID; /* specificed element */ return (sng_cntrl_mtp2(&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_disable_relay_channel(uint32_t chanId) { RyMngmt cntrl; Pst pst; /* initalize the post structure */ smPstInit(&pst); /* insert the destination Entity */ pst.dstEnt = ENTRY; /* initalize the control structure */ memset(&cntrl, 0x0, sizeof(RyMngmt)); /* initalize the control header */ smHdrInit(&cntrl.hdr); cntrl.hdr.msgType = TCNTRL; /* this is a control request */ cntrl.hdr.entId.ent = ENTRY; cntrl.hdr.entId.inst = S_INST; cntrl.hdr.elmId.elmnt = STGEN; cntrl.hdr.elmId.elmntInst1 = chanId; cntrl.t.cntrl.action = ADISIMM; /* Deactivate */ cntrl.t.cntrl.subAction = SAELMNT; /* specificed element */ return (sng_cntrl_relay(&pst, &cntrl)); }
int ftmod_ss7_shutdown_mtp2(void) { SdMngmt cntrl; Pst pst; /* initalize the post structure */ smPstInit(&pst); /* insert the destination Entity */ pst.dstEnt = ENTSD; /* initalize the control structure */ memset(&cntrl, 0x0, sizeof(SdMngmt)); /* initalize the control header */ smHdrInit(&cntrl.hdr); cntrl.hdr.msgType = TCNTRL; /* this is a control request */ cntrl.hdr.entId.ent = ENTSD; 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_mtp2(&pst, &cntrl)); }
int ftmod_ss7_mtp2link_sta(uint32_t id, SdMngmt *cfm) { SdMngmt sta; Pst pst; memset(&sta, 0x0, sizeof(sta)); /* initalize the post structure */ smPstInit(&pst); /* insert the destination Entity */ pst.dstEnt = ENTSD; sta.hdr.elmId.elmnt = STDLSAP; sta.hdr.elmId.elmntInst1 = g_ftdm_sngss7_data.cfg.mtp2Link[id].id; return(sng_sta_mtp2(&pst, &sta, cfm)); }
int ftmod_ss7_relay_status(uint32_t id, RyMngmt *cfm) { RyMngmt sta; Pst pst; memset(&sta, 0x0, sizeof(sta)); /* initalize the post structure */ smPstInit(&pst); /* insert the destination Entity */ pst.dstEnt = ENTRY; sta.hdr.entId.ent = ENTRY; sta.hdr.entId.inst = S_INST; sta.hdr.msgType = TSSTA; sta.hdr.elmId.elmnt = STCHSTA; sta.hdr.elmId.elmntInst1 = id; return(sng_sta_relay(&pst, &sta, cfm)); }
int ftmod_ss7_mtp3link_sta(uint32_t id, SnMngmt *cfm) { SnMngmt sta; Pst pst; memset(&sta, 0x0, sizeof(sta)); /* initalize the post structure */ smPstInit(&pst); /* insert the destination Entity */ pst.dstEnt = ENTSN; /* check the for the correct ProcId and make sure it goes to the right system */ if (g_ftdm_sngss7_data.cfg.procId != 1) { pst.dstProcId = 1; } sta.hdr.elmId.elmnt = STDLSAP; sta.hdr.elmId.elmntInst1 = g_ftdm_sngss7_data.cfg.mtp3Link[id].id; return(sng_sta_mtp3(&pst, &sta, cfm)); }
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)); } }