AH (IP Authentication Header) More...
#include "ipsec/ipsec.h"
Go to the source code of this file.
Macros | |
#define | AH_SUPPORT DISABLED |
#define | AH_ESN_SUPPORT ENABLED |
#define | AH_CMAC_SUPPORT DISABLED |
#define | AH_HMAC_SUPPORT ENABLED |
#define | AH_AES_128_SUPPORT DISABLED |
#define | AH_MD5_SUPPORT DISABLED |
#define | AH_SHA1_SUPPORT ENABLED |
#define | AH_SHA256_SUPPORT ENABLED |
#define | AH_SHA384_SUPPORT ENABLED |
#define | AH_SHA512_SUPPORT ENABLED |
#define | AH_MAX_ICV_SIZE 32 |
#define | AH_MAX_OVERHEAD (sizeof(AhHeader) + AH_MAX_ICV_SIZE) |
Functions | |
error_t | ipv4ProcessAhHeader (NetInterface *interface, const Ipv4Header *ipv4Header, const NetBuffer *buffer, size_t offset, NetRxAncillary *ancillary) |
Process AH protected packet. More... | |
error_t | ahGenerateIcv (IpsecSadEntry *sa, const Ipv4Header *ipv4Header, AhHeader *ahHeader, const NetBuffer *buffer, size_t offset) |
ICV generation. More... | |
error_t | ahVerifyIcv (IpsecSadEntry *sa, const Ipv4Header *ipv4Header, const AhHeader *ahHeader, const NetBuffer *buffer, size_t offset) |
ICV verification. More... | |
void | ahProcessMutableIpv4Options (Ipv4Header *header) |
Zeroize mutable IPv4 options. More... | |
void | ahDumpHeader (const AhHeader *ahHeader) |
Dump AH header for debugging purpose. More... | |
Variables | |
typedef | __packed_struct |
AH header. More... | |
uint8_t | payloadLen |
uint16_t | reserved |
uint32_t | spi |
uint32_t | seqNum |
uint8_t | icv [] |
AhHeader | |
Detailed Description
AH (IP Authentication Header)
License
SPDX-License-Identifier: GPL-2.0-or-later
Copyright (C) 2022-2024 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.4.4
Definition in file ah.h.
Macro Definition Documentation
◆ AH_AES_128_SUPPORT
◆ AH_CMAC_SUPPORT
◆ AH_ESN_SUPPORT
◆ AH_HMAC_SUPPORT
◆ AH_MAX_ICV_SIZE
◆ AH_MAX_OVERHEAD
#define AH_MAX_OVERHEAD (sizeof(AhHeader) + AH_MAX_ICV_SIZE) |
◆ AH_MD5_SUPPORT
◆ AH_SHA1_SUPPORT
◆ AH_SHA256_SUPPORT
◆ AH_SHA384_SUPPORT
◆ AH_SHA512_SUPPORT
◆ AH_SUPPORT
Function Documentation
◆ ahDumpHeader()
void ahDumpHeader | ( | const AhHeader * | ahHeader | ) |
◆ ahGenerateIcv()
error_t ahGenerateIcv | ( | IpsecSadEntry * | sa, |
const Ipv4Header * | ipv4Header, | ||
AhHeader * | ahHeader, | ||
const NetBuffer * | buffer, | ||
size_t | offset | ||
) |
◆ ahProcessMutableIpv4Options()
void ahProcessMutableIpv4Options | ( | Ipv4Header * | header | ) |
◆ ahVerifyIcv()
error_t ahVerifyIcv | ( | IpsecSadEntry * | sa, |
const Ipv4Header * | ipv4Header, | ||
const AhHeader * | ahHeader, | ||
const NetBuffer * | buffer, | ||
size_t | offset | ||
) |
◆ ipv4ProcessAhHeader()
error_t ipv4ProcessAhHeader | ( | NetInterface * | interface, |
const Ipv4Header * | ipv4Header, | ||
const NetBuffer * | buffer, | ||
size_t | offset, | ||
NetRxAncillary * | ancillary | ||
) |
Process AH protected packet.
- Parameters
-
[in] interface Underlying network interface [in] ipv4Header Pointer to the IPv4 header [in] buffer Multi-part buffer containing the AH protected packet [in] offset Offset to the first byte of the AH header [in] ancillary Additional options passed to the stack along with the packet
- Returns
- Error code
Variable Documentation
◆ __packed_struct
typedef __packed_struct |