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

144 Chapter4
NetIPC Examples
Example 2
TYPE
byte = 0..255; { this is one byte long }
shortint = -32768..32767; { this is two bytes long }
CONST
$if 'native_mode'$
DESC_TYPE = 4; { descriptor type for 64b ptr }
DESC_LEN = 12; { length of NM vector descriptor}
$else$
DESC_TYPE = 0; { descriptor type for CM stack }
DESC_LEN = 8; { length of CM vector descriptor}
$endif$
F_VECTORED = 31; { vectored data }
TYPE
flags_type = set of 0..31;
location_type = packed array [1..50] of char;
msg_type = packed array [1..80] of char;
netipc_data_desc = packed record
{ This structure contains a maximum of two data descriptors. }
$if 'native_mode'$
d_desc_type1 : shortint; { type of data desc - use 4 }
d_desc_len1 : shortint; { length in bytes of area 1 }
d_desc_dataptr1 : globalanyptr; { pointer to area 1 }
d_desc_type2 : shortint; { type of d_d - use 4 }
d_desc_len2 : shortint; { length in bytes of area 2 }
d_desc_dataptr2 : globalanyptr; { pointer to area 2 }
$else$
d_desc_type1 : shortint; { type of data desc - use 0 }
d_desc_dst1 : shortint; { dst is 0 for stack }
d_desc_dataptr1 : shortint; { pointer to area 1 }
d_desc_len1 : shortint; { length in bytes of area 1 }
d_desc_type2 : shortint; { type of d_d - use 0 }
d_desc_dst2 : shortint; { dst is 0 for stack }
d_desc_dataptr2 : shortint; { pointer to area 2 }
d_desc_len2 : shortint; { length in bytes of area 2 }
$endif$
end;
CONST
SOCK_ADDR = 32000; { socket's address }
VAR
sd_remote: integer; { remote socket descriptor }
cd_remote: integer; { remote connection descriptor }
dd: integer; { destination descriptor }
dlen: integer; { data length }