IKE message formatting. More...
#include "ipsec/ipsec_misc.h"
#include "ike/ike.h"
#include "ike/ike_fsm.h"
#include "ike/ike_algorithms.h"
#include "ike/ike_message_format.h"
#include "ike/ike_message_encrypt.h"
#include "ike/ike_payload_format.h"
#include "ike/ike_auth.h"
#include "ike/ike_key_exchange.h"
#include "ike/ike_key_material.h"
#include "ike/ike_dh_groups.h"
#include "ike/ike_misc.h"
#include "ike/ike_debug.h"
#include "ah/ah_algorithms.h"
#include "debug.h"
Go to the source code of this file.
Macros | |
#define | TRACE_LEVEL IKE_TRACE_LEVEL |
Detailed Description
IKE message formatting.
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 ike_message_format.c.
Macro Definition Documentation
◆ TRACE_LEVEL
#define TRACE_LEVEL IKE_TRACE_LEVEL |
Definition at line 32 of file ike_message_format.c.
Function Documentation
◆ ikeFormatCreateChildSaRequest()
error_t ikeFormatCreateChildSaRequest | ( | IkeSaEntry * | sa, |
IkeChildSaEntry * | childSa, | ||
uint8_t * | p, | ||
size_t * | length | ||
) |
Format CREATE_CHILD_SA request.
- Parameters
-
[in] sa Pointer to the IKE SA [in] childSa Pointer to the Child SA [out] p Buffer where to format the message [out] length Length of the resulting message, in bytes
- Returns
- Error code
Definition at line 1283 of file ike_message_format.c.
◆ ikeFormatCreateChildSaResponse()
error_t ikeFormatCreateChildSaResponse | ( | IkeSaEntry * | sa, |
IkeChildSaEntry * | childSa, | ||
uint8_t * | p, | ||
size_t * | length | ||
) |
Format CREATE_CHILD_SA response.
- Parameters
-
[in] sa Pointer to the IKE SA [in] childSa Pointer to the Child SA [out] p Buffer where to format the message [out] length Length of the resulting message, in bytes
- Returns
- Error code
Definition at line 1301 of file ike_message_format.c.
◆ ikeFormatErrorResponse()
Format INFORMATIONAL response (outside of an IKE SA)
- Parameters
-
[in] requestHeader Pointer to the IKE header of the request [out] p Buffer where to format the message [out] length Length of the resulting message, in bytes
- Returns
- Error code
Definition at line 1644 of file ike_message_format.c.
◆ ikeFormatIkeAuthRequest()
error_t ikeFormatIkeAuthRequest | ( | IkeSaEntry * | sa, |
uint8_t * | p, | ||
size_t * | length | ||
) |
Format IKE_AUTH request.
- Parameters
-
[in] sa Pointer to the IKE SA [out] p Buffer where to format the message [out] length Length of the resulting message, in bytes
- Returns
- Error code
Definition at line 937 of file ike_message_format.c.
◆ ikeFormatIkeAuthResponse()
error_t ikeFormatIkeAuthResponse | ( | IkeSaEntry * | sa, |
uint8_t * | p, | ||
size_t * | length | ||
) |
Format IKE_AUTH response.
- Parameters
-
[in] sa Pointer to the IKE SA [out] p Buffer where to format the message [out] length Length of the resulting message, in bytes
- Returns
- Error code
Definition at line 1110 of file ike_message_format.c.
◆ ikeFormatIkeSaInitRequest()
error_t ikeFormatIkeSaInitRequest | ( | IkeSaEntry * | sa, |
uint8_t * | p, | ||
size_t * | length | ||
) |
Format IKE_SA_INIT request.
- Parameters
-
[in] sa Pointer to the IKE SA [out] p Buffer where to format the message [out] length Length of the resulting message, in bytes
- Returns
- Error code
Definition at line 700 of file ike_message_format.c.
◆ ikeFormatIkeSaInitResponse()
error_t ikeFormatIkeSaInitResponse | ( | IkeSaEntry * | sa, |
uint8_t * | p, | ||
size_t * | length | ||
) |
Format IKE_SA_INIT response.
- Parameters
-
[in] sa Pointer to the IKE SA [out] p Buffer where to format the message [out] length Length of the resulting message, in bytes
- Returns
- Error code
Definition at line 817 of file ike_message_format.c.
◆ ikeFormatInformationalRequest()
error_t ikeFormatInformationalRequest | ( | IkeSaEntry * | sa, |
uint8_t * | p, | ||
size_t * | length | ||
) |
Format INFORMATIONAL request.
- Parameters
-
[in] sa Pointer to the IKE SA [out] p Buffer where to format the message [out] length Length of the resulting message, in bytes
- Returns
- Error code
Definition at line 1370 of file ike_message_format.c.
◆ ikeFormatInformationalResponse()
error_t ikeFormatInformationalResponse | ( | IkeSaEntry * | sa, |
uint8_t * | p, | ||
size_t * | length | ||
) |
Format INFORMATIONAL response.
- Parameters
-
[in] sa Pointer to the IKE SA [out] p Buffer where to format the message [out] length Length of the resulting message, in bytes
- Returns
- Error code
Definition at line 1467 of file ike_message_format.c.
◆ ikeSendCreateChildSaRequest()
error_t ikeSendCreateChildSaRequest | ( | IkeSaEntry * | sa, |
IkeChildSaEntry * | childSa | ||
) |
Send CREATE_CHILD_SA request.
- Parameters
-
[in] sa Pointer to the IKE SA [in] childSa Pointer to the Child SA
- Returns
- Error code
Definition at line 449 of file ike_message_format.c.
◆ ikeSendCreateChildSaResponse()
error_t ikeSendCreateChildSaResponse | ( | IkeSaEntry * | sa, |
IkeChildSaEntry * | childSa | ||
) |
Send CREATE_CHILD_SA response.
- Parameters
-
[in] sa Pointer to the IKE SA [in] childSa Pointer to the Child SA
- Returns
- Error code
Definition at line 464 of file ike_message_format.c.
◆ ikeSendErrorResponse()
error_t ikeSendErrorResponse | ( | IkeContext * | context, |
uint8_t * | message, | ||
size_t | length | ||
) |
Send INFORMATIONAL response (outside of an IKE SA)
- Parameters
-
[in] context Pointer to the IKE context [in] message Pointer to the received IKE message [in] length Length of the IKE message, in bytes
- Returns
- Error code
Definition at line 650 of file ike_message_format.c.
◆ ikeSendIkeAuthRequest()
error_t ikeSendIkeAuthRequest | ( | IkeSaEntry * | sa | ) |
Send IKE_AUTH request.
- Parameters
-
[in] sa Pointer to the IKE SA
- Returns
- Error code
Definition at line 223 of file ike_message_format.c.
◆ ikeSendIkeAuthResponse()
error_t ikeSendIkeAuthResponse | ( | IkeSaEntry * | sa | ) |
Send IKE_AUTH response.
- Parameters
-
[in] sa Pointer to the IKE SA
- Returns
- Error code
Definition at line 308 of file ike_message_format.c.
◆ ikeSendIkeSaInitRequest()
error_t ikeSendIkeSaInitRequest | ( | IkeSaEntry * | sa | ) |
Send IKE_SA_INIT request.
- Parameters
-
[in] sa Pointer to the IKE SA
- Returns
- Error code
Definition at line 61 of file ike_message_format.c.
◆ ikeSendIkeSaInitResponse()
error_t ikeSendIkeSaInitResponse | ( | IkeSaEntry * | sa | ) |
Send IKE_SA_INIT response.
- Parameters
-
[in] sa Pointer to the IKE SA
- Returns
- Error code
Definition at line 107 of file ike_message_format.c.
◆ ikeSendInformationalRequest()
error_t ikeSendInformationalRequest | ( | IkeSaEntry * | sa | ) |
Send INFORMATIONAL request.
- Parameters
-
[in] sa Pointer to the IKE SA
- Returns
- Error code
Definition at line 510 of file ike_message_format.c.
◆ ikeSendInformationalResponse()
error_t ikeSendInformationalResponse | ( | IkeSaEntry * | sa | ) |
Send INFORMATIONAL response.
- Parameters
-
[in] sa Pointer to the IKE SA
- Returns
- Error code
Definition at line 579 of file ike_message_format.c.