I'm trying to use bridging and TUN/TAP on uClinux on Nios processor, on an Altera fpga. I downloaded the source for tunctl and it compiled and runs just fine. It says it created tap0, tap1, tap2, etc., but they don't show up in the /dev directory. I'm assuming because there is no demon to create these entries. I looked at Ubuntu, and saw the /dev/tapx entries are major, minor 36,16. However, the /dev/net/tun in the uClinux is 200,10. My question is this: If I create /dev/tap0 in the /dev directory, which Major,Minor number should I give it? I'm a little fuzzy on this. I'm assuming if the Major/Minor numbers are wrong, the brctl program won't be able to use the tap0 interface. I want to do this, ultimately: [ethernet]----[kernel bridge]---[tap]---(user program)------data link------(user program)---[tap]---[kernel bridge]--[ethernet] The data link is non standard and proprietary. The goal is to bridge the two ethernets. Can someone give me some heads up? Any pointers would be appreciated!!! thanks, Wade -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.linux-foundation.org/pipermail/bridge/attachments/20090504/e1c37dbe/attachment.htm
You should probably just use libpcap to receive all packets from each interface, and SOCK_RAW to send. This should be a more efficient of getting packets to usermode than using bridging. On Mon, May 4, 2009 at 9:47 AM, Wade Maxfield <wmaxfield at gmail.com> wrote:> > I'm trying to use bridging and TUN/TAP on uClinux on Nios processor, on > an Altera fpga. > > I downloaded the source for tunctl and it compiled and runs just fine. > > It says it created tap0, tap1, tap2, etc., but they don't show up in the > /dev directory. > > I'm assuming because there is no demon to create these entries. > > I looked at Ubuntu, and saw the /dev/tapx entries are major, minor > 36,16. > > However, the /dev/net/tun in the uClinux is 200,10. > > My question is this: If I create /dev/tap0 in the /dev directory, which > Major,Minor number should I give it? > > I'm a little fuzzy on this. I'm assuming if the Major/Minor numbers are > wrong, the brctl program won't be able to use the tap0 interface. > > I want to do this, ultimately: > > [ethernet]----[kernel bridge]---[tap]---(user program)------data > link------(user program)---[tap]---[kernel bridge]--[ethernet] > > The data link is non standard and proprietary. The goal is to bridge the > two ethernets. > > Can someone give me some heads up? Any pointers would be appreciated!!! > > thanks, > Wade > > > > _______________________________________________ > Bridge mailing list > Bridge at lists.linux-foundation.org > https://lists.linux-foundation.org/mailman/listinfo/bridge >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.linux-foundation.org/pipermail/bridge/attachments/20090504/f5af249d/attachment.htm
Network interfaces don't show up in /dev in Linux anyway. When tap0, tap1, etc are created, they will show up in "ifconfig -a" and you can add them to bridges at that point. /dev/net/tun should be the only thing you need in /dev. I think /dev/tapX is an older interface. If your user program is trying to use the /dev/tapX devices, you could modify it to use /dev/net/tun and connect to the right device using the ioctl as described in Documentation/tuntap.txt in the Linux source. On Mon, May 4, 2009 at 2:47 PM, Wade Maxfield <wmaxfield at gmail.com> wrote:> > ? I'm trying to use bridging and TUN/TAP on uClinux on Nios processor, on an > Altera fpga. > > ? I downloaded the source for tunctl and it compiled and runs just fine. > > ? It says it created tap0, tap1, tap2, etc., but they don't show up in the > /dev directory. > > ?? I'm assuming because there is no demon to create these entries. > > ?? I looked at Ubuntu, and saw the /dev/tapx entries are major, minor > 36,16. > > ? However, the /dev/net/tun in the uClinux is 200,10. > > ?? My question is this: If I create /dev/tap0 in the /dev directory, which > Major,Minor number should I give it? > > ?? I'm a little fuzzy on this.? I'm assuming if the Major/Minor numbers are > wrong, the brctl program won't be able to use the tap0 interface. > > ?? I want to do this, ultimately: > > ? [ethernet]----[kernel bridge]---[tap]---(user program)------data > link------(user program)---[tap]---[kernel bridge]--[ethernet] > > ? The data link is non standard and proprietary.? The goal is to bridge the > two ethernets. > > ? Can someone give me some heads up?? Any pointers would be appreciated!!! > > thanks, > Wade > > > > _______________________________________________ > Bridge mailing list > Bridge at lists.linux-foundation.org > https://lists.linux-foundation.org/mailman/listinfo/bridge >