SccpInitAddrCfg

Initializes an SCCP global title translation definition to its default values that can be passed to SccpSetAddrCfg.

Prototype

SCCP_STATUS SccpInitAddrCfg ( SccpAddrMapCfg *pCfg, U8 *pGtIn, U8 nBytes)

Argument

Description

pCfg

Pointer to an address of the SCCP global title translation buffer.

pGtIn

Pointer to a buffer containing binary coded decimal digits that define the global title (or partial title) to be translated.

nBytes

Number of bytes in the BCD encoded global title.


Return values

Return value

Description

SCCP_SUCCESS

 

SCCP_BUFLEN

nBytes is out of range.

SCCP_NULLPTR

Null pointer was specified for pCfg.


Details

Prior to calling SccpSetAddrCfg 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.

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

typedef struct
{
  U8  format;                   /* format type                */
  U8  spare1;                   /* alignment                  */
  U16 spare2;                   /* alignment                  */
  union {
     struct {                   /* Format 1:                  */
       U8  oddEven;             /* odd/even indicator         */
       U8  natAddr;             /* nature of address          */
       U8  spare1;              /* alignment                  */
       U8  spare2;              /* alignment                  */
      } f1;
     struct {                   /* Format 2:                  */
       U8  tType;               /* translation type           */
       U8  spare1;              /* alignment                  */
       U8  spare2;              /* alignment                  */
       U8  spare3;              /* alignment                  */
      } f2;
     struct {                   /* Format 3:                  */
       U8  tType;               /* translation type           */
       U8  numPlan;             /* numbering plan             */
       U8  encSch;              /* encoding scheme            */
       U8  spare1;              /* alignment                  */
      } f3;
     struct {                   /* Format 4:                  */
       U8 tType;                /* translation type           */
       U8 numPlan;              /* numbering plan             */
       U8 encSch;               /* encoding scheme            */
       U8 natAddr;              /* nature of address          */
      } f4;
  }
 SccpAddrName addr;             /* address digits (BCD hex)   */
} SccpGlbTitleCfg;

typedef struct
{
  U8              pres;   /* address is present (always 1)    */
  U8              spare1; /* alignment                        */
  S16             swType; /* variant switch                   */
  U8              niInd;  /* national/international indicator */
  U8              rtgInd; /* routing indicator                */
  U8              ssnInd; /* subsystem number indicator       */
  U8              pcInd;  /* point code indicator             */
  U8              ssn;    /* subsystem number                 */
  U8              spare2; /* alignment                        */
  U32             pc;     /* point code                       */
  SccpGlbTitleCfg gt;     /* global title                     */
} SccpAddrCfg;

typedef struct
{
  SccpAddrName  gtI;    /* Global Title (incoming)               */
  U8            replGt; /* replace Gt (0=leave glt,1=replace glt)*/
  U8            spare1; /* alignment                             */
  U8            spare2; /* alignment                             */
  SccpAddrCfg   addr;   /* outgoing address                      */
} SccpAddrMapCfg;

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

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

Once a global title translation is set by SccpSetAddrCfg, it can only be modified by first deleting it with SccpDelAddrCfg, and then calling SccpSetAddrCfg with the new parameters.

Field

Range

Default value

Description

gtI

N/A

Parameter

Global title or portion of a global title to be matched in outgoing addresses.

replGt

0 or 1

0

Set to 1 if the global title should be replaced on the outgoing message.

addr.swType

SCCP_SW_ANS

SCCP_SW_ITU

SCCP_SW_ANS

Format of the address.

addr.rtgInd

ROUTE_PC_SN

ROUTE_GLT

ROUTE_PC_SN

Set the routing flag on the outgoing message. Either route by point code and SSN, or route by the global title.

addr.pcInd

0 or 1

0

Set to 1 if a point code is included in an outgoing message.

addr.pc

N/A

None

Translated point code. Entered as a hex number.

addr.ssnInd

0 or 1

0

Set to 1 if a subsystem is included in the outgoing message. If a subsystem is included in the called address of the message, that subsystem is inserted into the message.

addr.ssn

0 - 255

None

Translated subsystem number.

addr.niInd

ADDRIND_INT

ADDRIND_NAT

ADDRIND_NAT

National or international indicator in the outgoing message.

addr.gt.format

0 - 4

0

Only used if the global title is to be replaced (replGt is 1). Specifies the format of the global title.

addr.gt.gt.fn.tType

0 - 255

None

Only used if the global title is to be replaced (replGt is 1), and if required by the global title format.

addr.gt.gt.fn.natAddr

0 - 4

None

Only used if the global title is to be replaced (replGt is 1), and if required by the global title format.

addr.gt.gt.fn.numPlan

0 - 15

None

Only used if the global title is to be replaced (replGt is 1), and if required by the global title format.

addr.gt.addr

N/A

None

Only used if the global title is to be replaced (replGt is 1).


You can specify the content of outgoing messages for global title translations using either of the following methods:

The following example shows the translation settings, where the first three digits of the global title match 847 and ANSI addressing is used:

      gtI            847
      replGt         0
      addr.pres      1
      addr.swType    SCCP_SW_ANS
      addr.rtgInd    ROUTE_PC_SN
      addr.pcInd     1
      addr.pc        1.1.2
      addr.ssnInd    1
      addr.ssn       254
      addr.niInd     ADDRIND_NAT

The outgoing message is routed to point code 1.1.2, subsystem 254, with the routing flag set to route by point code and SSN. The original global title is included in the outgoing message. Since the replGt field is zero (the global title is not replaced), none of the addr.gt fields need to be filled.

The following example shows the translation settings, where the first three digits of the global title match 847 and ANSI addressing is used, and the translation node is at point code 1.1.2, subsystem 254:

      gtI            847
      replGt         0
      addr.pres      1
      addr.swType    SCCP_SW_ANS
      addr.rtgInd    ROUTE_GLT
      addr.pcInd     1
      addr.pc        1.1.2
      addr.ssnInd    1
      addr.ssn       254
      addr.niInd     ADDRIND_NAT

The outgoing message is routed to point code 1.1.2, subsystem 254, with the routing flag set to route by global title. The original global title is included in the outgoing message. The node at 1.1.2 translates the global title. Since the replGt field is zero (the global title is not replaced), none of the addr.gt fields need to be filled.

Refer to Global title translation for more information.