mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-25 14:57:20 +00:00
[host] app: print list of valid capture interfaces
This commit is contained in:
parent
03662f45a7
commit
bfadf0a427
@ -123,6 +123,18 @@ static bool validateCaptureBackend(struct Option * opt, const char ** error)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static StringList getValuesCaptureBackend(struct Option * opt)
|
||||||
|
{
|
||||||
|
StringList sl = stringlist_new(false);
|
||||||
|
if (!sl)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
for (int i = 0; CaptureInterfaces[i]; ++i)
|
||||||
|
stringlist_push(sl, (char *)CaptureInterfaces[i]->shortName);
|
||||||
|
|
||||||
|
return sl;
|
||||||
|
}
|
||||||
|
|
||||||
static struct Option options[] =
|
static struct Option options[] =
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
@ -132,6 +144,7 @@ static struct Option options[] =
|
|||||||
.type = OPTION_TYPE_STRING,
|
.type = OPTION_TYPE_STRING,
|
||||||
.value.x_string = "",
|
.value.x_string = "",
|
||||||
.validator = validateCaptureBackend,
|
.validator = validateCaptureBackend,
|
||||||
|
.getValues = getValuesCaptureBackend
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.module = "app",
|
.module = "app",
|
||||||
|
Loading…
Reference in New Issue
Block a user