diff --git a/faradayio_cli/faradayio_cli.py b/faradayio_cli/faradayio_cli.py index 96880c7..503c1d0 100644 --- a/faradayio_cli/faradayio_cli.py +++ b/faradayio_cli/faradayio_cli.py @@ -1,6 +1,6 @@ """faradayio-cli.faradayio-cli: provides entry point main().""" -__version__ = "0.0.3" +__version__ = "0.0.4" import argparse import serial @@ -29,8 +29,12 @@ def setupArgparse(): parser.add_argument("id", type=int, help="ID number radio") # Optional arguments + parser.add_argument("-i", "--addr", default="10.0.0.1", + help="Set IP Address of TUN adapter (Farday Radio)") parser.add_argument("-l", "--loopback", action="store_true", help="Use software loopback serial port") + parser.add_argument("-m", "--mtu", default=1500, + help="Set Maximum Transmission Unit (MTU)") parser.add_argument("-p", "--port", default="/dev/ttyUSB0", help="Physical serial port of radio") @@ -96,7 +100,11 @@ def main(): # Setup TUN adapter and start try: - tun = Monitor(serialPort=serialPort, name=tunName, isRunning=isRunning) + tun = Monitor(serialPort=serialPort, + name=tunName, + isRunning=isRunning, + addr=args.addr, + mtu=int(args.mtu)) tun.start() except pytun.Error as error: diff --git a/requirements.txt b/requirements.txt index 84035d4..24f3e59 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,13 @@ attrs==17.4.0 -faradayio==0.0.3 +certifi==2018.1.18 +chardet==3.0.4 +coverage==4.5.1 +coveralls==1.2.0 +docopt==0.6.2 +faradayio==0.0.4 +faradayio-cli==0.0.4 flake8==3.5.0 +idna==2.6 mccabe==0.6.1 pluggy==0.6.0 py==1.5.2 @@ -8,8 +15,12 @@ pycodestyle==2.3.1 pyflakes==1.6.0 pyserial==3.4 pytest==3.4.1 +pytest-cov==2.5.1 python-pytun==2.2.1 +requests==2.18.4 +scapy-python3==0.23 six==1.11.0 sliplib==0.3.0 sphinx-rtd-theme==0.2.4 timeout-decorator==0.4.0 +urllib3==1.22 diff --git a/setup.py b/setup.py index c38ab27..76fbc71 100644 --- a/setup.py +++ b/setup.py @@ -12,8 +12,15 @@ packages=['faradayio_cli'], install_requires=[ 'attrs==17.4.0', - 'faradayio==0.0.3', + 'certifi==2018.1.18', + 'chardet==3.0.4', + 'coverage==4.5.1', + 'coveralls==1.2.0', + 'docopt==0.6.2', + 'faradayio==0.0.4', + 'faradayio-cli==0.0.4', 'flake8==3.5.0', + 'idna==2.6', 'mccabe==0.6.1', 'pluggy==0.6.0', 'py==1.5.2', @@ -21,11 +28,15 @@ 'pyflakes==1.6.0', 'pyserial==3.4', 'pytest==3.4.1', + 'pytest-cov==2.5.1', 'python-pytun==2.2.1', + 'requests==2.18.4', + 'scapy-python3==0.23', 'six==1.11.0', 'sliplib==0.3.0', 'sphinx-rtd-theme==0.2.4', 'timeout-decorator==0.4.0', + 'urllib3==1.22', ], entry_points={ "console_scripts": ['faradayio-cli = faradayio_cli.faradayio_cli:main']