1.2.1.9 Dynamic DNS Module
The Dynamic DNS Client module provides a method for updating a dynamic IP address to a public DDNS service. These services can be used to provide DNS hostname mapping to devices that behind routers, firewalls, and/or on networks that dynamically assign IP addresses.
Note that this only solves one of the two problems for communicating to devices on local subnets from the Internet. While Dynamic DNS can help to locate the device, the router or firewall it sits behind must still properly forward the incoming connection request. This generally requires port forwarding to be configured for the router behind which the device is located.
The Dynamic DNS client supports the popular interface used by No-IP (noip.com) and DNS-O-Matic (dnsomatic.com).
Important: The dynamic DNS services stipulate that updates should be made no more frequently than 10 minutes, and only when the IP address has changed. Updates made more often than that are considered abusive, and may eventually cause your account to be disabled. Production devices that get rebooted frequently may need to store the last known IP in non-volatile memory. You also should not enable this module while testing the rest of your application
Abstraction Model
![TCPIP DDNS Abstraction Model](GUID-B3CF31E7-F276-4474-891C-E33F190B69CA-low.png)
Library Interface
Name | Description |
---|---|
Macros | |
TCPIP_DDNS_CHECKIP_SERVER | Default CheckIP server for determining current IP address |
TCPIP_DDNS_TASK_TICK_RATE | dynDNS task rate, ms The default value is hundreds of milliseconds. The lower the rate (higher the frequency) the higher the module priority and higher module performance can be obtained The value cannot be lower than the TCPIP_STACK_TICK_RATE. |
Functions | |
TCPIP_DDNS_Task | Standard TCP/IP stack module task function. |
TCPIP_DDNS_LastIPGet | Returns the last known external IP address of the device. |
TCPIP_DDNS_LastStatusGet | Returns the status of the most recent update. |
TCPIP_DDNS_ServiceSet | Selects a preconfigured Dynamic DNS service. |
TCPIP_DDNS_UpdateForce | Forces an immediate DDNS update. |
Data Types and Constants | |
DDNS_SERVICES | Dynamic DNS Services. Must support the DynDNS API (Auxlang) and correspond to ddnsServiceHosts and ddnsServicePorts in DynDNS.c. |
DDNS_STATUS | Status message for DynDNS client. GOOD and NOCHG are okay, but ABUSE through 911 are fatal. UNCHANGED through INVALID are locally defined. |
DDNS_MODULE_CONFIG | This is type DDNS_MODULE_CONFIG. |
DDNSClient | Global DDNS Configuration parameters |
DDNS_POINTERS | Configuration parameters for the Dynamic DNS Client |
TCPIP_DNSS_RESOLVE_TYPE | DNS query record type. |
TCPIP_DNSS_RESULT_OBSOLETE | DNS result codes |