SANGOMA

Wanpipe AFT SS7 MTP2 API FAQ


  1. XMTP2 API Has Only 1 File descriptor for all links?
     
    yes
    Currently all events, commands, read , write are preformed on single kernel device for all mtp2 links.


  2. Ok.. how do I identify the link for reading?
     
    Look at transfer_L2_to_L3 (int xmtp2km_fd) function. 
    Mtp2api application will receive events for each linkset/link.
    Each p_msu event will have linkset and link associated with it.  One uses the linkset and link as indexes to retrieve the mtp2 device.
    The mtp2dev structure can be expanded by the user to contain private data for that device including thread id etc.
    mtp2dev = &mtp2_dev_idx[MTP2_DEV_KEY(p_msu->hdr.linkset,p_msu->hdr.link)]; 

     
  3. MTP2API is Poll Based ?
     
    Yes
    Currently all events must be polled for!  This means that user implements a 100ms delay after which events are polled out of the xmtp2api device.  Events are read in a loop until they are exhausted.  Note this will be changed to a proper poll() on event.
     
     
  4. Why does MTP2API use Linkset & Link isn't that MTP3 Functionality
     
    Yes Linkset and Link really belong to MTP3 Layer.  However, the MTP2 stack has been designed to conform to this architecture.  The LinkSet and Link offer logical mapping from MTP3 to MTP2.   The developer is free to map MTP2 notions of LinkSet and Link to their upper layer stacks.  In the mtp2api.c example file the linkset & link values are used as indexes to identify the mtp2 device structure for a particular link.  

    Note that MTP2 is limited to 16 links in a single Linkset.  MTP2 will not configure more than 16 links in a single Linkset!
     

  5. How do I map  Card/Span/Slot  to a mtp2 link device

    The notion of Card and Span are identical.  The limitation of MTP2 currently is that Card 1 MUST be Span1

            mtp2dev->cfg.card=1;            /* wanpipe1.conf */
            mtp2dev->cfg.slot=i;               /* T1/E1 timeslot starting from 0 to 30 */
            mtp2dev->cfg.clear_ch=1;      /* 1=8bit hdlc  0=7bit hdlc */
            mtp2dev->cfg.linkset=0;          /* LinkSet number */   
            mtp2dev->cfg.link=i;                /* Link in LinkSet  there can be 16 links in linkset */

     
  6. How do I start/stop link without re-configuring it?

    int xmtp2_cmd (
        int xmtp2km_fd,
        const unsigned int linkset,
        const unsigned int link,
        const unsigned int cause,
        const unsigned int caller)

    The above function is used to control each mtp2 link:
    Please refer to libxmtp2.c for all cmd options:

    xmtp2_cmd (xmtp2km_fd, p_msu->hdr.linkset, p_msu->hdr.link, LSC_CAUSE_START, LSAC);
    xmtp2_cmd (xmtp2km_fd, p_msu->hdr.linkset, p_msu->hdr.link, LSC_CAUSE_STOP, LSAC);
    xmtp2_cmd (xmtp2km_fd, mtp2dev->cfg.linkset, mtp2dev->cfg.link, LSC_CAUSE_POWER_ON, MGMT);


     
     

Site

Changes
Index
Search

 

User

 

Log In
Register

 
 

Last Modified 6/5/08 5:24 PM