system header files.
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- $Id: device.h,v 1.1.2.9 2003/07/15 16:38:18 guus Exp $
+ $Id: device.h,v 1.1.2.10 2003/07/18 13:45:06 guus Exp $
*/
#ifndef __TINC_DEVICE_H__
extern int device_fd;
extern char *device;
-#ifdef HAVE_CYGWIN
extern char *iface;
-#define interface iface
-#else
-extern char *interface;
-#endif
extern int setup_device(void);
extern void close_device(void);
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- $Id: graph.c,v 1.1.2.25 2003/07/17 15:06:26 guus Exp $
+ $Id: graph.c,v 1.1.2.26 2003/07/18 13:45:06 guus Exp $
*/
/* We need to generate two trees from the graph:
asprintf(&envp[0], "NETNAME=%s", netname ? : "");
asprintf(&envp[1], "DEVICE=%s", device ? : "");
- asprintf(&envp[2], "INTERFACE=%s", interface ? : "");
+ asprintf(&envp[2], "INTERFACE=%s", iface ? : "");
asprintf(&envp[3], "NODE=%s", n->name);
sockaddr2str(&n->address, &address, &port);
asprintf(&envp[4], "REMOTEADDRESS=%s", address);
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- $Id: net_setup.c,v 1.1.2.35 2003/07/17 15:06:26 guus Exp $
+ $Id: net_setup.c,v 1.1.2.36 2003/07/18 13:45:06 guus Exp $
*/
#include "system.h"
/* Run tinc-up script to further initialize the tap interface */
asprintf(&envp[0], "NETNAME=%s", netname ? : "");
asprintf(&envp[1], "DEVICE=%s", device ? : "");
- asprintf(&envp[2], "INTERFACE=%s", interface ? : "");
+ asprintf(&envp[2], "INTERFACE=%s", iface ? : "");
asprintf(&envp[3], "NAME=%s", myself->name);
envp[4] = NULL;
asprintf(&envp[0], "NETNAME=%s", netname ? : "");
asprintf(&envp[1], "DEVICE=%s", device ? : "");
- asprintf(&envp[2], "INTERFACE=%s", interface ? : "");
+ asprintf(&envp[2], "INTERFACE=%s", iface ? : "");
asprintf(&envp[3], "NAME=%s", myself->name);
envp[4] = NULL;
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- $Id: net_socket.c,v 1.1.2.28 2003/07/18 13:41:35 guus Exp $
+ $Id: net_socket.c,v 1.1.2.29 2003/07/18 13:45:06 guus Exp $
*/
#include "system.h"
int nfd, flags;
char *addrstr;
int option;
- char *interface;
+ char *iface;
struct ifreq ifr;
cp();
#endif
if(get_config_string
- (lookup_config(config_tree, "BindToInterface"), &interface)) {
+ (lookup_config(config_tree, "BindToInterface"), &iface)) {
#if defined(SOL_SOCKET) && defined(SO_BINDTODEVICE)
memset(&ifr, 0, sizeof(ifr));
- strncpy(ifr.ifr_ifrn.ifrn_name, interface, IFNAMSIZ);
+ strncpy(ifr.ifr_ifrn.ifrn_name, iface, IFNAMSIZ);
if(setsockopt(nfd, SOL_SOCKET, SO_BINDTODEVICE, &ifr, sizeof(ifr))) {
close(nfd);
- logger(LOG_ERR, _("Can't bind to interface %s: %s"), interface,
+ logger(LOG_ERR, _("Can't bind to interface %s: %s"), iface,
strerror(errno));
return -1;
}
char *addrstr;
int option;
#if defined(SOL_SOCKET) && defined(SO_BINDTODEVICE)
- char *interface;
+ char *iface;
struct ifreq ifr;
#endif
#if defined(SOL_SOCKET) && defined(SO_BINDTODEVICE)
if(get_config_string
- (lookup_config(config_tree, "BindToInterface"), &interface)) {
+ (lookup_config(config_tree, "BindToInterface"), &iface)) {
memset(&ifr, 0, sizeof(ifr));
- strncpy(ifr.ifr_ifrn.ifrn_name, interface, IFNAMSIZ);
+ strncpy(ifr.ifr_ifrn.ifrn_name, iface, IFNAMSIZ);
if(setsockopt(nfd, SOL_SOCKET, SO_BINDTODEVICE, &ifr, sizeof(ifr))) {
close(nfd);
- logger(LOG_ERR, _("Can't bind to interface %s: %s"), interface,
+ logger(LOG_ERR, _("Can't bind to interface %s: %s"), iface,
strerror(errno));
return -1;
}