Tiny TCP/IP stack (QNX Neutrino)
io-net ... -p ttcpip ttcpip_options ...
The ttcpip_options are one or more of the following, separated by commas without whitespace:
The route= options must be specified after if= options or you could get "no route to host" errors.
The npm-ttcpip.so interface is a tiny TCP/IP stack for use in resource-constrained environments; it implements a subset of the functionality usually found in full TCP/IP implementations, such as npm-tcpip.so.
The npm-ttcpip.so interface currently provides multiple interfaces, broadcasting, IP fragmentation, reception of urgent data, raw IP, some ICMP messages, UDP and TCP support to the network I/O manager, io-net.
After configuring your hardware you should try to ping the machine from another to make sure it's configured correctly. If that doesn't work, check the parameters specified to your networking hardware.
The npm-ttcpip.so interface has some limitations in order to keep it small. It doesn't support:
While npm-ttcpip.so is running, you can get statistics on the interfaces, routes, and connections from the /proc/ipstats device:
$ cat /proc/ipstats Ttcpip Jan 11 1999 17:05:05 verbosity level 0 ip checksum errors: 0 udp checksum errors: 0 tcp checksum errors: 0 packets sent: 1306 packets received: 429 ppp0 : addr 10.0.0.163 netmask 255.0.0.0 up en0 : addr 10.0.0.163 netmask 255.0.0.0 up lo0 : addr 127.0.0.1 netmask 255.0.0.0 up DST: 10.0.0.25 NETMASK: 255.255.255.255 GATEWAY: ppp0 DST: 126.96.36.199 NETMASK: 255.0.0.0 GATEWAY: 10.0.0.109 DST: 10.0.0.0 NETMASK: 255.0.0.0 GATEWAY: en0 DST: 127.0.0.0 NETMASK: 255.0.0.0 GATEWAY: lo0 DST: 0.0.0.0 NETMASK: 0.0.0.0 GATEWAY: 10.0.0.25 TCP 10.0.0.163.19 > 10.0.0.25.1117 ESTABLISHED snd 8192 rcv 0 TCP 10.0.0.163.1026 > 10.0.0.25.2049 ESTABLISHED snd 0 rcv 0 TCP 10.0.0.163.1029 > 10.0.0.25.2049 ESTABLISHED snd 0 rcv 0 TCP 10.0.0.163.1030 > 10.0.0.25.2049 ESTABLISHED snd 0 rcv 0 TCP 0.0.0.0.19 LISTEN TCP 0.0.0.0.23 LISTEN TCP 0.0.0.0.21 LISTEN
|In order to obtain all current statistics, the client accessing the /proc/ipstats device must provide a buffer large enough to contain the information in a single read operation. If the default buffer for your client is too small, see the ibs option to the dd utility.|
If you are developing applications using the tiny stack, be aware that it supports only a subset of the options supported by the big stack.
The following setsockopt() options are supported by npm-ttcpip.so:
For more information, see "Options" in the description of getsockopt() in the Library Reference.
The following ioctl() options are supported by npm-ttcpip.so:
For more information, see <sys/ioctl.h>.
The following io-net command uses an NE-2000 driver (devn-ne2000.so), specifies an interface with an IP address of 10.0.0.163 and a netmask of 255.0.0.0 (the default), adds a route to reach network 188.8.131.52 through the gateway at 10.25 and is slightly verbose:
io-net -dne2000 -pttcpip \ if=en0:10.163,route=11.0:255.0:10.109,default=10.25,verbose=1
The following command tells io-net to load the NE-2000 driver and the tiny stack protocol. The tiny stack is told to preallocate an interface of type Ethernet and assign it the address 10.0.0.163:
io-net -dne2000 -pttcpip if=en0:10.163
/etc/autoconnect, dd, /etc/hosts, io-net, ping, pppd, /etc/resolv.conf
"Network drivers (devn-*)" and "Network protocol modules (npm-*)" in the Utilities Summary
getsockopt(), ioctl(), setsockopt() in the Library Reference
TCP/IP Networking in the Neutrino User's Guide