3.3.4.76 GetFreeIPAddresses

The GetFreeIPAddresses operation can be used to retrieve the IP addresses that are not present in the IPAM data store and that can potentially map to the specified IP range.

 <wsdl:operation name="GetFreeIPAddresses">
   <wsdl:input wsaw:Action="http://Microsoft.Windows.Ipam/IIpamServer/GetFreeIPAddresses" message="ipam:IIpamServer_GetFreeIPAddresses_InputMessage" />
   <wsdl:output wsaw:Action="http://Microsoft.Windows.Ipam/IIpamServer/GetFreeIPAddressesResponse" message="ipam:IIpamServer_GetFreeIPAddresses_OutputMessage" />
 </wsdl:operation>

Upon receiving the IIpamServer_GetFreeIPAddresses_InputMessage request message, the server performs the following processing steps. Upon successful completion of the following steps, the server MUST respond with the IIpamServer_GetFreeIPAddresses_OutputMessage message. In the event of a failure, an appropriate SOAP fault MUST be sent to the client as specified in section 2.2.2.1:

  1. If the GetFreeIPAddresses.addressFamily is InterNetwork, the rest of the processing is done with the IPv4-specific tables. Otherwise IPv6-specific tables are used for further processing.

  2. Lookup the ADM_IPRangeTable for the row whose RecordId is equal to GetFreeIPAddresses.rangeRecordId.

  3. Call the procedure GetIPRangeFromTable passing the RecordId of the row found as Param_id and addressfamily as Param_addressfamily. Store the result into parentRange.

  4. If parentRange.ManagedByValue is MS DHCP, return NULL.

  5. Lookup the ADM_IPAddressTable for the rows whose RangeRecordId is the same as GetFreeIPAddresses. rangeRecordId. Store these results in mappedIPAddresses.

  6. If mappedIPAddresses exist, then iterate from GetFreeIPAddresses.startIPAddress to GetFreeIPAddresses.endIPAddress and check whether the IP Address is not in mappedIPAddresses. If it is not, add it to the GetFreeIPAddressesResponse.GetFreeIPAddressesResult. Continue the iteration until the number of IP Addresses in the result set is equal to GetFreeIPAddresses.numFreeIPAddresses or GetFreeIPAddresses.endIPAddress is reached.

  7. If mappedIPAddresses do not exist, iterate from GetFreeIPAddresses.startIPAddress to GetFreeIPAddresses.endIPAddress and add the IP Address to the GetFreeIPAddressesResponse.GetFreeIPAddressesResult until the number of IP Addresses in the result set is equal to GetFreeIPAddresses.numFreeIPAddresses or until GetFreeIPAddresses.endIPAddress is reached.