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
e74f7f2d
Commit
e74f7f2d
authored
Jul 25, 2017
by
Pedro Oliveira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel integration
parent
ee35f93e
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
2 deletions
+5
-2
Hello.py
Hello.py
+1
-1
Main.py
Main.py
+4
-1
No files found.
Hello.py
View file @
e74f7f2d
...
...
@@ -37,7 +37,7 @@ class Hello:
def
force_send
(
self
,
interface
:
Interface
):
# When PIM is enabled on an interface or when a router first starts, the Hello Timer (HT)
# MUST be set to random value between 0 and Triggered_Hello_Delay
Hello Timer(HT)
# MUST be set to random value between 0 and Triggered_Hello_Delay
hello_timer
=
random
.
uniform
(
0
,
Hello
.
TRIGGERED_HELLO_DELAY
)
Timer
(
hello_timer
,
self
.
packet_send_handle
,
args
=
[
interface
]).
start
()
...
...
Main.py
View file @
e74f7f2d
...
...
@@ -3,12 +3,13 @@ import time
from
prettytable
import
PrettyTable
from
Interface
import
Interface
from
Kernel
import
Kernel
from
Neighbor
import
Neighbor
interfaces
=
{}
# interfaces with multicast routing enabled
neighbors
=
{}
# multicast router neighbors
protocols
=
{}
kernel
=
None
def
add_interface
(
interface_name
):
global
interfaces
...
...
@@ -108,5 +109,7 @@ def main(interfaces_to_add=[]):
from
Hello
import
Hello
Hello
()
global
kernel
kernel
=
Kernel
()
for
interface
in
interfaces_to_add
:
add_interface
(
interface
)
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