Blame ares_set_local_dev.3

Packit 514978
.\"
Packit 514978
.\" Copyright 2010 by Ben Greear <greearb@candelatech.com>
Packit 514978
.\"
Packit 514978
.\" Permission to use, copy, modify, and distribute this
Packit 514978
.\" software and its documentation for any purpose and without
Packit 514978
.\" fee is hereby granted, provided that the above copyright
Packit 514978
.\" notice appear in all copies and that both that copyright
Packit 514978
.\" notice and this permission notice appear in supporting
Packit 514978
.\" documentation, and that the name of M.I.T. not be used in
Packit 514978
.\" advertising or publicity pertaining to distribution of the
Packit 514978
.\" software without specific, written prior permission.
Packit 514978
.\" M.I.T. makes no representations about the suitability of
Packit 514978
.\" this software for any purpose.  It is provided "as is"
Packit 514978
.\" without express or implied warranty.
Packit 514978
.\"
Packit 514978
.TH ARES_SET_LOCAL_DEV 3 "30 June 2010"
Packit 514978
.SH NAME
Packit 514978
ares_set_local_dev \- Bind to a specific network device when creating sockets.
Packit 514978
.SH SYNOPSIS
Packit 514978
.nf
Packit 514978
.B #include <ares.h>
Packit 514978
.PP
Packit 514978
.B void ares_set_local_dev(ares_channel \fIchannel\fP, const char* \fIlocal_dev_name\fP)
Packit 514978
.fi
Packit 514978
.SH DESCRIPTION
Packit 514978
The \fBares_set_local_dev\fP function causes all future sockets
Packit 514978
to be bound to this device with SO_BINDTODEVICE.  This forces communications
Packit 514978
to go over a certain interface, which can be useful on multi-homed machines.
Packit 514978
This option is only supported on Linux, and root privileges are required
Packit 514978
for the option to work.  If SO_BINDTODEVICE is not supported or the
Packit 514978
setsocktop call fails (probably because of permissions), the error is
Packit 514978
silently ignored.
Packit 514978
.SH SEE ALSO
Packit 514978
.BR ares_set_local_ip4 (3)
Packit 514978
.BR ares_set_local_ip6 (3)
Packit 514978
.SH NOTES
Packit 514978
This function was added in c-ares 1.7.4
Packit 514978
.SH AUTHOR
Packit 514978
Ben Greear