ares_set_servers_csv: fixed IPv6 address parsing
[platform/upstream/c-ares.git] / ares_set_local_dev.3
1 .\"
2 .\" Copyright 2010 by Ben Greear <greearb@candelatech.com>
3 .\"
4 .\" Permission to use, copy, modify, and distribute this
5 .\" software and its documentation for any purpose and without
6 .\" fee is hereby granted, provided that the above copyright
7 .\" notice appear in all copies and that both that copyright
8 .\" notice and this permission notice appear in supporting
9 .\" documentation, and that the name of M.I.T. not be used in
10 .\" advertising or publicity pertaining to distribution of the
11 .\" software without specific, written prior permission.
12 .\" M.I.T. makes no representations about the suitability of
13 .\" this software for any purpose.  It is provided "as is"
14 .\" without express or implied warranty.
15 .\"
16 .TH ARES_SET_LOCAL_DEV 3 "30 June 2010"
17 .SH NAME
18 ares_set_local_dev \- Bind to a specific network device when creating sockets.
19 .SH SYNOPSIS
20 .nf
21 .B #include <ares.h>
22 .PP
23 .B void ares_set_local_dev(ares_channel \fIchannel\fP, const char* \fIlocal_dev_name\fP)
24 .fi
25 .SH DESCRIPTION
26 The \fBares_set_local_dev\fP function causes all future sockets
27 to be bound to this device with SO_BINDTODEVICE.  This forces communications
28 to go over a certain interface, which can be useful on multi-homed machines.
29 This option is only supported on Linux, and root priviledges are required
30 for the option to work.  If SO_BINDTODEVICE is not supported or the
31 setsocktop call fails (probably because of permissions), the error is
32 silently ignored.
33 .SH SEE ALSO
34 .BR ares_set_local_ipv4 (3)
35 .BR ares_set_local_ipv6 (3)
36 .SH NOTES
37 This function was added in c-ares 1.7.4
38 .SH AUTHOR
39 Ben Greear