Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
pim_dm
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
pim_dm
Commits
28b51ae5
Commit
28b51ae5
authored
Mar 22, 2020
by
Pedro Oliveira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use -li to check if StateRefresh is enabled
parent
1e75e8f6
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
7 deletions
+9
-7
pimdm/Main.py
pimdm/Main.py
+7
-5
pimdm/Run.py
pimdm/Run.py
+1
-1
setup.py
setup.py
+1
-1
No files found.
pimdm/Main.py
View file @
28b51ae5
...
@@ -79,7 +79,7 @@ def list_neighbors():
...
@@ -79,7 +79,7 @@ def list_neighbors():
def
list_enabled_interfaces
():
def
list_enabled_interfaces
():
global
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
():
for
interface
in
netifaces
.
interfaces
():
try
:
try
:
# TODO: fix same interface with multiple ips
# TODO: fix same interface with multiple ips
...
@@ -87,11 +87,13 @@ def list_enabled_interfaces():
...
@@ -87,11 +87,13 @@ def list_enabled_interfaces():
pim_enabled
=
interface
in
interfaces
pim_enabled
=
interface
in
interfaces
igmp_enabled
=
interface
in
igmp_interfaces
igmp_enabled
=
interface
in
igmp_interfaces
enabled
=
str
(
pim_enabled
)
+
"/"
+
str
(
igmp_enabled
)
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
:
if
igmp_enabled
:
state
=
igmp_interfaces
[
interface
].
interface_state
.
print_state
()
igmp_state
=
igmp_interfaces
[
interface
].
interface_state
.
print_state
()
else
:
t
.
add_row
([
interface
,
ip
,
enabled
,
state_refresh_enabled
,
igmp_state
])
state
=
"-"
t
.
add_row
([
interface
,
ip
,
enabled
,
state
])
except
Exception
:
except
Exception
:
continue
continue
print
(
t
)
print
(
t
)
...
...
pimdm/Run.py
View file @
28b51ae5
...
@@ -9,7 +9,7 @@ import os
...
@@ -9,7 +9,7 @@ import os
import
argparse
import
argparse
import
traceback
import
traceback
VERSION
=
"1.0.4"
VERSION
=
"1.0.4
.1
"
def
client_socket
(
data_to_send
):
def
client_socket
(
data_to_send
):
# Create a UDS socket
# Create a UDS socket
...
...
setup.py
View file @
28b51ae5
...
@@ -13,7 +13,7 @@ setup(
...
@@ -13,7 +13,7 @@ setup(
long_description
=
open
(
"README.md"
,
"r"
).
read
(),
long_description
=
open
(
"README.md"
,
"r"
).
read
(),
long_description_content_type
=
"text/markdown"
,
long_description_content_type
=
"text/markdown"
,
keywords
=
"PIM-DM Multicast Routing Protocol Dense-Mode Router RFC3973"
,
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"
,
url
=
"http://github.com/pedrofran12/pim_dm"
,
author
=
"Pedro Oliveira"
,
author
=
"Pedro Oliveira"
,
author_email
=
"pedro.francisco.oliveira@tecnico.ulisboa.pt"
,
author_email
=
"pedro.francisco.oliveira@tecnico.ulisboa.pt"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment