3.3.4.59 GetAllResourceRecordsForIPAddress
The GetAllResourceRecordsForIPAddress operation gets a list of DNS resource records related to an IP address.
-
<wsdl:operation name="GetAllResourceRecordsForIPAddress"> <wsdl:input wsaw:Action="http://Microsoft.Windows.Ipam/IIpamServer/GetAllResourceRecordsForIPAddress" message="ipam:IIpamServer_GetAllResourceRecordsForIPAddress_InputMessage" /> <wsdl:output wsaw:Action="http://Microsoft.Windows.Ipam/IIpamServer/GetAllResourceRecordsForIPAddressResponse" message="ipam:IIpamServer_GetAllResourceRecordsForIPAddress_OutputMessage" /> </wsdl:operation>
The protocol client sends an IIpamServer_GetAllResourceRecordsForIPAddress_InputMessage request. The server then performs the following processing steps. When the operation completes successfully, the protocol server MUST respond with IIpamServer_GetAllResourceRecordsForIPAddress_OutputMessage. In the event of a failure, an appropriate SOAP fault MUST be sent to the client as specified in section 2.2.2.1:
The following conditions MUST be met:
Create a temporary variable temp_result of String array and temp_hostnames of type String array. Assure the following conditions are met:
GetAllResourceRecordsForIPAddress.ipAddress is not NULL.
GetAllResourceRecordsForIPAddress.ipAddress.Address is not NULL.
GetAllResourceRecordsForIPAddress.maxLimit is greater than 0.
Iterate through all the rows in ADM_DNSResourceRecordTable and put the RecordId of the rows where RecordType equals A or AAAA and IPAddress equals GetAllResourceRecordsForIPAddress.ipAddress.Address in temp_result. Add RecordName to temp_hostNames if no element of temp_hostNames equals RecordName, until the temp_result.count is less than or equal to GetAllResourceRecordsForIPAddress.maxLimit.
If temp_result.count is less than GetAllResourceRecordsForIPAddress.maxLimit, iterate through all the rows in ADM_DNSResourceRecordTable and put the RecordId of the rows where RecordType equals PTR and RecordName equals GetAllResourceRecordsForIPAddress.ipAddress.Address in temp_result. Add HostName to temp_hostNames if no element of temp_hostNames equals HostName until the temp_result.count is less than or equal to GetAllResourceRecordsForIPAddress.maxLimit.
If temp_result.count is less than GetAllResourceRecordsForIPAddress.maxLimit, iterate through all the rows in ADM_DNSResourceRecordTable and add the RecordId of the rows to temp_result where RecordType is not equal to A, AAAA or PTR and RecordHostName is in temp_hostnames and RecordId is not already in temp_result. Add RecordName to temp_hostNames if no element of temp_hostNames equals RecordName until temp_result.count is less than or equal to GetAllResourceRecordsForIPAddress.maxLimit.
If temp_result.count is less than GetAllResourceRecordsForIPAddress.maxLimit, iterate through all the rows in ADM_DNSResourceRecordTable and put the RecordId of the rows in temp_result where RecordType is not equal to A, AAAA or PTR and RecordHostName is in temp_hostnames and RecordId is not already in temp_result. Add RecordName to temp_hostNames if no element of temp_hostNames equals RecordName, until the temp_result.count is less than or equal to GetAllResourceRecordsForIPAddress.maxLimit.
If temp_result.count is less than GetAllResourceRecordsForIPAddress.maxLimit, iterate through all the rows in ADM_DNSResourceRecordTable and put the RecordId of the rows in temp_result where RecordType is equal to CNAME and RecordHostName is in temp_hostnames and RecordId is not already in temp_result. Add RecordHostName to temp_hostNames if no element of temp_hostNames equals HostName, until the temp_result.count is less than or equal to GetAllResourceRecordsForIPAddress.maxLimit.
If temp_result.count is less than GetAllResourceRecordsForIPAddress.maxLimit, iterate through all the rows in ADM_DNSResourceRecordTable and put RecordId of the rows in temp_result where RecordType is not equal to CNAME and RecordHostName is in temp_hostnames and RecordId is not already in temp_result. Add RecordHostName to temp_hostNames if no element of temp_hostNames equals HostName, until the temp_result.count is less than or equal to GetAllResourceRecordsForIPAddress.maxLimit.
Call the GetDnsResourceRecordByRecordId procedure of ADM_DnsResourceRecordTable with temp_result as the input parameter and send the output as the response.