tfDnsUpdateExecute

Jump to: navigation, search

Table of Contents >> Application Reference >> Dynamic DNS Update


#include <trsocket.h>


int tfDnsUpdateExecute (ttDnsUpdateHandle dnsUpdateHandle);


Function Description

When running DNS in non-blocking mode (see tfDnsInit()), tfDnsUpdateExecute() performs the second half of the send process for the DNS update request. If tfDnsUpdateSend() returns an error code other than TM_EWOULDBLOCK, the send is complete and the return code indicates the result. A return code of TM_EWOULDBLOCK indicates that the send is in progress and requires further processing. In this case, you must call tfDnsUpdateExecute() periodically until it returns a value other than TM_EWOULDBLOCK. A return code of TM_ENOERROR indicates the DNS server successfully applied the requested updates. If you want to know when you need to call tfDnsUpdateExecute(), you can receive event notification by calling tfDnsUpdateSetCallback() to set a callback function.

When the send completes, all the prerequisite conditions and updates (adds and deletes) are cleared from the descriptor. If the send did not end with a fatal error, such as connection reset, you are free to build and send a new request with the same descriptor. You can even revise and resend a request after the DNS server indicated that a prerequisite failed.


Parameters

  • dnsUpdateHandle
    A DNS update descriptor handle returned by tfDnsUpdateOpen().


Returns

  • TM_ENOERROR
    Success. The zone master file has been updated as requested.
  • TM_EWOULDBLOCK
    The update is in progress, call tfDnsUpdateExecute() again after some delay.
  • TM_EINVAL
    Invalid descriptor handle.
  • TM_ETIMEDOUT
    Timed out waiting for a response from the server. See tfDnsSetOption(), options TM_DNS_OPTION_RETRIES and TM_DNS_OPTION_TIMEOUT.
  • TM_ECONNREFUSED
    The server rejected the connection. This usually indicates that the remote host not listening on the port.
  • TM_ESHUTDOWN
    The server closed the connection (TCP only).
  • TM_ECONNRESET
    The server reset the connection (TCP only).
  • TM_DNS_EFORMAT
    The name server was unable to interpret the request due to a format error.
  • TM_DNS_ESERVER
    The name server encountered an internal failure while processing this request, for example an operating system error or a forwarding timeout.
  • TM_DNS_ENXDOMAIN
    Non-existent domain. Some name that ought to exist, does not exist.
  • TM_DNS_ENOT_IMPLEM
    The name server does not support the specified opcode.
  • TM_DNS_EREFUSED
    The name server refuses to perform the specified operation for policy or security reasons.
  • TM_DNS_EYXDOMAIN
    Some name that ought not to exist, does exist.
  • TM_DNS_EYXRRSET
    Some RRset that ought not to exist, does exist.
  • TM_DNS_ENXRRSET
    Some RRset that ought to exist, does not exist.
  • TM_DNS_ENOTAUTH
    The server is not authoritative for the zone named in the Zone Section of the request.
  • TM_DNS_ENOTZONE
    A name used in the Prerequisite or Update Section of the request is not within the zone denoted by the Zone Section.
  • (more)
    Other socket errors are possible. See sendto() and recvfrom() for UDP, or send(), recv() and connect() for TCP.


Table of Contents >> Application Reference >> Dynamic DNS Update