hid-replay: silent one compiler complain

hid-replay.c:165:2: warning: pointer targets in passing argument 1 of ‘strlen’ differ in signedness [-Wpointer-sign]
  len = strlen(dev->name);
  ^
In file included from hid-replay.c:40:0:
/usr/include/string.h:395:15: note: expected ‘const char *’ but argument is of type ‘__u8 *’
 extern size_t strlen (const char *__s)
               ^

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
hid-recorder: silent some -Wall warnings

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
hid-recorder: silent one valgrind memleak error

filename was allocated in case of an autodetection. Storing it for later
and destroying it at the termination of the program silents valgrind.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
hid-recorder: store device attributes in one struct

We want to record several devices at the same time in one call.
The first step is to group all of the state of a recording in a struct.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
hid-recorder: cleanup the device when Ctrl-C is pressed

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
hid-recorder: fetch_hidraw_information should also take a hid_recorder_device

allows to add fields in the struct and reuse them in
fetch_hidraw_information.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
hid-replay: create a struct hid_replay_device

Will allow to have several devices in the same hid-replay file.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
add list implementation from ccan

licensed under BSD-MIT

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
hid-replay: allow several devices to be described in one file

We are using a tag "D:" which switches from one device to an other.
This is a backward-compatible change which allows to have several
hidraw recording (one per usb interface for instance) in the same file.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
tools: usbmon2hid-replay: convert the script to multi-device handling

Remove the 'nomem' flag because now we can multiplex several devices
in one file. This also removes print_hid_replay() and
print_hid_replay_dev() because nobody uses them anymore.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
tools: capture_usbmon: use a bigger usbmon buffer

For some devices, 256 bytes is not enough. Use 512.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>