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

npm-tcpip.so

Full TCP/IP stack (QNX Neutrino)

Syntax:

io-net ... -p tcpip tcpip_options ...

Options:

The tcpip_options are one or more of the following, separated by commas without whitespace:

external_arp
Enable use of external ip_en converter module (default is builtin).
fastforward
Enable fastforwarding path. This is useful for gateways.
forward
Enable forwarding between interfaces.
ipsec
Enable IPSec support (default is off).
prefix=/path
Path to prepend to traditional /dev/socket. This option is useful when running multiple stacks.
ngif=num
Number of GIF interfaces to create (default is 0).
nipip=num
Number of IPIP (IP tunneling protocol) interfaces to create (default is 0).
ngre=num
Number of GRE (Generic Routing Encapsulation) interfaces to create (default is 0).
nvlan=num
Number of VLAN interfaces to create (default is 0).
random
Use /dev/random as source of random data. The default is to use the builtin pseudo-random generator.
recv_ctxt=num
Size of the receive context buffer, in bytes (default is 2048).
reuseport_unicast
If using SO_REUSEPORT socket option, unicast packets are received on all sockets bound to the same port.
somaxconn=num
Maximum queue length. The default length is specified by SOMAXCONN, which is defined in <sys/socket.h>.
stacksize=num
Size of each thread's stack, in bytes (default is 2912).
threads=num
Number of threads (default is 48, minimum is 4).

Description:

The npm-tcpip.so interface is a full TCP/IP stack. It provides protocol support to the network I/O manager, io-net. Supported address families include:

AF_INET
ARPA Internet
AF_INET6
ARPA Internet version 6
AF_LOCAL
Unix
AF_ROUTE
Routing socket

For routing socket information, see ROUTE in the Library Reference.


Note: If you're working in resource-constrained environments, you might want to use npm-ttcpip.so, which implements a subset of the functionality usually found in full TCP/IP implementations.

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.

While npm-tcpip.so is running, you can get statistics on the interfaces, routes, and connections from the netstat utility.

Examples:

The following io-net command uses the NE-2000 driver (devn-ne2000.so), and the networking stack with IPSec and forwarding enabled. The ifconfig command configures the ethernet interface to an IP address of 10.0.0.163 and the route command set the default gateway to 10.0.0.25:

io-net -dne2000 -ptcpip ipsec,forward
ifconfig en0 10.163
route add default 10.25

If running multiple stacks, a particular instance is targeted by clients with the SOCK environment variable, as follows:

io-net -i1 -ptcpip prefix=/alt
SOCK=/alt ifconfig -a

See also:

/etc/autoconnect, dd, /etc/hosts, ifconfig, io-net, netstat, ping, pppd, /etc/resolv.conf, route, sysctl

"Network drivers (devn-*)" and "Network protocol modules (npm-*)" in the Utilities Summary

getsockopt(), ioctl(), setsockopt(), and ROUTE in the Library Reference

TCP/IP Networking in the Neutrino User's Guide


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