ipc_register

Use this subroutine to initialize IPC functions for datagram and logical link communications and register with the IPC router process.

ipc_register must be called prior to using any other communications functions besides ipc_dg_alloc or ipc_dg_free. Following successful execution of this function, an application can start sending and receiving datagram messages or establish logical link communications.

Syntax

int ipc_register ( retstat, port_index, object_name,

                  maxlnk, bufsiz)

COR_STATUS *retstat;

int        *port_index;

char       *object_name;

int        maxlnk;

int        bufsiz;

Input Arguments

object_name

The name under which the process registers. The object_name in combination with the node name defines the physical address of the process. All other processes address the process with this name. Maximum length is 10 characters.

Maxlnk

The maximum number of logical links this process can request. Each datagram port and each logical link connection counts as one link.

Bufsiz

The maximum message size used by this process. ipc_dg_alloc may be used to determine this size. The maximum is MAXMSGSIZ, which is defined in netcom.h.

Output Arguments

port_index

Identifier for port index to be used in datagram functions.

Retstat

Pointer to status structure. When the function is not successful, retstat.err_code contains one of the following values:

 

103

IPC_ERR_BUFTOOBIG - requested buffer too big

 

108

IPC_ERR_MAXLNKVIO 108 - max link violation

 

109

IPC_ERR_MBXASGN - mailbox assignment failed

 

110

IPC_ERR_RTRLNKFAI - router link attempt failed

 

111

IPC_ERR_INTERNDAT - internal data failure

Return Value

Either COR_SUCCESS, COR_WARNING, or COR_FAILURE.

If the function returns anything other than COR_SUCCESS, additional error information can be found in retstat.err_msg and retstat.err_code.

More information

Point Management API general subroutines.