ipc_register

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. Following successful execution of this function, an application can start sending and receiving datagram messages or establish logical link communications.

Syntax

int ipc_register (ret_stat, port_index, object_name, maxlnk,
????????????????????????????????????bufsiz)
COR_STATUS *ret_stat;
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.
ret_stat Pointer to status structure. When the function is not successful, ret_stat.err_code contains one of the following values:
IPC_ERR_BUFTOOBIG 103 requested buffer too big
IPC_ERR_MAXLNKVIO 108 max link violation
IPC_ERR_MBXASGN 109 mailbox assignment failed
IPC_ERR_RTRLNKFAI 110 router link attempt failed
IPC_ERR_INTERNDAT 111 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 ret_stat.err_msg and ret_stat.err_code.