DPDK 25.03.0-rc0
rte_icmp.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 1982, 1986, 1990, 1993
3 * The Regents of the University of California.
4 * Copyright(c) 2013 6WIND S.A.
5 * All rights reserved.
6 */
7
8#ifndef _RTE_ICMP_H_
9#define _RTE_ICMP_H_
10
17#include <stdint.h>
18
19#include <rte_byteorder.h>
20
25 uint8_t type;
26 uint8_t code;
27 rte_be16_t checksum;
29
34 struct rte_icmp_base_hdr base;
35 rte_be16_t identifier;
36 rte_be16_t sequence;
38
45 uint8_t icmp_type; /* ICMP packet type. */
46 uint8_t icmp_code; /* ICMP packet code. */
47 rte_be16_t icmp_cksum; /* ICMP packet checksum. */
48 rte_be16_t icmp_ident; /* ICMP packet identifier. */
49 rte_be16_t icmp_seq_nb; /* ICMP packet sequence number. */
51
52/* ICMP packet types */
53#define RTE_ICMP_TYPE_ECHO_REPLY 0
54#define RTE_IP_ICMP_ECHO_REPLY \
55 (RTE_DEPRECATED(RTE_IP_ICMP_ECHO_REPLY) RTE_ICMP_TYPE_ECHO_REPLY)
56#define RTE_ICMP_TYPE_DEST_UNREACHABLE 3
57#define RTE_ICMP_TYPE_REDIRECT 5
58#define RTE_ICMP_TYPE_ECHO_REQUEST 8
59#define RTE_IP_ICMP_ECHO_REQUEST \
60 (RTE_DEPRECATED(RTE_IP_ICMP_ECHO_REQUEST) RTE_ICMP_TYPE_ECHO_REQUEST)
61#define RTE_ICMP_TYPE_TTL_EXCEEDED 11
62#define RTE_ICMP_TYPE_PARAM_PROBLEM 12
63#define RTE_ICMP_TYPE_TIMESTAMP_REQUEST 13
64#define RTE_ICMP_TYPE_TIMESTAMP_REPLY 14
65
66/* Destination Unreachable codes */
67#define RTE_ICMP_CODE_UNREACH_NET 0
68#define RTE_ICMP_CODE_UNREACH_HOST 1
69#define RTE_ICMP_CODE_UNREACH_PROTO 2
70#define RTE_ICMP_CODE_UNREACH_PORT 3
71#define RTE_ICMP_CODE_UNREACH_FRAG 4
72#define RTE_ICMP_CODE_UNREACH_SRC 5
73
74/* Time Exceeded codes */
75#define RTE_ICMP_CODE_TTL_EXCEEDED 0
76#define RTE_ICMP_CODE_TTL_FRAG 1
77
78/* Redirect codes */
79#define RTE_ICMP_CODE_REDIRECT_NET 0
80#define RTE_ICMP_CODE_REDIRECT_HOST 1
81#define RTE_ICMP_CODE_REDIRECT_TOS_NET 2
82#define RTE_ICMP_CODE_REDIRECT_TOS_HOST 3
83
84#define RTE_ICMP6_ECHO_REQUEST 128
85#define RTE_ICMP6_ECHO_REPLY 129
86
87#endif /* RTE_ICMP_H_ */
uint16_t rte_be16_t
#define __rte_packed
Definition: rte_common.h:108