Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

Specify_Local_Port - Setting the TCP/IP port of the local application

&pagelevel(4)&pagelevel

The Specify_Local_Port (CMSLP) call sets the port number of the local application. The call overwrites the value assigned using the Enable_UTM_UPIC call. After the Initialize_Conversation call, this call may no longer be issued.

This function is one of the additional functions of the UPIC carrier system; it is not a component of the CPI-C interface.

UPIC-Local on Unix, Linux and Windows systems:

Connection via UPIC local does not support the Specify_Local_Port call.

Syntax
CMSLP (port_number, return_code)

Parameters

--> port_number

Specifies which port number the local application uses when signing on to the communication system.
Minimum: 1, maximum: 65535

<-- return_code

Result of the function call

Result (return_code)

CM_OK

The call is OK.

CM_CALL_NOT_SUPPORTED

The function is not supported. This return code occurs in UPIC-L and in UPIC-R on BS2000 systems.

On Unix, Linux and Windows systems, this code is always returned with UPIC-L. It indicates to the program that a port number cannot be assigned because UPIC-L does not require this information as a result of the underlying communication system.

The code is only returned with UPIC-R on BS2000 systems in the event that the UPIC library on the BS2000 system is used together with CMX. The CMX communication system used by UPIC-R does not provide any option on BS2000 systems for passing IP addresses for addressing the partner application at the interface. If the UPIC library uses the Socket interface as its communication system, the code is never returned.

CM_PROGRAM_STATE_CHECK

The conversation is not in the “Reset” state.

CM_PRODUCT_SPECIFIC_ERROR

The UPIC instance could not be found.

CM_PROGRAM_PARAMETER_CHECK

The value of port_number is invalid.

State change

The call does not change the state of the conversation.

Note

The local port number is a purely formal value which has no effect whatsoever. Specification of this value is only supported for reasons of compatibility. It should be omitted.

Behavior in the event of errors

CM_PROGRAM_PARAMETER_CHECK

Modify program.

CM_PROGRAM_STATE_CHECK

Modify program.

CM_PRODUCT_SPECIFIC_ERROR

The operating system cannot provide sufficient memory for the internal buffers. Check whether the memory requirements of your program are too high and if necessary reboot your system.

CM_CALL_NOT_SUPPORTED

This is not necessarily an error:

If the application is intended for both UPIC-L and UPIC-R on Unix, Linux and Windows systems this return code just means that the application is linked to a UPIC-L library.The program can take note of this return code and avoid making further calls to set address information.

On BS2000 systems, this return code means that the application is connected to UPIC-R and CMX. The program can remember this return code and then no longer requires the Specify_Local_Port call.

Function declaration: Specify_Local_Port
CM_ENTRY Specify_Local_Port ( CM_INT32 CM_PTR port_number, 
                        CM_RETURN_CODE CM_PTR return_code )