The MonQuery procedure is used to obtain status information
or to request TCP/IP to perform certain actions.
Restriction: When you use this function, the
total number of IPv4 IP addresses that can be configured to the TCP/IP
stack is limited to 255 IP addresses. This limitation of 255 IP addresses
applies to all IPv4 IP addresses, including loopback and dynamic VIPA
addresses.
Figure 1. MonQuery example procedure MonQuery
(
QueryRecord: MonQueryRecordType;
Buffer: integer;
BufSize: integer;
var ReturnCode: integer;
var Length: integer
);
external;
- Parameter
- Description
- Buffer
- The address of the buffer to receive
data.
- BufSize
- The size of the buffer.
- ReturnCode
- Indicates success or failure of
the call. Possible return values are:
- OK
- FATALerror
- NOTyetBEGUN
- TCPipSHUTDOWN
- UNIMPLEMENTEDrequest
- UNAUTHORIZEDuser
- SOFTWAREerror
- Length
- The length of the data returned
in the buffer.
- QueryRecord
- Your program sets up a QueryRecord to specify the type of status
information to be retrieved. The MonQueryRecordType is shown in Figure 2.
Figure 2. Monitor query record MonQueryRecordType =
record
case QueryType: MonQueryType of
QUERYhomeONLY: ();
end; { MonQueryRecordType }
The only QueryType values available for customer use is:
- QUERYhomeONLY
- Used to obtain a list of the home Internet addresses (up to 255)
recognized by TCP/IP. Your program sets the Buffer to the address
of a variable of type HomeOnlyListType, and the BufSize to its length.
When MonQuery returns, Length is set to the length of the Buffer that
was used, if ReturnCode is OK. Divide the Length by size of the InternetAddressType
to get the number of the home addresses that are returned.
For a description of Pascal return codes, see Table 1.