2015-12-17 17:56:48 +00:00
/*
* Copyright ( c ) 2013 - 2015 Dmitry V . Levin < ldv @ altlinux . org >
2017-05-22 19:14:52 +02:00
* Copyright ( c ) 2013 - 2017 The strace developers .
2015-12-17 17:56:48 +00:00
* All rights reserved .
*
* Redistribution and use in source and binary forms , with or without
* modification , are permitted provided that the following conditions
* are met :
* 1. Redistributions of source code must retain the above copyright
* notice , this list of conditions and the following disclaimer .
* 2. Redistributions in binary form must reproduce the above copyright
* notice , this list of conditions and the following disclaimer in the
* documentation and / or other materials provided with the distribution .
* 3. The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission .
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ` ` AS IS ' ' AND ANY EXPRESS OR
* IMPLIED WARRANTIES , INCLUDING , BUT NOT LIMITED TO , THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED .
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT , INDIRECT ,
* INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT
* NOT LIMITED TO , PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES ; LOSS OF USE ,
* DATA , OR PROFITS ; OR BUSINESS INTERRUPTION ) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY , WHETHER IN CONTRACT , STRICT LIABILITY , OR TORT
* ( INCLUDING NEGLIGENCE OR OTHERWISE ) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE , EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE .
*/
2013-05-07 18:38:01 +04:00
# ifndef SYS_socket_subcall
# error SYS_socket_subcall is not defined
# endif
2015-01-11 13:56:40 +00:00
2015-01-10 22:01:35 +03:00
# define IS TRACE_INDIRECT_SUBCALL
2015-07-10 22:24:48 +03:00
[ SYS_socket_subcall + 1 ] = { 3 , IS | TN , SEN ( socket ) , " socket " } ,
[ SYS_socket_subcall + 2 ] = { 3 , IS | TN , SEN ( bind ) , " bind " } ,
[ SYS_socket_subcall + 3 ] = { 3 , IS | TN , SEN ( connect ) , " connect " } ,
[ SYS_socket_subcall + 4 ] = { 2 , IS | TN , SEN ( listen ) , " listen " } ,
[ SYS_socket_subcall + 5 ] = { 3 , IS | TN , SEN ( accept ) , " accept " } ,
[ SYS_socket_subcall + 6 ] = { 3 , IS | TN , SEN ( getsockname ) , " getsockname " } ,
[ SYS_socket_subcall + 7 ] = { 3 , IS | TN , SEN ( getpeername ) , " getpeername " } ,
[ SYS_socket_subcall + 8 ] = { 4 , IS | TN , SEN ( socketpair ) , " socketpair " } ,
[ SYS_socket_subcall + 9 ] = { 4 , IS | TN , SEN ( send ) , " send " } ,
[ SYS_socket_subcall + 10 ] = { 4 , IS | TN , SEN ( recv ) , " recv " } ,
[ SYS_socket_subcall + 11 ] = { 6 , IS | TN , SEN ( sendto ) , " sendto " } ,
[ SYS_socket_subcall + 12 ] = { 6 , IS | TN , SEN ( recvfrom ) , " recvfrom " } ,
[ SYS_socket_subcall + 13 ] = { 2 , IS | TN , SEN ( shutdown ) , " shutdown " } ,
[ SYS_socket_subcall + 14 ] = { 5 , IS | TN , SEN ( setsockopt ) , " setsockopt " } ,
[ SYS_socket_subcall + 15 ] = { 5 , IS | TN , SEN ( getsockopt ) , " getsockopt " } ,
[ SYS_socket_subcall + 16 ] = { 3 , IS | TN , SEN ( sendmsg ) , " sendmsg " } ,
[ SYS_socket_subcall + 17 ] = { 3 , IS | TN , SEN ( recvmsg ) , " recvmsg " } ,
[ SYS_socket_subcall + 18 ] = { 4 , IS | TN , SEN ( accept4 ) , " accept4 " } ,
[ SYS_socket_subcall + 19 ] = { 5 , IS | TN , SEN ( recvmmsg ) , " recvmmsg " } ,
[ SYS_socket_subcall + 20 ] = { 4 , IS | TN , SEN ( sendmmsg ) , " sendmmsg " } ,
2015-01-11 13:56:40 +00:00
2015-02-26 22:07:14 +00:00
# define SYS_socket_nsubcalls 21
2015-01-11 13:56:40 +00:00
# define SYS_ipc_subcall ((SYS_socket_subcall) + (SYS_socket_nsubcalls))
2015-07-10 22:24:48 +03:00
[ SYS_ipc_subcall + 1 ] = { 4 , IS | TI , SEN ( semop ) , " semop " } ,
[ SYS_ipc_subcall + 2 ] = { 3 , IS | TI , SEN ( semget ) , " semget " } ,
[ SYS_ipc_subcall + 3 ] = { 4 , IS | TI , SEN ( semctl ) , " semctl " } ,
[ SYS_ipc_subcall + 4 ] = { 5 , IS | TI , SEN ( semtimedop ) , " semtimedop " } ,
[ SYS_ipc_subcall + 11 ] = { 4 , IS | TI , SEN ( msgsnd ) , " msgsnd " } ,
2016-07-22 01:17:25 +00:00
[ SYS_ipc_subcall + 12 ] = { 5 , IS | TI , SEN ( msgrcv ) , " msgrcv " } ,
2015-07-10 22:24:48 +03:00
[ SYS_ipc_subcall + 13 ] = { 2 , IS | TI , SEN ( msgget ) , " msgget " } ,
[ SYS_ipc_subcall + 14 ] = { 4 , IS | TI , SEN ( msgctl ) , " msgctl " } ,
[ SYS_ipc_subcall + 21 ] = { 4 , IS | TI | TM | SI , SEN ( shmat ) , " shmat " } ,
[ SYS_ipc_subcall + 22 ] = { 4 , IS | TI | TM | SI , SEN ( shmdt ) , " shmdt " } ,
[ SYS_ipc_subcall + 23 ] = { 3 , IS | TI , SEN ( shmget ) , " shmget " } ,
[ SYS_ipc_subcall + 24 ] = { 4 , IS | TI , SEN ( shmctl ) , " shmctl " } ,
2015-01-11 13:56:40 +00:00
2013-05-07 18:38:01 +04:00
# define SYS_ipc_nsubcalls 25
2015-01-10 22:01:35 +03:00
# undef IS