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.