Functions | |
SOCKET * | install_icmp_socket (uint16_t size) |
Install an ICMP socket for ping and messages. More... | |
One of the most commonly used mechanism to solve network communication problems is a "Ping". Ping is based on the ICMP protocol and usually available on all TCP/IP implementations. To have the D.SignT TCP/IP stack answer a Ping request you need to install the protocol by calling function
To save program and data memory, it is not necessary to install the ICMP protocol for proper TCP or UDP communication. In some cases a ping may be helpful to fix communication problems, so having this diagnostic tool available may be a good idea at least during the development process.
SOCKET * install_icmp_socket | ( | uint16_t | size | ) |
size | - maximum size of ICMP message to be processed |
The D.SignT TCP/IP stack does not implement the full ICMP protocol (Internet Control Message Protocol). Only "ping" requests are answered, which allows a remote host to "ping" the DSP to verify accessibility.
A "ping" will send random data to the DSP, which, in turn, echoes this data back to the sender. To enable ICMP, i.e. to enable the DSP to be "ping-ed", use function install_icmp_socket().
Parameter size defines the maximum ping data size which can be handled. Internally this buffer is increased to hold the ICMP header and a DSP specific structure alignment too. Thus a ping request of data sizes larger than the specified size may be possible and will not cause buffer overflows.
This buffer, and the associated socket data structure, is allocated from the system heap. It is not freed until the DSP is restarted.