]> granicus.if.org Git - strace/commitdiff
net: decode more SOL_* socket options
authorEugene Syromyatnikov <evgsyr@gmail.com>
Mon, 7 May 2018 06:10:41 +0000 (06:10 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Tue, 8 May 2018 20:59:20 +0000 (20:59 +0000)
* xlat/sockalgoptions.in: New file.
* xlat/sockbluetoothoptions.in: Likewise.
* xlat/sockcaifoptions.in: Likewise.
* xlat/sockdccpoptions.in: Likewise.
* xlat/sockiucvoptions.in: Likewise.
* xlat/sockkcmoptions.in: Likewise.
* xlat/sockllcoptions.in: Likewise.
* xlat/socknfcllcpoptions.in: Likewise.
* xlat/sockpnpoptions.in: Likewise.
* xlat/sockpppol2tpoptions.in: Likewise.
* xlat/sockrdsoptions.in: Likewises.
* xlat/sockrxrpcoptions.in: Likewise.
* xlat/socktipcoptions.in: Likewise.
* xlat/socktlsoptions.in: Likewise.
* xlat/sockudpoptions.in: Likewise.
* net.c: Include "xlat/sockalgoptions.h", "xlat/sockbluetoothoptions.h",
"xlat/sockcaifoptions.h", "xlat/sockdccpoptions.h",
"xlat/sockiucvoptions.h", "xlat/sockkcmoptions.h",
"xlat/sockllcoptions.h", "xlat/socknfcllcpoptions.h",
"xlat/sockpnpoptions.h", "xlat/sockpppol2tpoptions.h",
"xlat/sockrdsoptions.h", "xlat/sockrxrpcoptions.h",
"xlat/socktipcoptions.h", "xlat/socktlsoptions.h",
and "xlat/sockudpoptions.h".
(print_sockopt_fd_level_name): Decode SOL_UDP, SOL_IRDA, SOL_LLC,
SOL_DCCP, SOL_TIPC, SOL_RXRPC, SOL_PPPOL2TP, SOL_BLUETOOTH, SOL_PNPIPE,
SOL_RDS, SOL_IUCV, SOL_CAIF, SOL_ALG, SOL_NFC, SOL_KCM, and SOL_TLS
socket option names.

Co-Authored-by: Dmitry V. Levin <ldv@altlinux.org>
17 files changed:
net.c
xlat/sockalgoptions.in [new file with mode: 0644]
xlat/sockbluetoothoptions.in [new file with mode: 0644]
xlat/sockcaifoptions.in [new file with mode: 0644]
xlat/sockdccpoptions.in [new file with mode: 0644]
xlat/sockirdaoptions.in [new file with mode: 0644]
xlat/sockiucvoptions.in [new file with mode: 0644]
xlat/sockkcmoptions.in [new file with mode: 0644]
xlat/sockllcoptions.in [new file with mode: 0644]
xlat/socknfcllcpoptions.in [new file with mode: 0644]
xlat/sockpnpoptions.in [new file with mode: 0644]
xlat/sockpppol2tpoptions.in [new file with mode: 0644]
xlat/sockrdsoptions.in [new file with mode: 0644]
xlat/sockrxrpcoptions.in [new file with mode: 0644]
xlat/socktipcoptions.in [new file with mode: 0644]
xlat/socktlsoptions.in [new file with mode: 0644]
xlat/sockudpoptions.in [new file with mode: 0644]

diff --git a/net.c b/net.c
index 2f4a6a68e5612af1b65faa30728c8340094fc4d1..a1f368de15d1018c9ed1740350479c59f9083227 100644 (file)
--- a/net.c
+++ b/net.c
@@ -438,6 +438,22 @@ SYS_FUNC(socketpair)
 #include "xlat/sockrawoptions.h"
 #include "xlat/socksctpoptions.h"
 #include "xlat/socktcpoptions.h"
+#include "xlat/sockudpoptions.h"
+#include "xlat/sockirdaoptions.h"
+#include "xlat/sockllcoptions.h"
+#include "xlat/sockdccpoptions.h"
+#include "xlat/socktipcoptions.h"
+#include "xlat/sockrxrpcoptions.h"
+#include "xlat/sockpppol2tpoptions.h"
+#include "xlat/sockbluetoothoptions.h"
+#include "xlat/sockpnpoptions.h"
+#include "xlat/sockrdsoptions.h"
+#include "xlat/sockiucvoptions.h"
+#include "xlat/sockcaifoptions.h"
+#include "xlat/sockalgoptions.h"
+#include "xlat/socknfcllcpoptions.h"
+#include "xlat/sockkcmoptions.h"
+#include "xlat/socktlsoptions.h"
 
 static void
 print_sockopt_fd_level_name(struct tcb *tcp, int fd, unsigned int level,
@@ -478,6 +494,54 @@ print_sockopt_fd_level_name(struct tcb *tcp, int fd, unsigned int level,
        case SOL_NETLINK:
                printxval(socknetlinkoptions, name, "NETLINK_???");
                break;
+       case SOL_UDP:
+               printxval(sockudpoptions, name, "UDP_???");
+               break;
+       case SOL_IRDA:
+               printxval_index(sockirdaoptions, name, "IRLMP_???");
+               break;
+       case SOL_LLC:
+               printxval_index(sockllcoptions, name, "LLC_OPT_???");
+               break;
+       case SOL_DCCP:
+               printxval_search(sockdccpoptions, name, "DCCP_SOCKOPT_???");
+               break;
+       case SOL_TIPC:
+               printxval_search(socktipcoptions, name, "TIPC_???");
+               break;
+       case SOL_RXRPC:
+               printxval_index(sockrxrpcoptions, name, "RXRPC_???");
+               break;
+       case SOL_PPPOL2TP:
+               printxval_index(sockpppol2tpoptions, name, "PPPOL2TP_SO_???");
+               break;
+       case SOL_BLUETOOTH:
+               printxval_search(sockbluetoothoptions, name, "BT_???");
+               break;
+       case SOL_PNPIPE:
+               printxval(sockpnpoptions, name, "PNPIPE_???");
+               break;
+       case SOL_RDS:
+               printxval(sockrdsoptions, name, "RDS_???");
+               break;
+       case SOL_IUCV:
+               printxval(sockiucvoptions, name, "SO_???");
+               break;
+       case SOL_CAIF:
+               printxval(sockcaifoptions, name, "CAIFSO_???");
+               break;
+       case SOL_ALG:
+               printxval_index(sockalgoptions, name, "ALG_???");
+               break;
+       case SOL_NFC:
+               printxval_index(socknfcllcpoptions, name, "NFC_LLCP_???");
+               break;
+       case SOL_KCM:
+               printxval(sockkcmoptions, name, "KCM_???");
+               break;
+       case SOL_TLS:
+               printxval(socktlsoptions, name, "TLS_???");
+               break;
 
                /* Other SOL_* protocol levels still need work. */
 
diff --git a/xlat/sockalgoptions.in b/xlat/sockalgoptions.in
new file mode 100644 (file)
index 0000000..a1fb4a1
--- /dev/null
@@ -0,0 +1,6 @@
+#value_indexed
+ALG_SET_KEY            1
+ALG_SET_IV             2
+ALG_SET_OP             3
+ALG_SET_AEAD_ASSOCLEN  4
+ALG_SET_AEAD_AUTHSIZE  5
diff --git a/xlat/sockbluetoothoptions.in b/xlat/sockbluetoothoptions.in
new file mode 100644 (file)
index 0000000..919b21b
--- /dev/null
@@ -0,0 +1,9 @@
+/* sort -k2,2n */
+BT_SECURITY            4
+BT_DEFER_SETUP         7
+BT_FLUSHABLE           8
+BT_POWER               9
+BT_CHANNEL_POLICY      10
+BT_VOICE               11
+BT_SNDMTU              12
+BT_RCVMTU              13
diff --git a/xlat/sockcaifoptions.in b/xlat/sockcaifoptions.in
new file mode 100644 (file)
index 0000000..5e1c044
--- /dev/null
@@ -0,0 +1,3 @@
+CAIFSO_LINK_SELECT     127
+CAIFSO_REQ_PARAM       128
+CAIFSO_RSP_PARAM       129
diff --git a/xlat/sockdccpoptions.in b/xlat/sockdccpoptions.in
new file mode 100644 (file)
index 0000000..06a0efe
--- /dev/null
@@ -0,0 +1,17 @@
+/* sort -k2,2n */
+DCCP_SOCKOPT_PACKET_SIZE       1
+DCCP_SOCKOPT_SERVICE           2
+DCCP_SOCKOPT_CHANGE_L          3
+DCCP_SOCKOPT_CHANGE_R          4
+DCCP_SOCKOPT_GET_CUR_MPS       5
+DCCP_SOCKOPT_SERVER_TIMEWAIT   6
+DCCP_SOCKOPT_SEND_CSCOV                10
+DCCP_SOCKOPT_RECV_CSCOV                11
+DCCP_SOCKOPT_AVAILABLE_CCIDS   12
+DCCP_SOCKOPT_CCID              13
+DCCP_SOCKOPT_TX_CCID           14
+DCCP_SOCKOPT_RX_CCID           15
+DCCP_SOCKOPT_QPOLICY_ID                16
+DCCP_SOCKOPT_QPOLICY_TXQLEN    17
+DCCP_SOCKOPT_CCID_RX_INFO      128
+DCCP_SOCKOPT_CCID_TX_INFO      192
diff --git a/xlat/sockirdaoptions.in b/xlat/sockirdaoptions.in
new file mode 100644 (file)
index 0000000..a26e098
--- /dev/null
@@ -0,0 +1,12 @@
+#value_indexed
+IRLMP_ENUMDEVICES      1
+IRLMP_IAS_SET          2
+IRLMP_IAS_QUERY                3
+IRLMP_HINTS_SET                4
+IRLMP_QOS_SET          5
+IRLMP_QOS_GET          6
+IRLMP_MAX_SDU_SIZE     7
+IRLMP_IAS_GET          8
+IRLMP_IAS_DEL          9
+IRLMP_HINT_MASK_SET    10
+IRLMP_WAITDEVICE       11
diff --git a/xlat/sockiucvoptions.in b/xlat/sockiucvoptions.in
new file mode 100644 (file)
index 0000000..827b54c
--- /dev/null
@@ -0,0 +1,3 @@
+SO_IPRMDATA_MSG        0x0080
+SO_MSGLIMIT    0x1000
+SO_MSGSIZE     0x0800
diff --git a/xlat/sockkcmoptions.in b/xlat/sockkcmoptions.in
new file mode 100644 (file)
index 0000000..ee58639
--- /dev/null
@@ -0,0 +1 @@
+KCM_RECV_DISABLE       1
diff --git a/xlat/sockllcoptions.in b/xlat/sockllcoptions.in
new file mode 100644 (file)
index 0000000..7a948d7
--- /dev/null
@@ -0,0 +1,11 @@
+#value_indexed
+LLC_OPT_UNKNOWN                0
+LLC_OPT_RETRY          1
+LLC_OPT_SIZE           2
+LLC_OPT_ACK_TMR_EXP    3
+LLC_OPT_P_TMR_EXP      4
+LLC_OPT_REJ_TMR_EXP    5
+LLC_OPT_BUSY_TMR_EXP   6
+LLC_OPT_TX_WIN         7
+LLC_OPT_RX_WIN         8
+LLC_OPT_PKTINFO                9
diff --git a/xlat/socknfcllcpoptions.in b/xlat/socknfcllcpoptions.in
new file mode 100644 (file)
index 0000000..c9f9fdc
--- /dev/null
@@ -0,0 +1,6 @@
+#value_indexed
+NFC_LLCP_RW            0
+NFC_LLCP_MIUX          1
+NFC_LLCP_REMOTE_MIU    2
+NFC_LLCP_REMOTE_LTO    3
+NFC_LLCP_REMOTE_RW     4
diff --git a/xlat/sockpnpoptions.in b/xlat/sockpnpoptions.in
new file mode 100644 (file)
index 0000000..a8d939c
--- /dev/null
@@ -0,0 +1,4 @@
+PNPIPE_ENCAP           1
+PNPIPE_IFINDEX         2
+PNPIPE_HANDLE          3
+PNPIPE_INITSTATE       4
diff --git a/xlat/sockpppol2tpoptions.in b/xlat/sockpppol2tpoptions.in
new file mode 100644 (file)
index 0000000..9c4177a
--- /dev/null
@@ -0,0 +1,6 @@
+#value_indexed
+PPPOL2TP_SO_DEBUG      1
+PPPOL2TP_SO_RECVSEQ    2
+PPPOL2TP_SO_SENDSEQ    3
+PPPOL2TP_SO_LNSMODE    4
+PPPOL2TP_SO_REORDERTO  5
diff --git a/xlat/sockrdsoptions.in b/xlat/sockrdsoptions.in
new file mode 100644 (file)
index 0000000..806fd46
--- /dev/null
@@ -0,0 +1,24 @@
+RDS_CANCEL_SENT_TO     1
+RDS_GET_MR             2
+RDS_FREE_MR            3
+RDS_BARRIER            4
+RDS_RECVERR            5
+RDS_CONG_MONITOR       6
+RDS_GET_MR_FOR_DEST    7
+SO_RDS_TRANSPORT       8
+SO_RDS_MSG_RXPATH_LATENCY      10
+
+/* It's 29 except for hppa where it's 0x4012, so we can't even simply assume that the xlat is sorted */
+SO_TIMESTAMP
+
+RDS_INFO_COUNTERS              10000
+RDS_INFO_CONNECTIONS           10001
+RDS_INFO_FLOWS                 10002
+RDS_INFO_SEND_MESSAGES         10003
+RDS_INFO_RETRANS_MESSAGES      10004
+RDS_INFO_RECV_MESSAGES         10005
+RDS_INFO_SOCKETS               10006
+RDS_INFO_TCP_SOCKETS           10007
+RDS_INFO_IB_CONNECTIONS                10008
+RDS_INFO_CONNECTION_STATS      10009
+RDS_INFO_IWARP_CONNECTIONS     10010
diff --git a/xlat/sockrxrpcoptions.in b/xlat/sockrxrpcoptions.in
new file mode 100644 (file)
index 0000000..5540829
--- /dev/null
@@ -0,0 +1,7 @@
+#value_indexed
+RXRPC_SECURITY_KEY             1
+RXRPC_SECURITY_KEYRING         2
+RXRPC_EXCLUSIVE_CONNECTION     3
+RXRPC_MIN_SECURITY_LEVEL       4
+RXRPC_UPGRADEABLE_SERVICE      5
+RXRPC_SUPPORTED_CMSG           6
diff --git a/xlat/socktipcoptions.in b/xlat/socktipcoptions.in
new file mode 100644 (file)
index 0000000..849e50d
--- /dev/null
@@ -0,0 +1,11 @@
+/* sort -k2,2n */
+TIPC_IMPORTANCE                127
+TIPC_SRC_DROPPABLE     128
+TIPC_DEST_DROPPABLE    129
+TIPC_CONN_TIMEOUT      130
+TIPC_NODE_RECVQ_DEPTH  131
+TIPC_SOCK_RECVQ_DEPTH  132
+TIPC_MCAST_BROADCAST   133
+TIPC_MCAST_REPLICAST   134
+TIPC_GROUP_JOIN                135
+TIPC_GROUP_LEAVE       136
diff --git a/xlat/socktlsoptions.in b/xlat/socktlsoptions.in
new file mode 100644 (file)
index 0000000..5fcefd6
--- /dev/null
@@ -0,0 +1,2 @@
+TLS_TX 1
+TLS_RX 2
diff --git a/xlat/sockudpoptions.in b/xlat/sockudpoptions.in
new file mode 100644 (file)
index 0000000..18ec8d4
--- /dev/null
@@ -0,0 +1,4 @@
+UDP_CORK               1
+UDP_ENCAP              100
+UDP_NO_CHECK6_TX       101
+UDP_NO_CHECK6_RX       102