/* -*-c-*-
*
- * $Id: tun-bsd.c,v 1.1 2001/02/05 19:48:18 mdw Exp $
+ * $Id$
*
* Tunnel interface for 4.4BSD-derived systems
*
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-/*----- Revision history --------------------------------------------------*
- *
- * $Log: tun-bsd.c,v $
- * Revision 1.1 2001/02/05 19:48:18 mdw
- * Initial support for BSD tunnel devices.
- *
- */
-
/*----- Header files ------------------------------------------------------*/
#include "tripe.h"
n = read(fd, buf_i, sizeof(buf_i));
if (n < 0) {
- a_warn("tunnel read failed (%s): %s", tun_ifname(t), strerror(errno));
+ a_warn("TUN %s read-error -- %s", tun_ifname(t), strerror(errno));
return;
}
IF_TRACING(T_TUNNEL, {
n = 0;
for (;;) {
sprintf(buf, "/dev/tun%u", n);
- if ((fd = open("/dev/unet", O_RDWR)) >= 0)
+ if ((fd = open(buf, O_RDWR)) >= 0)
break;
switch (errno) {
case EBUSY:
T( trace(T_TUNNEL, "tunnel device %u busy: skipping", n); )
break;
case ENOENT:
- a_warn("no suitable tunnel devices found");
+ a_warn("TUN - bsd no-tunnel-devices");
return (-1);
default:
- a_warn("error opening `%s': %s (skipping)", buf, strerror(errno));
+ a_warn("TUN - open-error %s -- %s", buf, strerror(errno));
break;
}
n++;