Skip to content
Snippets Groups Projects
Commit 131ebca7 authored by NGUYEN Do Duc Anh's avatar NGUYEN Do Duc Anh
Browse files

add passing node id

parent 6d629d07
No related branches found
No related tags found
No related merge requests found
......@@ -10,7 +10,7 @@ MARK_TO_INTERFACE = {}
for index in range(MIN_INTER_NUMBER, MAX_INTER_NUMBER):
MARK_TO_INTERFACE[index] = name_interface + str(index)
my_id = 1
my_id = int(sys.argv[1])
def process_packet(new_packet):
......
......@@ -2,8 +2,8 @@ import socket, struct, threading
import math, queue
import time
from scapy.all import sendp, sniff, Raw, get_if_hwaddr
import subprocess, netifaces, sys
from scapy.layers.l2 import Ether
import subprocess, netifaces, sys
# Configuration
LISTEN_PORT = 12346 # Specify the port number to listen on
......@@ -239,7 +239,7 @@ def proceed_simple_VC():
if node.state == State.DECIDED_IN_VC:
subprocess.Popen([sys.executable, '/home/node/Desktop/gns3_unikernel_testbed/ubuntu_base/opportunistic_monitor.py'])
elif node.state == State.DECIDED_NOT_VC:
subprocess.Popen([sys.executable, '/home/node/Desktop/gns3_unikernel_testbed/ubuntu_base/opportunistic_node.py'])
subprocess.Popen([sys.executable, '/home/node/Desktop/gns3_unikernel_testbed/ubuntu_base/opportunistic_node.py', str(node.myid)])
else:
print("Error I cannot decide!!")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment