Skip to content

How best to implement IPv6? #20

@mon

Description

@mon

I've been wanting to poke around with IPv6 multicast for a while, and I've collected some thoughts that might turn into an implementation at some point...

The first thing is that dual-stack sockets aren't really feasible, because OpenBSD disables them for security reasons. The second is that the multicast address is of course different when in the IPv6 space (unless you use the "IPv4 mapped into the IPv6 space" address, but I'm not sure if that's allowed on OpenBSD).

So either we accept all address types and have 2 sockets internally, or just bump the work down to the user and have a MulticastSocketV4 and MulticastSocketV6. I think this is probably best, I've never seen any use for both V4 and V6 at the same time.

Then, the question is whether to have a generic MulticastSocket<T> where T is either Ipv4Addr or Ipv6Addr, or actually split the implementation... somehow. Macros? Just repeat the code and have some helper functions?

I'm not really sure of the best way to do it and would appreciate any input! On a technical level, it seems like both the unix and windows APIs can happily work with ipv6.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions