Quantcast
Channel: Developer Group
Viewing all articles
Browse latest Browse all 1888

Forum Post: Programmatic protocol configuration

$
0
0
Hi, I'm currently working on a project that needs to send SRI and MT messages to several point codes. The design is such that we have a small c layer that performs the GCTLib calls, and exposes methods and callbacks to interop. Our C code made use of the MTU, MTR, and SSM example applications to implement. We have been making use of system.txt and config.txt files to initialized the dsi environment, but would like to configure the environment dynamically. The config file I'm are currently using: CNSYS:IPADDR=192.168.0.222,PER=0; SNSLI:SNLINK=1,IPADDR=192.168.0.111,SNEND=C,SNTYPE=M3UA,HPORT=2905; SNAPI:AS=1,OPC=2222,RC=1,TRMD=LS; SNRAI:RAS=1,RC=1,DPC=1111; SNALI:SNAL=1,RAS=1,SNLINK=1; SNLBI:SNLB=1,AS=1,RAS=1; * SCCP_CONFIG local_spc ssf options SCCP_CONFIG 2222 0x8 0x0102 1 * SCCP_TRACE op_evt_mask ip_evt_mask non_prim_mask SCCP_TRACE 0x3 0x7 0x3 * SCCP_SSR ssr_id RSP remote_spc flags pc_mask SCCP_SSR 1 RSP 1111 0 0x0000 * SCCP_SSR ssr_id LSS local_ssn module_id flags protocol SCCP_SSR 3 LSS 0x06 0x2d 0 MAP SCCP_SSR 4 LSS 0x08 0x2d 0 MAP * SCCP_SSR ssr_id RSS remote_spc remote_ssn flags SCCP_SSR 5 RSS 1111 0x06 4 SCCP_SSR 6 RSS 1111 0x08 4 * TCAP_CONFIG base_ogdlg_id nog_dialogues base_icdlg_id * nic_dialogues options dlg_hunt [ addr_format ] TCAP_CONFIG 0x0 8192 0x8000 8192 0x0000 0 0 * TCAP_TRACE op_evt_mask ip_evt_mask non_prim_mask TCAP_TRACE 0x7 0xf 0x0 * MAP_CONFIG options MAP_CONFIG 0x0 * MAP_TRACE op_evt_mask ip_evt_mask non_prim_mask MAP_TRACE 0xf 0xf 0x15 From the varius user manuals, I've concluded that I would need to send the following messages to replicate the config file programatically: SCTP_MSG_CONFIG (0x7282) M3U_MSG_CONFIG (0x72c0) SCP_MSG_CONFIG (0x7740) TCP_MSG_CONFIG (0x7780) MAP_MSG_CONFIG (0x77e4) SCTP_MSG_HOST_IP_ADDR_ADD (0x7283) SCTP_MSG_AS_CONFIG (0x7286) SCP_MSG_CNF_SSR (0x7741) Example of my implementation of each message: s32 result; MSG *m; /* Message structure */ HDR *h; /* received message */ bool finished = FALSE; u8 *pptr; /* Pointer to paraameter area */ if ((m = getm(SCTP_MSG_CONFIG, 0, RESPONCE(MODULE_ID), SCTPML_CONFIG)) != 0) {      m- hdr.src = MODULE_ID;      m- hdr.dst = SCTP_TASK_ID;      pptr = get_param(m);      memset((void*)pptr, 0, m- len);      /*      * Format parameter area      */      rpackbytes(pptr, SCTPMO_CONFIG_mngt_id, 0xd1, SCTPMS_CONFIG_mngt_id);      rpackbytes(pptr, SCTPMO_CONFIG_trace_id, 0, SCTPMS_CONFIG_trace_id);      rpackbytes(pptr, SCTPMO_CONFIG_ip_id, 0, SCTPMS_CONFIG_ip_id);      rpackbytes(pptr, SCTPMO_CONFIG_max_assocs, 16, SCTPMS_CONFIG_max_assocs);      rpackbytes(pptr, SCTPMO_CONFIG_max_i_streams, 16, SCTPMS_CONFIG_max_i_streams);      rpackbytes(pptr, SCTPMO_CONFIG_max_o_streams, 16, SCTPMS_CONFIG_max_o_streams);      rpackbytes(pptr, SCTPMO_CONFIG_ms_per_tick, 5000, SCTPMS_CONFIG_ms_per_tick);      rpackbytes(pptr, SCTPMO_CONFIG_options, SCTP_CFG_OPT_PATH_PREFERRED, SCTPMS_CONFIG_options);      result = send_msg(m);      if (result == 0)      {           // Retreive config response           while (!finished)           {                if ((h = GCT_grab(MODULE_ID)) != 0)                {                     m = (MSG *)h;                     if (m- hdr.type == MK_RESP(SCTP_MSG_CONFIG))                     {                          if (m- hdr.status == 0)                          {                               /* Success */                          }                          else                          {                               /* Failure */                          }                          finished = TRUE;                     }                    relm(h);                }                else                {                     Sleep(20);                }           }      }      return result; } The problem is I do not know if I'm on the right path, since I have not been able to find an example for the steps taken to configure manually. In addition to this, I'm unsure about many of the parameters used by each message. I've even attempted to sniff packets between s7_mgt and gct to try see which config messages are being sent, with no luck. My question is, is there an existing guide indicating how this process should be done? What changes should I make in my message order? What are the variables being used by the s7_mgt module when performing the configuration (I assume there are default values used). Finally, if there is anything fundamentally wrong with my approach. Thanks

Viewing all articles
Browse latest Browse all 1888

Trending Articles