Table of Contents Index NMS Glossary Previous Page Next Page (Page 4 of 14 in this chapter) Version


mspCreateEndpoint

Description

Creates an MSPP endpoint.

Prototype

DWORD mspCreateEndpoint (CTAHD ctahd,
MSP_ENDPOINT_ADDR* addr,
MSP_ENDPOINT_PARMS* parm,
MSPHD* ephd)

ctahd CT Access handle used to open MSPP service.

addr Pointer to MSP_ENDPOINT_ADDR structure, as shown:


typedef struct tag_MSP_ENDPOINT_ADDR
{
    DWORD   size;       // size of defined structure - not a
                        // sizeof(ENDPOINT_ADDR) but for example
                        // sizeof(DS0_ENDPOINT_ADDR)
    DWORD   nBoard;     // board number
    DWORD   eEpType;    // MSP_ENDPOINT_DS0, MSP_ENDPOINT_RTPFDX,
                        // etc

    union   
    {
        DS0_ENDPOINT_ADDR           DS0;
        RTPRTCP_ENDPOINT_ADDR       RtpRtcp;
        UDP_ENDPOINT_ADDR           Udp;

        // Structure may be expanded to define new Endpoints
    } EP;

} MSP_ENDPOINT_ADDR;

parm Pointer to an endpoint parameters structure, as shown:


typedef struct tag_MSP_ENDPOINT_PARMS
{
    DWORD   size;      // size of defined structure - not a
                       // sizeof(ENDPOINT_PARAMS) but for example
                       // sizeof(PSTN_ENDPOINT_PARAMS) 
    DWORD   eParmType; // MSP_ENDPOINT_DS0, MSP_ENDPOINT_RTPFDX,
                       // etc

    union   
    {
        DS0_ENDPOINT_PARMS          DS0;
        RTPRTCP_ENDPOINT_PARMS      RtpRtcp;
        UDP_ENDPOINT_PARMS          Udp;
        UNDEFINED_ENDPOINT_PARMS    Undefined;

        // Structure may be expanded to define new Endpoints
    } EP;
}
ephd Pointer to a MSPP return endpoint handle.

Return Values

Events

Details

Applications can create MSPP endpoints by invoking the MSPP service function mspCreateEndpoint. This function requires that you specify a ctahd that has been used to open an MSPP service instance. In addition, you provide two structures that define the endpoint: an address structure and a parameter structure.

The address structure provides basic configuration information about the endpoint, usually the source and destination address for transferred data. The parameter structure specifies the features that will be available on the MSPP endpoint. For more information on MSPP parameters, refer to Appendix C.

When it creates the MSPP endpoint, the MSPP service returns a unique endpoint object handle (ephd) that the application can use to configure and control the endpoint. MSPP endpoints are enabled by default.

The MSPP service provides the following set of standard endpoints for sending and receiving data to and from a network interface:
Endpoint Type

Description

DS0 (PSTN)

Provides an entry and/or exit point for simplex or duplex voice over IP and T.38 fax over UDP data.

RTP full duplex

Provides and entry and exit point for full duplex voice over IP streams (includes an RTP header within UDP packets).

RTP simplex receive

Provides an entry point for simplex voice over IP data streams (includes an RTP header within UDP packets).

RTP simplex send

Provides an exit point for simplex voice over IP data streams (includes an RTP header within UDP packets).

UDP full duplex

Provides an entry and exit point for full duplex UDP data streams (including those carrying T.38 fax data).

See Also

mspDestroyEndpoint, mspDisableEndpoint, mspEnableEndpoint

Example


mspAddr.eEpType = MSP_ENDPOINT_DS0;
mspAddr.nBoard = DEFAULT_BOARDID;
mspAddr.size = sizeof(DS0_ENDPOINT_ADDR);
mspAddr.EP.DS0.nTimeslot = 1;
mspParm.eParmType = MSP_ENDPOINT_DS0;
mspParm.EP.DS0.media = MSP_VOICE;
mspParm.size = sizeof(DS0_ENDPOINT_PARMS);
ret = mspCreateEndpoint( hCta, &mspAddr, NULL, &hEp);
if (ret != SUCCESS)
return FAILURE;
// Wait for event
ctaWaitEvent( hCta, &Event, CTA_WAIT_FOREVER );
// Check the reason code
if ( Event.id != MSPEVN_CREATE_ENDPOINT_DONE ||
Event.value != CTA_REASON_FINISHED )
return FAILURE;


Table of Contents Index NMS Glossary Previous Page Next Page (Page 4 of 14 in this chapter) Version


Want to send us feedback on our documentation? Email: Tech_Pubs@nmss.com
Copyright © 2000, Natural MicroSystems, Inc. All rights reserved.