mirror of
https://github.com/apache/nuttx.git
synced 2026-10-19 12:48:48 +00:00
Networking: First cut at ICMPv6 ping logic
This commit is contained in:
parent
59e24c865f
commit
30f0a942e1
5 changed files with 223 additions and 108 deletions
|
|
@ -175,6 +175,36 @@ struct icmpv6_neighbor_advertise_s
|
|||
#endif
|
||||
};
|
||||
|
||||
/* This the message format for the ICMPv6 Echo Request message */
|
||||
|
||||
struct icmpv6_echo_request_s
|
||||
{
|
||||
uint8_t type; /* Message Type: ICMPv6_ECHO_REQUEST */
|
||||
uint8_t code; /* Further qualifies the ICMP messages */
|
||||
uint16_t chksum; /* Checksum of ICMP header and data */
|
||||
uint16_t id; /* Identifier */
|
||||
uint16_t seqno; /* Sequence Number */
|
||||
uint8_t data[1]; /* Data follows */
|
||||
};
|
||||
|
||||
#define SIZEOF_ICMPV6_ECHO_REQUEST_S(n) \
|
||||
(sizeof(struct icmpv6_echo_request_s) - 1 + (n))
|
||||
|
||||
/* This the message format for the ICMPv6 Echo Reply message */
|
||||
|
||||
struct icmpv6_echo_reply_s
|
||||
{
|
||||
uint8_t type; /* Message Type: ICMPv6_ECHO_REQUEST */
|
||||
uint8_t code; /* Further qualifies the ICMP messages */
|
||||
uint16_t chksum; /* Checksum of ICMP header and data */
|
||||
uint16_t id; /* Identifier */
|
||||
uint16_t seqno; /* Sequence Number */
|
||||
uint8_t data[1]; /* Data follows */
|
||||
};
|
||||
|
||||
#define SIZEOF_ICMPV6_ECHO_REPLY_S(n) \
|
||||
(sizeof(struct icmpv6_echo_reply_s) - 1 + (n))
|
||||
|
||||
/* The structure holding the ICMP statistics that are gathered if
|
||||
* CONFIG_NET_STATISTICS is defined.
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue