ICMPPort Component

The ICMPPort control is used to facilitate ICMP communications. It can act both as a client and a server and communicate with any number of hosts simultaneously, as well as generate and receive broadcast packets.

(NOTE: The following is a very short description. For more information, please consult the help files that come with the respective package.)


The interface of the control is similar to the interface of IPPort, only much simpler. The control is activated/deactivated by using the Active property. This property enables or disables sends or receives. Data can be sent in the same way as IPPort, using the DataToSend. The destination is specified using the RemoteHost property. Inbound data is received through the DataIn event. The control automatically creates an ICMP header containing MessageType, MessageSubType, and a checksum for the message.

If the UseConnection is set to True, then a local association is created with the remote host. Otherwise, the control can receive datagrams (packets) from any host, and send datagrams to any host. Packets can be broadcasted on the local net by setting the destination to 255.255.255.255.

The operation of the control is almost completely asynchronous. All the calls, except the ones that deal with domain name resolution, operate through Windows messages (no blocking calls). The gain in performance is considerable when compared to using blocking calls.

This control requires a Winsock 1.1 compliant TCP/IP stack. This means that the Winsock stack installed in the system must have a version of at least 1.1. In particular, Windows 95, 98, and NT machines with Winsock 2.0 are fully supported.


   PROPERTIES

AcceptData. Enables or disables data reception (the DataIn event).

Active. Enables or disables sending and receiving of data. Action property.

DataToSend. A string of data to be sent to the remote host. Write-only property.

DontRoute. If set to True, forces the socket to send data directly to interface (no routing).

InBufferSize. The size in bytes of the incoming queue of the socket.

LocalHost. The name of the local host or user-assigned IP interface through which connections are accepted or initiated.

MaxMessageSize. The maximum length of the messages that can be received.

MessageSubType. The subtype of the ICMP message (part of the ICMP header).

MessageType. The type of the ICMP message (part of the ICMP header).

OutBufferSize. The size in bytes of the outgoing queue of the socket.

RemoteHost. The address of the RemoteHost. Domain names are resolved to IP addresses.

SocketHandle. The handle of the main socket used by the control.

TimeToLive. The time to live (TTL) value for the ICMP packets to send.

UseConnection. If set, the control connects to the RemoteHost.

WinsockInfo. Identifying information about the loaded Winsock stack.

WinsockLoaded. Loads and unloads Winsock on demand.

WinsockMaxDatagramSize. Size in bytes of the largest UDP datagram that can be sent or received.

WinsockMaxSockets. Maximum number of sockets available to a single process.

WinsockPath. The path to the Winsock DLL used.

WinsockStatus. The status of the Winsock stack.

   EVENTS

DataIn. Fired when new ICMP messages come in.

Error. Information about errors during data delivery.

ReadyToSend. Fired when the control is ready to send data.


© 1999 devSoft Inc. - All Rights Reserved.
devSoft Inc.,  P.O.Box 13821 , Research Triangle Park, NC 27709 , USA,