Protocol Types¶
Types shared across the libedhoc API: the protocol enumerations of RFC 9528 (message number, role, method), the byte-sequence view used throughout the interfaces, the context passed to application callbacks, and the EDHOC error reporting types.
include/edhoc/types.h- group EDHOC types
Enums
-
enum edhoc_message¶
EDHOC message number (RFC 9528: 5).
Values:
-
enumerator EDHOC_MESSAGE_1¶
EDHOC message 1.
-
enumerator EDHOC_MESSAGE_2¶
EDHOC message 2.
-
enumerator EDHOC_MESSAGE_3¶
EDHOC message 3.
-
enumerator EDHOC_MESSAGE_4¶
EDHOC message 4.
-
enumerator EDHOC_MESSAGE_1¶
-
enum edhoc_role¶
EDHOC role of the local peer (RFC 9528: 3.1).
Values:
-
enumerator EDHOC_ROLE_INITIATOR¶
The local peer sent message 1.
-
enumerator EDHOC_ROLE_RESPONDER¶
The local peer received message 1.
-
enumerator EDHOC_ROLE_INITIATOR¶
-
enum edhoc_method¶
RFC 9528: 3.2. Method.
Values:
-
enumerator EDHOC_METHOD_0¶
Initiator signature key, Responder signature key.
-
enumerator EDHOC_METHOD_1¶
Initiator signature key, Responder static DH key.
-
enumerator EDHOC_METHOD_2¶
Initiator static DH key, Responder signature key.
-
enumerator EDHOC_METHOD_3¶
Initiator static DH key, Responder static DH key.
-
enumerator EDHOC_METHOD_0¶
-
enum edhoc_error_code¶
EDHOC error code. RFC 9528: 6. Error Handling.
Values:
-
enumerator EDHOC_ERROR_CODE_SUCCESS¶
RFC 9528: 6.1. Success.
-
enumerator EDHOC_ERROR_CODE_UNSPECIFIED_ERROR¶
RFC 9528: 6.2. Unspecified Error.
-
enumerator EDHOC_ERROR_CODE_WRONG_SELECTED_CIPHER_SUITE¶
RFC 9528: 6.3. Wrong Selected Cipher Suite.
-
enumerator EDHOC_ERROR_CODE_UNKNOWN_CREDENTIAL_REFERENCED¶
RFC 9528: 6.4. Unknown Credential Referenced.
-
enumerator EDHOC_ERROR_CODE_SUCCESS¶
-
struct edhoc_buffer¶
- #include <types.h>
Immutable view of a byte sequence.
-
struct edhoc_call_context¶
- #include <types.h>
Context of a call from the library into an application callback.
Valid for the duration of the callback.
Public Members
-
enum edhoc_role role¶
Role of the local peer.
-
enum edhoc_method method¶
Negotiated method.
-
int32_t selected_cipher_suite¶
Selected cipher suite.
-
enum edhoc_message message¶
Message being composed or processed.
-
enum edhoc_role role¶
-
struct edhoc_error_info¶
- #include <types.h>
EDHOC error information. RFC 9528: 6. Error Handling.
Public Members
-
char *text_string¶
Caller-owned buffer for the diagnostic text of EDHOC_ERROR_CODE_UNSPECIFIED_ERROR. Not
const:on processing the library writes the received text into it.
-
int32_t *cipher_suites¶
Caller-owned buffer for the suites of EDHOC_ERROR_CODE_WRONG_SELECTED_CIPHER_SUITE.
-
size_t entries_size¶
Capacity of
text_stringin characters, or ofcipher_suitesin entries.
-
size_t entries_length¶
Valid part of
text_stringorcipher_suites, in the same unit asentries_size(set by the caller on compose, by the library on process).
-
char *text_string¶
-
enum edhoc_message¶