SccpInitNSapCfg

Initializes an SCCP network service access point (NSAP) configuration buffer to default values that can be passed to SccpSetNSapCfg.

Prototype

SCCP_STATUS SccpInitNSapCfg ( SccpNSapCfg *pCfg, U16 sapId, U32 dpc, S16 swType)

Argument

Description

pCfg

Pointer to the address of the SCCP NSAP configuration parameters buffer:

typedef struct
{
  U8           length;             /* length in bytes                 */
  U8           strg[SCCP_LENADDR]; /* address value - hex bcd digits  */
  U8           spare1;             /* alignment                       */
} SccpAddrMask;


typedef struct
{
  S16          swType;             /* Protocol Switch type/version    */
  U8           dpcLen;             /* dpc length(PCLEN_ANSI |
                                    * PCLEN_ITU)                      */
  U8           useMsk;             /* use address mask? (0=no, 1=yes) */
  U32          dpc;                /* point code for this nsap 
                                    * (switch)                        */
  S16          maxMsgLen;          /* max message length for
                                    * MTP3 on this SAP                */
  S16          txQThr;             /* max msgs queued to MTP3
                                    * before discarding               */
  SccpAddrMask addrMaskList[SCCP_MAXMASKS];        
                                   /* address mask for incoming pkts 
                                    * on this SAP                     */
  MemoryId     mem;                /* memory region & pool id         */
  U16          dstProcId;          /* destination processor id        */
  S16          spId;               /* service provider id             */
  U8           selector;           /* selector                        */
  U8           priority;           /* priority                        */
  U8           route;              /* route                           */
  U8           dstEnt;             /* destination entity              */
  U8           dstInst;            /* detination instance             */
  U8           hopCnt;             /* default Hop Count 
                                    * (between 1 and 15)              */
  U8           ssf;                /* subsytem part of SIO to
                                    * be used on NSAP                 */
U8           niInd;              /* network indicator (0..1) for
                                  * SCCP mgmt msgs                  */
  U16          spare1;             /* alignment                       */
  U16          spare2;             /* alignment                       */
} SccpNSapCfg;

 

sapId

Network service access point ID.

dpc

Point code of this NSAP.

swType

Switch type that the SCCP NSAP uses:

SCCP_SW_ITU

SCCP_SW_ANS


Return values

Return value

Description

SCCP_SUCCESS

 

SCCP_NULLPTR

Null pointer was specified for pCfg.

SCCP_SWTYPE

swType contains an invalid switch type.


Details

Prior to calling SccpSetNSapCfg to send the configuration block to the SCCP layer, the application can change the default values within the specified range for any fields other than those denoted as internal or unused.

Default values for the SccpNSapCfg structure that can be overridden by the calling application are listed in the following table.

Note: SccpNSapCfg structure members not listed in the following table are either unused or for internal use only. These fields are set to correct values by SccpInitNSapCfg and must not be overridden by the application.

All values listed in the following table can be modified on the first call to SccpSetNSapCfg. On subsequent calls to SccpSetNSapCfg, only parameters listed in bold can be modified. Those fields not in bold are ignored on subsequent calls.

Field

Range

Default value

Description

swType

SCCP_SW_ANS

SCCP_SW_ITU

parameter

Protocol variant for this NSAP.

dpcLen

PCLEN_ANSI

PCLEN_ITU

ANSI: PCLEN_ANSI

ITU: PCLEN_ITU

Point code length of this network.

dpc

Hex number

parameter

Point code of this node. Enter 1.1.1 as 0x00010101.

maxMsgLen

32 - 1500

256

Maximum length of a message passed to MTP 3 on this NSAP.

txQThr

0 - 32766

20

Maximum number of messages to queue to MTP 3 before discarding.

useMsk

0 or 1

0

Set to 1 if an addrMsk is defined.

AddrMaskList[i].length

0 to SCCP_LENADR

none

Length of the address mask in bytes. Set to 0 if a mask is not used.

AddrMaskList[i].strg

0 to SCCP_LENADR
characters

none

Address mask describing which digits to match when performing a global title translation.

spId

0 to (SccpGenCfg
maxNSaps
-1)

parameter

NSAP ID.

hopCnt

1 - 15

10

Hop count value used on outgoing SCCP messages from this service access point.

ssf

SCCP_SSF_INTL

SCCP_SSF_SPARE

SCCP_SSF_NAT

SCCP_SSF_RES

ANSI:
SCCP_SSF_NAT

ITU:
SCCP_SSF_INTL

Value used in the subservice field for this network.

niInd

0 - 1

ANSI: 1

ITU: 0

Network indicator for SCCP management messages.


The addrMsk can be composed of only 0 and f. Each byte contains two hexadecimal digits. Use SccpAsciiMaskToBcd to convert an ASCII string into the correct format.

An addrMsk of a single 0 (zero) matches all global titles. Any global title masked with an addrMsk of zero matches an ADDRESS section of 0 (zero).