linux/include/uapi/linux/icmp.h

/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
/*
 * INET		An implementation of the TCP/IP protocol suite for the LINUX
 *		operating system.  INET is implemented using the  BSD Socket
 *		interface as the means of communication with the user level.
 *
 *		Definitions for the ICMP protocol.
 *
 * Version:	@(#)icmp.h	1.0.3	04/28/93
 *
 * Author:	Fred N. van Kempen, <[email protected]>
 *
 *		This program is free software; you can redistribute it and/or
 *		modify it under the terms of the GNU General Public License
 *		as published by the Free Software Foundation; either version
 *		2 of the License, or (at your option) any later version.
 */
#ifndef _UAPI_LINUX_ICMP_H
#define _UAPI_LINUX_ICMP_H

#include <linux/types.h>
#include <asm/byteorder.h>
#include <linux/if.h>
#include <linux/in6.h>

#define ICMP_ECHOREPLY
#define ICMP_DEST_UNREACH
#define ICMP_SOURCE_QUENCH
#define ICMP_REDIRECT
#define ICMP_ECHO
#define ICMP_TIME_EXCEEDED
#define ICMP_PARAMETERPROB
#define ICMP_TIMESTAMP
#define ICMP_TIMESTAMPREPLY
#define ICMP_INFO_REQUEST
#define ICMP_INFO_REPLY
#define ICMP_ADDRESS
#define ICMP_ADDRESSREPLY
#define NR_ICMP_TYPES


/* Codes for UNREACH. */
#define ICMP_NET_UNREACH
#define ICMP_HOST_UNREACH
#define ICMP_PROT_UNREACH
#define ICMP_PORT_UNREACH
#define ICMP_FRAG_NEEDED
#define ICMP_SR_FAILED
#define ICMP_NET_UNKNOWN
#define ICMP_HOST_UNKNOWN
#define ICMP_HOST_ISOLATED
#define ICMP_NET_ANO
#define ICMP_HOST_ANO
#define ICMP_NET_UNR_TOS
#define ICMP_HOST_UNR_TOS
#define ICMP_PKT_FILTERED
#define ICMP_PREC_VIOLATION
#define ICMP_PREC_CUTOFF
#define NR_ICMP_UNREACH

/* Codes for REDIRECT. */
#define ICMP_REDIR_NET
#define ICMP_REDIR_HOST
#define ICMP_REDIR_NETTOS
#define ICMP_REDIR_HOSTTOS

/* Codes for TIME_EXCEEDED. */
#define ICMP_EXC_TTL
#define ICMP_EXC_FRAGTIME

/* Codes for EXT_ECHO (PROBE) */
#define ICMP_EXT_ECHO
#define ICMP_EXT_ECHOREPLY
#define ICMP_EXT_CODE_MAL_QUERY
#define ICMP_EXT_CODE_NO_IF
#define ICMP_EXT_CODE_NO_TABLE_ENT
#define ICMP_EXT_CODE_MULT_IFS

/* Constants for EXT_ECHO (PROBE) */
#define ICMP_EXT_ECHOREPLY_ACTIVE
#define ICMP_EXT_ECHOREPLY_IPV4
#define ICMP_EXT_ECHOREPLY_IPV6
#define ICMP_EXT_ECHO_CTYPE_NAME
#define ICMP_EXT_ECHO_CTYPE_INDEX
#define ICMP_EXT_ECHO_CTYPE_ADDR
#define ICMP_AFI_IP
#define ICMP_AFI_IP6

struct icmphdr {};


/*
 *	constants for (set|get)sockopt
 */

#define ICMP_FILTER

struct icmp_filter {};

/* RFC 4884 extension struct: one per message */
struct icmp_ext_hdr {};

/* RFC 4884 extension object header: one for each object */
struct icmp_extobj_hdr {};

/* RFC 8335: 2.1 Header for c-type 3 payload */
struct icmp_ext_echo_ctype3_hdr {};

/* RFC 8335: 2.1 Interface Identification Object */
struct icmp_ext_echo_iio {};
#endif /* _UAPI_LINUX_ICMP_H */