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_addressThe broadcast address of the adapter.
adapter_countThe number of adapters in the system.
adapter_descriptionThe description of the adapter identified by AdapterIndex .
adapter_device_indexThe system index of the adapter identified by AdapterIndex .
adapter_dhcp_enabledShows whether or not the adapter identified by AdapterIndex has DHCP Enabled.
adapter_dhcp_serverThe DHCP server of the adapter identified by AdapterIndex .
adapter_dns_serversThe DNS server list for the adapter identified by AdapterIndex .
adapter_gatewayThe default gateway of the adapter identified by AdapterIndex .
adapter_indexSets the current adapter.
adapter_ip_addressThe IP address of the adapter identified by AdapterIndex .
adapter_i_pv_6_addressThe IPv6 address of the adapter identified by AdapterIndex .
adapter_i_pv_6_link_local_addressThe IPv6 link local address of the adapter identified by AdapterIndex .
adapter_lease_expiresThe expiration date and time of the lease obtained by the adapter identified by AdapterIndex .
adapter_lease_obtainedThe date and time of when the current lease was obtained by the adapter identified by AdapterIndex .
adapter_nameThe name of the adapter identified by AdapterIndex .
adapter_other_ip_addressesOther IP addresses leased by the adapter specified by AdapterIndex , if any.
adapter_physical_addressThe physical address of the adapter identified by AdapterIndex .
adapter_primary_wins_serverThe primary WINS server of the adapter identified by AdapterIndex .
adapter_secondary_wins_serverThe secondary WINS server of the adapter identified by AdapterIndex .
adapter_statusReturns the current status of the adapter.
adapter_subnet_maskThe subnet of the adapter identified by AdapterIndex .
adapter_typeThe type of adapter identified by AdapterIndex .
adapter_uses_winsShows whether or not the adapter identified by AdapterIndex uses WINS.
adapter_zone_idThe zone Id of the adapter identified by AdapterIndex .
arp_proxyShows whether the local computer is acting as an ARP proxy.
dhcp_scopeThe DHCP Scope of the DHCP server.
dns_enabledShows whether DNS is enabled on the local computer.
dns_serverThe address of the DNS Server.
domain_nameThe current network domain on which the system resides.
host_addressAn Internet Address in dotted format. When set, it initiates a search for the corresponding host name.
host_aliasesOther names corresponding to the host with the name HostName.
host_nameThe Domain Name of an Internet host. When set, it initiates a search for the corresponding address(es).
local_hostThe name of the local host.
node_typeThe type of node for the system.
other_addressesOther addresses for the host identified by HostName (for multihomed hosts).
other_dns_serversOther DNS servers configured for the host machine.
pending_requestsThe number of requests awaiting completion.
request_idThe handle of the last request.
routing_enabledShows whether routing is enabled on the local computer.
service_aliasesOther names by which the service specified by ServiceName / ServicePort is known.
service_nameA name for a service. When set, it initiates a search for the corresponding port number and protocol.
service_portA port number for a service. When set, it initiates a search for the corresponding service name and protocol.
service_protocolThe 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.

configSets or retrieves a configuration setting.
dhcp_releaseReleases the IP Address of the current adapter specified by AdapterIndex .
dhcp_renewRenews the IP Address of the current adapter specified by AdapterIndex .
display_dns_cacheDisplays cached DNS entries.
do_eventsProcesses events from the internal message queue.
flush_dns_cacheFlush the DNS cache.
get_macReturns the MAC address of the network interface at IPAddress .
resetResets the class, stopping all pending requests and refreshing network information.
resolve_addressResolves an IP address.
resolve_nameResolves 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_entryFires once for each cached DNS entry.
on_errorInformation about errors during data delivery.
on_request_completeFired 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.

AdapterDADStateSpecifies the Duplicate Address Detection state of the IP address of the adapter specified by AdapterIndex.
AdapterIPv6DADStateSpecifies the Duplicate Address Detection state of the IPv6 address of the adapter specified by AdapterIndex.
AdapterOtherDADStatesSpecifies the Duplicate Address Detection states of the IP addresses leased by the adapter specified by AdapterIndex, if any.
ARPAddressSpecifies the IP Address of the interface to be used for the GetMAC method.
UseOldApiIf set the class will use the old API to get Adapter information.
BuildInfoInformation about the product's build.
CodePageThe system code page used for Unicode to Multibyte translations.
LicenseInfoInformation about the current license.
ProcessIdleEventsWhether the class uses its internal event loop to process events when the main thread is idle.
SelectWaitMillisThe length of time in milliseconds the class will wait when DoEvents is called if there are no events to process.
UseInternalSecurityAPITells the class whether or not to use the system security libraries or an internal implementation.

Copyright (c) 2022 /n software inc. - All rights reserved.
IPWorks 2020 Python Edition - Version 20.0 [Build 8307]