CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
rapid7

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.

GitHub Repository: rapid7/metasploit-framework
Path: blob/master/external/source/shellcode/osx/syscall.h
Views: 11780
1
/*
2
* Copyright (c) 2000-2003 Apple Computer, Inc. All rights reserved.
3
*
4
* @APPLE_LICENSE_HEADER_START@
5
*
6
* The contents of this file constitute Original Code as defined in and
7
* are subject to the Apple Public Source License Version 1.1 (the
8
* "License"). You may not use this file except in compliance with the
9
* License. Please obtain a copy of the License at
10
* http://www.apple.com/publicsource and read it before using this file.
11
*
12
* This Original Code and all software distributed under the License are
13
* distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
14
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
15
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
16
* FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the
17
* License for the specific language governing rights and limitations
18
* under the License.
19
*
20
* @APPLE_LICENSE_HEADER_END@
21
*/
22
/* Copyright (c) 1992, 1995-1999 Apple Computer, Inc. All Rights Reserved */
23
/*
24
*
25
* The NEXTSTEP Software License Agreement specifies the terms
26
* and conditions for redistribution.
27
*
28
*/
29
#include <sys/appleapiopts.h>
30
31
#ifdef __APPLE_API_PRIVATE
32
33
#define SYS_syscall 0
34
#define SYS_exit 1
35
#define SYS_fork 2
36
#define SYS_read 3
37
#define SYS_write 4
38
#define SYS_open 5
39
#define SYS_close 6
40
#define SYS_wait4 7
41
/* 8 is old creat */
42
#define SYS_link 9
43
#define SYS_unlink 10
44
/* 11 is obsolete execv */
45
#define SYS_chdir 12
46
#define SYS_fchdir 13
47
#define SYS_mknod 14
48
#define SYS_chmod 15
49
#define SYS_chown 16
50
/* 17 is obsolete sbreak */
51
#if COMPAT_GETFSSTAT
52
/* 18 is old getfsstat */
53
#else
54
#define SYS_getfsstat 18
55
#endif
56
/* 19 is old lseek */
57
#define SYS_getpid 20
58
/* 21 is obsolete mount */
59
/* 22 is obsolete umount */
60
#define SYS_setuid 23
61
#define SYS_getuid 24
62
#define SYS_geteuid 25
63
#define SYS_ptrace 26
64
#define SYS_recvmsg 27
65
#define SYS_sendmsg 28
66
#define SYS_recvfrom 29
67
#define SYS_accept 30
68
#define SYS_getpeername 31
69
#define SYS_getsockname 32
70
#define SYS_access 33
71
#define SYS_chflags 34
72
#define SYS_fchflags 35
73
#define SYS_sync 36
74
#define SYS_kill 37
75
/* 38 is old stat */
76
#define SYS_getppid 39
77
/* 40 is old lstat */
78
#define SYS_dup 41
79
#define SYS_pipe 42
80
#define SYS_getegid 43
81
#define SYS_profil 44
82
#define SYS_ktrace 45
83
#define SYS_sigaction 46
84
#define SYS_getgid 47
85
#define SYS_sigprocmask 48
86
#define SYS_getlogin 49
87
#define SYS_setlogin 50
88
#define SYS_acct 51
89
#define SYS_sigpending 52
90
#define SYS_sigaltstack 53
91
#define SYS_ioctl 54
92
#define SYS_reboot 55
93
#define SYS_revoke 56
94
#define SYS_symlink 57
95
#define SYS_readlink 58
96
#define SYS_execve 59
97
#define SYS_umask 60
98
#define SYS_chroot 61
99
/* 62 is old fstat */
100
/* 63 is unused */
101
/* 64 is old getpagesize */
102
#define SYS_msync 65
103
#define SYS_vfork 66
104
/* 67 is obsolete vread */
105
/* 68 is obsolete vwrite */
106
#define SYS_sbrk 69
107
#define SYS_sstk 70
108
/* 71 is old mmap */
109
/* 72 is obsolete vadvise */
110
#define SYS_munmap 73
111
#define SYS_mprotect 74
112
#define SYS_madvise 75
113
/* 76 is obsolete vhangup */
114
/* 77 is obsolete vlimit */
115
#define SYS_mincore 78
116
#define SYS_getgroups 79
117
#define SYS_setgroups 80
118
#define SYS_getpgrp 81
119
#define SYS_setpgid 82
120
#define SYS_setitimer 83
121
/* 84 is old wait */
122
#define SYS_swapon 85
123
#define SYS_getitimer 86
124
/* 87 is old gethostname */
125
/* 88 is old sethostname */
126
#define SYS_getdtablesize 89
127
#define SYS_dup2 90
128
#define SYS_fcntl 92
129
#define SYS_select 93
130
/* 94 is obsolete setdopt */
131
#define SYS_fsync 95
132
#define SYS_setpriority 96
133
#define SYS_socket 97
134
#define SYS_connect 98
135
/* 99 is old accept */
136
#define SYS_getpriority 100
137
/* 101 is old send */
138
/* 102 is old recv */
139
#ifndef __ppc__
140
#define SYS_sigreturn 103
141
#endif
142
#define SYS_bind 104
143
#define SYS_setsockopt 105
144
#define SYS_listen 106
145
/* 107 is obsolete vtimes */
146
/* 108 is old sigvec */
147
/* 109 is old sigblock */
148
/* 110 is old sigsetmask */
149
#define SYS_sigsuspend 111
150
/* 112 is old sigstack */
151
/* 113 is old recvmsg */
152
/* 114 is old sendmsg */
153
/* 115 is obsolete vtrace */
154
#define SYS_gettimeofday 116
155
#define SYS_getrusage 117
156
#define SYS_getsockopt 118
157
/* 119 is obsolete resuba */
158
#define SYS_readv 120
159
#define SYS_writev 121
160
#define SYS_settimeofday 122
161
#define SYS_fchown 123
162
#define SYS_fchmod 124
163
/* 125 is old recvfrom */
164
/* 126 is old setreuid */
165
/* 127 is old setregid */
166
#define SYS_rename 128
167
/* 129 is old truncate */
168
/* 130 is old ftruncate */
169
#define SYS_flock 131
170
#define SYS_mkfifo 132
171
#define SYS_sendto 133
172
#define SYS_shutdown 134
173
#define SYS_socketpair 135
174
#define SYS_mkdir 136
175
#define SYS_rmdir 137
176
#define SYS_utimes 138
177
#define SYS_futimes 139
178
#define SYS_adjtime 140
179
/* 141 is old getpeername */
180
/* 142 is old gethostid */
181
/* 143 is old sethostid */
182
/* 144 is old getrlimit */
183
/* 145 is old setrlimit */
184
/* 146 is old killpg */
185
#define SYS_setsid 147
186
/* 148 is obsolete setquota */
187
/* 149 is obsolete quota */
188
/* 150 is old getsockname */
189
#define SYS_getpgid 151
190
#define SYS_setprivexec 152
191
#define SYS_pread 153
192
#define SYS_pwrite 154
193
#define SYS_nfssvc 155
194
/* 156 is old getdirentries */
195
#define SYS_statfs 157
196
#define SYS_fstatfs 158
197
#define SYS_unmount 159
198
/* 160 is obsolete async_daemon */
199
#define SYS_getfh 161
200
/* 162 is old getdomainname */
201
/* 163 is old setdomainname */
202
/* 164 is obsolete pcfs_mount */
203
#define SYS_quotactl 165
204
/* 166 is obsolete exportfs */
205
#define SYS_mount 167
206
/* 168 is obsolete ustat */
207
/* 169 is unused */
208
#define SYS_table 170
209
/* 171 is old wait_3 */
210
/* 172 is obsolete rpause */
211
/* 173 is unused */
212
/* 174 is obsolete getdents */
213
#define SYS_gc_control 175
214
#define SYS_add_profil 176
215
/* 177 is unused */
216
/* 178 is unused */
217
/* 179 is unused */
218
#define SYS_kdebug_trace 180
219
#define SYS_setgid 181
220
#define SYS_setegid 182
221
#define SYS_seteuid 183
222
#ifdef __ppc__
223
#define SYS_sigreturn 184
224
#endif
225
/* 185 is unused */
226
/* 186 is unused */
227
/* 187 is unused */
228
#define SYS_stat 188
229
#define SYS_fstat 189
230
#define SYS_lstat 190
231
#define SYS_pathconf 191
232
#define SYS_fpathconf 192
233
#if COMPAT_GETFSSTAT
234
#define SYS_getfsstat 193
235
#endif
236
#define SYS_getrlimit 194
237
#define SYS_setrlimit 195
238
#define SYS_getdirentries 196
239
#define SYS_mmap 197
240
#define SYS___syscall 198
241
#define SYS_lseek 199
242
#define SYS_truncate 200
243
#define SYS_ftruncate 201
244
#define SYS___sysctl 202
245
#define SYS_mlock 203
246
#define SYS_munlock 204
247
#define SYS_undelete 205
248
#define SYS_ATsocket 206
249
#define SYS_ATgetmsg 207
250
#define SYS_ATputmsg 208
251
#define SYS_ATPsndreq 209
252
#define SYS_ATPsndrsp 210
253
#define SYS_ATPgetreq 211
254
#define SYS_ATPgetrsp 212
255
/* 213 is reserved for AppleTalk */
256
#define SYS_kqueue_from_portset_np 214
257
#define SYS_kqueue_portset_np 215
258
#define SYS_mkcomplex 216
259
#define SYS_statv 217
260
#define SYS_lstatv 218
261
#define SYS_fstatv 219
262
#define SYS_getattrlist 220
263
#define SYS_setattrlist 221
264
#define SYS_getdirentriesattr 222
265
#define SYS_exchangedata 223
266
#define SYS_checkuseraccess 224
267
#define SYS_searchfs 225
268
269
/* 226 - 230 are reserved for HFS expansion */
270
/* 231 - 241 are reserved */
271
#define SYS_fsctl 242
272
/* 243 - 246 are reserved */
273
#define SYS_nfsclnt 247 /* from freebsd, for lockd */
274
#define SYS_fhopen 248 /* from freebsd, for lockd */
275
/* 249 is reserved */
276
#define SYS_minherit 250
277
#define SYS_semsys 251
278
#define SYS_msgsys 252
279
#define SYS_shmsys 253
280
#define SYS_semctl 254
281
#define SYS_semget 255
282
#define SYS_semop 256
283
#define SYS_semconfig 257
284
#define SYS_msgctl 258
285
#define SYS_msgget 259
286
#define SYS_msgsnd 260
287
#define SYS_msgrcv 261
288
#define SYS_shmat 262
289
#define SYS_shmctl 263
290
#define SYS_shmdt 264
291
#define SYS_shmget 265
292
#define SYS_shm_open 266
293
#define SYS_shm_unlink 267
294
#define SYS_sem_open 268
295
#define SYS_sem_close 269
296
#define SYS_sem_unlink 270
297
#define SYS_sem_wait 271
298
#define SYS_sem_trywait 272
299
#define SYS_sem_post 273
300
#define SYS_sem_getvalue 274
301
#define SYS_sem_init 275
302
#define SYS_sem_destroy 276
303
/* 277 - 295 are reserved */
304
#define SYS_load_shared_file 296
305
#define SYS_reset_shared_file 297
306
#define SYS_new_system_shared_regions 298
307
/* 299 - 309 are reserved */
308
#define SYS_getsid 310
309
/* 311 - 312 are reserved */
310
#define SYS_aio_fsync 313
311
#define SYS_aio_return 314
312
#define SYS_aio_suspend 315
313
#define SYS_aio_cancel 316
314
#define SYS_aio_error 317
315
#define SYS_aio_read 318
316
#define SYS_aio_write 319
317
#define SYS_lio_listio 320
318
/* 321 - 323 are reserved */
319
#define SYS_mlockall 324
320
#define SYS_munlockall 325
321
/* 326 is reserved */
322
#define SYS_issetugid 327
323
#define SYS___pthread_kill 328
324
#define SYS_pthread_sigmask 329
325
#define SYS_sigwait 330
326
327
#define SYS_audit 350 /* submit user space audit records */
328
#define SYS_auditon 351 /* audit subsystem control */
329
#define SYS_auditsvc 352 /* audit file control */
330
#define SYS_getauid 353
331
#define SYS_setauid 354
332
#define SYS_getaudit 355
333
#define SYS_setaudit 356
334
#define SYS_getaudit_addr 357
335
#define SYS_setaudit_addr 358
336
#define SYS_auditctl 359 /* audit control */
337
338
#define SYS_kqueue 362
339
#define SYS_kevent 363
340
#endif /* __APPLE_API_PRIVATE */
341
342