|
Libu2f-emu
0.0.0
Universal 2nd Factor (U2F) Emulation C Library
|

Macros | |
| #define | __unused __attribute__((unused)) |
Typedefs | |
| typedef struct message *(* | cmd_handler_t) (struct usb_state *state, const struct message *request) |
| Commands handler for U2FHID commands processing. More... | |
| typedef struct cmd | cmd_t |
| Command of U2FHID. More... | |
Functions | |
| static struct message * | cmd_ping_handler (struct usb_state *state, const struct message *request) |
| static struct message * | cmd_msg_handler (struct usb_state *state, const struct message *request) |
| The Handler for CMD_MSG. More... | |
| static struct message * | cmd_lock_handler (struct usb_state *state, const struct message *request) |
| The Handler for CMD_LOCK. More... | |
| static struct message * | cmd_init_handler (struct usb_state *state, const struct message *request) |
| static struct message * | cmd_wink_handler (struct usb_state *state, const struct message *request) |
| static struct message * | cmd_sync_handler (struct usb_state *state, const struct message *request) |
| static struct message * | cmd_error_handler (struct usb_state *state, const struct message *request) |
| static cmd_handler_t | cmd_get_handler (uint8_t cmd) |
| Get the command handler for a specific command. More... | |
| const char * | cmd_strerror (int error_nb) |
| Get the command error description. More... | |
| struct message * | cmd_generate_error (uint32_t cid, uint8_t error) |
| Generate an error response. More... | |
| static struct message * | cmd_ping_handler (struct usb_state *state __attribute__((unused)), const struct message *request) |
| The Handler for CMD_PING. More... | |
| static struct message * | cmd_wink_handler (struct usb_state *state __attribute__((unused)), const struct message *request) |
| The Handler for CMD_WINK. More... | |
| static struct message * | cmd_init_handler (struct usb_state *state __attribute__((unused)), const struct message *request) |
| The Handler for CMD_INIT. More... | |
| static struct message * | cmd_sync_handler (struct usb_state *state __attribute__((unused)), const struct message *request) |
| The Handler for CMD_SYNC. More... | |
| static struct message * | cmd_error_handler (struct usb_state *state __attribute__((unused)), const struct message *request __attribute__((unused))) |
| The Handler for CMD_ERROR. More... | |
| struct message * | cmd_process (struct usb_state *state, const struct message *request) |
| Process a command request. More... | |
Variables | |
| static const cmd_t | cmds [] |
| Commands handlers for U2FHID commands processing, depending of the associated command. More... | |
| static const size_t | cmds_nb = sizeof(cmds) / sizeof(cmds[0]) |
| Number of commands. More... | |
| #define __unused __attribute__((unused)) |
Commands handler for U2FHID commands processing.
|
static |
|
static |
The Handler for CMD_ERROR.
| state | The USB transport state. |
| request | The request. |
| struct message* cmd_generate_error | ( | uint32_t | cid, |
| uint8_t | error | ||
| ) |
Generate an error response.
| cid | Channel id. |
| error | The error. |
|
static |
Get the command handler for a specific command.
| cmd | The command. |
|
static |
|
static |
The Handler for CMD_INIT.
| state | The USB transport state. |
| request | The request |
|
static |
The Handler for CMD_LOCK.
| state | The USB transport state. |
| request | The request. |
|
static |
The Handler for CMD_MSG.
| state | The USB transport state. |
| request | The request. |
|
static |
|
static |
The Handler for CMD_PING.
| state | The USB transport state. |
| request | The request. |
Process a command request.
| state | The USB transport state. |
| request | The command request message. |
< Invalid command
| const char* cmd_strerror | ( | int | error_nb | ) |
Get the command error description.
| error_nb | The error number. |
< No error
< Invalid command
< Invalid parameter
< Invalid message length
< Invalide message sequencing
< Message has timed out
< Channel is busy
< Command requires channel lock
< Command sync failed
< Other unspecified error
|
static |
|
static |
The Handler for CMD_SYNC.
| state | The USB transport state. |
| request | The request. |
|
static |
|
static |
The Handler for CMD_WINK.
| state | The USB transport state. |
| request | The request. |
|
static |
Commands handlers for U2FHID commands processing, depending of the associated command.
1.8.10