1ARES_SET_LOCAL_DEV(3)      Library Functions Manual      ARES_SET_LOCAL_DEV(3)
2
3
4

NAME

6       ares_set_local_dev  -  Bind  to a specific network device when creating
7       sockets.
8

SYNOPSIS

10       #include <ares.h>
11
12       void ares_set_local_dev(ares_channel channel, const char* local_dev_name)
13

DESCRIPTION

15       The ares_set_local_dev function causes all future sockets to  be  bound
16       to  this device with SO_BINDTODEVICE.  This forces communications to go
17       over a certain interface, which can be useful on multi-homed  machines.
18       This  option  is  only  supported  on  Linux,  and  root privileges are
19       required for the option to work.  If SO_BINDTODEVICE is  not  supported
20       or  the  setsocktop  call  fails (probably because of permissions), the
21       error is silently ignored.
22

SEE ALSO

24       ares_set_local_ip4(3) ares_set_local_ip6(3)
25

NOTES

27       This function was added in c-ares 1.7.4
28

AUTHOR

30       Ben Greear
31
32
33
34                                 30 June 2010            ARES_SET_LOCAL_DEV(3)
Impressum