Update of /home/CVS/tinc/src
In directory humbolt:/tmp/cvs-serv21528
Modified Files:
Tag: CABAL
device.h graph.c net_setup.c net_socket.c
Log Message:
Use iface instead of interface because it might already be declared in
system header files.
Index: device.h
===================================================================
RCS file: /home/CVS/tinc/src/device.h,v
retrieving revision 1.1.2.9
retrieving revision 1.1.2.10
diff -u -r1.1.2.9 -r1.1.2.10
--- device.h 2003/07/15 16:38:18 1.1.2.9
+++ device.h 2003/07/18 13:45:06 1.1.2.10
@@ -26,12 +26,7 @@
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);
Index: graph.c
===================================================================
RCS file: /home/CVS/tinc/src/Attic/graph.c,v
retrieving revision 1.1.2.25
retrieving revision 1.1.2.26
diff -u -r1.1.2.25 -r1.1.2.26
--- graph.c 2003/07/17 15:06:26 1.1.2.25
+++ graph.c 2003/07/18 13:45:06 1.1.2.26
@@ -262,7 +262,7 @@
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);
Index: net_setup.c
===================================================================
RCS file: /home/CVS/tinc/src/net_setup.c,v
retrieving revision 1.1.2.35
retrieving revision 1.1.2.36
diff -u -r1.1.2.35 -r1.1.2.36
--- net_setup.c 2003/07/17 15:06:26 1.1.2.35
+++ net_setup.c 2003/07/18 13:45:06 1.1.2.36
@@ -525,7 +525,7 @@
/* 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;
@@ -577,7 +577,7 @@
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;
Index: net_socket.c
===================================================================
RCS file: /home/CVS/tinc/src/net_socket.c,v
retrieving revision 1.1.2.28
retrieving revision 1.1.2.29
diff -u -r1.1.2.28 -r1.1.2.29
--- net_socket.c 2003/07/18 13:41:35 1.1.2.28
+++ net_socket.c 2003/07/18 13:45:06 1.1.2.29
@@ -48,7 +48,7 @@
int nfd, flags;
char *addrstr;
int option;
- char *interface;
+ char *iface;
struct ifreq ifr;
cp();
@@ -84,14 +84,14 @@
#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;
}
@@ -125,7 +125,7 @@
char *addrstr;
int option;
#if defined(SOL_SOCKET) && defined(SO_BINDTODEVICE)
- char *interface;
+ char *iface;
struct ifreq ifr;
#endif
@@ -151,13 +151,13 @@
#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;
}
--
Tinc-cvs: CVS changelog list for the tinc VPN daemon
Archive: http://mail.nl.linux.org/tinc-cvs/
Tinc site: http://tinc.nl.linux.org/