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

Chapter 4 161
NetIPC Examples
Example 4
writeln ('initopt for ipccreate failed');
(* add the option for Catch_all Socket : bit 2 *)
flag[1] := 32; (* flag : 01000000000000000000000000000000 *)
flag[2] := 0;
flag[3] := 0;
flag[4] := 0;
addopt ( opt, 0, 144, 4, flag, result16 );
if result16 <> 0 then
writeln ('addopt for ipccreate catch-all failed');
(* add network name *)
net_name := 'direct';
addopt ( opt, 1, 140, 6, net_name, result16 );
if result16 <> 0 then
writeln ('addopt for ipccreate network name failed');
writeln;
writeln('***** IPCCREATE start ');
ipccreate ( 3, X25, , opt, sd_local, result );
if result <> 0 then
writeln ('ipccreate of local socket failed ', result );
(*********************** IPCRECVCN ********************************)
initopt ( opt, 4, result16 );
if result16 <> 0 then
writeln ('initopt for ipcrecvcn failed');
(* Set CUD receive for IPCRECVCN *)
for i := 1 to CUD_MAX do (* clean up CUD *)
cud[i] := 0;
addopt(opt, 0, 5, CUD_MAX, cud, result16);
if result16 <> 0 then
writeln('addopt IPCRECVCN CUD failed ',result16);
(* Set facility_field for IPCRECVCN *)
for i := 1 to 109 do (* clean up SF *)
sf[i] := 0;
addopt(opt, 1, 145, 109, sf, result16);
if result16 <> 0 then
writeln('addopt IPCRECVCN SF failed', result16);
(* add calling node address *)
addopt(opt, 2, 141, 8,cnaddr,result16);
if result16 <> 0 then
writeln('addopt IPCRECVCN calling node address failed', result16);
(* add X25_flags for receive fast select : bit 7 = 1 *)
x25_flags[1] := 0; (* clean up X25_flags *)
x25_flags[2] := 0;
x25_flags[3] := 0;
x25_flags[4] := 0;
addopt(opt, 3, 144, 4,x25_flags,result16);