File indexing completed on 2025-09-15 09:14:18
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032 #ifndef __VKI_DARWIN_H
0033 #define __VKI_DARWIN_H
0034
0035
0036
0037 #ifndef _XOPEN_SOURCE
0038 #define _XOPEN_SOURCE 0500
0039 #endif
0040
0041 #include <stdint.h>
0042
0043 #define vki_int8_t int8_t
0044 #define vki_uint8_t uint8_t
0045 #define vki_int16_t int16_t
0046 #define vki_uint16_t uint16_t
0047 #define vki_int32_t int32_t
0048 #define vki_uint32_t uint32_t
0049 #define vki_int64_t int64_t
0050 #define vki_uint64_t uint64_t
0051 #define vki_intptr_t intptr_t
0052 #define vki_uintptr_t uintptr_t
0053
0054 #include <sys/types.h>
0055
0056 #define vki_dev_t dev_t
0057 #define vki_mode_t mode_t
0058 #define vki_ino_t ino_t
0059 #define vki_ino64_t ino64_t
0060 #define vki_nlink_t nlink_t
0061 #define vki_uid_t uid_t
0062 #define vki_gid_t gid_t
0063 #define vki_time_t time_t
0064 #define vki_off_t off_t
0065 #define vki_blkcnt_t blkcnt_t
0066 #define vki_blksize_t blksize_t
0067 #define vki_size_t size_t
0068 #define vki_ssize_t ssize_t
0069 #define vki_pid_t pid_t
0070 #define vki_socklen_t socklen_t
0071 #define vki_suseconds_t suseconds_t
0072 #define vki_caddr_t caddr_t
0073 #define vki_u_long u_long
0074 #define vki_u_short u_short
0075 #define vki_clock_t clock_t
0076 #define vki_u_int32_t u_int32_t
0077 #define vki_u_int16_t u_int16_t
0078 #define vki_pthread_t pthread_t
0079
0080
0081
0082
0083
0084 #define VKI_MAP_ANONYMOUS MAP_ANON
0085
0086
0087 #define VM_TAG_VALGRIND VM_MAKE_TAG(239)
0088
0089
0090 #define VKI_MAX_PAGE_SHIFT VKI_PAGE_SHIFT
0091 #define VKI_MAX_PAGE_SIZE VKI_PAGE_SIZE
0092
0093
0094 typedef uint32_t vki_u32;
0095
0096
0097 #define _VKI_IOC_DIR(x) ((x) & IOC_DIRMASK)
0098 #define _VKI_IOC_SIZE(x) IOCPARM_LEN(x)
0099 #define _VKI_IOC_NONE IOC_VOID
0100 #define _VKI_IOC_READ IOC_OUT
0101 #define _VKI_IOC_WRITE IOC_IN
0102
0103
0104 #include <malloc/malloc.h>
0105
0106 #define vki_malloc_zone_t malloc_zone_t
0107
0108
0109 #include <sys/time.h>
0110
0111 #define vki_timeval timeval
0112 #define vki_timeval32 timeval32
0113 #define vki_tv_sec tv_sec
0114 #define vki_tv_usec tv_usec
0115 #define vki_timespec timespec
0116 #define vki_itimerval itimerval
0117 #define vki_timezone timezone
0118
0119
0120 #include <sys/stat.h>
0121
0122 #define VKI_S_ISBLK(m) S_ISBLK(m)
0123 #define VKI_S_ISCHR(m) S_ISCHR(m)
0124 #define VKI_S_ISDIR(m) S_ISDIR(m)
0125 #define VKI_S_ISFIFO(m) S_ISFIFO(m)
0126 #define VKI_S_ISREG(m) S_ISREG(m)
0127 #define VKI_S_ISLNK(m) S_ISLNK(m)
0128 #define VKI_S_ISSOCK(m) S_ISSOCK(m)
0129 #define VKI_S_ISWHT(m) S_ISWHT(m)
0130 #define VKI_S_ISXATTR(m) S_ISXATTR(m)
0131
0132 #define VKI_S_IRWXU S_IRWXU
0133 #define VKI_S_IRUSR S_IRUSR
0134 #define VKI_S_IWUSR S_IWUSR
0135 #define VKI_S_IXUSR S_IXUSR
0136 #define VKI_S_IRWXG S_IRWXG
0137 #define VKI_S_IRGRP S_IRGRP
0138 #define VKI_S_IWGRP S_IWGRP
0139 #define VKI_S_IXGRP S_IXGRP
0140 #define VKI_S_IRWXO S_IRWXO
0141 #define VKI_S_IROTH S_IROTH
0142 #define VKI_S_IWOTH S_IWOTH
0143 #define VKI_S_IXOTH S_IXOTH
0144 #define VKI_S_ISUID S_ISUID
0145 #define VKI_S_ISGID S_ISGID
0146 #define VKI_S_ISVTX S_ISVTX
0147
0148 #define vki_stat stat
0149 #define vki_stat64 stat64
0150
0151 #define st_atime st_atimespec.tv_sec
0152 #define st_atime_nsec st_atimespec.tv_nsec
0153 #define st_mtime st_mtimespec.tv_sec
0154 #define st_mtime_nsec st_mtimespec.tv_nsec
0155 #define st_ctime st_ctimespec.tv_sec
0156 #define st_ctime_nsec st_ctimespec.tv_nsec
0157
0158
0159 #include <sys/dirent.h>
0160
0161 #define VKI_MAXNAMLEN MAXNAMLEN
0162 #define vki_dirent dirent
0163
0164
0165 #include <sys/socket.h>
0166 #define VKI_SOCK_STREAM SOCK_STREAM
0167 #define VKI_SOCK_DGRAM SOCK_DGRAM
0168 #define VKI_SOCK_RAW SOCK_RAW
0169
0170 #define VKI_AF_UNIX AF_UNIX
0171 #define VKI_AF_INET AF_INET
0172 #define VKI_AF_INET6 AF_INET6
0173
0174 #define VKI_SOL_SOCKET SOL_SOCKET
0175
0176 #define VKI_SO_REUSEADDR SO_REUSEADDR
0177
0178 #define VKI_SO_SNDBUF SO_SNDBUF
0179 #define VKI_SO_RCVBUF SO_RCVBUF
0180 #define VKI_SO_SNDLOWAT SO_SNDLOWAT
0181 #define VKI_SO_RCVLOWAT SO_RCVLOWAT
0182 #define VKI_SO_SNDTIMEO SO_SNDTIMEO
0183 #define VKI_SO_RCVTIMEO SO_RCVTIMEO
0184 #define VKI_SO_ERROR SO_ERROR
0185 #define VKI_SO_TYPE SO_TYPE
0186 #define VKI_SO_NREAD SO_NREAD
0187 #define VKI_SO_NKE SO_NKE
0188 #define VKI_SO_NOSIGPIPE SO_NOSIGPIPE
0189 #define VKI_SO_NOADDRERR SO_NOADDRERR
0190 #define VKI_SO_NWRITE SO_NWRITE
0191 #define VKI_SO_LINGER_SEC SO_LINGER_SEC
0192
0193 #define vki_sa_family_t sa_family_t
0194 #define vki_sockaddr sockaddr
0195 #define vki_iovec iovec
0196 #define vki_msghdr msghdr
0197 #define vki_cmsghdr cmsghdr
0198
0199
0200 #define VKI_CMSG_ALIGN(a) ALIGN(a)
0201 #define VKI_CMSG_DATA(cmsg) CMSG_DATA(cmsg)
0202 #define VKI_CMSG_FIRSTHDR(mhdr) CMSG_FIRSTHDR(mhdr)
0203 #define VKI_CMSG_NXTHDR(mhdr, cmsg) CMSG_NXTHDR(mhdr, cmsg)
0204
0205 #define VKI_SCM_RIGHTS SCM_RIGHTS
0206 #define VKI_SCM_TIMESTAMP SCM_TIMESTAMP
0207 #define VKI_SCM_CREDS SCM_CREDS
0208
0209
0210 #include <sys/un.h>
0211
0212 #define vki_sockaddr_un sockaddr_un
0213
0214
0215 #include <netinet/in.h>
0216
0217 #define vki_in_addr_t in_addr_t
0218 #define vki_in_port_t in_port_t
0219 #define vki_in_addr in_addr
0220 #define vki_sockaddr_in sockaddr_in
0221
0222 #define VKI_INADDR_LOOPBACK INADDR_LOOPBACK
0223
0224
0225
0226
0227 #define vki_in6_addr in6_addr
0228 #define vki_sockaddr_in6 sockaddr_in6
0229
0230
0231 #include <net/if.h>
0232
0233 #define VKI_IFNAMSIZ IFNAMSIZ
0234
0235 #define vki_ifdevmtu ifdevmtu
0236 #define vki_ifreq ifreq
0237 #define vki_ifr_name ifr_name
0238 #define vki_ifr_addr ifr_addr
0239 #define vki_ifr_dstaddr ifr_dstaddr
0240 #define vki_ifr_broadaddr ifr_broadaddr
0241 #define vki_ifr_flags ifr_flags
0242 #define vki_ifr_metric ifr_metric
0243 #define vki_ifr_mtu ifr_mtu
0244 #define vki_ifr_phys ifr_phys
0245 #define vki_ifr_media ifr_media
0246 #define vki_ifr_data ifr_data
0247 #define vki_ifr_devmtu ifr_devmtu
0248 #define vki_ifr_intval ifr_intval
0249
0250 #define vki_ifconf ifconf
0251 #define vki_ifc_buf ifc_buf
0252 #define vki_ifc_req ifc_req
0253
0254
0255 #include <sys/fcntl.h>
0256
0257 #define VKI_SEEK_SET SEEK_SET
0258 #define VKI_SEEK_CUR SEEK_CUR
0259 #define VKI_SEEK_END SEEK_END
0260
0261 #define VKI_O_RDONLY O_RDONLY
0262 #define VKI_O_WRONLY O_WRONLY
0263 #define VKI_O_RDWR O_RDWR
0264 #define VKI_O_ACCMODE O_ACCMODE
0265 #define VKI_O_NONBLOCK O_NONBLOCK
0266 #define VKI_O_APPEND O_APPEND
0267 #define VKI_O_SYNC O_SYN
0268 #define VKI_O_SHLOCK O_SHLOCK
0269 #define VKI_O_EXLOCK O_EXLOCK
0270 #define VKI_O_ASYNC O_ASYNC
0271 #define VKI_O_NOFOLLOW O_NOFOLLOW
0272 #define VKI_O_CREAT O_CREAT
0273 #define VKI_O_TRUNC O_TRUNC
0274 #define VKI_O_EXCL O_EXCL
0275 #define VKI_O_EVTONLY O_EVTONLY
0276
0277 #define VKI_AT_FDCWD AT_FDCWD
0278
0279 #define VKI_F_DUPFD F_DUPFD
0280 #define VKI_F_GETFD F_GETFD
0281 #define VKI_F_SETFD F_SETFD
0282 #define VKI_F_GETFL F_GETFL
0283 #define VKI_F_SETFL F_SETFL
0284 #define VKI_F_GETOWN F_GETOWN
0285 #define VKI_F_SETOWN F_SETOWN
0286 #define VKI_F_GETLK F_GETLK
0287 #define VKI_F_SETLK F_SETLK
0288 #define VKI_F_SETLKW F_SETLKW
0289 #if DARWIN_VERS >= DARWIN_10_10
0290 #define VKI_F_SETLKWTIMEOUT F_SETLKWTIMEOUT
0291 #endif
0292
0293 #define VKI_F_CHKCLEAN F_CHKCLEAN
0294 #define VKI_F_PREALLOCATE F_PREALLOCATE
0295 #define VKI_F_SETSIZE F_SETSIZE
0296 #define VKI_F_RDADVISE F_RDADVISE
0297 #define VKI_F_RDAHEAD F_RDAHEAD
0298 #define VKI_F_READBOOTSTRAP F_READBOOTSTRAP
0299 #define VKI_F_WRITEBOOTSTRAP F_WRITEBOOTSTRAP
0300 #define VKI_F_NOCACHE F_NOCACHE
0301 #define VKI_F_LOG2PHYS F_LOG2PHYS
0302 #define VKI_F_GETPATH F_GETPATH
0303 #define VKI_F_ADDSIGS F_ADDSIGS
0304 #if DARWIN_VERS >= DARWIN_10_9
0305 # define VKI_F_ADDFILESIGS F_ADDFILESIGS
0306 #endif
0307 #if DARWIN_VERS >= DARWIN_10_11
0308 # define VKI_F_ADDFILESIGS_FOR_DYLD_SIM F_ADDFILESIGS_FOR_DYLD_SIM
0309 # define VKI_F_BARRIERFSYNC F_BARRIERFSYNC
0310 # define VKI_F_ADDFILESIGS_RETURN F_ADDFILESIGS_RETURN
0311 #endif
0312 #define VKI_F_FULLFSYNC F_FULLFSYNC
0313 #define VKI_F_PATHPKG_CHECK F_PATHPKG_CHECK
0314 #define VKI_F_FREEZE_FS F_FREEZE_FS
0315 #define VKI_F_THAW_FS F_THAW_FS
0316 #define VKI_F_GLOBAL_NOCACHE F_GLOBAL_NOCACHE
0317
0318 #define VKI_FD_CLOEXEC FD_CLOEXEC
0319
0320 #define vki_radvisory radvisory
0321 #define vki_fstore fstore
0322 #define vki_fbootstraptransfer fbootstraptransfer
0323 #define vki_log2phys log2phys
0324 #define vki_fsignatures_t fsignatures_t
0325
0326
0327
0328
0329 #define VKI_CS_OPS_STATUS 0
0330 #define VKI_CS_OPS_MARKINVALID 1
0331 #define VKI_CS_OPS_MARKHARD 2
0332 #define VKI_CS_OPS_MARKKILL 3
0333 #define VKI_CS_OPS_PIDPATH 4
0334 #define VKI_CS_OPS_CDHASH 5
0335
0336 #include <sys/mman.h>
0337
0338 #define VKI_PROT_NONE PROT_NONE
0339 #define VKI_PROT_READ PROT_READ
0340 #define VKI_PROT_WRITE PROT_WRITE
0341 #define VKI_PROT_EXEC PROT_EXEC
0342
0343 #define VKI_MAP_SHARED MAP_SHARED
0344 #define VKI_MAP_PRIVATE MAP_PRIVATE
0345 #define VKI_MAP_FIXED MAP_FIXED
0346 #define VKI_MAP_RENAME MAP_RENAME
0347 #define VKI_MAP_NORESERVE MAP_NORESERVE
0348 #define VKI_MAP_RESERVED0080 MAP_RESERVED0080
0349 #define VKI_MAP_NOEXTEND MAP_NOEXTEND
0350 #define VKI_MAP_HASSEMAPHORE MAP_HASSEMAPHORE
0351 #define VKI_MAP_FILE MAP_FILE
0352 #define VKI_MAP_ANON MAP_ANON
0353 #define VKI_MAP_FAILED MAP_FAILED
0354
0355
0356 #include <mach/vm_param.h>
0357
0358 #define VKI_PAGE_SHIFT PAGE_SHIFT
0359 #define VKI_PAGE_SIZE PAGE_SIZE
0360 #define VKI_PAGE_MASK PAGE_MASK
0361
0362
0363 #include <sys/vmparam.h>
0364
0365 #define VKI_USRSTACK USRSTACK
0366 #define VKI_USRSTACK64 USRSTACK64
0367
0368
0369 #include <mach/mach_time.h>
0370
0371 #define vki_mach_timebase_info mach_timebase_info
0372
0373
0374 #include <sys/syslimits.h>
0375
0376 #define VKI_PATH_MAX PATH_MAX
0377
0378
0379 #include <sys/param.h>
0380
0381 #define VKI_MAXPATHLEN MAXPATHLEN
0382
0383
0384 #include <sys/signal.h>
0385
0386
0387
0388
0389
0390
0391
0392
0393 #define _VKI_NSIG_BPW 32
0394 #define _VKI_NSIG 32
0395 #define _VKI_NSIG_WORDS (_VKI_NSIG / _VKI_NSIG_BPW)
0396 typedef struct {
0397 UInt sig[_VKI_NSIG_WORDS];
0398 } vki_sigset_t;
0399
0400
0401
0402
0403 #define VKI_SS_ONSTACK SS_ONSTACK
0404 #define VKI_SS_DISABLE SS_DISABLE
0405 #define VKI_MINSIGSTKSZ MINSIGSTKSZ
0406 #define VKI_SIGSTKSZ SIGSTKSZ
0407
0408 #define vki_stack_t stack_t
0409 #define vki_siginfo_t siginfo_t
0410
0411
0412
0413
0414
0415
0416
0417
0418
0419
0420
0421
0422
0423
0424
0425
0426
0427
0428
0429
0430 typedef
0431 struct {
0432 void* ksa_handler;
0433 void (*sa_tramp)(void*,UWord,UWord,void*,void*);
0434 vki_sigset_t sa_mask;
0435 int sa_flags;
0436 }
0437 vki_sigaction_toK_t;
0438
0439 typedef
0440 struct {
0441 void* ksa_handler;
0442 vki_sigset_t sa_mask;
0443 int sa_flags;
0444 }
0445 vki_sigaction_fromK_t;
0446
0447
0448
0449
0450
0451
0452
0453
0454
0455 #define VKI_SA_ONSTACK SA_ONSTACK
0456 #define VKI_SA_RESTART SA_RESTART
0457 #define VKI_SA_DISABLE SA_DISABLE
0458 #define VKI_SA_RESETHAND SA_RESETHAND
0459 #define VKI_SA_NOCLDSTOP SA_NOCLDSTOP
0460 #define VKI_SA_NODEFER SA_NODEFER
0461 #define VKI_SA_NOCLDWAIT SA_NOCLDWAIT
0462 #define VKI_SA_SIGINFO SA_SIGINFO
0463 #define VKI_SA_USERTRAMP SA_USERTRAMP
0464 #define VKI_SA_64REGSET SA_64REGSET
0465 #define VKI_SA_RESTORER 0
0466
0467 #define VKI_SIG_BLOCK SIG_BLOCK
0468 #define VKI_SIG_UNBLOCK SIG_UNBLOCK
0469 #define VKI_SIG_SETMASK SIG_SETMASK
0470
0471 #define VKI_SIGHUP SIGHUP
0472 #define VKI_SIGINT SIGINT
0473 #define VKI_SIGQUIT SIGQUIT
0474 #define VKI_SIGILL SIGILL
0475 #define VKI_SIGTRAP SIGTRAP
0476 #define VKI_SIGABRT SIGABRT
0477 #define VKI_SIGPOLL SIGPOLL
0478 #define VKI_SIGFPE SIGFPE
0479 #define VKI_SIGKILL SIGKILL
0480 #define VKI_SIGBUS SIGBUS
0481 #define VKI_SIGSEGV SIGSEGV
0482 #define VKI_SIGSYS SIGSYS
0483 #define VKI_SIGPIPE SIGPIPE
0484 #define VKI_SIGALRM SIGALRM
0485 #define VKI_SIGTERM SIGTERM
0486 #define VKI_SIGURG SIGURG
0487 #define VKI_SIGSTOP SIGSTOP
0488 #define VKI_SIGTSTP SIGTSTP
0489 #define VKI_SIGCONT SIGCONT
0490 #define VKI_SIGCHLD SIGCHLD
0491 #define VKI_SIGTTIN SIGTTIN
0492 #define VKI_SIGTTOU SIGTTOU
0493 #define VKI_SIGIO SIGIO
0494 #define VKI_SIGXCPU SIGXCPU
0495 #define VKI_SIGXFSZ SIGXFSZ
0496 #define VKI_SIGVTALRM SIGVTALRM
0497 #define VKI_SIGPROF SIGPROF
0498 #define VKI_SIGWINCH SIGWINCH
0499 #define VKI_SIGINFO SIGINFO
0500 #define VKI_SIGUSR1 SIGUSR1
0501 #define VKI_SIGUSR2 SIGUSR2
0502
0503 #define VKI_SIG_DFL SIG_DFL
0504 #define VKI_SIG_IGN SIG_IGN
0505
0506
0507 #define VKI_SI_USER SI_USER
0508 #define VKI_SEGV_MAPERR SEGV_MAPERR
0509 #define VKI_SEGV_ACCERR SEGV_ACCERR
0510 #define VKI_ILL_ILLOPC ILL_ILLOPC
0511 #define VKI_ILL_ILLOPN ILL_ILLOPN
0512 #define VKI_ILL_ILLADR ILL_ILLADR
0513 #define VKI_ILL_ILLTRP ILL_ILLTRP
0514 #define VKI_ILL_PRVOPC ILL_PRVOPC
0515 #define VKI_ILL_PRVREG ILL_PRVREG
0516 #define VKI_ILL_COPROC ILL_COPROC
0517 #define VKI_ILL_BADSTK ILL_BADSTK
0518 #define VKI_FPE_INTDIV FPE_INTDIV
0519 #define VKI_FPE_INTOVF FPE_INTOVF
0520 #define VKI_FPE_FLTDIV FPE_FLTDIV
0521 #define VKI_FPE_FLTOVF FPE_FLTOVF
0522 #define VKI_FPE_FLTUND FPE_FLTUND
0523 #define VKI_FPE_FLTRES FPE_FLTRES
0524 #define VKI_FPE_FLTINV FPE_FLTINV
0525 #define VKI_FPE_FLTSUB FPE_FLTSUB
0526 #define VKI_BUS_ADRALN BUS_ADRALN
0527 #define VKI_BUS_ADRERR BUS_ADRERR
0528 #define VKI_BUS_OBJERR BUS_OBJERR
0529 #define VKI_TRAP_BRKPT TRAP_BRKPT
0530 #define VKI_CLD_EXITED CLD_EXITED
0531 #define VKI_CLD_KILLED CLD_KILLED
0532 #define VKI_CLD_DUMPED CLD_DUMPED
0533 #define VKI_CLD_TRAPPED CLD_TRAPPED
0534 #define VKI_CLD_STOPPED CLD_STOPPED
0535 #define VKI_CLD_CONTINUED CLD_CONTINUED
0536
0537
0538 #define VKI_SA_ONESHOT SA_RESETHAND
0539 #define VKI_SA_NOMASK SA_NODEFER
0540
0541 #define VKI_UC_SET_ALT_STACK 0x40000000
0542 #define VKI_UC_RESET_ALT_STACK 0x80000000
0543
0544
0545 #include <sys/errno.h>
0546
0547 #define VKI_EPERM EPERM
0548 #define VKI_ENOENT ENOENT
0549 #define VKI_ESRCH ESRCH
0550 #define VKI_EINTR EINTR
0551 #define VKI_EIO EIO
0552 #define VKI_ENXIO ENXIO
0553 #define VKI_E2BIG E2BIG
0554 #define VKI_ENOEXEC ENOEXEC
0555 #define VKI_EBADF EBADF
0556 #define VKI_ECHILD ECHILD
0557 #define VKI_EDEADLK EDEADLK
0558 #define VKI_ENOMEM ENOMEM
0559 #define VKI_EACCES EACCES
0560 #define VKI_EFAULT EFAULT
0561 #define VKI_ENOTBLK ENOTBLK
0562 #define VKI_EBUSY EBUSY
0563 #define VKI_EEXIST EEXIST
0564 #define VKI_EXDEV EXDEV
0565 #define VKI_ENODEV ENODEV
0566 #define VKI_ENOTDIR ENOTDIR
0567 #define VKI_EISDIR EISDIR
0568 #define VKI_EINVAL EINVAL
0569 #define VKI_ENFILE ENFILE
0570 #define VKI_EMFILE EMFILE
0571 #define VKI_ENOTTY ENOTTY
0572 #define VKI_ETXTBSY ETXTBSY
0573 #define VKI_EFBIG EFBIG
0574 #define VKI_ENOSPC ENOSPC
0575 #define VKI_ESPIPE ESPIPE
0576 #define VKI_EROFS EROFS
0577 #define VKI_EMLINK EMLINK
0578 #define VKI_EPIPE EPIPE
0579 #define VKI_EDOM EDOM
0580 #define VKI_ERANGE ERANGE
0581 #define VKI_EAGAIN EAGAIN
0582 #define VKI_EWOULDBLOCK EAGAIN
0583 #define VKI_EINPROGRESS EINPROGRESS
0584 #define VKI_EALREADY EALREADY
0585 #define VKI_ENOTSOCK ENOTSOCK
0586 #define VKI_EDESTADDRREQ EDESTADDRREQ
0587 #define VKI_EMSGSIZE EMSGSIZE
0588 #define VKI_EPROTOTYPE EPROTOTYPE
0589 #define VKI_ENOPROTOOPT ENOPROTOOPT
0590 #define VKI_EPROTONOSUPPORT EPROTONOSUPPORT
0591 #define VKI_ESOCKTNOSUPPORT ESOCKTNOSUPPORT
0592 #define VKI_ENOTSUP ENOTSUP
0593 #define VKI_EPFNOSUPPORT EPFNOSUPPORT
0594 #define VKI_EAFNOSUPPORT EAFNOSUPPORT
0595 #define VKI_EADDRINUSE EADDRINUSE
0596 #define VKI_EADDRNOTAVAIL EADDRNOTAVAIL
0597 #define VKI_ENETDOWN ENETDOWN
0598 #define VKI_ENETUNREACH ENETUNREACH
0599 #define VKI_ENETRESET ENETRESET
0600 #define VKI_ECONNABORTED ECONNABORTED
0601 #define VKI_ECONNRESET ECONNRESET
0602 #define VKI_ENOBUFS ENOBUFS
0603 #define VKI_EISCONN EISCONN
0604 #define VKI_ENOTCONN ENOTCONN
0605 #define VKI_ESHUTDOWN ESHUTDOWN
0606 #define VKI_ETOOMANYREFS ETOOMANYREFS
0607 #define VKI_ETIMEDOUT ETIMEDOUT
0608 #define VKI_ECONNREFUSED ECONNREFUSED
0609 #define VKI_ELOOP ELOOP
0610 #define VKI_ENAMETOOLONG ENAMETOOLONG
0611 #define VKI_EHOSTDOWN EHOSTDOWN
0612 #define VKI_EHOSTUNREACH EHOSTUNREACH
0613 #define VKI_ENOTEMPTY ENOTEMPTY
0614 #define VKI_EPROCLIM EPROCLIM
0615 #define VKI_EUSERS EUSERS
0616 #define VKI_EDQUOT EDQUOT
0617 #define VKI_ESTALE ESTALE
0618 #define VKI_EREMOTE EREMOTE
0619 #define VKI_EBADRPC EBADRPC
0620 #define VKI_ERPCMISMATCH ERPCMISMATCH
0621 #define VKI_EPROGUNAVAIL EPROGUNAVAIL
0622 #define VKI_EPROGMISMATCH EPROGMISMATCH
0623 #define VKI_EPROCUNAVAIL EPROCUNAVAIL
0624 #define VKI_ENOLCK ENOLCK
0625 #define VKI_ENOSYS ENOSYS
0626 #define VKI_EFTYPE EFTYPE
0627 #define VKI_EAUTH EAUTH
0628 #define VKI_ENEEDAUTH ENEEDAUTH
0629 #define VKI_EPWROFF EPWROFF
0630 #define VKI_EDEVERR EDEVERR
0631 #define VKI_EOVERFLOW EOVERFLOW
0632 #define VKI_EBADEXEC EBADEXEC
0633 #define VKI_EBADARCH EBADARCH
0634 #define VKI_ESHLIBVERS ESHLIBVERS
0635 #define VKI_EBADMACHO EBADMACHO
0636 #define VKI_ECANCELED ECANCELED
0637 #define VKI_EIDRM EIDRM
0638 #define VKI_ENOMSG ENOMSG
0639 #define VKI_EILSEQ EILSEQ
0640 #define VKI_ENOATTR ENOATTR
0641 #define VKI_EBADMSG EBADMSG
0642 #define VKI_EMULTIHOP EMULTIHOP
0643 #define VKI_ENODATA ENODATA
0644 #define VKI_ENOLINK ENOLINK
0645 #define VKI_ENOSR ENOSR
0646 #define VKI_ENOSTR ENOSTR
0647 #define VKI_EPROTO EPROTO
0648 #define VKI_ETIME ETIME
0649 #define VKI_EOPNOTSUPP EOPNOTSUPP
0650 #define VKI_ELAST ELAST
0651
0652
0653 #include <sys/resource.h>
0654
0655 #define VKI_RLIMIT_CPU RLIMIT_CPU
0656 #define VKI_RLIMIT_FSIZE RLIMIT_FSIZE
0657 #define VKI_RLIMIT_DATA RLIMIT_DATA
0658 #define VKI_RLIMIT_STACK RLIMIT_STACK
0659 #define VKI_RLIMIT_CORE RLIMIT_CORE
0660 #define VKI_RLIMIT_AS RLIMIT_AD
0661 #define VKI_RLIMIT_RSS RLIMIT_AS
0662 #define VKI_RLIMIT_MEMLOCK RLIMIT_MEMLOCK
0663 #define VKI_RLIMIT_NPROC RLIMIT_NPROC
0664 #define VKI_RLIMIT_NOFILE RLIMIT_NOFILE
0665 #define VKI_RLIM_NLIMITS RLIM_NLIMITS
0666
0667 #define vki_rlim_t rlim_t
0668 #define vki_rlimit rlimit
0669 #define vki_rusage rusage
0670
0671
0672 #include <sys/poll.h>
0673
0674 #define vki_pollfd pollfd
0675
0676
0677 #include <sys/ipc.h>
0678
0679 #define VKI_IPC_RMID IPC_RMID
0680 #define VKI_IPC_SET IPC_SET
0681 #define VKI_IPC_STAT IPC_STAT
0682
0683 #define vki_key_t key_t
0684 #define vki_ipc_perm ipc_perm
0685
0686
0687 #include <sys/sem.h>
0688
0689 #define VKI_GETNCNT GETNCNT
0690 #define VKI_GETPID GETPID
0691 #define VKI_GETVAL GETVAL
0692 #define VKI_GETALL GETALL
0693 #define VKI_GETZCNT GETZCNT
0694 #define VKI_SETVAL SETVAL
0695 #define VKI_SETALL SETALL
0696
0697 #define vki_sembuf sembuf
0698 #define vki_semid_ds semid_ds
0699 #define vki_semun semun
0700
0701
0702 #include <sys/semaphore.h>
0703
0704 #define vki_sem_t sem_t
0705
0706
0707 #include <sys/mount.h>
0708
0709 #define VKI_MFSNAMELEN MFSNAMELEN
0710 #define VKI_MNAMELEN MNAMELEN
0711
0712 #define vki_fsid fsid
0713 #define vki_fsid_t fsid_t
0714 #define vki_statfs statfs
0715 #define vki_statfs64 statfs64
0716
0717
0718 #include <sys/select.h>
0719
0720 #define vki_fd_set fd_set
0721
0722
0723 #include <sys/msgbuf.h>
0724
0725 #define VKI_MSG_BSIZE MSG_BSIZE
0726 #define VKI_MSG_MAGIC MSG_MAGIC
0727 #define vki_msgbuf msgbuf
0728
0729
0730 #include <sys/shm.h>
0731
0732 #define VKI_SHM_RDONLY SHM_RDONLY
0733 #define VKI_SHM_RND SHM_RND
0734 #define VKI_SHMLBA SHMLBA
0735
0736 #define vki_shmid_ds shmid_ds
0737
0738
0739 #include <sys/times.h>
0740
0741 #define vki_tms tms
0742
0743
0744 #include <sys/utsname.h>
0745
0746 #define _VKI_SYS_NAMELEN _SYS_NAMELEN
0747 #define vki_new_utsname utsname
0748
0749
0750 #include <sys/unistd.h>
0751
0752 #define VKI_F_OK F_OK
0753 #define VKI_X_OK X_OK
0754 #define VKI_W_OK W_OK
0755 #define VKI_R_OK R_OK
0756
0757 #define vki_accessx_descriptor accessx_descriptor
0758 #define VKI_ACCESSX_MAX_DESCRIPTORS ACCESSX_MAX_DESCRIPTORS
0759
0760 #include <sys/sysctl.h>
0761
0762 #define VKI_CTL_MAXNAME CTL_MAXNAME
0763
0764 #define VKI_CTL_UNSPEC CTL_UNSPEC
0765 #define VKI_CTL_KERN CTL_KERN
0766 #define VKI_CTL_VM CTL_VM
0767 #define VKI_CTL_VFS CTL_VFS
0768 #define VKI_CTL_NET CTL_NET
0769 #define VKI_CTL_DEBUG CTL_DEBUG
0770 #define VKI_CTL_HW CTL_HW
0771 #define VKI_CTL_MACHDEP CTL_MACHDEP
0772 #define VKI_CTL_USER CTL_USER
0773 #define VKI_CTL_MAXID CTL_MAXID
0774
0775 #define VKI_HW_MACHINE HW_MACHINE
0776 #define VKI_HW_MODEL HW_MODEL
0777 #define VKI_HW_NCPU HW_NCPU
0778 #define VKI_HW_BYTEORDER HW_BYTEORDER
0779 #define VKI_HW_PHYSMEM HW_PHYSMEM
0780 #define VKI_HW_USERMEM HW_USERMEM
0781 #define VKI_HW_PAGESIZE HW_PAGESIZE
0782 #define VKI_HW_DISKNAMES HW_DISKNAMES
0783 #define VKI_HW_DISKSTATS HW_DISKSTATS
0784 #define VKI_HW_EPOCH HW_EPOCH
0785 #define VKI_HW_FLOATINGPT HW_FLOATINGPT
0786 #define VKI_HW_MACHINE_ARCH HW_MACHINE_ARCH
0787 #define VKI_HW_VECTORUNIT HW_VECTORUNIT
0788 #define VKI_HW_BUS_FREQ HW_BUS_FREQ
0789 #define VKI_HW_CPU_FREQ HW_CPU_FREQ
0790 #define VKI_HW_CACHELINE HW_CACHELINE
0791 #define VKI_HW_L1ICACHESIZE HW_L1ICACHESIZE
0792 #define VKI_HW_L1DCACHESIZE HW_L1DCACHESIZE
0793 #define VKI_HW_L2SETTINGS HW_L2SETTINGS
0794 #define VKI_HW_L2CACHESIZE HW_L2CACHESIZE
0795 #define VKI_HW_L3SETTINGS HW_L3SETTINGS
0796 #define VKI_HW_L3CACHESIZE HW_L3CACHESIZE
0797 #define VKI_HW_TB_FREQ HW_TB_FREQ
0798 #define VKI_HW_MEMSIZE HW_MEMSIZE
0799 #define VKI_HW_AVAILCPU MW_AVAILCPU
0800 #define VKI_HW_MAXID MW_MAXID
0801
0802 #define VKI_KERN_USRSTACK32 KERN_USRSTACK32
0803 #define VKI_KERN_USRSTACK64 KERN_USRSTACK64
0804
0805
0806 #include <sys/attr.h>
0807
0808 #define vki_attrlist attrlist
0809
0810
0811 #include <sys/event.h>
0812
0813 #define vki_kevent kevent
0814 #define vki_kevent64 kevent64_s
0815
0816
0817
0818 struct vki_kevent_qos_s {
0819 uint64_t ident;
0820 int16_t filter;
0821 uint16_t flags;
0822 int32_t qos;
0823 uint64_t udata;
0824 uint32_t fflags;
0825 uint32_t xflags;
0826 int64_t data;
0827 uint64_t ext[4];
0828 };
0829
0830 #include <sys/ev.h>
0831
0832 typedef struct eventreq vki_eventreq;
0833
0834
0835 #include <sys/acl.h>
0836
0837 #define vki_kauth_filesec kauth_filesec
0838
0839
0840 #include <sys/ptrace.h>
0841
0842 #define VKI_PTRACE_TRACEME PT_TRACE_ME
0843 #define VKI_PTRACE_DETACH PT_DETACH
0844
0845
0846
0847
0848 struct ByteRangeLockPB2
0849 {
0850 unsigned long long offset;
0851 unsigned long long length;
0852 unsigned long long retRangeStart;
0853 unsigned char unLockFlag;
0854 unsigned char startEndFlag;
0855 int fd;
0856 };
0857
0858 #define afpfsByteRangeLock2FSCTL _IOWR('z', 23, struct ByteRangeLockPB2)
0859
0860 #define vki_ByteRangeLockPB2 ByteRangeLockPB2
0861 #define VKI_afpfsByteRangeLock2FSCTL afpfsByteRangeLock2FSCTL
0862
0863
0864
0865
0866 #define VKI_FSIOC_SYNC_VOLUME _IOW('A', 1, uint32_t)
0867
0868
0869
0870
0871 #define VKI_WQOPS_QUEUE_ADD 1
0872 #define VKI_WQOPS_QUEUE_REMOVE 2
0873 #define VKI_WQOPS_THREAD_RETURN 4
0874 #define VKI_WQOPS_THREAD_SETCONC 8
0875 #define VKI_WQOPS_QUEUE_NEWSPISUPP 16
0876 #define VKI_WQOPS_QUEUE_REQTHREADS 32
0877 #define VKI_WQOPS_QUEUE_REQTHREADS2 48
0878 #define VKI_WQOPS_THREAD_KEVENT_RETURN 64
0879 #define VKI_WQOPS_SET_EVENT_MANAGER_PRIORITY 128
0880 #define VKI_WQOPS_THREAD_WORKLOOP_RETURN 256
0881 #define VKI_WQOPS_SHOULD_NARROW 512
0882
0883
0884 #include <sys/ttycom.h>
0885
0886 #define vki_winsize winsize
0887
0888 #define VKI_TIOCMODG TIOCMODG
0889 #define VKI_TIOCMODS TIOCMODS
0890 #define VKI_TIOCEXCL TIOCEXCL
0891 #define VKI_TIOCNXCL TIOCNXCL
0892 #define VKI_TIOCFLUSH TIOCFLUSH
0893 #define VKI_TIOCGETA TIOCGETA
0894 #define VKI_TIOCSETA TIOCSETA
0895 #define VKI_TIOCSETAW TIOCSETAW
0896 #define VKI_TIOCSETAF TIOCSETAF
0897 #define VKI_TIOCGETD TIOCGETD
0898 #define VKI_TIOCSETD TIOCSETD
0899 #define VKI_TIOCSBRK TIOCSBRK
0900 #define VKI_TIOCCBRK TIOCCBRK
0901 #define VKI_TIOCSDTR TIOCSDTR
0902 #define VKI_TIOCCDTR TIOCCDTR
0903 #define VKI_TIOCGPGRP TIOCGPGRP
0904 #define VKI_TIOCSPGRP TIOCSPGRP
0905 #define VKI_TIOCOUTQ TIOCOUTQ
0906 #define VKI_TIOCSTI TIOCSTI
0907 #define VKI_TIOCNOTTY TIOCNOTTY
0908 #define VKI_TIOCPKT TIOCPKT
0909 #define VKI_TIOCSTOP TIOCSTOP
0910 #define VKI_TIOCSTART TIOCSTART
0911 #define VKI_TIOCMSET TIOCMSET
0912 #define VKI_TIOCMBIS TIOCMBIS
0913 #define VKI_TIOCMBIC TIOCMBIC
0914 #define VKI_TIOCMGET TIOCMGET
0915 #define VKI_TIOCREMOTE TIOCREMOTE
0916 #define VKI_TIOCGWINSZ TIOCGWINSZ
0917 #define VKI_TIOCSWINSZ TIOCSWINSZ
0918 #define VKI_TIOCUCNTL TIOCUCNTL
0919 #define VKI_TIOCSTAT TIOCSTAT
0920 #define VKI_UIOCCMD(n) UIOCCMD(n)
0921 #define VKI_TIOCSCONS TIOCSCONS
0922 #define VKI_TIOCCONS TIOCCONS
0923 #define VKI_TIOCSCTTY TIOCSCTTY
0924 #define VKI_TIOCEXT TIOCEXT
0925 #define VKI_TIOCSIG TIOCSIG
0926 #define VKI_TIOCDRAIN TIOCDRAIN
0927 #define VKI_TIOCMSDTRWAIT TIOCMSDTRWAIT
0928 #define VKI_TIOCMGDTRWAIT TIOCMGDTRWAIT
0929 #define VKI_TIOCTIMESTAMP TIOCTIMESTAMP
0930 #define VKI_TIOCDCDTIMESTAMP TIOCDCDTIMESTAMP
0931 #define VKI_TIOCSDRAINWAIT TIOCSDRAINWAIT
0932 #define VKI_TIOCGDRAINWAIT TIOCGDRAINWAIT
0933 #define VKI_TIOCDSIMICROCODE TIOCDSIMICROCODE
0934 #define VKI_TIOCPTYGRANT TIOCPTYGRANT
0935 #define VKI_TIOCPTYGNAME TIOCPTYGNAME
0936 #define VKI_TIOCPTYUNLK TIOCPTYUNLK
0937
0938
0939 #include <sys/filio.h>
0940
0941 #define VKI_FIOCLEX FIOCLEX
0942 #define VKI_FIONCLEX FIONCLEX
0943 #define VKI_FIONREAD FIONREAD
0944 #define VKI_FIONBIO FIONBIO
0945 #define VKI_FIOASYNC FIOASYNC
0946 #define VKI_FIOSETOWN FIOSETOWN
0947 #define VKI_FIOGETOWN FIOGETOWN
0948 #define VKI_FIODTYPE FIODTYPE
0949
0950
0951 #include <sys/sockio.h>
0952
0953 #define VKI_SIOCSHIWAT SIOCSHIWAT
0954 #define VKI_SIOCGHIWAT SIOCGHIWAT
0955 #define VKI_SIOCSLOWAT SIOCSLOWAT
0956 #define VKI_SIOCGLOWAT SIOCGLOWAT
0957 #define VKI_SIOCATMARK SIOCATMARK
0958 #define VKI_SIOCSPGRP SIOCSPGRP
0959 #define VKI_SIOCGPGRP SIOCGPGRP
0960
0961 #define VKI_SIOCSIFADDR SIOCSIFADDR
0962 #define VKI_OSIOCGIFADDR OSIOCGIFADDR
0963 #define VKI_SIOCSIFDSTADDR SIOCSIFDSTADDR
0964 #define VKI_OSIOCGIFDSTADDR OSIOCGIFDSTADDR
0965 #define VKI_SIOCSIFFLAGS SIOCSIFFLAGS
0966 #define VKI_SIOCGIFFLAGS SIOCGIFFLAGS
0967 #define VKI_OSIOCGIFBRDADDR OSIOCGIFBRDADDR
0968 #define VKI_SIOCSIFBRDADDR SIOCSIFBRDADDR
0969 #define VKI_OSIOCGIFCONF OSIOCGIFCONF
0970 #define VKI_OSIOCGIFNETMASK OSIOCGIFNETMASK
0971 #define VKI_SIOCSIFNETMASK SIOCSIFNETMASK
0972 #define VKI_SIOCGIFMETRIC SIOCGIFMETRIC
0973 #define VKI_SIOCSIFMETRIC SIOCSIFMETRIC
0974 #define VKI_SIOCDIFADDR SIOCDIFADDR
0975 #define VKI_SIOCAIFADDR SIOCAIFADDR
0976 #define VKI_SIOCGETVIFCNT SIOCGETVIFCNT
0977 #define VKI_SIOCGETSGCNT SIOCGETSGCNT
0978 #define VKI_SIOCALIFADDR SIOCALIFADDR
0979 #define VKI_SIOCGLIFADDR SIOCGLIFADDR
0980 #define VKI_SIOCDLIFADDR SIOCDLIFADDR
0981
0982 #define VKI_SIOCGIFADDR SIOCGIFADDR
0983 #define VKI_SIOCGIFDSTADDR SIOCGIFDSTADDR
0984 #define VKI_SIOCGIFBRDADDR SIOCGIFBRDADDR
0985 #define VKI_SIOCGIFCONF SIOCGIFCONF
0986 #define VKI_SIOCGIFNETMASK SIOCGIFNETMASK
0987 #define VKI_SIOCAUTOADDR SIOCAUTOADDR
0988 #define VKI_SIOCAUTONETMASK SIOCAUTONETMASK
0989 #define VKI_SIOCARPIPLL SIOCARPIPLL
0990
0991 #define VKI_SIOCADDMULTI SIOCADDMULTI
0992 #define VKI_SIOCDELMULTI SIOCDELMULTI
0993 #define VKI_SIOCGIFMTU SIOCGIFMTU
0994 #define VKI_SIOCSIFMTU SIOCSIFMTU
0995 #define VKI_SIOCGIFPHYS SIOCGIFPHYS
0996 #define VKI_SIOCSIFPHYS SIOCSIFPHYS
0997 #define VKI_SIOCSIFMEDIA SIOCSIFMEDIA
0998 #define VKI_SIOCGIFMEDIA SIOCGIFMEDIA
0999 #define VKI_SIOCSIFGENERIC SIOCSIFGENERIC
1000 #define VKI_SIOCGIFGENERIC SIOCGIFGENERIC
1001 #define VKI_SIOCRSLVMULTI SIOCRSLVMULTI
1002
1003 #define VKI_SIOCSIFLLADDR SIOCSIFLLADDR
1004 #define VKI_SIOCGIFSTATUS SIOCGIFSTATUS
1005 #define VKI_SIOCSIFPHYADDR SIOCSIFPHYADDR
1006 #define VKI_SIOCGIFPSRCADDR SIOCGIFPSRCADDR
1007 #define VKI_SIOCGIFPDSTADDR SIOCGIFPDSTADDR
1008 #define VKI_SIOCDIFPHYADDR SIOCDIFPHYADDR
1009 #define VKI_SIOCSLIFPHYADDR SIOCSLIFPHYADDR
1010 #define VKI_SIOCGLIFPHYADDR SIOCGLIFPHYADDR
1011
1012 #define VKI_SIOCGIFDEVMTU SIOCGIFDEVMTU
1013 #define VKI_SIOCSIFALTMTU SIOCSIFALTMTU
1014 #define VKI_SIOCGIFALTMTU SIOCGIFALTMTU
1015 #define VKI_SIOCSIFBOND SIOCSIFBOND
1016 #define VKI_SIOCGIFBOND SIOCGIFBOND
1017 #define VKI_SIOCIFCREATE SIOCIFCREATE
1018 #define VKI_SIOCIFDESTROY SIOCIFDESTROY
1019 #define VKI_SIOCSIFVLAN SIOCSIFVLAN
1020 #define VKI_SIOCGIFVLAN SIOCGIFVLAN
1021
1022 #define VKI_SIOCSETVLAN SIOCSIFVLAN
1023 #define VKI_SIOCGETVLAN SIOCGIFVLAN
1024
1025 #define VKI_SIOCGIFASYNCMAP SIOCGIFASYNCMAP
1026 #define VKI_SIOCSIFASYNCMAP SIOCSIGASYNCMAP
1027
1028
1029 #include <sys/dtrace.h>
1030
1031 #define VKI_DTRACEHIOC_REMOVE DTRACEHIOC_REMOVE
1032 #define VKI_DTRACEHIOC_ADDDOF DTRACEHIOC_ADDDOF
1033
1034
1035 #include <net/bpf.h>
1036
1037 #define vki_bpf_program bpf_program
1038 #define vki_bf_len bf_len
1039 #define vki_bf_insns bf_insns
1040 #define vki_bpf_dltlist bpf_dltlist
1041 #define vki_bfl_len bfl_len
1042 #define vki_bfl_list bfl_list
1043
1044 #define VKI_BIOCSETF BIOCSETF
1045 #define VKI_BIOCFLUSH BIOCFLUSH
1046 #define VKI_BIOCPROMISC BIOCPROMISC
1047 #define VKI_BIOCSETIF BIOCSETIF
1048 #define VKI_BIOCSRTIMEOUT BIOCSRTIMEOUT
1049 #define VKI_BIOCGDLTLIST BIOCGDLTLIST
1050
1051
1052 #include <sys/ucontext.h>
1053
1054
1055
1056 #define vki_ucontext __darwin_ucontext
1057
1058
1059 #include <sys/termios.h>
1060
1061 #define vki_termios termios
1062
1063
1064 #include <uuid/uuid.h>
1065
1066 #define vki_uuid_t uuid_t
1067
1068
1069 #include <bsm/audit.h>
1070
1071 #define VKI_A_GETPOLICY A_GETPOLICY
1072 #define VKI_A_SETPOLICY A_SETPOLICY
1073 #define VKI_A_GETKMASK A_GETKMASK
1074 #define VKI_A_SETKMASK A_SETKMASK
1075 #define VKI_A_GETQCTRL A_GETQCTRL
1076 #define VKI_A_SETQCTRL A_SETQCTRL
1077 #define VKI_A_GETCWD A_GETCWD
1078 #define VKI_A_GETCAR A_GETCAR
1079 #define VKI_A_GETSTAT A_GETSTAT
1080 #define VKI_A_SETSTAT A_SETSTAT
1081 #define VKI_A_SETUMASK A_SETUMASK
1082 #define VKI_A_SETSMASK A_SETSMASK
1083 #define VKI_A_GETCOND A_GETCOND
1084 #define VKI_A_SETCOND A_SETCOND
1085 #define VKI_A_GETCLASS A_GETCLASS
1086 #define VKI_A_SETCLASS A_SETCLASS
1087 #define VKI_A_GETPINFO A_GETPINFO
1088 #define VKI_A_SETPMASK A_SETPMASK
1089 #define VKI_A_SETFSIZE A_SETFSIZE
1090 #define VKI_A_GETFSIZE A_GETFSIZE
1091 #define VKI_A_GETPINFO_ADDR A_GETPINFO_ADDR
1092 #define VKI_A_GETKAUDIT A_GETKAUDIT
1093 #define VKI_A_SETKAUDIT A_SETKAUDIT
1094 #if DARWIN_VERS >= DARWIN_10_6
1095 #define VKI_A_SENDTRIGGER A_SENDTRIGGER
1096 #define VKI_A_GETSINFO_ADDR A_GETSINFO_ADDR
1097 #endif
1098
1099
1100 #include <sys/aio.h>
1101
1102 #define vki_aiocb aiocb
1103
1104
1105 #include <netinet/tcp.h>
1106
1107 #define VKI_TCP_NODELAY TCP_NODELAY
1108
1109
1110 #include <netinet/in.h>
1111
1112 #define VKI_IPPROTO_TCP IPPROTO_TCP
1113
1114
1115
1116
1117
1118
1119
1120 typedef int vki_errno_t;
1121
1122
1123
1124
1125 #if DARWIN_VERS >= DARWIN_10_10
1126 struct vki_necp_aggregate_result {
1127 vki_u_int32_t field1;
1128 unsigned int field2;
1129 vki_u_int32_t field3;
1130 vki_u_int32_t field4;
1131 vki_uuid_t field5;
1132 u_int32_t field6;
1133 u_int32_t field7;
1134 };
1135
1136 #define VKI_CSR_CHECK 0
1137 #define VKI_CSR_GET_ACTIVE_CONFIG 1
1138 #endif
1139
1140 #if DARWIN_VERS >= DARWIN_10_12
1141
1142 #define VKI_UL_OPCODE_MASK 0x000000FF
1143 #define VKI_UL_FLAGS_MASK 0xFFFFFF00
1144 #define VKI_UL_COMPARE_AND_WAIT 1
1145 #define VKI_UL_UNFAIR_LOCK 2
1146
1147 #define ULF_NO_ERRNO 0x01000000
1148
1149
1150 #define VKI_ULF_WAKE_ALL 0x00000100
1151 #define VKI_ULF_WAKE_THREAD 0x00000200
1152
1153
1154 #define WKI_ULF_WAIT_WORKQ_DATA_CONTENTION 0x00010000
1155
1156 #define VKI_NECP_CLIENT_ACTION_ADD 1
1157 #define VKI_NECP_CLIENT_ACTION_REMOVE 2
1158 #define VKI_NECP_CLIENT_ACTION_COPY_PARAMETERS 3
1159 #define VKI_NECP_CLIENT_ACTION_COPY_RESULT 4
1160 #define VKI_NECP_CLIENT_ACTION_COPY_LIST 5
1161 #define VKI_NECP_CLIENT_ACTION_AGENT 7
1162 #define VKI_NECP_CLIENT_ACTION_COPY_AGENT 8
1163 #define VKI_NECP_CLIENT_ACTION_COPY_INTERFACE 9
1164 #define VKI_NECP_CLIENT_ACTION_COPY_ROUTE_STATISTICS 11
1165 #define VKI_NECP_CLIENT_ACTION_AGENT_USE 12
1166 #define VKI_NECP_CLIENT_ACTION_UPDATE_CACHE 14
1167 #define VKI_NECP_CLIENT_ACTION_COPY_CLIENT_UPDATE 15
1168 #define VKI_NECP_CLIENT_ACTION_COPY_UPDATED_RESULT 16
1169 #define VKI_NECP_CLIENT_ACTION_CLAIM 19
1170 #define VKI_NECP_CLIENT_ACTION_SIGN 20
1171
1172 #define VKI_NECP_MAX_CLIENT_PARAMETERS_SIZE 1024
1173 #define VKI_NECP_CLIENT_ACTION_SIGN_TAG_LENGTH 32
1174
1175 #define VKI_IFXNAMSIZ IFNAMSIZ + 8
1176 #define VKI_IFNET_SIGNATURELEN 20
1177
1178 struct vki_necp_client_signable {
1179 uuid_t client_id;
1180 u_int32_t sign_type;
1181 } __attribute__((__packed__));
1182
1183 struct vki_necp_cache_buffer {
1184 u_int8_t necp_cache_buf_type;
1185 u_int8_t necp_cache_buf_ver;
1186 u_int32_t necp_cache_buf_size;
1187 mach_vm_address_t necp_cache_buf_addr;
1188 };
1189
1190 struct vki_necp_interface_signature {
1191 u_int8_t signature[VKI_IFNET_SIGNATURELEN];
1192 u_int8_t signature_len;
1193 };
1194
1195 struct vki_necp_interface_details_legacy {
1196 char name[VKI_IFXNAMSIZ];
1197 u_int32_t index;
1198 u_int32_t generation;
1199 u_int32_t functional_type;
1200 u_int32_t delegate_index;
1201 u_int32_t flags;
1202 u_int32_t mtu;
1203 struct vki_necp_interface_signature ipv4_signature;
1204 struct vki_necp_interface_signature ipv6_signature;
1205 };
1206
1207 struct vki_necp_agent_use_parameters {
1208 uuid_t agent_uuid;
1209 uint64_t out_use_count;
1210 };
1211
1212
1213 #define VKI_IFNET_STATS_PER_FLOW_SIZE 96
1214 #define VKI_NECP_STAT_COUNTS_SIZE 68
1215
1216 #endif
1217
1218 #endif