|
Libu2f-emu
0.0.0
Universal 2nd Factor (U2F) Emulation C Library
|
#include <errno.h>#include <stdlib.h>#include "cmd.h"#include "packet.h"#include "time.h"#include "usb.h"
Functions | |
| bool | u2f_emu_vdev_usb_has_response (void *state) |
| Check the precense of a response from the USB transport. More... | |
| size_t | u2f_emu_vdev_usb_get_response (void *state, uint8_t **data) |
| Get the response frim the USB transport. More... | |
| static struct message * | packet_init_handle (struct usb_state *state, const struct packet_init *packet) |
| The packet init handler. More... | |
| static struct message * | packet_cont_handle (struct usb_state *state, const struct packet_cont *packet) |
| The packet cont handler. More... | |
| void | u2f_emu_vdev_usb_process (void *state, const void *packet, size_t size) |
| Process incoming data from an USB HID packet. More... | |
| void | u2f_emu_vdev_usb_state_free (void *state) |
| Free the USB state. More... | |
| int | u2f_emu_vdev_usb_state_init (u2f_emu_vdev *vdev, void **state_ref) |
| Init the USB state. More... | |
Variables | |
| transport_info_t | usb_transport |
| The USB transport. More... | |
|
static |
The packet cont handler.
| state | The usb state. |
| packet | The cont packet. |
|
static |
The packet init handler.
| state | The usb state. |
| packet | The init packet. |
| size_t u2f_emu_vdev_usb_get_response | ( | void * | state, |
| uint8_t ** | data | ||
| ) |
Get the response frim the USB transport.
| state | The USB transport state. |
| data | The data ref buffer to put rhe resonse |
| bool u2f_emu_vdev_usb_has_response | ( | void * | state | ) |
Check the precense of a response from the USB transport.
| state | The USB transport state. |
| void u2f_emu_vdev_usb_process | ( | void * | state, |
| const void * | packet, | ||
| size_t | size | ||
| ) |
Process incoming data from an USB HID packet.
| state | The USB transport state. |
| packet | The USB HID packet. |
| size | The size of the USB HID packet. |
< Invalid command
< Channel is busy
< Invalid command
| void u2f_emu_vdev_usb_state_free | ( | void * | state | ) |
Free the USB state.
| state | The USB transport state. |
| int u2f_emu_vdev_usb_state_init | ( | u2f_emu_vdev * | vdev, |
| void ** | state_ref | ||
| ) |
Init the USB state.
| vdev | The virtual device. |
| state_ref | The USB transport state ref. |
| transport_info_t usb_transport |
The USB transport.
1.8.10