Skip to content

Commit

Permalink
support having different processes manipulating different VRFs
Browse files Browse the repository at this point in the history
  • Loading branch information
pedrofran12 committed Jun 26, 2020
1 parent b4df366 commit b1132fe
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 11 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Additionally, IGMPv2 and MLDv1 are implemented alongside with HPIM-DM to detect

# Documents detailing this work

- [The HPIM Multicast Routing Protocol - Full High Level Description](https://arxiv.org/abs/2002.06635)
- [The HPIM-DM Multicast Routing Protocol - Full High Level Description](https://arxiv.org/abs/2002.06635)
- [HPIM-DM state machines](https://github.com/pedrofran12/hpim_dm/tree/master/docs/HPIMStateMachines.pdf)
- [Python implementation of IGMPv2, PIM-DM and HPIM-DM](https://github.com/pedrofran12/hpim_dm/tree/master/docs/PythonImplementations.pdf)
- [Test to Python implementation of IGMPv2, PIM-DM, and HPIM-DM](https://github.com/pedrofran12/hpim_dm/tree/master/docs/PythonTests.pdf)
Expand Down
2 changes: 1 addition & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# Documents detailing this work

- [The HPIM Multicast Routing Protocol - Full High Level Description](https://arxiv.org/abs/2002.06635)
- [The HPIM-DM Multicast Routing Protocol - Full High Level Description](https://arxiv.org/abs/2002.06635)
- [HPIM-DM state machines](https://github.com/pedrofran12/hpim_dm/tree/master/docs/HPIMStateMachines.pdf)
- [Python implementation of IGMPv2, PIM-DM and HPIM-DM](https://github.com/pedrofran12/hpim_dm/tree/master/docs/PythonImplementations.pdf)
- [Test to Python implementation of IGMPv2, PIM-DM, and HPIM-DM](https://github.com/pedrofran12/hpim_dm/tree/master/docs/PythonTests.pdf)
Expand Down
10 changes: 5 additions & 5 deletions hpimdm/Run.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from hpimdm.daemon.Daemon import Daemon
from hpimdm import Main

VERSION = "1.3.3.1"
VERSION = "1.3.3.2"


def client_socket(data_to_send):
Expand All @@ -22,7 +22,7 @@ def client_socket(data_to_send):
sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)

# Connect the socket to the port where the server is listening
server_address = '/tmp/hpim_uds_socket'
server_address = '/tmp/hpim_uds_socket' + str(hpim_globals.MULTICAST_TABLE_ID)
#print('connecting to %s' % server_address)
try:
sock.connect(server_address)
Expand All @@ -43,7 +43,7 @@ def run(self):
Daemon process will run this method until the daemon process explicitly is stopped
"""
Main.main()
server_address = '/tmp/hpim_uds_socket'
server_address = '/tmp/hpim_uds_socket' + str(hpim_globals.MULTICAST_TABLE_ID)

# Make sure the socket does not already exist
try:
Expand Down Expand Up @@ -204,7 +204,7 @@ def main():
if os.geteuid() != 0:
sys.exit('HPIM-DM must be run as root!')

daemon = MyDaemon('/tmp/Daemon-hpim.pid')
daemon = MyDaemon('/tmp/Daemon-hpim' + str(hpim_globals.MULTICAST_TABLE_ID) + '.pid')
if args.start:
print("start")
daemon.start()
Expand All @@ -217,7 +217,7 @@ def main():
daemon.restart()
sys.exit(0)
elif args.verbose:
os.system("tail -f /var/log/hpimdm/stdout")
os.system("tail -f /var/log/hpimdm/stdout" + str(hpim_globals.MULTICAST_TABLE_ID))
sys.exit(0)
elif args.multicast_routes:
if args.ipv4 or not args.ipv6:
Expand Down
5 changes: 3 additions & 2 deletions hpimdm/daemon/Daemon.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import time
import atexit
import signal
from hpimdm.tree import hpim_globals


class Daemon:
Expand Down Expand Up @@ -48,8 +49,8 @@ def daemonize(self):
sys.stdout.flush()
sys.stderr.flush()
si = open(os.devnull, 'r')
so = open('stdout', 'a+')
se = open('stderror', 'a+')
so = open('stdout' + str(hpim_globals.MULTICAST_TABLE_ID), 'a+')
se = open('stderror' + str(hpim_globals.MULTICAST_TABLE_ID), 'a+')

os.dup2(si.fileno(), sys.stdin.fileno())
os.dup2(so.fileno(), sys.stdout.fileno())
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
description="HPIM-DM protocol",
long_description=open("README.md", "r").read(),
long_description_content_type="text/markdown",
keywords="HPIM-DM Multicast Routing Protocol Dense-Mode Router IPv4 IPv6",
version="1.3.3.1",
keywords="HPIM-DM Multicast Routing Protocol HPIM Dense-Mode Router IPv4 IPv6",
version="1.3.3.2",
url="http://github.com/pedrofran12/hpim_dm",
author="Pedro Oliveira",
author_email="pedro.francisco.oliveira@tecnico.ulisboa.pt",
Expand Down

0 comments on commit b1132fe

Please sign in to comment.