f-stack/dpdk/lib/librte_net/rte_icmp.h

45 lines
848 B
C
Raw Normal View History

2019-06-25 11:12:58 +00:00
/* SPDX-License-Identifier: BSD-3-Clause
* Copyright(c) 1982, 1986, 1990, 1993
* The Regents of the University of California.
* Copyright(c) 2013 6WIND S.A.
* All rights reserved.
2017-04-21 10:43:26 +00:00
*/
#ifndef _RTE_ICMP_H_
#define _RTE_ICMP_H_
/**
* @file
*
* ICMP-related defines
*/
#include <stdint.h>
2020-06-18 16:55:50 +00:00
#include <rte_byteorder.h>
2017-04-21 10:43:26 +00:00
#ifdef __cplusplus
extern "C" {
#endif
/**
* ICMP Header
*/
2020-06-18 16:55:50 +00:00
struct rte_icmp_hdr {
uint8_t icmp_type; /* ICMP packet type. */
uint8_t icmp_code; /* ICMP packet code. */
rte_be16_t icmp_cksum; /* ICMP packet checksum. */
rte_be16_t icmp_ident; /* ICMP packet identifier. */
rte_be16_t icmp_seq_nb; /* ICMP packet sequence number. */
2021-02-05 08:48:47 +00:00
} __rte_packed;
2017-04-21 10:43:26 +00:00
/* ICMP packet types */
2020-06-18 16:55:50 +00:00
#define RTE_IP_ICMP_ECHO_REPLY 0
#define RTE_IP_ICMP_ECHO_REQUEST 8
2017-04-21 10:43:26 +00:00
#ifdef __cplusplus
}
#endif
#endif /* RTE_ICMP_H_ */