Commit 28b51ae5 authored by Pedro Oliveira's avatar Pedro Oliveira

Use -li to check if StateRefresh is enabled

parent 1e75e8f6
......@@ -79,7 +79,7 @@ def list_neighbors():
def list_enabled_interfaces():
global interfaces
t = PrettyTable(['Interface', 'IP', 'PIM/IGMP Enabled', 'IGMP State'])
t = PrettyTable(['Interface', 'IP', 'PIM/IGMP Enabled', 'State Refresh Enabled', 'IGMP State'])
for interface in netifaces.interfaces():
try:
# TODO: fix same interface with multiple ips
......@@ -87,11 +87,13 @@ def list_enabled_interfaces():
pim_enabled = interface in interfaces
igmp_enabled = interface in igmp_interfaces
enabled = str(pim_enabled) + "/" + str(igmp_enabled)
state_refresh_enabled = "-"
if pim_enabled:
state_refresh_enabled = interfaces[interface].is_state_refresh_enabled()
igmp_state = "-"
if igmp_enabled:
state = igmp_interfaces[interface].interface_state.print_state()
else:
state = "-"
t.add_row([interface, ip, enabled, state])
igmp_state = igmp_interfaces[interface].interface_state.print_state()
t.add_row([interface, ip, enabled, state_refresh_enabled, igmp_state])
except Exception:
continue
print(t)
......
......@@ -9,7 +9,7 @@ import os
import argparse
import traceback
VERSION = "1.0.4"
VERSION = "1.0.4.1"
def client_socket(data_to_send):
# Create a UDS socket
......
......@@ -13,7 +13,7 @@ setup(
long_description=open("README.md", "r").read(),
long_description_content_type="text/markdown",
keywords="PIM-DM Multicast Routing Protocol Dense-Mode Router RFC3973",
version="1.0.4",
version="1.0.4.1",
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