2018-01-29 13:11:24 +00:00
|
|
|
/* SPDX-License-Identifier: BSD-3-Clause
|
2018-03-20 19:20:35 +00:00
|
|
|
* Copyright 2016 Mellanox Technologies, Ltd
|
2017-10-25 15:07:19 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _RTE_ESP_H_
|
|
|
|
#define _RTE_ESP_H_
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @file
|
|
|
|
*
|
|
|
|
* ESP-related defines
|
|
|
|
*/
|
|
|
|
|
2019-01-10 21:06:27 +00:00
|
|
|
#include <rte_byteorder.h>
|
2017-10-25 15:07:19 +00:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/**
|
|
|
|
* ESP Header
|
|
|
|
*/
|
2019-05-21 16:13:06 +00:00
|
|
|
struct rte_esp_hdr {
|
2018-01-11 09:15:58 +00:00
|
|
|
rte_be32_t spi; /**< Security Parameters Index */
|
|
|
|
rte_be32_t seq; /**< packet sequence number */
|
2020-02-09 17:29:23 +00:00
|
|
|
} __rte_packed;
|
2017-10-25 15:07:19 +00:00
|
|
|
|
2019-01-10 21:06:27 +00:00
|
|
|
/**
|
|
|
|
* ESP Trailer
|
|
|
|
*/
|
2019-09-27 11:30:35 +00:00
|
|
|
struct rte_esp_tail {
|
2019-01-10 21:06:27 +00:00
|
|
|
uint8_t pad_len; /**< number of pad bytes (0-255) */
|
|
|
|
uint8_t next_proto; /**< IPv4 or IPv6 or next layer header */
|
2020-02-09 17:29:23 +00:00
|
|
|
} __rte_packed;
|
2019-01-10 21:06:27 +00:00
|
|
|
|
2017-10-25 15:07:19 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif /* RTE_ESP_H_ */
|