Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
multicast-study
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
Kirill Smelkov
multicast-study
Commits
2805de89
Commit
2805de89
authored
Apr 29, 2022
by
Léo-Paul Géneau
👾
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
client6: Listen on all interfaces
parent
72d3499e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
client6.py
client6.py
+6
-1
No files found.
client6.py
View file @
2805de89
...
...
@@ -16,7 +16,12 @@ sock = socket.socket(socket.AF_INET6, socket.SOCK_DGRAM)
sock
.
bind
(
server_address
)
# on all interfaces.
sock
.
setsockopt
(
socket
.
IPPROTO_IPV6
,
socket
.
IPV6_JOIN_GROUP
,
socket
.
inet_pton
(
socket
.
AF_INET6
,
args
.
multicast_group
)
+
struct
.
pack
(
'@I'
,
0
))
for
ifidx
,
ifname
in
socket
.
socket
.
if_nameindex
():
print
(
"joining %s @ [%d]%s"
%
(
args
.
multicast_group
,
ifidx
,
ifname
))
bifidx
=
struct
.
pack
(
"@i"
,
ifidx
)
mreq
=
socket
.
inet_pton
(
socket
.
AF_INET6
,
args
.
multicast_group
)
+
\
bifidx
sock
.
setsockopt
(
socket
.
IPPROTO_IPV6
,
socket
.
IPV6_JOIN_GROUP
,
mreq
)
# = IPV6_ADD_MEMBERSHIP
try
:
while
True
:
...
...
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