[Previous] [Contents] [Index] [Next]


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 default gateway, in standard dot notation.
A TCP/IP interface with the following parameters:
The type of interface being configured. Currently, it must be en (Ethernet: one of the devn-*.so drivers).
A number that specifies the particular instance of the interface type.
IP address of the interface, in standard dot notation.
Netmask of the interface, in standard dot notation. The netmask is optional and defaults to something sensible, based on the class of the address specified in ip_addr.
A route for the interface, with the following parameters:
IP address of the destination for this route, in standard dot notation.
Netmask for this route, to determine if the destination is a host or a network (a host has a netmask of
The gateway used to reach the destination in standard dot notation.

The route= options must be specified after if= options or you could get "no route to host" errors.

Verbosity level; a higher level produces more diagnostic messages.


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.

Note: If you want name resolution to work, you should also set up /etc/resolv.conf and /etc/hosts.


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      netmask       up
en0   : addr      netmask       up
lo0   : addr       netmask       up

DST:       NETMASK: GATEWAY: ppp0           
DST:        NETMASK:       GATEWAY:     
DST:        NETMASK:       GATEWAY: en0           
DST:       NETMASK:       GATEWAY: lo0            
DST:         NETMASK:         GATEWAY:      

TCP         >        ESTABLISHED snd 8192 rcv    0
TCP       >        ESTABLISHED snd    0 rcv    0
TCP       >        ESTABLISHED snd    0 rcv    0
TCP       >        ESTABLISHED snd    0 rcv    0
TCP                                    LISTEN
TCP                                    LISTEN
TCP                                    LISTEN

Note: 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.

Development Considerations

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.

Supported setsockopt() options

The following setsockopt() options are supported by npm-ttcpip.so:

For more information, see "Options" in the description of getsockopt() in the Library Reference.

Supported ioctl() options

The following ioctl() options are supported by npm-ttcpip.so:

Set/clear nonblocking I/O.
Get the number of bytes to read.
Set the owner.
Add a route.
Determine if you're at an out-of-band mark.
Delete a route.
Get the address of the network associated with an interface.
Get the broadcast address.
Get the list of networks associated with interfaces.
Get the point-to-point address.
Get the flags for the network associated with an interface.
Get the network address mask.
Set the address of the network associated with an interface.
Set the point-to-point address.
Set the flags for the network associated with an interface.
Set the network address mask.

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 and a netmask of (the default), adds a route to reach network through the gateway at 10.25 and is slightly verbose:

io-net -dne2000 -pttcpip \

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

io-net -dne2000 -pttcpip if=en0:10.163

See also:

/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

[Previous] [Contents] [Index] [Next]