Re: sol_socket so_bindtodevice alternative
Hado, you can use IP_BOUND_IF to bind socket to the particular interface index. something like int idx = if_nametoindex( "en1"); setsockopt(s, IPPROTO_TCP, IP_BOUND_IF, &idx, sizeof(idx) ); -- Sincerely, Rustam Muginov On Jan 4, 2014, at 12:43 PM, Hado Hein <maclists@batchmaker.de> wrote:
I’m trying to find a solution to send udp broadcasts over a specific network interface. Binding to an address is not an option.
Since so_bindtodevice is not available on Darwin I’m looking for an alternative. I have two ethernet interfaces which both go to different class c subnets. The first interface has also a gateway set (Internet).
Now I need to send a broadcast to a class a device physically on the second ethernet port. Neither of these (interface nor class a device) can change their ip or their subnet.
Is there a possibility to achieve this at userlevel?
thx,
_______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/darwin-dev/rmuginov%40gmail.com
This email sent to rmuginov@gmail.com
_______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.app... This email sent to site_archiver@lists.apple.com
participants (1)
-
Rustam Muginov