f-stack/dpdk/lib/net/rte_esp.h

41 lines
642 B
C
Raw Normal View History

2019-06-25 11:12:58 +00:00
/* SPDX-License-Identifier: BSD-3-Clause
* Copyright 2016 Mellanox Technologies, Ltd
2017-04-21 10:43:26 +00:00
*/
#ifndef _RTE_ESP_H_
#define _RTE_ESP_H_
2017-04-21 10:43:26 +00:00
/**
* @file
*
* ESP-related defines
*/
2017-04-21 10:43:26 +00:00
2020-06-18 16:55:50 +00:00
#include <rte_byteorder.h>
2017-04-21 10:43:26 +00:00
#ifdef __cplusplus
extern "C" {
2017-04-21 10:43:26 +00:00
#endif
/**
* ESP Header
*/
2020-06-18 16:55:50 +00:00
struct rte_esp_hdr {
rte_be32_t spi; /**< Security Parameters Index */
rte_be32_t seq; /**< packet sequence number */
2021-02-05 08:48:47 +00:00
} __rte_packed;
2020-06-18 16:55:50 +00:00
/**
* ESP Trailer
*/
struct rte_esp_tail {
uint8_t pad_len; /**< number of pad bytes (0-255) */
uint8_t next_proto; /**< IPv4 or IPv6 or next layer header */
2021-02-05 08:48:47 +00:00
} __rte_packed;
2020-06-18 16:55:50 +00:00
#ifdef __cplusplus
}
#endif
#endif /* RTE_ESP_H_ */