NetIPC 3000/XL Programmer's Reference Manual (5958-8600)
Table Of Contents
- 1 NetIPC Fundamentals
- 2 Cross-System NetIPC
- 3 NetIPC Intrinsics
- 4 NetIPC Examples
- A IPC Interpreter (IPCINT)
- B Cause and Diagnostic Codes
- C ErrorMessages
- D Migration From PTOP to NetIPC and RPM
- E C Program Language Considerations

166 Chapter4
NetIPC Examples
Example 4
dd: integer; (* destination descriptor *)
dlen: integer; (* data length *)
optlen: integer; (* opt length *)
optioncode: shortint; (* option code *)
flag : packed array[1..4] of byte; (* flag *)
x25_flags: packed array [1..4] of byte; (*x25_flags parameter *)
result: integer; (* back from IPC call *)
result16: shortint; (* back from opt calls *)
i: integer; (* loop counter for messages *)
msg : packed array[1..2000] of byte; (* message for send and receive *)
expect : packed array[1..12] of char; (* expect data *)
adrs: packed array[1..2] of byte; (* socket's address *)
opt: packed array [0..500] of byte; (* options array *)
xchico : packed array [1..50] of bit4; (* chico Dest_net_addre *)
cud: packed array [1..CUD_MAX] of byte; (* CUD *)
data: packed array[1..12] of char; (* receive data *)
readdata : packed array[1..200] of byte; (* readdata for readopt *)
sf : packed array[1..109] of byte; (* 109 bytes of facility_field *)
net_name : packed array[1..8] of char; (* network name *)
fac_name : packed array[1..8] of char; (* facility name *)
(* IPC intrinsics used *)
procedure readopt; intrinsic;
procedure addopt; intrinsic;
procedure initopt; intrinsic;
procedure ipccheck; intrinsic;
procedure ipcconnect; intrinsic;
procedure ipccontrol; intrinsic;
procedure ipccreate; intrinsic;
procedure ipcdest; intrinsic;
procedure ipcerrmsg; intrinsic;
procedure ipcget; intrinsic;
procedure ipcgive; intrinsic;
procedure ipcrecv; intrinsic;
procedure ipcrecvcn; intrinsic;
procedure ipcsend; intrinsic;
procedure ipcshutdown; intrinsic;
(*****************)
(* Program start *)
(*****************)
begin
writeln ('### Program nmipc2 : X25 features test program ### ');
********************* IPCCREATE *************************************)
(* initialize opt array entry *)
initopt ( opt, 1, result16 );
if result16 <> 0 then
writeln('ipccreate initopt failed', result16);
(* add the option for Network Name *)