ExamineIPAddresses()

Syntax

Result = ExamineIPAddresses([Format])
Description
Start examining the available IP addresses on the local computer. NextIPAddress() is used to retrieve each IP.

Parameters

Format (optional) The format of the IP to examine. It can be one of the following value:
  #PB_Network_IPv4: examine IPv4 addresses (default).
  #PB_Network_IPv6: examine IPv6 addresses. Returned addresses needs to be freed with FreeIP() after use.

Return value

Returns nonzero if examining the addresses works and zero if it failed.

Example: IPv4

  InitNetwork()
  If ExamineIPAddresses()
    Repeat
      IP = NextIPAddress()
      If IP
        Debug "IPv4: " + IPString(IP) 
      EndIf
    Until IP = 0
  EndIf

Example: IPv6

  InitNetwork()
  If ExamineIPAddresses(#PB_Network_IPv6)
    Repeat
      IP = NextIPAddress()
      If IP
        Debug "IPv6: " + IPString(IP, #PB_Network_IPv6) 
        FreeIP(IP)                                     
      EndIf
    Until IP = 0
  EndIf

See Also

NextIPAddress()

Supported OS

All

<- EventServer() - Network Index - FreeIP() ->