Home
Support

Knowledge Base

BSPs and drivers
Community resources
Product documentation
Questions?
Contact us

Example for running multiple io-pkt instances
 
________________________________________________________________________

Applicable Environment
________________________________________________________________________
  • Topic: io-pkt
  • SDP: 7.1.0, 7.0.0, 6.6.0, 6.5.0
  • Target: All supported targets
________________________________________________________________________

Question
________________________________________________________________________

How to setup multiple instances of io-pkt?

________________________________________________________________________

Solution
________________________________________________________________________

See the -i option in our io-pkt documentation on how to start multiple io-pkt instances. This is an example for launching 4 different network stacks:

slay -f io-pkt-v4-hc
sleep 2

echo "tulip"
io-pkt-v4-hc -i1 -ptcpip prefix=/alt
mount -Tio-pkt1 /lib/dll/devn-tulip.so
SOCK=/alt ifconfig

echo "speedo"
io-pkt-v4-hc -i2 -ptcpip prefix=/alt2
mount -Tio-pkt2 /lib/dll/devn-speedo.so
SOCK=/alt2 ifconfig

echo "3com"
# pci=0,vid=0x10b7,did=0x9055 /lib/dll/devn-el900.so
io-pkt-v4-hc -i3 -ptcpip prefix=/alt3
mount -Tio-pkt3 -o pci=0,vid=0x10b7,did=0x9055 /lib/dll/devn-el900.so
SOCK=/alt3 ifconfig

echo "3com 2"
# pci=0,vid=0x10b7,did=0x9200 /lib/dll/devn-el900.so
io-pkt-v4-hc -i4 -ptcpip prefix=/alt4
mount -Tio-pkt4 -o pci=0,vid=0x10b7,did=0x9200 /lib/dll/devn-el900.so
SOCK=/alt4 ifconfig

pidin -p io-pkt-v4-hc

It's required to specify the pci,vid and did for identical netwok cards.

The console output looks like this:

# ./run4stacks.sh
tulip
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 33192
inet 127.0.0.1 netmask 0xff000000
en0: flags=80008802<BROADCAST,SIMPLEX,MULTICAST,SHIM> mtu 1500
address: 00:80:ad:86:cd:b5
media: Ethernet 100baseTX
status: active
speedo
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 33192
inet 127.0.0.1 netmask 0xff000000
en0: flags=80008802<BROADCAST,SIMPLEX,MULTICAST,SHIM> mtu 1500
address: 00:07:e9:b9:31:77
media: Ethernet none
status: no carrier
3com
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 33192
inet 127.0.0.1 netmask 0xff000000
en0: flags=80008802<BROADCAST,SIMPLEX,MULTICAST,SHIM> mtu 1500
capabilities=7<IP4CSUM,TCP4CSUM,UDP4CSUM>
enabled=0
address: 00:50:04:7a:fa:cf
media: Ethernet none full-duplex
status: active
3com 2
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 33192
inet 127.0.0.1 netmask 0xff000000
en0: flags=80008802<BROADCAST,SIMPLEX,MULTICAST,SHIM> mtu 1500
capabilities=7<IP4CSUM,TCP4CSUM,UDP4CSUM>
enabled=0
address: 00:01:02:45:44:a0
media: Ethernet none full-duplex
status: active
pid tid name prio STATE Blocked
2342938 1 sbin/io-pkt-v4-hc 21r SIGWAITINFO
2342938 2 sbin/io-pkt-v4-hc 21r RECEIVE 1
2342938 3 sbin/io-pkt-v4-hc 21r RECEIVE 16
2375727 1 sbin/io-pkt-v4-hc 21r SIGWAITINFO
2375727 2 sbin/io-pkt-v4-hc 21r RECEIVE 1
2375727 3 sbin/io-pkt-v4-hc 21r RECEIVE 16
2408497 1 sbin/io-pkt-v4-hc 21r SIGWAITINFO

# ls /dev/
[snip]
io-net1
io-net2
io-net3
io-net4
[snip]

________________________________________________________________________
NOTE: This entry has been validated against the SDP version listed above. Use caution when considering this advice for any other SDP version. For supported releases, please reach out to QNX Technical Support if you have any questions/concerns.
________________________________________________________________________


Related Attachments
 None Found





Please contact us with your questions or concerns.