Add command to list available NIC names.
This commit is contained in:
parent
1f43b11177
commit
3bbbbe52c0
@ -3,7 +3,7 @@ import argparse
|
||||
|
||||
from iottb.subcommands.capture import setup_capture_parser
|
||||
from iottb.subcommands.add_device import setup_init_device_root_parser
|
||||
|
||||
from iottb.utils.tcpdump_utils import list_interfaces
|
||||
|
||||
######################
|
||||
# Argparse setup
|
||||
@ -13,9 +13,17 @@ def setup_argparse():
|
||||
root_parser = argparse.ArgumentParser(prog='iottb')
|
||||
subparsers = root_parser.add_subparsers(title='subcommands', required=True, dest='command')
|
||||
|
||||
# shared options
|
||||
root_parser.add_argument('--verbose', '-v', action='count', default=0)
|
||||
# configure subcommands
|
||||
setup_capture_parser(subparsers)
|
||||
setup_init_device_root_parser(subparsers)
|
||||
|
||||
# Utility to list interfaces directly with iottb instead of relying on external tooling
|
||||
|
||||
interfaces_parser = subparsers.add_parser('list-interfaces', aliases=['li', 'if'])
|
||||
interfaces_parser.set_defaults(func=list_interfaces)
|
||||
|
||||
return root_parser
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user