History

icmp: standardize naming of RFC 8335 PROBE constants

The current definitions of constants for PROBE, currently defined only in the net-next kernel branch, are inconsistent, with some beginning with ICMP and others with simply EXT. This patch attempts to standardize the naming conventions of the constants for PROBE before their release into a stable Kernel, and to update the relevant definitions in net/ipv4/icmp.c. Similarly, the definitions for the code field (previously ICMP_EXT_MAL_QUERY, etc) use the same prefixes as the type field. This patch adds _CODE_ to the prefix to clarify the distinction of these constants.

Andreas Roeseler committed 5 years ago

Commit e542d291 parent f89271f2 files · +22 −22Browse files

Showing the changes to include/uapi/linux (1 of 2 files). Show all

Unified · Split

include/uapi/linux/icmp.h+14−14
@@ -70,22 +70,22 @@ · 69 unmodified lines
70#define ICMP_EXC_FRAGTIME 1 /* Fragment Reass time exceeded */70#define ICMP_EXC_FRAGTIME 1 /* Fragment Reass time exceeded */
71 71
72/* Codes for EXT_ECHO (PROBE) */72/* Codes for EXT_ECHO (PROBE) */
73#define ICMP_EXT_ECHO 4273#define ICMP_EXT_ECHO 42
74#define ICMP_EXT_ECHOREPLY 4374#define ICMP_EXT_ECHOREPLY 43
75#define ICMP_EXT_MAL_QUERY 1 /* Malformed Query */75#define ICMP_EXT_CODE_MAL_QUERY 1 /* Malformed Query */
76#define ICMP_EXT_NO_IF 2 /* No such Interface */76#define ICMP_EXT_CODE_NO_IF 2 /* No such Interface */
77#define ICMP_EXT_NO_TABLE_ENT 3 /* No such Table Entry */77#define ICMP_EXT_CODE_NO_TABLE_ENT 3 /* No such Table Entry */
78#define ICMP_EXT_MULT_IFS 4 /* Multiple Interfaces Satisfy Query */78#define ICMP_EXT_CODE_MULT_IFS 4 /* Multiple Interfaces Satisfy Query */
79 79
80/* Constants for EXT_ECHO (PROBE) */80/* Constants for EXT_ECHO (PROBE) */
81#define EXT_ECHOREPLY_ACTIVE (1 << 2)/* active bit in reply message */81#define ICMP_EXT_ECHOREPLY_ACTIVE (1 << 2)/* active bit in reply message */
82#define EXT_ECHOREPLY_IPV4 (1 << 1)/* ipv4 bit in reply message */82#define ICMP_EXT_ECHOREPLY_IPV4 (1 << 1)/* ipv4 bit in reply message */
83#define EXT_ECHOREPLY_IPV6 1 /* ipv6 bit in reply message */83#define ICMP_EXT_ECHOREPLY_IPV6 1 /* ipv6 bit in reply message */
84#define EXT_ECHO_CTYPE_NAME 184#define ICMP_EXT_ECHO_CTYPE_NAME 1
85#define EXT_ECHO_CTYPE_INDEX 285#define ICMP_EXT_ECHO_CTYPE_INDEX 2
86#define EXT_ECHO_CTYPE_ADDR 386#define ICMP_EXT_ECHO_CTYPE_ADDR 3
87#define ICMP_AFI_IP 1 /* Address Family Identifier for ipv4 */87#define ICMP_AFI_IP 1 /* Address Family Identifier for ipv4 */
88#define ICMP_AFI_IP6 2 /* Address Family Identifier for ipv6 */88#define ICMP_AFI_IP6 2 /* Address Family Identifier for ipv6 */
89 89
90struct icmphdr {90struct icmphdr {
91 __u8 type;91 __u8 type;