Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: mbed-TFT-example-NCS36510 mbed-Accelerometer-example-NCS36510 mbed-Accelerometer-example-NCS36510
socket_callback_t Struct Reference
ICMP socket instruction. More...
#include <socket_api.h>
Data Fields | |
uint8_t | event_type |
Socket Callback Event check list below. | |
int8_t | socket_id |
Socket id queue which socket cause call back. | |
int8_t | interface_id |
Network Interface ID where Packet came. | |
uint16_t | d_len |
Data length if event type is SOCKET_DATA. | |
uint8_t | LINK_LQI |
LINK LQI info if interface cuold give. |
Detailed Description
ICMP socket instruction.
ICMP header is comprised of 4 bytes. The first byte is for type, second for code and the last two are for checksum that must always be zero. The stack will calculate the checksum automatically when sending the packet. The payload comes after the header and it can be of any length. It can also be set to 0.
This applies for reading and sending.
ICMP TYPE ICMP Code ICMP Checksum (2 bytes) Payload n bytes -------- -------- -------- -------- -------- -------- ....... ------- 0xXX 0xXX 0x00 0x00 0xXX 0xXX ...... 0xXX
Example data flow for ping:
ICMP echo request with 4-bytes payload (Ping6). 0x80, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03
ICMP echo response for the message above. 0x81, 0x00, 0xXX, 0xXX, 0x00, 0x01, 0x02, 0x03
Socket Callback function structure type.
Definition at line 182 of file socket_api.h.
Field Documentation
uint16_t d_len |
Data length if event type is SOCKET_DATA.
Definition at line 186 of file socket_api.h.
uint8_t event_type |
Socket Callback Event check list below.
Definition at line 183 of file socket_api.h.
int8_t interface_id |
Network Interface ID where Packet came.
Definition at line 185 of file socket_api.h.
uint8_t LINK_LQI |
LINK LQI info if interface cuold give.
Definition at line 187 of file socket_api.h.
int8_t socket_id |
Socket id queue which socket cause call back.
Definition at line 184 of file socket_api.h.
Generated on Tue Jul 12 2022 11:03:19 by
