gtpc2mb7 | C/C++ Language Support User's Guide |
This function sets the mode_name and mode_name_length
characteristics. It overrides the default value set by the
cminit function.
Format
#include <tpfmap.h>
void cmsmn(unsigned char *conversation_ID,
unsigned char *mode_name,
signed int *mode_name_length,
signed int *return_code);
- conversation_ID
- This is a pointer to an 8-byte character array that contains the
conversation ID. This conversation ID must be the ID returned by the
cminit (INITIALIZE) that started this conversation.
- mode_name
- This is a pointer to an array of characters that specifies the new mode
name. This mode name determines the network properties for the session
to be allocated for the conversation.
- mode_name_length
- This is a pointer to a 4-byte field that contains the length of the new
mode name. The value can be from 0-8 bytes. If the value
is 0, the mode name is set to NULL, and the name specified by
mode_name is ignored.
- return_code
- This is a pointer to a 4-byte field where the return code is to be
placed.
Return Codes
The following is a list of return codes that can be returned to the program
that called the cmsmn function. A complete list of the
return codes and their definitions can be found in Table 45.
- CM_OK
- CM_PRODUCT_SPECIFIC_ERROR
- CM_PROGRAM_PARAMETER_CHECK -- Either conversation_ID or
mode_name_length is invalid.
- CM_PROGRAM_STATE_CHECK -- The program is not in initialize
state.
Programming Considerations
- You can execute this function on any I-stream.
- The conversation must be in initialize state.
- The value supplied in conversation_ID must be the conversation ID
returned by the cmaccp or cminit function.
- This function changes the value of the mode_name and
mode_name_length characteristics.
- This function causes no state change.
- If the new mode name is invalid, it is not detected until the ALLOCATE is
attempted.
- If return_code is not CM_OK, the mode_name and
mode_name_length characteristics remain unchanged.
Examples
The following example changes the mode_name and
mode_name_length characteristics.
#include <tpfmap.h>
unsigned char convid[8];
signed int len;
signed int rcode;
.
.
/* set conversation_ID with value returned from initialize */
.
len = 5;
.
cmsmn(convid,"MODE1",&len,&rcode);
. /* normal processing path */
.
.
Related Information