Skip to content
Snippets Groups Projects
Commit 8cb8f128 authored by Michael Tüxen's avatar Michael Tüxen
Browse files

Support codes for TIME EXCEEDED ICMP messages.

Sponsored by:	Netflix
parent f28e5fb7
No related branches found
No related tags found
No related merge requests found
......@@ -94,4 +94,8 @@ struct icmpv4 {
#define ICMP_PREC_CUTOFF 15
#define NR_ICMP_UNREACH 15
/* Codes for ICMP_TIME_EXCEEDED */
#define ICMP_TTL_EX 0
#define ICMP_REAS_TIME_EX 1
#endif /* __ICMP_HEADERS_H__ */
......@@ -62,6 +62,13 @@ struct icmp_code_info icmpv4_unreachable_codes[] = {
{ 0, NULL },
};
/* Values for the 'code' byte of an IPv4 ICMP_TIME_EXCEEDED header (RFC 1700). */
struct icmp_code_info icmpv4_time_exceeded_codes[] = {
{ ICMP_TTL_EX, "ttl_exceeded_in_transit" },
{ ICMP_REAS_TIME_EX, "frag_reass_exceeded" },
{ 0, NULL },
};
/* Information about the supported types of ICMPv4 header (RFC 1700). */
struct icmp_type_info icmpv4_types[] = {
{ ICMP_ECHOREPLY, "echo_reply" },
......@@ -69,7 +76,7 @@ struct icmp_type_info icmpv4_types[] = {
{ ICMP_SOURCE_QUENCH, "source_quench" },
{ ICMP_REDIRECT, "redirect" },
{ ICMP_ECHO, "echo_request" },
{ ICMP_TIME_EXCEEDED, "time_exceeded" },
{ ICMP_TIME_EXCEEDED, "time_exceeded", icmpv4_time_exceeded_codes },
{ ICMP_PARAMETERPROB, "parameter_problem" },
{ ICMP_TIMESTAMP, "timestamp_request" },
{ ICMP_TIMESTAMPREPLY, "timestamp_reply" },
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment