ESP (IP Encapsulating Security Payload) More...
#include "ipsec/ipsec.h"Go to the source code of this file.
Functions | |
| error_t | espProtectOutboundIpv4Packet (IpsecContext *context, IpsecSadEntry *sa, NetInterface *interface, const Ipv4PseudoHeader *pseudoHeader, uint16_t fragId, NetBuffer *buffer, size_t offset, NetTxAncillary *ancillary) |
| Protect an outbound IPv4 packet using ESP. More... | |
| error_t | espProcessInboundIpv4Packet (NetInterface *interface, const Ipv4Header *ipv4Header, const NetBuffer *buffer, size_t offset, NetRxAncillary *ancillary, bool_t udpEncapsulation) |
| Process ESP protected packet. More... | |
| bool_t | espIsUdpEncapsulatedPacket (const NetBuffer *buffer, size_t offset) |
| Determine if a packet uses UDP-encapsulated ESP format. More... | |
| void | espDumpHeader (const EspHeader *espHeader) |
| Dump ESP header for debugging purpose. More... | |
Variables | |
| typedef | __packed_struct |
| ESP header. More... | |
| uint32_t | seqNum |
| uint8_t | payloadData [] |
| EspHeader | |
| uint8_t | nextHeader |
| uint8_t | icv [] |
| EspTrailer | |
Detailed Description
ESP (IP Encapsulating Security Payload)
License
SPDX-License-Identifier: GPL-2.0-or-later
Copyright (C) 2022-2026 Oryx Embedded SARL. All rights reserved.
This file is part of CycloneIPSEC Open.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- Version
- 2.6.6
Definition in file esp.h.
Macro Definition Documentation
◆ ESP_3DES_SUPPORT
◆ ESP_AES_128_SUPPORT
◆ ESP_AES_192_SUPPORT
◆ ESP_AES_256_SUPPORT
◆ ESP_BUFFER_SIZE
◆ ESP_CAMELLIA_128_SUPPORT
◆ ESP_CAMELLIA_192_SUPPORT
◆ ESP_CAMELLIA_256_SUPPORT
◆ ESP_CBC_SUPPORT
◆ ESP_CCM_12_SUPPORT
◆ ESP_CCM_16_SUPPORT
◆ ESP_CCM_8_SUPPORT
◆ ESP_CHACHA20_POLY1305_SUPPORT
◆ ESP_CMAC_SUPPORT
◆ ESP_CTR_SUPPORT
◆ ESP_DES_SUPPORT
◆ ESP_ESN_SUPPORT
◆ ESP_GCM_12_SUPPORT
◆ ESP_GCM_16_SUPPORT
◆ ESP_GCM_8_SUPPORT
◆ ESP_GMAC_SUPPORT
◆ ESP_HMAC_SUPPORT
◆ ESP_IDEA_SUPPORT
◆ ESP_KMAC128_SUPPORT
◆ ESP_KMAC256_SUPPORT
◆ ESP_MAX_DIGEST_SIZE
◆ ESP_MD5_SUPPORT
◆ ESP_NULL_SUPPORT
◆ ESP_SHA1_SUPPORT
◆ ESP_SHA256_SUPPORT
◆ ESP_SHA384_SUPPORT
◆ ESP_SHA512_SUPPORT
◆ ESP_SM3_SUPPORT
◆ ESP_SM4_SUPPORT
◆ ESP_SUPPORT
◆ ESP_UDP_ENCAPS_SUPPORT
Function Documentation
◆ espDumpHeader()
| void espDumpHeader | ( | const EspHeader * | espHeader | ) |
◆ espIsUdpEncapsulatedPacket()
◆ espProcessInboundIpv4Packet()
| error_t espProcessInboundIpv4Packet | ( | NetInterface * | interface, |
| const Ipv4Header * | ipv4Header, | ||
| const NetBuffer * | buffer, | ||
| size_t | offset, | ||
| NetRxAncillary * | ancillary, | ||
| bool_t | udpEncapsulation | ||
| ) |
Process ESP protected packet.
- Parameters
-
[in] interface Underlying network interface [in] ipv4Header Pointer to the IPv4 header [in] buffer Multi-part buffer containing the ESP protected packet [in] offset Offset to the first byte of the ESP header [in] ancillary Additional options passed to the stack along with the packet [in] udpEncapsulation UDP-encapsulated ESP packet
- Returns
- Error code
◆ espProtectOutboundIpv4Packet()
| error_t espProtectOutboundIpv4Packet | ( | IpsecContext * | context, |
| IpsecSadEntry * | sa, | ||
| NetInterface * | interface, | ||
| const Ipv4PseudoHeader * | pseudoHeader, | ||
| uint16_t | fragId, | ||
| NetBuffer * | buffer, | ||
| size_t | offset, | ||
| NetTxAncillary * | ancillary | ||
| ) |
Protect an outbound IPv4 packet using ESP.
- Parameters
-
[in] context Pointer to the IPsec context [in] sa Pointer to the security association [in] interface Underlying network interface [in] pseudoHeader IPv4 pseudo header [in] fragId Fragment identification field [in] buffer Multi-part buffer containing the payload [in] offset Offset to the first byte of the payload [in] ancillary Additional options passed to the stack along with the packet
- Returns
- Error code
Variable Documentation
◆ __packed_struct
| typedef __packed_struct |
