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