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

Library Interface

NameDescription
Macros
TCPIP_DDNS_CHECKIP_SERVERDefault CheckIP server for determining current IP address
TCPIP_DDNS_TASK_TICK_RATEdynDNS 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_TaskStandard TCP/IP stack module task function.
TCPIP_DDNS_LastIPGetReturns the last known external IP address of the device.
TCPIP_DDNS_LastStatusGetReturns the status of the most recent update.
TCPIP_DDNS_ServiceSetSelects a preconfigured Dynamic DNS service.
TCPIP_DDNS_UpdateForceForces an immediate DDNS update.
Data Types and Constants
DDNS_SERVICESDynamic DNS Services. Must support the DynDNS API (Auxlang) and correspond to ddnsServiceHosts and ddnsServicePorts in DynDNS.c.
DDNS_STATUSStatus message for DynDNS client. GOOD and NOCHG are okay, but ABUSE through 911 are fatal. UNCHANGED through INVALID are locally defined.
DDNS_MODULE_CONFIGThis is type DDNS_MODULE_CONFIG.
DDNSClientGlobal DDNS Configuration parameters
DDNS_POINTERSConfiguration parameters for the Dynamic DNS Client
TCPIP_DNSS_RESOLVE_TYPEDNS query record type.
TCPIP_DNSS_RESULT_OBSOLETEDNS result codes