IPInfo Class
Properties Methods Events Configuration Settings Errors
The IPInfo class is used to resolve host names to host addresses and vice-versa using asynchronous DNS. The class provides access to other TCP/IP database functions as well.
Syntax
class ipworks.IPInfo
Remarks
The IPInfo class operates asynchronously. Requests are posted to the class by setting a property like host_name or host_address and then waiting for the on_request_complete event. The request_id property identifies the request.
Up to 100 simultaneous requests can be queued at any moment. pending_requests shows the number of pending requests, and may also be used to adjust the size of the queue (by dumping a number of the pending requests).
Property List
The following is the full list of the properties of the class with short descriptions. Click on the links for further details.
adapter_broadcast_address | The broadcast address of the adapter. |
adapter_count | The number of adapters in the system. |
adapter_description | The description of the adapter identified by AdapterIndex . |
adapter_device_index | The system index of the adapter identified by AdapterIndex . |
adapter_dhcp_enabled | Shows whether or not the adapter identified by AdapterIndex has DHCP Enabled. |
adapter_dhcp_server | The DHCP server of the adapter identified by AdapterIndex . |
adapter_dns_servers | The DNS server list for the adapter identified by AdapterIndex . |
adapter_gateway | The default gateway of the adapter identified by AdapterIndex . |
adapter_index | Sets the current adapter. |
adapter_ip_address | The IP address of the adapter identified by AdapterIndex . |
adapter_i_pv_6_address | The IPv6 address of the adapter identified by AdapterIndex . |
adapter_i_pv_6_link_local_address | The IPv6 link local address of the adapter identified by AdapterIndex . |
adapter_lease_expires | The expiration date and time of the lease obtained by the adapter identified by AdapterIndex . |
adapter_lease_obtained | The date and time of when the current lease was obtained by the adapter identified by AdapterIndex . |
adapter_name | The name of the adapter identified by AdapterIndex . |
adapter_other_ip_addresses | Other IP addresses leased by the adapter specified by AdapterIndex , if any. |
adapter_physical_address | The physical address of the adapter identified by AdapterIndex . |
adapter_primary_wins_server | The primary WINS server of the adapter identified by AdapterIndex . |
adapter_secondary_wins_server | The secondary WINS server of the adapter identified by AdapterIndex . |
adapter_status | Returns the current status of the adapter. |
adapter_subnet_mask | The subnet of the adapter identified by AdapterIndex . |
adapter_type | The type of adapter identified by AdapterIndex . |
adapter_uses_wins | Shows whether or not the adapter identified by AdapterIndex uses WINS. |
adapter_zone_id | The zone Id of the adapter identified by AdapterIndex . |
arp_proxy | Shows whether the local computer is acting as an ARP proxy. |
dhcp_scope | The DHCP Scope of the DHCP server. |
dns_enabled | Shows whether DNS is enabled on the local computer. |
dns_server | The address of the DNS Server. |
domain_name | The current network domain on which the system resides. |
host_address | An Internet Address in dotted format. When set, it initiates a search for the corresponding host name. |
host_aliases | Other names corresponding to the host with the name HostName. |
host_name | The Domain Name of an Internet host. When set, it initiates a search for the corresponding address(es). |
local_host | The name of the local host. |
node_type | The type of node for the system. |
other_addresses | Other addresses for the host identified by HostName (for multihomed hosts). |
other_dns_servers | Other DNS servers configured for the host machine. |
pending_requests | The number of requests awaiting completion. |
request_id | The handle of the last request. |
routing_enabled | Shows whether routing is enabled on the local computer. |
service_aliases | Other names by which the service specified by ServiceName / ServicePort is known. |
service_name | A name for a service. When set, it initiates a search for the corresponding port number and protocol. |
service_port | A port number for a service. When set, it initiates a search for the corresponding service name and protocol. |
service_protocol | The protocol of the service specified by ServiceName / ServicePort . |
Method List
The following is the full list of the methods of the class with short descriptions. Click on the links for further details.
config | Sets or retrieves a configuration setting. |
dhcp_release | Releases the IP Address of the current adapter specified by AdapterIndex . |
dhcp_renew | Renews the IP Address of the current adapter specified by AdapterIndex . |
display_dns_cache | Displays cached DNS entries. |
do_events | Processes events from the internal message queue. |
flush_dns_cache | Flush the DNS cache. |
get_mac | Returns the MAC address of the network interface at IPAddress . |
reset | Resets the class, stopping all pending requests and refreshing network information. |
resolve_address | Resolves an IP address. |
resolve_name | Resolves a host name. |
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.
on_dns_cache_entry | Fires once for each cached DNS entry. |
on_error | Information about errors during data delivery. |
on_request_complete | Fired after an asynchronous request completes. |
Configuration Settings
The following is a list of configuration settings for the class with short descriptions. Click on the links for further details.
AdapterDADState | Specifies the Duplicate Address Detection state of the IP address of the adapter specified by AdapterIndex. |
AdapterIPv6DADState | Specifies the Duplicate Address Detection state of the IPv6 address of the adapter specified by AdapterIndex. |
AdapterOtherDADStates | Specifies the Duplicate Address Detection states of the IP addresses leased by the adapter specified by AdapterIndex, if any. |
ARPAddress | Specifies the IP Address of the interface to be used for the GetMAC method. |
UseOldApi | If set the class will use the old API to get Adapter information. |
BuildInfo | Information about the product's build. |
CodePage | The system code page used for Unicode to Multibyte translations. |
LicenseInfo | Information about the current license. |
ProcessIdleEvents | Whether the class uses its internal event loop to process events when the main thread is idle. |
SelectWaitMillis | The length of time in milliseconds the class will wait when DoEvents is called if there are no events to process. |
UseInternalSecurityAPI | Tells the class whether or not to use the system security libraries or an internal implementation. |