Bionix1441
Bionix1441

Reputation: 2319

How to get the interface used to join a multicast group programmatically?

Is there a way to find which interface has been used to join an IPv6 multicast group, if the index used was 0 meaning that we leave to the kernel to choose which interface is suitable. Can we get that information afterwards?

Upvotes: 1

Views: 176

Answers (1)

SoronelHaetir
SoronelHaetir

Reputation: 15162

Does the IPV6_MULTICAST_IF socket option change after the join is complete? If not you'll have to look at the interface table and see which is the default, on windows this would be done with GetAdaptersAddresses, no idea for *nix.

Upvotes: 1

Related Questions