ipsec_inbound.h File Reference

IPsec processing of inbound IP traffic. More...

#include "ipsec/ipsec.h"

Go to the source code of this file.

Functions

error_t ipsecProcessInboundIpv4Packet (NetInterface *interface, const Ipv4Header *ipv4Header, const NetBuffer *buffer, size_t offset)
 Inbound IPv4 traffic processing. More...
 
error_t ipsecGetInboundIpv4PacketSelector (const Ipv4Header *ipv4Header, uint8_t nextHeader, const NetBuffer *buffer, size_t offset, IpsecSelector *selector)
 Extract packet's selector from inbound IPv4 packet. More...
 
uint64_t ipsecGetSeqNum (IpsecSadEntry *sa, uint32_t seql)
 Determine the higher-order bits of the sequence number. More...
 

Detailed Description

IPsec processing of inbound IP traffic.

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.

Author
Oryx Embedded SARL (www.oryx-embedded.com)
Version
2.4.4

Definition in file ipsec_inbound.h.

Function Documentation

◆ ipsecGetInboundIpv4PacketSelector()

error_t ipsecGetInboundIpv4PacketSelector ( const Ipv4Header ipv4Header,
uint8_t  nextHeader,
const NetBuffer buffer,
size_t  offset,
IpsecSelector selector 
)

Extract packet's selector from inbound IPv4 packet.

Parameters
[in]ipv4HeaderPointer to the IPv4 header
[in]nextHeaderValue of the next header field
[in]bufferMulti-part buffer containing the IP payload
[in]offsetOffset from the beginning of the buffer
[out]selectorPointer to the IPsec selector
Returns
Error code

Definition at line 119 of file ipsec_inbound.c.

◆ ipsecGetSeqNum()

uint64_t ipsecGetSeqNum ( IpsecSadEntry sa,
uint32_t  seql 
)

Determine the higher-order bits of the sequence number.

Parameters
[in]saPointer to the security association
[in]seqlLower 32 bits of the sequence number extracted from the received packet
Returns
64-bit sequence number

Definition at line 220 of file ipsec_inbound.c.

◆ ipsecProcessInboundIpv4Packet()

error_t ipsecProcessInboundIpv4Packet ( NetInterface interface,
const Ipv4Header ipv4Header,
const NetBuffer buffer,
size_t  offset 
)

Inbound IPv4 traffic processing.

Parameters
[in]interfaceUnderlying network interface
[in]ipv4HeaderPointer to the IPv4 header
[in]bufferMulti-part buffer containing the IP payload
[in]offsetOffset from the beginning of the buffer
Returns
Error code

Definition at line 50 of file ipsec_inbound.c.