Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 146437
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T08:36:11+00:00 2026-05-11T08:36:11+00:00

How do you get a socket to receive packets destined for the IPv6 Subnet-Routers

  • 0

How do you get a socket to receive packets destined for the IPv6 Subnet-Routers Anycast address?

I haven’t been able to find any informationn on how to do this.

In a fit of desparation, I’ve tried using socket.setsockopt as you would to join a multicast group:

# 7 is the interface number  s = socket(AF_INET6, SOCK_DGRAM) packed_iface_num = struct.pack('I', 7)  group = inet_pton(AF_INET6, 'fd36:d00d:d00d:47cb::') + packed_iface_num  # socket.error: (22, 'Invalid argument') s.setsockopt(IPPROTO_IPV6, IPV6_JOIN_GROUP,  group) 

And also using bind

# socket.error: (99, 'Cannot assign requested address') s.bind(('fd36:773e:6b4c:47cb::', 9876)) 

As expected, neither of these worked. Is there a way to do this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T08:36:12+00:00Added an answer on May 11, 2026 at 8:36 am

    Instead of IPV6_JOIN_GROUP, try passing IPV6_JOIN_ANYCAST to your s.setsockopt() code. Unfortunately the Python socket module doesn’t define it but you should be able to pass the integer equivalent instead. In Linux IPV6_JOIN_ANYCAST is 27 and IPV6_LEAVE_ANYCAST is 28. (defined in /usr/include/linux/in6.h)

    The best documentation I could find is from this lkml e-mail describing the anycast patch to the Linux kernel:

    The application interface for joining and leaving anycast groups is 2 new setsockopt() calls: IPV6_JOIN_ANYCAST and IPV6_LEAVE_ANYCAST. The arguments are the same as the corresponding multicast operations.

    May the dancing kame be with you!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've been dabbling with socket servers in Java and now I'm ready to get
How can you get a raw socket in Perl, and then what's the best
I'm trying to get a simple socket.io server running: Client: <script src=http://www.my-server.com:8080/socket.io/socket.io.js></script> var socket
I'm trying to get the IP of the machine a socket I've bound is
I am trying to get the IP of a socket connection in string form.
Is there a way to get a list of all open sockets ( socket
I'm trying to get a simple winsock program working, so I create my socket
I need to be able to send out a UDP message and also receive
I am sending packets from one pc to other. I am using python socket
I have an asynchronous UDP server class with a socket bound on IPAddress.Any, and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.