Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
R
re6stnet
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Kirill Smelkov
re6stnet
Commits
2c071ec5
Commit
2c071ec5
authored
Jul 09, 2012
by
Ulysse Beaugnon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed propagation references in vifibnet.py since we will not be using it
parent
6dc66be1
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
9 deletions
+3
-9
propagation.py
propagation.py
+2
-2
vifibnet.py
vifibnet.py
+1
-7
No files found.
propagation.py
View file @
2c071ec5
...
...
@@ -29,7 +29,7 @@ class Ring:
if
entryPoint
==
None
:
self
.
successor
=
self
.
me
else
:
self
.
send
(
'FIND_SUCCESSOR '
+
str
(
self
.
me
.
id
)
+
' '
+
self
.
me
.
toString
(),
entry
p
oint
)
self
.
send
(
'FIND_SUCCESSOR '
+
str
(
self
.
me
.
id
)
+
' '
+
self
.
me
.
toString
(),
entry
P
oint
)
log
.
log
(
'Init the ring with me = '
+
self
.
me
.
toString
(),
3
)
# TODO :
...
...
@@ -41,7 +41,7 @@ class Ring:
def
send
(
self
,
message
,
target
):
# TODO : switch to log
log
.
log
(
'Sending : '
+
message
+
' to '
+
target
.
toString
(),
5
)
self
.
sock
.
send
T
o
(
message
,
(
target
.
ip
,
target
.
port
))
self
.
sock
.
send
t
o
(
message
,
(
target
.
ip
,
target
.
port
))
def
findSuccessor
(
self
,
id
,
sender
):
if
self
.
id
<
id
and
id
<=
self
.
successor
:
...
...
vifibnet.py
View file @
2c071ec5
...
...
@@ -4,7 +4,6 @@ import traceback
import
upnpigd
import
openvpn
import
random
import
propagation
import
log
VIFIB_NET
=
"2001:db8:42::/48"
...
...
@@ -88,8 +87,6 @@ def getConfig():
# Temporary args - to be removed
_
(
'--ip'
,
required
=
True
,
help
=
'IPv6 of the server'
)
_
(
'--entry-ip'
,
default
=
None
,
help
=
'entrypoint for the ring'
)
_
(
'--entry-port'
,
default
=
None
,
help
=
'entrypoint for the ring'
)
# Openvpn options
_
(
'openvpn_args'
,
nargs
=
argparse
.
REMAINDER
,
help
=
"Common OpenVPN options (e.g. certificates)"
)
...
...
@@ -186,9 +183,6 @@ def main():
# Timed refresh initializing
next_refresh
=
time
.
time
()
+
config
.
refresh_time
# initializing the ring to propagate the peers
ring
=
propagation
.
Ring
(
None
)
# main loop
try
:
while
True
:
...
...
@@ -206,4 +200,4 @@ if __name__ == "__main__":
main
()
# TODO : remove incomming connections from avalaible peers
# maybe not needed : it doesn't append often
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