53 ICMP_TYPE_ECHO_REPLY = 0,
54 ICMP_TYPE_DEST_UNREACHABLE = 3,
55 ICMP_TYPE_SOURCE_QUENCH = 4,
56 ICMP_TYPE_REDIRECT = 5,
57 ICMP_TYPE_ECHO_REQUEST = 8,
58 ICMP_TYPE_TIME_EXCEEDED = 11,
59 ICMP_TYPE_PARAM_PROBLEM = 12,
60 ICMP_TYPE_TIMESTAMP_REQUEST = 13,
61 ICMP_TYPE_TIMESTAMP_REPLY = 14,
62 ICMP_TYPE_INFO_REQUEST = 15,
63 ICMP_TYPE_INFO_REPLY = 16,
64 ICMP_TYPE_ADDR_MASK_REQUEST = 17,
65 ICMP_TYPE_ADDR_MASK_REPLY = 18
75 ICMP_CODE_NET_UNREACHABLE = 0,
76 ICMP_CODE_HOST_UNREACHABLE = 1,
77 ICMP_CODE_PROTOCOL_UNREACHABLE = 2,
78 ICMP_CODE_PORT_UNREACHABLE = 3,
79 ICMP_CODE_FRAG_NEEDED_AND_DF_SET = 4,
80 ICMP_CODE_SOURCE_ROUTE_FAILED = 5
90 ICMP_CODE_TTL_EXCEEDED = 0,
91 ICMP_CODE_REASSEMBLY_TIME_EXCEEDED = 1
96#if defined(__CWCC__) || defined(_WIN32)
140} IcmpDestUnreachableMessage;
154} IcmpTimeExceededMessage;
169} IcmpParamProblemMessage;
182 uint16_t sequenceNumber;
188#if defined(__CWCC__) || defined(_WIN32)
193error_t icmpEnableEchoRequests(NetInterface *interface, bool_t enable);
195error_t icmpEnableBroadcastEchoRequests(NetInterface *interface,
198void icmpProcessMessage(NetInterface *interface,
199 const Ipv4PseudoHeader *requestPseudoHeader,
const NetBuffer *buffer,
202void icmpProcessEchoRequest(NetInterface *interface,
203 const Ipv4PseudoHeader *requestPseudoHeader,
const NetBuffer *request,
204 size_t requestOffset);
206error_t icmpSendErrorMessage(NetInterface *interface, uint8_t type,
207 uint8_t code, uint8_t parameter,
const NetBuffer *ipPacket,
208 size_t ipPacketOffset);
210void icmpUpdateInStats(uint8_t type);
211void icmpUpdateOutStats(uint8_t type);
213void icmpDumpMessage(
const IcmpHeader *message);
214void icmpDumpEchoMessage(
const IcmpEchoMessage *message);
215void icmpDumpErrorMessage(
const IcmpErrorMessage *message);
error_t
Error codes.
Definition error.h:43
IcmpType
ICMP message type.
Definition icmp.h:52
IcmpTimeExceededCode
Time Exceeded message codes.
Definition icmp.h:89
IcmpDestUnreachableCode
Destination Unreachable message codes.
Definition icmp.h:74
typedef __packed_struct
ICMP header.
Definition icmp.h:106
Structure describing a buffer that spans multiple chunks.
Definition net_mem.h:89