Bind a socket to a specific interface for UDP sending [closed]

asked 2018-07-26 04:52:06 -0500

DRos gravatar image

Hi all,

I've written a node that sends a datagram to a specific port and IP.

The node works and runs but only sends to the loopback interface, even though the IP set is that of a different network adapter.

I've tried to setsockopt to a specific adapter but I get "operation not permitted" i'm assuming because ros doesn't have root privileges. (Look here https://stackoverflow.com/questions/4... )

I've also tried with IPADDR_ANY with no luck.

Could someone point me in the right direction?

Thanks for your help

edit retag flag offensive reopen merge delete

Closed for the following reason question is off-topic or not relevant. Please see http://wiki.ros.org/Support for more details. by gvdhoorn
close date 2018-08-22 05:45:37.157013

Comments

A possible reason you didn't get any replies: this is not a ROS question, but a general networking related one.

This sort of question is best asked on SO or a forum like that.

gvdhoorn gravatar image gvdhoorn  ( 2018-08-22 05:45:32 -0500 )edit