ike_fsm.c File Reference

IKEv2 finite state machine. More...

#include "ipsec/ipsec_misc.h"
#include "ike/ike.h"
#include "ike/ike_fsm.h"
#include "ike/ike_key_exchange.h"
#include "ike/ike_message_format.h"
#include "ike/ike_misc.h"
#include "debug.h"

Go to the source code of this file.

Macros

#define TRACE_LEVEL   IKE_TRACE_LEVEL
 

Functions

void ikeChangeSaState (IkeSaEntry *sa, IkeSaState newState)
 Update IKE SA state. More...
 
void ikeChangeChildSaState (IkeChildSaEntry *childSa, IkeChildSaState newState)
 Update Child SA state. More...
 
void ikeProcessEvents (IkeContext *context)
 IKE event processing. More...
 
error_t ikeProcessSaEvents (IkeSaEntry *sa)
 IKE SA event processing. More...
 
error_t ikeProcessChildSaEvents (IkeChildSaEntry *childSa)
 Child SA event processing. More...
 
error_t ikeProcessSaInitEvent (IkeSaEntry *sa)
 Handle IKE SA creation event. More...
 
error_t ikeProcessSaDpdEvent (IkeSaEntry *sa)
 Handle IKE SA dead peer detection event. More...
 
error_t ikeProcessSaRekeyEvent (IkeSaEntry *sa)
 Handle IKE SA rekeying event. More...
 
error_t ikeProcessSaReauthEvent (IkeSaEntry *sa)
 Handle IKE SA reauthentication event. More...
 
error_t ikeProcessSaDeleteEvent (IkeSaEntry *sa)
 Handle IKE SA deletion event. More...
 
error_t ikeProcessChildSaInitEvent (IkeChildSaEntry *childSa)
 Handle Child SA creation event. More...
 
error_t ikeProcessChildSaRekeyEvent (IkeChildSaEntry *childSa)
 Handle Child SA rekeying event. More...
 
error_t ikeProcessChildSaDeleteEvent (IkeChildSaEntry *childSa)
 Handle Child SA deletion event. More...
 

Detailed Description

IKEv2 finite state machine.

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.0

Definition in file ike_fsm.c.

Macro Definition Documentation

◆ TRACE_LEVEL

#define TRACE_LEVEL   IKE_TRACE_LEVEL

Definition at line 32 of file ike_fsm.c.

Function Documentation

◆ ikeChangeChildSaState()

void ikeChangeChildSaState ( IkeChildSaEntry childSa,
IkeChildSaState  newState 
)

Update Child SA state.

Parameters
[in]childSaPointer to the Child SA
[in]newStateNew Child SA state to switch to

Definition at line 108 of file ike_fsm.c.

◆ ikeChangeSaState()

void ikeChangeSaState ( IkeSaEntry sa,
IkeSaState  newState 
)

Update IKE SA state.

Parameters
[in]saPointer to the IKE SA
[in]newStateNew IKE SA state to switch to

Definition at line 53 of file ike_fsm.c.

◆ ikeProcessChildSaDeleteEvent()

error_t ikeProcessChildSaDeleteEvent ( IkeChildSaEntry childSa)

Handle Child SA deletion event.

Parameters
[in]childSaPointer to the Child SA
Returns
Error code

Definition at line 806 of file ike_fsm.c.

◆ ikeProcessChildSaEvents()

error_t ikeProcessChildSaEvents ( IkeChildSaEntry childSa)

Child SA event processing.

Parameters
[in]childSaPointer to the Child SA
Returns
Error code

Definition at line 335 of file ike_fsm.c.

◆ ikeProcessChildSaInitEvent()

error_t ikeProcessChildSaInitEvent ( IkeChildSaEntry childSa)

Handle Child SA creation event.

Parameters
[in]childSaPointer to the Child SA
Returns
Error code

Definition at line 670 of file ike_fsm.c.

◆ ikeProcessChildSaRekeyEvent()

error_t ikeProcessChildSaRekeyEvent ( IkeChildSaEntry childSa)

Handle Child SA rekeying event.

Parameters
[in]childSaPointer to the Child SA
Returns
Error code

Definition at line 729 of file ike_fsm.c.

◆ ikeProcessEvents()

void ikeProcessEvents ( IkeContext context)

IKE event processing.

Parameters
[in]contextPointer to the IKE context

Definition at line 129 of file ike_fsm.c.

◆ ikeProcessSaDeleteEvent()

error_t ikeProcessSaDeleteEvent ( IkeSaEntry sa)

Handle IKE SA deletion event.

Parameters
[in]saPointer to the IKE SA
Returns
Error code

Definition at line 649 of file ike_fsm.c.

◆ ikeProcessSaDpdEvent()

error_t ikeProcessSaDpdEvent ( IkeSaEntry sa)

Handle IKE SA dead peer detection event.

Parameters
[in]saPointer to the IKE SA
Returns
Error code

Definition at line 416 of file ike_fsm.c.

◆ ikeProcessSaEvents()

error_t ikeProcessSaEvents ( IkeSaEntry sa)

IKE SA event processing.

Parameters
[in]saPointer to the IKE SA
Returns
Error code

Definition at line 226 of file ike_fsm.c.

◆ ikeProcessSaInitEvent()

error_t ikeProcessSaInitEvent ( IkeSaEntry sa)

Handle IKE SA creation event.

Parameters
[in]saPointer to the IKE SA
Returns
Error code

Definition at line 369 of file ike_fsm.c.

◆ ikeProcessSaReauthEvent()

error_t ikeProcessSaReauthEvent ( IkeSaEntry sa)

Handle IKE SA reauthentication event.

Parameters
[in]saPointer to the IKE SA
Returns
Error code

Definition at line 519 of file ike_fsm.c.

◆ ikeProcessSaRekeyEvent()

error_t ikeProcessSaRekeyEvent ( IkeSaEntry sa)

Handle IKE SA rekeying event.

Parameters
[in]saPointer to the IKE SA
Returns
Error code

Definition at line 436 of file ike_fsm.c.