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
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Rafael Monnerat
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
Hide 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:
...
@@ -29,7 +29,7 @@ class Ring:
if
entryPoint
==
None
:
if
entryPoint
==
None
:
self
.
successor
=
self
.
me
self
.
successor
=
self
.
me
else
:
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
)
log
.
log
(
'Init the ring with me = '
+
self
.
me
.
toString
(),
3
)
# TODO :
# TODO :
...
@@ -41,7 +41,7 @@ class Ring:
...
@@ -41,7 +41,7 @@ class Ring:
def
send
(
self
,
message
,
target
):
def
send
(
self
,
message
,
target
):
# TODO : switch to log
# TODO : switch to log
log
.
log
(
'Sending : '
+
message
+
' to '
+
target
.
toString
(),
5
)
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
):
def
findSuccessor
(
self
,
id
,
sender
):
if
self
.
id
<
id
and
id
<=
self
.
successor
:
if
self
.
id
<
id
and
id
<=
self
.
successor
:
...
...
vifibnet.py
View file @
2c071ec5
...
@@ -4,7 +4,6 @@ import traceback
...
@@ -4,7 +4,6 @@ import traceback
import
upnpigd
import
upnpigd
import
openvpn
import
openvpn
import
random
import
random
import
propagation
import
log
import
log
VIFIB_NET
=
"2001:db8:42::/48"
VIFIB_NET
=
"2001:db8:42::/48"
...
@@ -88,8 +87,6 @@ def getConfig():
...
@@ -88,8 +87,6 @@ def getConfig():
# Temporary args - to be removed
# Temporary args - to be removed
_
(
'--ip'
,
required
=
True
,
_
(
'--ip'
,
required
=
True
,
help
=
'IPv6 of the server'
)
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 options
_
(
'openvpn_args'
,
nargs
=
argparse
.
REMAINDER
,
_
(
'openvpn_args'
,
nargs
=
argparse
.
REMAINDER
,
help
=
"Common OpenVPN options (e.g. certificates)"
)
help
=
"Common OpenVPN options (e.g. certificates)"
)
...
@@ -186,9 +183,6 @@ def main():
...
@@ -186,9 +183,6 @@ def main():
# Timed refresh initializing
# Timed refresh initializing
next_refresh
=
time
.
time
()
+
config
.
refresh_time
next_refresh
=
time
.
time
()
+
config
.
refresh_time
# initializing the ring to propagate the peers
ring
=
propagation
.
Ring
(
None
)
# main loop
# main loop
try
:
try
:
while
True
:
while
True
:
...
@@ -206,4 +200,4 @@ if __name__ == "__main__":
...
@@ -206,4 +200,4 @@ if __name__ == "__main__":
main
()
main
()
# TODO : remove incomming connections from avalaible peers
# 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