Migrating from QNX SDP 7.1 io-pkt to QNX SDP 8.0 io-sock
Applications that use io-pkt can be modified to use io-sock. QNX recommends the following initial modifications to make them compatible.
libsocket.so shared library
There is no io-sock version of the libsocket.a static library. Instead, your io-sock applications should link against the libsocket.so shared library. Many of the prerequisite header files that are included in io-pkt header files are not included by io-sock header files. For example, in_var.h requires net/if.h and if_dl.h requires sys/types.h.
etc/hosts
Both io-pkt and io-sock use a etc/hosts file for information about known hosts. Unlike io-pkt, io-sock does not support using IPv4 shorthand for addresses (e.g., 127.1) in its /etc/hosts. Use four-part Internet addresses only (e.g., 192.0.2.1). For more information, see the FreeBSD hosts documentation (https://www.freebsd.org/cgi/man.cgi?query=hosts&sektion=5&manpath=FreeBSD+13.4-RELEASE+and+Ports).
etc/protocols
The io-sock packages include an io-sock version of etc/protocols. Unlike io-pkt, running io-sock without etc/protocols generates errors, and you can't use the io-pkt version of etc/protocols with io-sock.
Sending RAW packets
When RAW packets are sent with the IP header, io-sock converts ip_len and ip_off from host byte order to network byte order. Because io-pkt does not perform this conversion, you may need to revise your application code.
UNIX LOCAL_CREDS socket option and SCM_CREDS control message
The UNIX-domain protocol family that io-sock uses is ported from FreeBSD. Differences from the UNIX-domain protocol family used by io-pkt include different behavior for the LOCAL_CREDS socket option and the SCM_CREDS control message. For more information, see the FreeBSD unix documentation (https://www.freebsd.org/cgi/man.cgi?query=unix&sektion=4&manpath=FreeBSD+13.4-RELEASE+and+Ports).
accept()
The accept() function returns EINTR if the socket is closed locally. (The io-pkt version of accept() returns ECONNABORTED). For more information, see the FreeBSD accept() documentation (https://www.freebsd.org/cgi/man.cgi?query=accept&sektion=2&manpath=FreeBSD+13.4-RELEASE+and+Ports).
connect()
If you use connect() to connect to a socket after you have shut down its connection using shutdown(), connect() returns the error EINTR. (The io-pkt version of connect() returns EISCONN.) For more information, see the FreeBSD connect() documentation (https://www.freebsd.org/cgi/man.cgi?query=connect&manpath=FreeBSD+13.4-RELEASE+and+Ports).
Process manager abilities
The abilities io-sock uses to govern specific networking operations are
different than the io-pkt ones. There are also differences in the
sysctl commands that are used to drop the privileges
io-sock needs during startup and apply a reduced set of
privileges for normal operation. For more information, see Privilege control
in the High-Performance Networking Stack
(io-sock) User's Guide.
Plug and Play
With Plug and Play, an interface is automatically attached after it is inserted into the bus, provided there is a driver loaded that supports the interface.
For io-sock, Plug and Play is enabled by default. However, you may
need to disable Plug and Play if you want to run multiple instances of the stack
with two or more Network Interface Controllers of the same type. For more
information, see Running multiple stacks with network interface controllers of the same
type
in the High-Performance Networking Stack
(io-sock) User's Guide.
Deprecated socket APIs
FreeBSD has deprecated some of the io-sock equivalents of
functions that io-pkt provides. For a list of these APIs and the
ones that replace them, see Socket
API
in the High-Performance Networking Stack
(io-sock) User's Guide.