There is a HID gadget driver on Linux which provides emulation of USB
HID devices. This could be very useful for testing the Solo firmware
without actual hardware, using only a Linux box.
This patch adds a command line argument which specifies whether the
existing UDP backing should be used or the new one which reads and
writes to /dev/hidg0.
Testing done:
1. Created HID device with configfs
2. Started "./main -b hidg" as root
3. Successfully executed Webauthn registration and authentication on
the same Linux machine
Closes: #122
udp_server() is being called second time during the simulated run, which
fails due to trying to claim already used port. This patch adds cache to
the udp_server() result.
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>