You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In C, one can set a socket's interface using setsockopt(socket, SOL_IP, IP_MULTICAST_IF, &mreqn, sizeof(mreqn)) where mreqn is
struct ip_mreqn {
struct in_addr imr_multiaddr; /* IP multicast group address */
struct in_addr imr_address; /* IP address of local interface */
int imr_ifindex; /* interface index */
};
sockets2 offers the set_multicast_if_v4 function, but only accepts an address as parameter. I would like to set the interface using sockets2 based on an interface index.
The text was updated successfully, but these errors were encountered:
A pr for this would be welcome. We'll have to look at how the ip_mreqn type would look as it needs to be cross platform(-ish). Another point is the migration of the API as we can't have breaking changing, but in future version we'll want a single function for IP_MULTICAST_IF
In C, one can set a socket's interface using
setsockopt(socket, SOL_IP, IP_MULTICAST_IF, &mreqn, sizeof(mreqn))
wheremreqn
issockets2 offers the
set_multicast_if_v4
function, but only accepts an address as parameter. I would like to set the interface using sockets2 based on an interface index.The text was updated successfully, but these errors were encountered: