Project Home
Project Home
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
wiki1657: Faq_wiki_page (Version 7)

Frequently Asked Questions#

What is io-pkt?#

io-pkt is a new networking infrastructure (protocols, drivers, utilities) to replace the existing io-net networking infrastructure. While io-net was loosely based on the NetBSD stack source, io-pkt much more closely tracks the NetBSD stack source. For example, the lowest level of (native) packet buffer in io-net was the "npkt", while in io-pkt the native packet buffer is an "mbuf". As a result of this, protocols, drivers and utilities should port much easier to QNX io-pkt - there is considerable source leverage.

Also, io-pkt gets rid of a thread context switch during packet receive, which improves receive performance as compared to io-net. Transmit performance is about the same.

Also, io-pkt has much different (and we think, better) support for 802.11 wireless. The hardware-independent portion of the 802.11 procotols is now located in the stack instead of in each driver. More (ported) wireless drivers are supported.

How do I get io-pkt?#

io-pkt is available in source code from here. io-pkt is actually in two different repositories: there is the public one, which contains 99% of the source, which you can download and compile. There is a second repository (sys/dev_nda) which contains source code for drivers which we legally cannot give out because we have obtained it under non-disclosure agreements. Well, we could give it out, but our lawyers would hunt us down like vermin and string us up by our thumbs. Currently the only stuff in the NDA repository is wireless drivers.

How do I compile io-pkt?#

SeanB has done a marvellous job of this. I actually told him one day that I thought his work with make was more impressive than his work with the procotols :-) All you have to do is type "make install" at the root of the source tree, and all source for all CPU architectures will be compiled, in the correct order, and all the various libraries will be installed. You can either run with a stage (most people at QNX do) but I like to live on the edge and run without a stage, so it is possible.

How do I install io-pkt?#

When io-pkt is part of a GA release, I am sure there will be all sort of magical file system soft links to make is work. If you're a do-it-yourselfer, and you've downloaded and compiled the code, the easiest and safest way to run io-pkt (assuming you don't want to get ride of your existing io-net stuff) is to put all the binaries in one directory on your hard disk - say /root/io-pkt

What binaries do you need? Good question. At a minimum, I might suggest copying the following binaries (appropriate for your CPU architecture!) from your io-pkt source tree (where they were compiled) to your directory e.g. /root/io-pkt:

io-pkt-v4 - from sys/target/CPU/o.v4
io-pkt-v6 - from sys/target/CPU/o.v6
libsocket.so - from lib/socket/CPU/so
devnp-shim.so - from sys/dev_qnx/shim/CPU/dll
devnp-i82544.so - from sys/dev_qnx/i82544/CPU/dll
ifconfig - from utils/i/ifconfig/CPU/o
netstat - from utils/n/netstat/CPU/o
nicinfo - from utils/u/nicinfo/CPU/o

Obviously, choose whichever network driver you wish to run. Remember that you DON'T have to run an io-pkt driver - you can run an existing binary io-net driver - io-pkt will automatically load the shim for you. Pretty neat, huh?

Now, create an executable text shell script file, which looks like this:

export LD_LIBRARY_PATH=/root/io-pkt:$LD_LIBRARY_PATH
export PATH=/root/io-pkt:$PATH
export SOCK=/alt

When you run the above script, it will cause the shell to look FIRST in /root/io-pkt for the io-pkt executables and libraries.

How do I run io-pkt?#

Let's say you've done the above. To run io-pkt, now type the following:

  1. io-pkt-v6 -d i82544 -p tcpip prefix=/alt

io-pkt will load the devnp-i28544.so from the /root/io-pkt directory. If you run

  1. ifconfig

you will see a "wm0" interface - NOT an en0 interface. This tells you that you have a native io-pkt driver running.

But let say you do this instead:

  1. io-pkt-v6 -d speedo -p tcpip prefix=/alt

This will work, too - since devnp-speedo.so has not been copied to /root/io-pkt (you could have) io-pkt automatically locates the io-net binary devn-speedo.so in your LD_LIBRARY_PATH and then quietly loads devnp-shim.so for you, and points the shim at the io-net speedo driver it found. If you run:

  1. ifconfig

you will see an "en0" interface - that tells you that you have an io-net driver running, which will work fine, but incurs the costs of a thread switch during packet receive.

Can I run io-net and io-pkt at the same time on one machine?#

Sure. Notice the /alt I stuck in above. Using "SOCK=/alt" causes any executable you run in the future to talk to io-pkt instead of io-net.