Libu2f-emu  0.0.0
Universal 2nd Factor (U2F) Emulation C Library
Macros | Functions
counter.h File Reference
#include <stdbool.h>
#include <stdint.h>
#include "u2f-emu-types.h"
Include dependency graph for counter.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define COUNTER_FILENAME   "counter"
 

Functions

bool counter_new_from_dir (const char *pathname, struct u2f_emu_vdev_counter **counter_ref)
 Create a new counter that sync with the counter file inside the setup directory. More...
 
bool counter_new_epthemeral (struct u2f_emu_vdev_counter **counter_ref)
 Create a new ephemeral counter. More...
 
void counter_free (struct u2f_emu_vdev_counter *vdev_counter)
 Release the ressources used by the counter. More...
 

Macro Definition Documentation

#define COUNTER_FILENAME   "counter"

Function Documentation

void counter_free ( struct u2f_emu_vdev_counter vdev_counter)

Release the ressources used by the counter.

Parameters
vdev_counterThe virtual device counter to release.
bool counter_new_epthemeral ( struct u2f_emu_vdev_counter **  counter_ref)

Create a new ephemeral counter.

Parameters
counter_refThe reference to the counter to create.
Returns
Success: true. Failure: false.
bool counter_new_from_dir ( const char *  pathname,
struct u2f_emu_vdev_counter **  counter_ref 
)

Create a new counter that sync with the counter file inside the setup directory.

Parameters
pathnameThe pathname of the setup directory.
counter_refThe reference to the counter to create.
Returns
Success: true. Failure: false.