Commit f81e6d9e authored by Pedro Oliveira's avatar Pedro Oliveira

Command to obtain version and update installation instructions

parent 8eca3c59
......@@ -9,21 +9,20 @@ This repository stores the implementation of this protocol. The implementation i
- Linux machine
- Python3 (we have written all code to be compatible with at least Python v3.2)
- pip (to install all dependencies)
- tcpdump
# Installation
You may need sudo permissions, in order to run this protocol. This is required because we use raw sockets to exchange control messages. For this reason, some sockets to work properly need to have super user permissions.
First clone this repository:
`git clone https://github.com/pedrofran12/pim_dm.git`
```
pip3 install pim-dm
```
Then enter in the cloned repository and install the protocol:
`sudo python3 setup.py install`
And that's it :D
# Run PIM-DM protocol
# Run protocol
You may need sudo permissions, in order to run this protocol. This is required because we use raw sockets to exchange control messages. For this reason, some sockets to work properly need to have super user permissions.
To interact with the protocol you need to execute the `pim-dm` command. You may need to specify a command and corresponding arguments:
......
......@@ -9,6 +9,7 @@ import os
import argparse
import traceback
VERSION = "1.0.2"
def client_socket(data_to_send):
# Create a UDS socket
......@@ -96,7 +97,7 @@ def main():
"""
Entry point for PIM-DM
"""
parser = argparse.ArgumentParser(description='PIM-DM protocol')
parser = argparse.ArgumentParser(description='PIM-DM protocol', prog='pim-dm')
group = parser.add_mutually_exclusive_group(required=True)
group.add_argument("-start", "--start", action="store_true", default=False, help="Start PIM")
group.add_argument("-stop", "--stop", action="store_true", default=False, help="Stop PIM")
......@@ -112,6 +113,7 @@ def main():
group.add_argument("-riigmp", "--remove_interface_igmp", nargs=1, metavar='INTERFACE_NAME', help="Remove IGMP interface")
group.add_argument("-v", "--verbose", action="store_true", default=False, help="Verbose (print all debug messages)")
group.add_argument("-t", "--test", nargs=2, metavar=('ROUTER_NAME', 'SERVER_LOG_IP'), help="Tester... send log information to SERVER_LOG_IP. Set the router name to ROUTER_NAME")
group.add_argument("--version", action='version', version='%(prog)s ' + VERSION)
args = parser.parse_args()
#print(parser.parse_args())
......
......@@ -12,7 +12,7 @@ setup(
description="PIM-DM protocol",
long_description=open("README.md", "r").read(),
long_description_content_type="text/markdown",
version="1.0.1",
version="1.0.2",
url="http://github.com/pedrofran12/pim_dm",
author='Pedro Oliveira',
author_email='pedro.francisco.oliveira@tecnico.ulisboa.pt',
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment