IP*Works! V9 - Online Help
IP*Works! V9
Questions / Feedback?

ICMPPort Class

Properties   Methods   Events   Configuration Settings   Errors  

The ICMPPort component 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.

Class Name

IPWorks_ICMPPort

Procedural Interface

 ipworks_icmpport_open();
 ipworks_icmpport_close($res);
 ipworks_icmpport_register_callback($res, $id, $function);
 ipworks_icmpport_get_last_error($res);
 ipworks_icmpport_get_last_error_code($res);
 ipworks_icmpport_set($res, $id, $index, $value);
 ipworks_icmpport_get($res, $id, $index);
 ipworks_icmpport_do_config($res, $configurationstring);
 ipworks_icmpport_do_doevents($res);
 ipworks_icmpport_do_send($res, $text);

Remarks

The interface of the class is similar to the interface of IPPort, only much simpler. The class 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 Send method and Text parameter or the DataToSend property. The destination is specified using the RemoteHost property. The class automatically creates an ICMP header containing MessageType, MessageSubType, and a checksum for the message.

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

Inbound data is received through the DataIn event.

The operation of the class 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.

Property List


The following is the full list of the properties of the class with short descriptions. Click on the links for further details.

AcceptDataEnables or disables data reception (the DataIn event).
ActiveEnables or disables sending and receiving of data.
DataToSendA string of data to be sent to the remote host. Write-only property.
DontRouteIf set to True, it forces the socket to send data directly to interface (no routing).
LocalHostThe name of the local host or user-assigned IP interface through which connections are initiated or accepted.
MessageSubTypeThe subtype of the ICMP message (part of the ICMP header).
MessageTypeThe type of the ICMP message (part of the ICMP header).
RemoteHostThe address of the RemoteHost. Domain names are resolved to IP addresses.
TimeoutA timeout for the component.
TimeToLiveThe time to live (TTL) value for the ICMP packets sent by the component.

Method List


The following is the full list of the methods of the class with short descriptions. Click on the links for further details.

ConfigSets or retrieves a configuration setting .
DoEventsProcesses events from the internal message queue.
SendSends data to the remote host.

Event List


The following is the full list of the events fired by the class with short descriptions. Click on the links for further details.

DataInFired when new ICMP messages come in.
ErrorInformation about errors during data delivery.
ReadyToSendFired when the component is ready to send data.

Configuration Settings


The following is a list of configuration settings for the class with short descriptions. Click on the links for further details.

IcmpDllTimeoutThe timeout for the component when using the icmp.dll.
MaxMessageSizeThe maximum length of the messages that can be received.
MulticastTTLThe time to live (TTL) value for multicast ICMP packets sent by the component.
UseConnectionDetermines whether to use a connected socket.
TimeoutInMillisecondsThe timeout is treated as milliseconds.
UseICMPDLLUse the icmp.dll included on Windows Systems.
UseIPHLPDLLUse the iphlpapi.dll included on Windows Systems.
AbsoluteTimeoutDetermines whether timeouts are inactivity timeouts or absolute timeouts.
FirewallDataUsed to send extra data to the firewall.
InBufferSizeThe size in bytes of the incoming queue of the socket.
OutBufferSizeThe size in bytes of the outgoing queue of the socket.
CodePageThe system code page used for Unicode to Multibyte translations.

 
 
Copyright (c) 2018 /n software inc. - All rights reserved.
Build 9.0.6635.0