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
d618be3f
Commit
d618be3f
authored
Sep 22, 2017
by
Pedro Oliveira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
script that start igmp on all interfaces and python code to test the emission of messages
parent
df992f08
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
57 additions
and
3 deletions
+57
-3
emulation/client1/root/server.py
emulation/client1/root/server.py
+44
-0
emulation/router1/root/script.sh
emulation/router1/root/script.sh
+5
-1
emulation/router2/root/script.sh
emulation/router2/root/script.sh
+5
-1
emulation/router3/root/script.sh
emulation/router3/root/script.sh
+3
-1
No files found.
emulation/client1/root/server.py
0 → 100644
View file @
d618be3f
import
socket
import
struct
import
sys
#import trac
import
traceback
#message = 'very important data'
multicast_group
=
(
'224.12.12.12'
,
10000
)
# Create the datagram socket
sock
=
socket
.
socket
(
socket
.
AF_INET
,
socket
.
SOCK_DGRAM
)
# Set a timeout so the socket does not block indefinitely when trying
# to receive data.
#sock.settimeout(0.2)
# Set the time-to-live for messages to 1 so they do not go past the
# local network segment.
ttl
=
struct
.
pack
(
'b'
,
12
)
sock
.
setsockopt
(
socket
.
IPPROTO_IP
,
socket
.
IP_MULTICAST_TTL
,
ttl
)
try
:
# Send data to the multicast group
#print >>sys.stderr, 'sending "%s"' % message
#sent = sock.sendto(message, multicast_group)
# Look for responses from all recipients
while
True
:
#print >>sys.stderr, 'waiting to receive'
input_msg
=
input
(
'msg --> '
)
try
:
#message = struct.pack("s", input_msg.encode('utf-8'))
msg
=
bytes
(
input_msg
,
"utf-8"
)
sock
.
sendto
(
msg
,
multicast_group
)
except
:
traceback
.
print_exc
()
continue
#print >>sys.stderr, 'received "%s" from %s' % (data, server)
finally
:
#print >>sys.stderr, 'closing socket'
sock
.
close
()
emulation/router1/root/script.sh
View file @
d618be3f
rm
-rf
MulticastRouting/
cp
-rf
/hosthome/Desktop/pim
_code
/ MulticastRouting/
cp
-rf
/hosthome/Desktop/pim/ MulticastRouting/
cd
MulticastRouting
pip-3.2
install
-r
requirements.txt
python3 Run.py
-stop
python3 Run.py
-start
python3 Run.py
-aiigmp
eth0
python3 Run.py
-aiigmp
eth1
python3 Run.py
-aiigmp
eth2
python3 Run.py
-ai
eth0
python3 Run.py
-ai
eth1
python3 Run.py
-ai
eth2
python3 Run.py
-v
emulation/router2/root/script.sh
View file @
d618be3f
rm
-rf
MulticastRouting/
cp
-rf
/hosthome/Desktop/pim
_code
/ MulticastRouting/
cp
-rf
/hosthome/Desktop/pim/ MulticastRouting/
cd
MulticastRouting
pip-3.2
install
-r
requirements.txt
python3 Run.py
-stop
python3 Run.py
-start
python3 Run.py
-aiigmp
eth0
python3 Run.py
-aiigmp
eth1
python3 Run.py
-aiigmp
eth2
python3 Run.py
-ai
eth0
python3 Run.py
-ai
eth1
python3 Run.py
-ai
eth2
python3 Run.py
-v
emulation/router3/root/script.sh
View file @
d618be3f
rm
-rf
MulticastRouting/
cp
-rf
/hosthome/Desktop/pim
_code
/ MulticastRouting/
cp
-rf
/hosthome/Desktop/pim/ MulticastRouting/
cd
MulticastRouting
pip-3.2
install
-r
requirements.txt
python3 Run.py
-stop
python3 Run.py
-start
python3 Run.py
-aiigmp
eth0
python3 Run.py
-aiigmp
eth1
python3 Run.py
-ai
eth0
python3 Run.py
-ai
eth1
python3 Run.py
-v
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