[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] Re: [lwip-users] problem running lwip on redhat 7.2 linux
From: |
Marc Boucher |
Subject: |
[PATCH] Re: [lwip-users] problem running lwip on redhat 7.2 linux |
Date: |
Thu, 24 Apr 2003 21:11:54 -0400 |
User-agent: |
Mutt/1.5.1i |
Here's a patch to make this common problem easier to diagnose:
--- tapif.c 2003/04/25 01:04:33 1.1
+++ tapif.c 2003/04/25 01:10:56
@@ -102,7 +102,11 @@
tapif->fd = open(DEVTAP, O_RDWR);
DEBUGF(TAPIF_DEBUG, ("tapif_init: fd %d\n", tapif->fd));
if(tapif->fd == -1) {
- perror("tapif_init");
+#ifdef linux
+ perror("tapif_init: try running \"modprobe tun\" or rebuilding your kernel
with CONFIG_TUN; cannot open "DEVTAP);
+#else
+ perror("tapif_init: cannot open "DEVTAP);
+#endif
exit(1);
}
@@ -112,7 +116,7 @@
memset(&ifr, 0, sizeof(ifr));
ifr.ifr_flags = IFF_TAP|IFF_NO_PI;
if (ioctl(tapif->fd, TUNSETIFF, (void *) &ifr) < 0) {
- perror(buf);
+ perror("tapif_init: "DEVTAP" ioctl TUNSETIFF");
exit(1);
}
}
On Thu, Apr 24, 2003 at 09:01:29PM -0400, Marc Boucher wrote:
> tapif_init() is failing because the process
> cannot open DEVTAP (/dev/net/tun), probably
> because the 'tun' kernel module is not loaded.
> To do that, try running "modprobe tun" before
> starting the sim{host,router,node}.
>
> Marc
>
> On Thu, Apr 24, 2003 at 03:53:01PM -0700, Navneet Aron wrote:
> >
> > Hi All,
> > After failing to get lwip 0.5.2 running on linux, I'm trying to compile
> > and get lwip 0.6.2 working on Redhat Linux 7.2. I compiled it . It did .
> > But when I execute the executables i get following errors.
> > simhost
> > -------
> > System initialized.
> > TCP/IP initialized.
> > tapif_init: No such file or directory
> >
> > simrouter
> > ---------
> > System initialized.
> > tapif_init: No such file or directory
> >
> >
> > simnode
> > --------
> > unixif: unix_socket_client: socket: No such file or directory
> > unixif_init: Illegal seek
> >
> >
> > Aborted
> >
> >
> > Could someone let me know what I'm doing wrong or what I'm not doing that
> > is necesssary?
> > The README file in proj/unixsim directory says about creating a tap in BSD
> > but for linux the directions are really simple -just to compile it using
> > make...
> >
> > Thanks
> > Navneet