NetIPC 3000/XL Programmer's Reference Manual (5958-8600)

Table Of Contents
96 Chapter3
NetIPC Intrinsics
IPCLOOKUP
protocol
(output)
32-bit integer, by reference. A number identifying
the protocol module with which the socket is associated:
The only protocol available to user processes is: 4 =
TCP.
socketkind
(output)
32-bit integer, by reference. A number which
identifies the socket’s type: 3 = call.
result
(output)
32-bit integer, by reference. The error code
returned; zero if no error.
Description
The IPCLOOKUP intrinsic is used to gain access to a named socket. When
supplied with the socket’s name, it returns a destination descriptor that
the calling process can use in order to connect to and send messages to
that socket. It is important to synchronize the naming and lookup of
sockets so that the naming occurs before the lookup. If these two events
are occurring concurrently, you can repeat the IPCLOOKUP call, checking
the result parameter after each call, until the call is successful. If the
result value is 37 (“NAME NOT FOUND”), the socket has not yet been
given the name. The following Pascal program fragment illustrates this
idea:
socketname := 'RAINBOW';
location := 'SOMEWHERE';
result := 0;
repeat
IPCLOOKUP (socketname, 7, location, 9, ,
destdesc, , , result);
until result<>37;
if result<>0 then ERRORPROCEDURE;
The only required parameters in the IPCLOOKUP intrinsic are
socketname
,
nlen
, and
destdesc
. This intrinsic is option variable.
Condition codes returned by this intrinsic are:
CCE — Succeeded.
CCL — Failed.
CCG — Not returned by this intrinsic.
This intrinsic cannot be called in split stack mode.