7eca7f7fd0
OVS currently maintains a copy of those headers with the right endianness annotations so that sparse checks can pass. We introduced rte_beXX_t for better readibility in v17.08. Let's make use of them, OVS then only needs to override those rte_beXX_t types by exposing a tweaked rte_byteorder.h header. Other existing dpdk users won't be affected since rte_beXX_t types are mapped to uintXX_t types. Signed-off-by: David Marchand <david.marchand@redhat.com> Acked-by: Olivier Matz <olivier.matz@6wind.com>
45 lines
863 B
C
45 lines
863 B
C
/* 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.
|
|
*/
|
|
|
|
#ifndef _RTE_ICMP_H_
|
|
#define _RTE_ICMP_H_
|
|
|
|
/**
|
|
* @file
|
|
*
|
|
* ICMP-related defines
|
|
*/
|
|
|
|
#include <stdint.h>
|
|
|
|
#include <rte_byteorder.h>
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
/**
|
|
* ICMP Header
|
|
*/
|
|
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. */
|
|
} __attribute__((__packed__));
|
|
|
|
/* ICMP packet types */
|
|
#define RTE_IP_ICMP_ECHO_REPLY 0
|
|
#define RTE_IP_ICMP_ECHO_REQUEST 8
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif /* RTE_ICMP_H_ */
|