Zephyr API Documentation 4.4.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
fido2_transport.h File Reference

FIDO2 transport abstraction API. More...

#include <zephyr/kernel.h>
#include <zephyr/sys/iterable_sections.h>
#include <zephyr/authentication/fido2/fido2_types.h>
#include <stddef.h>
#include <stdint.h>

Go to the source code of this file.

Data Structures

struct  fido2_transport_api
 Transport driver API callbacks. More...
struct  fido2_transport
 A registered FIDO2 transport. More...
#define FIDO2_TRANSPORT_DEFINE(_name, _label, _api)
 Register a FIDO2 transport.
enum  fido2_wire_status { FIDO2_WIRE_STATUS_UP_NEEDED , FIDO2_WIRE_STATUS_PROCESSING , FIDO2_WIRE_STATUS_DONE }
 Transport progress status codes. More...
typedef void(* fido2_transport_recv_cb_t) (const struct fido2_transport *transport, uint32_t cid, const uint8_t *buf, size_t len)
 Callback invoked when a transport receives data from the host.
typedef void(* fido2_transport_cancel_cb_t) (void)
 Callback invoked when a transport receives a cancel command.

Detailed Description

FIDO2 transport abstraction API.

Macro Definition Documentation

◆ FIDO2_TRANSPORT_DEFINE

#define FIDO2_TRANSPORT_DEFINE ( _name,
_label,
_api )
Value:
.name = _label, \
.api = _api, \
}
#define STRUCT_SECTION_ITERABLE(struct_type, varname)
Defines a new element for an iterable section.
Definition iterable_sections.h:242
A registered FIDO2 transport.
Definition fido2_transport.h:111

Register a FIDO2 transport.

Parameters
_nameC identifier for this transport instance.
_labelHuman-readable name string (e.g. "USB_HID").
_apiPointer to the transport's fido2_transport_api.

Typedef Documentation

◆ fido2_transport_cancel_cb_t

typedef void(* fido2_transport_cancel_cb_t) (void)

Callback invoked when a transport receives a cancel command.

◆ fido2_transport_recv_cb_t

typedef void(* fido2_transport_recv_cb_t) (const struct fido2_transport *transport, uint32_t cid, const uint8_t *buf, size_t len)

Callback invoked when a transport receives data from the host.

Executes in the transport's internal work queue thread, not the FIDO2 core thread. Must not block. Implementations should enqueue work and return immediately. Not callable from userspace.

Parameters
transportTransport instance that received the data.
cidTransport channel ID associated with the received message.
bufReceived data payload.
lenLength of the received data in bytes.

Enumeration Type Documentation

◆ fido2_wire_status

Transport progress status codes.

Enumerator
FIDO2_WIRE_STATUS_UP_NEEDED 

The authenticator is waiting for a user presence gesture.

FIDO2_WIRE_STATUS_PROCESSING 

A long-running operation has started (e.g.

crypto, storage).

FIDO2_WIRE_STATUS_DONE 

The operation is complete.