BINDTEST(1)

NAME
bindtest - test bind(2) behavior on IPv6 implementation

SYNOPSIS
bindtest [-APst] -p port

DESCRIPTION
bindtest tests interaction between IPv4/IPv6 socket interface, implemented into the kernel it has underneath.

RFC2553 defines socket API for IPv6, and relationship between IPv6 wildcard bind(2) socket (::.port) and IPv4 wildcard bind(2) socket (0.0.0.0.port). However, the document does not define ordering constraints between them, relationship with specific bind(2), nor relationship with speficfic bind(2) using IPv4 mapped IPv6 address (::ffff:127.0.0.1).

bindtest tries to reveal the behavior implemented in the kernel, and shows some report to standard output. As RFC2553 does not define the expected behavior, we have no idea what the result should be.

By default bindtest will use SOCK_DGRAM socket for testing. With -t, bindtest will use SOCK_STREAM socket instead. TCP/UDP port number must be specified with -p port. The port needs to be vacant.

-A sets SO_REUSEADDR socket option for all the sockets. -P sets SO_REUSEPORT socket option for all the sockets.

With -s, bindtest generates summarized output instead of verbose output. Here are legends for summarized output. bindtest will make a two set of socket(2) and bind(2). The first set is presented on the lefthand side. The second set is presented above the table.

o   The second bind(2) attempt was successful after the first bind(2).

x   bind(2) failed for the second set, with EADDRINUSE.

!1  socket(2) failed for the first set. Normally you will not see this, unless you run bindtest on IPv4-only/IPv6-only kernel.

!2  socket(2) failed for the second set. Normally you will not see this, unless you run bindtest on IPv4-only/IPv6-only kernel.

?1  bind(2) failed for the first set.

?2  bind(2) failed for the second set, with some error other than EADDRINUSE.

RETURN VALUES
bindtest exits with 0 on success, and non-zero on errors.

SEE ALSO
R. Gilligan, S. Thomson, J. Bound, W. Stevens, Basic Socket Interface Extensions for IPv6, March 1999, RFC2553.

bind(2), tcpdump(8)

HISTORY
The bindtest command first appeared in WIDE/KAME IPv6 protocol stack kit.