The socktype option was documented as type option

This commit is contained in:
Gerhard Rieger 2021-12-26 10:04:13 +01:00
parent d6e5de4f93
commit 08666f631f
3 changed files with 9 additions and 4 deletions

View file

@ -46,6 +46,10 @@ Testing:
OpenIndiana/SunOS netstat format; OpenIndiana/SunOS netstat format;
many more functional and cosmetic code corrections. many more functional and cosmetic code corrections.
Documentation:
The socktype option was documented unspecifically as type option.
Thanks to Jonas Metzger for the hint.
####################### V 1.7.4.2: ####################### V 1.7.4.2:
Corrections: Corrections:

View file

@ -1982,12 +1982,12 @@ label(OPTION_PROTOCOL_FAMILY)dit(bf(tt(pf=<string>)))
used as first argument to the code(socket()) or code(socketpair()) calls. used as first argument to the code(socket()) or code(socketpair()) calls.
This option affects address resolution and the required syntax of bind and This option affects address resolution and the required syntax of bind and
range options. range options.
label(OPTION_SO_TYPE)dit(bf(tt(type=<type>))) label(OPTION_SO_TYPE)dit(bf(tt(socktype=<type>)))
Sets the type of the socket, specified as second argument to the Sets the type of the socket, specified as second argument to the
code(socket()) or code(socketpair()) calls, to <type> code(socket()) or code(socketpair()) calls, to <type>
[link(int)(TYPE_INT)]. Address resolution is not affected by this option. [link(int)(TYPE_INT)]. Address resolution is not affected by this option.
Under Linux, 1 means stream oriented socket, 2 means datagram socket, and 3 Under Linux, 1 means stream oriented socket, 2 means datagram socket, 3
means raw socket. means raw socket, and 5 seqpacket (stream keeping packet boundaries).
label(OPTION_SO_PROTOCOL)dit(bf(tt(protocol))) label(OPTION_SO_PROTOCOL)dit(bf(tt(protocol)))
Sets the protocol of the socket, specified as third argument to the Sets the protocol of the socket, specified as third argument to the
code(socket()) or code(socketpair()) calls, to <protocol> code(socket()) or code(socketpair()) calls, to <protocol>

View file

@ -422,7 +422,7 @@ else
SECONDIP6ADDR="[$SECONDIP6ADDR]" SECONDIP6ADDR="[$SECONDIP6ADDR]"
fi fi
TRUE=$(type true) TRUE=$(which true)
#E=-e # Linux #E=-e # Linux
if [ $(echo "x\c") = "x" ]; then E="" if [ $(echo "x\c") = "x" ]; then E=""
elif [ $(echo -e "x\c") = "x" ]; then E="-e" elif [ $(echo -e "x\c") = "x" ]; then E="-e"
@ -4046,6 +4046,7 @@ TEST="$NAME: exec against address with ignoreeof"
if ! eval $NUMCOND; then :; else if ! eval $NUMCOND; then :; else
tf="$td/test$N.stdout" tf="$td/test$N.stdout"
te="$td/test$N.stderr" te="$td/test$N.stderr"
# remark: diagnostics to null, no good style
CMD="$TRACE $SOCAT $opts -lf /dev/null EXEC:$TRUE /dev/null,ignoreeof" CMD="$TRACE $SOCAT $opts -lf /dev/null EXEC:$TRUE /dev/null,ignoreeof"
printf "test $F_n $TEST... " $N printf "test $F_n $TEST... " $N
$CMD >"$tf" 2>"$te" $CMD >"$tf" 2>"$te"