#include <stdbool.h>
#include <stdint.h>
#include "message.h"
#include "transaction.h"
#include "transport.h"
#include "u2f-emu.h"
Go to the source code of this file.
size_t u2f_emu_vdev_usb_get_response |
( |
void * |
state, |
|
|
uint8_t ** |
data |
|
) |
| |
Get the response frim the USB transport.
- Parameters
-
state | The USB transport state. |
data | The data ref buffer to put rhe resonse |
- Returns
- The size of the allocated data.
bool u2f_emu_vdev_usb_has_response |
( |
void * |
state | ) |
|
Check the precense of a response from the USB transport.
- Parameters
-
state | The USB transport state. |
- Returns
- Has response: true. Has no response: false.
void u2f_emu_vdev_usb_process |
( |
void * |
state, |
|
|
const void * |
packet, |
|
|
size_t |
size |
|
) |
| |
Process incoming data from an USB HID packet.
- Parameters
-
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.
- Parameters
-
state | The USB transport state. |
int u2f_emu_vdev_usb_state_init |
( |
u2f_emu_vdev * |
vdev, |
|
|
void ** |
state_ref |
|
) |
| |
Init the USB state.
- Parameters
-
vdev | The virtual device. |
state_ref | The USB transport state ref. |
- Returns
- Sucess: 0. Failure: -errno.