Path: blob/buildjre8/ios-missing-include/sys/proc_info.h
861 views
/*1* Copyright (c) 2005-2020 Apple Computer, Inc. All rights reserved.2*3* @APPLE_OSREFERENCE_LICENSE_HEADER_START@4*5* This file contains Original Code and/or Modifications of Original Code6* as defined in and that are subject to the Apple Public Source License7* Version 2.0 (the 'License'). You may not use this file except in8* compliance with the License. The rights granted to you under the License9* may not be used to create, or enable the creation or redistribution of,10* unlawful or unlicensed copies of an Apple operating system, or to11* circumvent, violate, or enable the circumvention or violation of, any12* terms of an Apple operating system software license agreement.13*14* Please obtain a copy of the License at15* http://www.opensource.apple.com/apsl/ and read it before using this file.16*17* The Original Code and all software distributed under the License are18* distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER19* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,20* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,21* FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.22* Please see the License for the specific language governing rights and23* limitations under the License.24*25* @APPLE_OSREFERENCE_LICENSE_HEADER_END@26*/2728#ifndef _SYS_PROC_INFO_H29#define _SYS_PROC_INFO_H3031#include <sys/cdefs.h>32#include <sys/param.h>33#include <sys/types.h>34#include <sys/stat.h>35#include <sys/mount.h>36#include <sys/socket.h>37#include <sys/un.h>38#include <sys/kern_control.h>39#include <sys/event.h>40#include <net/if.h>41#include <net/route.h>42#include <netinet/in.h>43#include <netinet/tcp.h>44#include <mach/machine.h>45#include <uuid/uuid.h>464748__BEGIN_DECLS495051#define PROC_ALL_PIDS 152#define PROC_PGRP_ONLY 253#define PROC_TTY_ONLY 354#define PROC_UID_ONLY 455#define PROC_RUID_ONLY 556#define PROC_PPID_ONLY 657#define PROC_KDBG_ONLY 75859struct proc_bsdinfo {60uint32_t pbi_flags; /* 64bit; emulated etc */61uint32_t pbi_status;62uint32_t pbi_xstatus;63uint32_t pbi_pid;64uint32_t pbi_ppid;65uid_t pbi_uid;66gid_t pbi_gid;67uid_t pbi_ruid;68gid_t pbi_rgid;69uid_t pbi_svuid;70gid_t pbi_svgid;71uint32_t rfu_1; /* reserved */72char pbi_comm[MAXCOMLEN];73char pbi_name[2 * MAXCOMLEN]; /* empty if no name is registered */74uint32_t pbi_nfiles;75uint32_t pbi_pgid;76uint32_t pbi_pjobc;77uint32_t e_tdev; /* controlling tty dev */78uint32_t e_tpgid; /* tty process group id */79int32_t pbi_nice;80uint64_t pbi_start_tvsec;81uint64_t pbi_start_tvusec;82};838485struct proc_bsdshortinfo {86uint32_t pbsi_pid; /* process id */87uint32_t pbsi_ppid; /* process parent id */88uint32_t pbsi_pgid; /* process perp id */89uint32_t pbsi_status; /* p_stat value, SZOMB, SRUN, etc */90char pbsi_comm[MAXCOMLEN]; /* upto 16 characters of process name */91uint32_t pbsi_flags; /* 64bit; emulated etc */92uid_t pbsi_uid; /* current uid on process */93gid_t pbsi_gid; /* current gid on process */94uid_t pbsi_ruid; /* current ruid on process */95gid_t pbsi_rgid; /* current tgid on process */96uid_t pbsi_svuid; /* current svuid on process */97gid_t pbsi_svgid; /* current svgid on process */98uint32_t pbsi_rfu; /* reserved for future use*/99};100101102103104/* pbi_flags values */105#define PROC_FLAG_SYSTEM 1 /* System process */106#define PROC_FLAG_TRACED 2 /* process currently being traced, possibly by gdb */107#define PROC_FLAG_INEXIT 4 /* process is working its way in exit() */108#define PROC_FLAG_PPWAIT 8109#define PROC_FLAG_LP64 0x10 /* 64bit process */110#define PROC_FLAG_SLEADER 0x20 /* The process is the session leader */111#define PROC_FLAG_CTTY 0x40 /* process has a control tty */112#define PROC_FLAG_CONTROLT 0x80 /* Has a controlling terminal */113#define PROC_FLAG_THCWD 0x100 /* process has a thread with cwd */114/* process control bits for resource starvation */115#define PROC_FLAG_PC_THROTTLE 0x200 /* In resource starvation situations, this process is to be throttled */116#define PROC_FLAG_PC_SUSP 0x400 /* In resource starvation situations, this process is to be suspended */117#define PROC_FLAG_PC_KILL 0x600 /* In resource starvation situations, this process is to be terminated */118#define PROC_FLAG_PC_MASK 0x600119/* process action bits for resource starvation */120#define PROC_FLAG_PA_THROTTLE 0x800 /* The process is currently throttled due to resource starvation */121#define PROC_FLAG_PA_SUSP 0x1000 /* The process is currently suspended due to resource starvation */122#define PROC_FLAG_PSUGID 0x2000 /* process has set privileges since last exec */123#define PROC_FLAG_EXEC 0x4000 /* process has called exec */124125126struct proc_taskinfo {127uint64_t pti_virtual_size; /* virtual memory size (bytes) */128uint64_t pti_resident_size; /* resident memory size (bytes) */129uint64_t pti_total_user; /* total time */130uint64_t pti_total_system;131uint64_t pti_threads_user; /* existing threads only */132uint64_t pti_threads_system;133int32_t pti_policy; /* default policy for new threads */134int32_t pti_faults; /* number of page faults */135int32_t pti_pageins; /* number of actual pageins */136int32_t pti_cow_faults; /* number of copy-on-write faults */137int32_t pti_messages_sent; /* number of messages sent */138int32_t pti_messages_received; /* number of messages received */139int32_t pti_syscalls_mach; /* number of mach system calls */140int32_t pti_syscalls_unix; /* number of unix system calls */141int32_t pti_csw; /* number of context switches */142int32_t pti_threadnum; /* number of threads in the task */143int32_t pti_numrunning; /* number of running threads */144int32_t pti_priority; /* task priority*/145};146147struct proc_taskallinfo {148struct proc_bsdinfo pbsd;149struct proc_taskinfo ptinfo;150};151152#define MAXTHREADNAMESIZE 64153154struct proc_threadinfo {155uint64_t pth_user_time; /* user run time */156uint64_t pth_system_time; /* system run time */157int32_t pth_cpu_usage; /* scaled cpu usage percentage */158int32_t pth_policy; /* scheduling policy in effect */159int32_t pth_run_state; /* run state (see below) */160int32_t pth_flags; /* various flags (see below) */161int32_t pth_sleep_time; /* number of seconds that thread */162int32_t pth_curpri; /* cur priority*/163int32_t pth_priority; /* priority*/164int32_t pth_maxpriority; /* max priority*/165char pth_name[MAXTHREADNAMESIZE]; /* thread name, if any */166};167168struct proc_regioninfo {169uint32_t pri_protection;170uint32_t pri_max_protection;171uint32_t pri_inheritance;172uint32_t pri_flags; /* shared, external pager, is submap */173uint64_t pri_offset;174uint32_t pri_behavior;175uint32_t pri_user_wired_count;176uint32_t pri_user_tag;177uint32_t pri_pages_resident;178uint32_t pri_pages_shared_now_private;179uint32_t pri_pages_swapped_out;180uint32_t pri_pages_dirtied;181uint32_t pri_ref_count;182uint32_t pri_shadow_depth;183uint32_t pri_share_mode;184uint32_t pri_private_pages_resident;185uint32_t pri_shared_pages_resident;186uint32_t pri_obj_id;187uint32_t pri_depth;188uint64_t pri_address;189uint64_t pri_size;190};191192#define PROC_REGION_SUBMAP 1193#define PROC_REGION_SHARED 2194195#define SM_COW 1196#define SM_PRIVATE 2197#define SM_EMPTY 3198#define SM_SHARED 4199#define SM_TRUESHARED 5200#define SM_PRIVATE_ALIASED 6201#define SM_SHARED_ALIASED 7202#define SM_LARGE_PAGE 8203204205/*206* Thread run states (state field).207*/208209#define TH_STATE_RUNNING 1 /* thread is running normally */210#define TH_STATE_STOPPED 2 /* thread is stopped */211#define TH_STATE_WAITING 3 /* thread is waiting normally */212#define TH_STATE_UNINTERRUPTIBLE 4 /* thread is in an uninterruptible213* wait */214#define TH_STATE_HALTED 5 /* thread is halted at a215* clean point */216217/*218* Thread flags (flags field).219*/220#define TH_FLAGS_SWAPPED 0x1 /* thread is swapped out */221#define TH_FLAGS_IDLE 0x2 /* thread is an idle thread */222223224struct proc_workqueueinfo {225uint32_t pwq_nthreads; /* total number of workqueue threads */226uint32_t pwq_runthreads; /* total number of running workqueue threads */227uint32_t pwq_blockedthreads; /* total number of blocked workqueue threads */228uint32_t pwq_state;229};230231/*232* workqueue state (pwq_state field)233*/234#define WQ_EXCEEDED_CONSTRAINED_THREAD_LIMIT 0x1235#define WQ_EXCEEDED_TOTAL_THREAD_LIMIT 0x2236#define WQ_FLAGS_AVAILABLE 0x4237238struct proc_fileinfo {239uint32_t fi_openflags;240uint32_t fi_status;241off_t fi_offset;242int32_t fi_type;243uint32_t fi_guardflags;244};245246/* stats flags in proc_fileinfo */247#define PROC_FP_SHARED 1 /* shared by more than one fd */248#define PROC_FP_CLEXEC 2 /* close on exec */249#define PROC_FP_GUARDED 4 /* guarded fd */250#define PROC_FP_CLFORK 8 /* close on fork */251252#define PROC_FI_GUARD_CLOSE (1u << 0)253#define PROC_FI_GUARD_DUP (1u << 1)254#define PROC_FI_GUARD_SOCKET_IPC (1u << 2)255#define PROC_FI_GUARD_FILEPORT (1u << 3)256257struct proc_exitreasonbasicinfo {258uint32_t beri_namespace;259uint64_t beri_code;260uint64_t beri_flags;261uint32_t beri_reason_buf_size;262} __attribute__((packed));263264struct proc_exitreasoninfo {265uint32_t eri_namespace;266uint64_t eri_code;267uint64_t eri_flags;268uint32_t eri_reason_buf_size;269uint64_t eri_kcd_buf;270} __attribute__((packed));271272/*273* A copy of stat64 with static sized fields.274*/275struct vinfo_stat {276uint32_t vst_dev; /* [XSI] ID of device containing file */277uint16_t vst_mode; /* [XSI] Mode of file (see below) */278uint16_t vst_nlink; /* [XSI] Number of hard links */279uint64_t vst_ino; /* [XSI] File serial number */280uid_t vst_uid; /* [XSI] User ID of the file */281gid_t vst_gid; /* [XSI] Group ID of the file */282int64_t vst_atime; /* [XSI] Time of last access */283int64_t vst_atimensec; /* nsec of last access */284int64_t vst_mtime; /* [XSI] Last data modification time */285int64_t vst_mtimensec; /* last data modification nsec */286int64_t vst_ctime; /* [XSI] Time of last status change */287int64_t vst_ctimensec; /* nsec of last status change */288int64_t vst_birthtime; /* File creation time(birth) */289int64_t vst_birthtimensec; /* nsec of File creation time */290off_t vst_size; /* [XSI] file size, in bytes */291int64_t vst_blocks; /* [XSI] blocks allocated for file */292int32_t vst_blksize; /* [XSI] optimal blocksize for I/O */293uint32_t vst_flags; /* user defined flags for file */294uint32_t vst_gen; /* file generation number */295uint32_t vst_rdev; /* [XSI] Device ID */296int64_t vst_qspare[2]; /* RESERVED: DO NOT USE! */297};298299struct vnode_info {300struct vinfo_stat vi_stat;301int vi_type;302int vi_pad;303fsid_t vi_fsid;304};305306struct vnode_info_path {307struct vnode_info vip_vi;308char vip_path[MAXPATHLEN]; /* tail end of it */309};310311struct vnode_fdinfo {312struct proc_fileinfo pfi;313struct vnode_info pvi;314};315316struct vnode_fdinfowithpath {317struct proc_fileinfo pfi;318struct vnode_info_path pvip;319};320321struct proc_regionwithpathinfo {322struct proc_regioninfo prp_prinfo;323struct vnode_info_path prp_vip;324};325326struct proc_regionpath {327uint64_t prpo_addr;328uint64_t prpo_regionlength;329char prpo_path[MAXPATHLEN];330};331332struct proc_vnodepathinfo {333struct vnode_info_path pvi_cdir;334struct vnode_info_path pvi_rdir;335};336337struct proc_threadwithpathinfo {338struct proc_threadinfo pt;339struct vnode_info_path pvip;340};341342/*343* Socket344*/345346347/*348* IPv4 and IPv6 Sockets349*/350351#define INI_IPV4 0x1352#define INI_IPV6 0x2353354struct in4in6_addr {355u_int32_t i46a_pad32[3];356struct in_addr i46a_addr4;357};358359struct in_sockinfo {360int insi_fport; /* foreign port */361int insi_lport; /* local port */362uint64_t insi_gencnt; /* generation count of this instance */363uint32_t insi_flags; /* generic IP/datagram flags */364uint32_t insi_flow;365366uint8_t insi_vflag; /* ini_IPV4 or ini_IPV6 */367uint8_t insi_ip_ttl; /* time to live proto */368uint32_t rfu_1; /* reserved */369/* protocol dependent part */370union {371struct in4in6_addr ina_46;372struct in6_addr ina_6;373} insi_faddr; /* foreign host table entry */374union {375struct in4in6_addr ina_46;376struct in6_addr ina_6;377} insi_laddr; /* local host table entry */378struct {379u_char in4_tos; /* type of service */380} insi_v4;381struct {382uint8_t in6_hlim;383int in6_cksum;384u_short in6_ifindex;385short in6_hops;386} insi_v6;387};388389/*390* TCP Sockets391*/392393#define TSI_T_REXMT 0 /* retransmit */394#define TSI_T_PERSIST 1 /* retransmit persistence */395#define TSI_T_KEEP 2 /* keep alive */396#define TSI_T_2MSL 3 /* 2*msl quiet time timer */397#define TSI_T_NTIMERS 4398399#define TSI_S_CLOSED 0 /* closed */400#define TSI_S_LISTEN 1 /* listening for connection */401#define TSI_S_SYN_SENT 2 /* active, have sent syn */402#define TSI_S_SYN_RECEIVED 3 /* have send and received syn */403#define TSI_S_ESTABLISHED 4 /* established */404#define TSI_S__CLOSE_WAIT 5 /* rcvd fin, waiting for close */405#define TSI_S_FIN_WAIT_1 6 /* have closed, sent fin */406#define TSI_S_CLOSING 7 /* closed xchd FIN; await FIN ACK */407#define TSI_S_LAST_ACK 8 /* had fin and close; await FIN ACK */408#define TSI_S_FIN_WAIT_2 9 /* have closed, fin is acked */409#define TSI_S_TIME_WAIT 10 /* in 2*msl quiet wait after close */410#define TSI_S_RESERVED 11 /* pseudo state: reserved */411412struct tcp_sockinfo {413struct in_sockinfo tcpsi_ini;414int tcpsi_state;415int tcpsi_timer[TSI_T_NTIMERS];416int tcpsi_mss;417uint32_t tcpsi_flags;418uint32_t rfu_1; /* reserved */419uint64_t tcpsi_tp; /* opaque handle of TCP protocol control block */420};421422/*423* Unix Domain Sockets424*/425426427struct un_sockinfo {428uint64_t unsi_conn_so; /* opaque handle of connected socket */429uint64_t unsi_conn_pcb; /* opaque handle of connected protocol control block */430union {431struct sockaddr_un ua_sun;432char ua_dummy[SOCK_MAXADDRLEN];433} unsi_addr; /* bound address */434union {435struct sockaddr_un ua_sun;436char ua_dummy[SOCK_MAXADDRLEN];437} unsi_caddr; /* address of socket connected to */438};439440/*441* PF_NDRV Sockets442*/443444struct ndrv_info {445uint32_t ndrvsi_if_family;446uint32_t ndrvsi_if_unit;447char ndrvsi_if_name[IF_NAMESIZE];448};449450/*451* Kernel Event Sockets452*/453454struct kern_event_info {455uint32_t kesi_vendor_code_filter;456uint32_t kesi_class_filter;457uint32_t kesi_subclass_filter;458};459460/*461* Kernel Control Sockets462*/463464struct kern_ctl_info {465uint32_t kcsi_id;466uint32_t kcsi_reg_unit;467uint32_t kcsi_flags; /* support flags */468uint32_t kcsi_recvbufsize; /* request more than the default buffer size */469uint32_t kcsi_sendbufsize; /* request more than the default buffer size */470uint32_t kcsi_unit;471char kcsi_name[MAX_KCTL_NAME]; /* unique nke identifier, provided by DTS */472};473474/*475* VSock Sockets476*/477478struct vsock_sockinfo {479uint32_t local_cid;480uint32_t local_port;481uint32_t remote_cid;482uint32_t remote_port;483};484485/* soi_state */486487#define SOI_S_NOFDREF 0x0001 /* no file table ref any more */488#define SOI_S_ISCONNECTED 0x0002 /* socket connected to a peer */489#define SOI_S_ISCONNECTING 0x0004 /* in process of connecting to peer */490#define SOI_S_ISDISCONNECTING 0x0008 /* in process of disconnecting */491#define SOI_S_CANTSENDMORE 0x0010 /* can't send more data to peer */492#define SOI_S_CANTRCVMORE 0x0020 /* can't receive more data from peer */493#define SOI_S_RCVATMARK 0x0040 /* at mark on input */494#define SOI_S_PRIV 0x0080 /* privileged for broadcast, raw... */495#define SOI_S_NBIO 0x0100 /* non-blocking ops */496#define SOI_S_ASYNC 0x0200 /* async i/o notify */497#define SOI_S_INCOMP 0x0800 /* Unaccepted, incomplete connection */498#define SOI_S_COMP 0x1000 /* unaccepted, complete connection */499#define SOI_S_ISDISCONNECTED 0x2000 /* socket disconnected from peer */500#define SOI_S_DRAINING 0x4000 /* close waiting for blocked system calls to drain */501502struct sockbuf_info {503uint32_t sbi_cc;504uint32_t sbi_hiwat; /* SO_RCVBUF, SO_SNDBUF */505uint32_t sbi_mbcnt;506uint32_t sbi_mbmax;507uint32_t sbi_lowat;508short sbi_flags;509short sbi_timeo;510};511512enum {513SOCKINFO_GENERIC = 0,514SOCKINFO_IN = 1,515SOCKINFO_TCP = 2,516SOCKINFO_UN = 3,517SOCKINFO_NDRV = 4,518SOCKINFO_KERN_EVENT = 5,519SOCKINFO_KERN_CTL = 6,520SOCKINFO_VSOCK = 7,521};522523struct socket_info {524struct vinfo_stat soi_stat;525uint64_t soi_so; /* opaque handle of socket */526uint64_t soi_pcb; /* opaque handle of protocol control block */527int soi_type;528int soi_protocol;529int soi_family;530short soi_options;531short soi_linger;532short soi_state;533short soi_qlen;534short soi_incqlen;535short soi_qlimit;536short soi_timeo;537u_short soi_error;538uint32_t soi_oobmark;539struct sockbuf_info soi_rcv;540struct sockbuf_info soi_snd;541int soi_kind;542uint32_t rfu_1; /* reserved */543union {544struct in_sockinfo pri_in; /* SOCKINFO_IN */545struct tcp_sockinfo pri_tcp; /* SOCKINFO_TCP */546struct un_sockinfo pri_un; /* SOCKINFO_UN */547struct ndrv_info pri_ndrv; /* SOCKINFO_NDRV */548struct kern_event_info pri_kern_event; /* SOCKINFO_KERN_EVENT */549struct kern_ctl_info pri_kern_ctl; /* SOCKINFO_KERN_CTL */550struct vsock_sockinfo pri_vsock; /* SOCKINFO_VSOCK */551} soi_proto;552};553554struct socket_fdinfo {555struct proc_fileinfo pfi;556struct socket_info psi;557};558559560561struct psem_info {562struct vinfo_stat psem_stat;563char psem_name[MAXPATHLEN];564};565566struct psem_fdinfo {567struct proc_fileinfo pfi;568struct psem_info pseminfo;569};570571572573struct pshm_info {574struct vinfo_stat pshm_stat;575uint64_t pshm_mappaddr;576char pshm_name[MAXPATHLEN];577};578579struct pshm_fdinfo {580struct proc_fileinfo pfi;581struct pshm_info pshminfo;582};583584585struct pipe_info {586struct vinfo_stat pipe_stat;587uint64_t pipe_handle;588uint64_t pipe_peerhandle;589int pipe_status;590int rfu_1; /* reserved */591};592593struct pipe_fdinfo {594struct proc_fileinfo pfi;595struct pipe_info pipeinfo;596};597598599struct kqueue_info {600struct vinfo_stat kq_stat;601uint32_t kq_state;602uint32_t rfu_1; /* reserved */603};604605struct kqueue_dyninfo {606struct kqueue_info kqdi_info;607uint64_t kqdi_servicer;608uint64_t kqdi_owner;609uint32_t kqdi_sync_waiters;610uint8_t kqdi_sync_waiter_qos;611uint8_t kqdi_async_qos;612uint16_t kqdi_request_state;613uint8_t kqdi_events_qos;614uint8_t kqdi_pri;615uint8_t kqdi_pol;616uint8_t kqdi_cpupercent;617uint8_t _kqdi_reserved0[4];618uint64_t _kqdi_reserved1[4];619};620621/* keep in sync with KQ_* in sys/eventvar.h */622#define PROC_KQUEUE_SELECT 0x01623#define PROC_KQUEUE_SLEEP 0x02624#define PROC_KQUEUE_32 0x08625#define PROC_KQUEUE_64 0x10626#define PROC_KQUEUE_QOS 0x20627628629struct kqueue_fdinfo {630struct proc_fileinfo pfi;631struct kqueue_info kqueueinfo;632};633634struct appletalk_info {635struct vinfo_stat atalk_stat;636};637638struct appletalk_fdinfo {639struct proc_fileinfo pfi;640struct appletalk_info appletalkinfo;641};642643typedef uint64_t proc_info_udata_t;644645/* defns of process file desc type */646#define PROX_FDTYPE_ATALK 0647#define PROX_FDTYPE_VNODE 1648#define PROX_FDTYPE_SOCKET 2649#define PROX_FDTYPE_PSHM 3650#define PROX_FDTYPE_PSEM 4651#define PROX_FDTYPE_KQUEUE 5652#define PROX_FDTYPE_PIPE 6653#define PROX_FDTYPE_FSEVENTS 7654#define PROX_FDTYPE_NETPOLICY 9655656struct proc_fdinfo {657int32_t proc_fd;658uint32_t proc_fdtype;659};660661struct proc_fileportinfo {662uint32_t proc_fileport;663uint32_t proc_fdtype;664};665666667/* Flavors for proc_pidinfo() */668#define PROC_PIDLISTFDS 1669#define PROC_PIDLISTFD_SIZE (sizeof(struct proc_fdinfo))670671#define PROC_PIDTASKALLINFO 2672#define PROC_PIDTASKALLINFO_SIZE (sizeof(struct proc_taskallinfo))673674#define PROC_PIDTBSDINFO 3675#define PROC_PIDTBSDINFO_SIZE (sizeof(struct proc_bsdinfo))676677#define PROC_PIDTASKINFO 4678#define PROC_PIDTASKINFO_SIZE (sizeof(struct proc_taskinfo))679680#define PROC_PIDTHREADINFO 5681#define PROC_PIDTHREADINFO_SIZE (sizeof(struct proc_threadinfo))682683#define PROC_PIDLISTTHREADS 6684#define PROC_PIDLISTTHREADS_SIZE (2* sizeof(uint32_t))685686#define PROC_PIDREGIONINFO 7687#define PROC_PIDREGIONINFO_SIZE (sizeof(struct proc_regioninfo))688689#define PROC_PIDREGIONPATHINFO 8690#define PROC_PIDREGIONPATHINFO_SIZE (sizeof(struct proc_regionwithpathinfo))691692#define PROC_PIDVNODEPATHINFO 9693#define PROC_PIDVNODEPATHINFO_SIZE (sizeof(struct proc_vnodepathinfo))694695#define PROC_PIDTHREADPATHINFO 10696#define PROC_PIDTHREADPATHINFO_SIZE (sizeof(struct proc_threadwithpathinfo))697698#define PROC_PIDPATHINFO 11699#define PROC_PIDPATHINFO_SIZE (MAXPATHLEN)700#define PROC_PIDPATHINFO_MAXSIZE (4*MAXPATHLEN)701702#define PROC_PIDWORKQUEUEINFO 12703#define PROC_PIDWORKQUEUEINFO_SIZE (sizeof(struct proc_workqueueinfo))704705#define PROC_PIDT_SHORTBSDINFO 13706#define PROC_PIDT_SHORTBSDINFO_SIZE (sizeof(struct proc_bsdshortinfo))707708#define PROC_PIDLISTFILEPORTS 14709#define PROC_PIDLISTFILEPORTS_SIZE (sizeof(struct proc_fileportinfo))710711#define PROC_PIDTHREADID64INFO 15712#define PROC_PIDTHREADID64INFO_SIZE (sizeof(struct proc_threadinfo))713714#define PROC_PID_RUSAGE 16715#define PROC_PID_RUSAGE_SIZE 0716717/* Flavors for proc_pidfdinfo */718719#define PROC_PIDFDVNODEINFO 1720#define PROC_PIDFDVNODEINFO_SIZE (sizeof(struct vnode_fdinfo))721722#define PROC_PIDFDVNODEPATHINFO 2723#define PROC_PIDFDVNODEPATHINFO_SIZE (sizeof(struct vnode_fdinfowithpath))724725#define PROC_PIDFDSOCKETINFO 3726#define PROC_PIDFDSOCKETINFO_SIZE (sizeof(struct socket_fdinfo))727728#define PROC_PIDFDPSEMINFO 4729#define PROC_PIDFDPSEMINFO_SIZE (sizeof(struct psem_fdinfo))730731#define PROC_PIDFDPSHMINFO 5732#define PROC_PIDFDPSHMINFO_SIZE (sizeof(struct pshm_fdinfo))733734#define PROC_PIDFDPIPEINFO 6735#define PROC_PIDFDPIPEINFO_SIZE (sizeof(struct pipe_fdinfo))736737#define PROC_PIDFDKQUEUEINFO 7738#define PROC_PIDFDKQUEUEINFO_SIZE (sizeof(struct kqueue_fdinfo))739740#define PROC_PIDFDATALKINFO 8741#define PROC_PIDFDATALKINFO_SIZE (sizeof(struct appletalk_fdinfo))742743744745/* Flavors for proc_pidfileportinfo */746747#define PROC_PIDFILEPORTVNODEPATHINFO 2 /* out: vnode_fdinfowithpath */748#define PROC_PIDFILEPORTVNODEPATHINFO_SIZE \749PROC_PIDFDVNODEPATHINFO_SIZE750751#define PROC_PIDFILEPORTSOCKETINFO 3 /* out: socket_fdinfo */752#define PROC_PIDFILEPORTSOCKETINFO_SIZE PROC_PIDFDSOCKETINFO_SIZE753754#define PROC_PIDFILEPORTPSHMINFO 5 /* out: pshm_fdinfo */755#define PROC_PIDFILEPORTPSHMINFO_SIZE PROC_PIDFDPSHMINFO_SIZE756757#define PROC_PIDFILEPORTPIPEINFO 6 /* out: pipe_fdinfo */758#define PROC_PIDFILEPORTPIPEINFO_SIZE PROC_PIDFDPIPEINFO_SIZE759760/* used for proc_setcontrol */761#define PROC_SELFSET_PCONTROL 1762763#define PROC_SELFSET_THREADNAME 2764#define PROC_SELFSET_THREADNAME_SIZE (MAXTHREADNAMESIZE -1)765766#define PROC_SELFSET_VMRSRCOWNER 3767768#define PROC_SELFSET_DELAYIDLESLEEP 4769770/* used for proc_dirtycontrol */771#define PROC_DIRTYCONTROL_TRACK 1772#define PROC_DIRTYCONTROL_SET 2773#define PROC_DIRTYCONTROL_GET 3774#define PROC_DIRTYCONTROL_CLEAR 4775776/* proc_track_dirty() flags */777#define PROC_DIRTY_TRACK 0x1778#define PROC_DIRTY_ALLOW_IDLE_EXIT 0x2779#define PROC_DIRTY_DEFER 0x4780#define PROC_DIRTY_LAUNCH_IN_PROGRESS 0x8781#define PROC_DIRTY_DEFER_ALWAYS 0x10782783/* proc_get_dirty() flags */784#define PROC_DIRTY_TRACKED 0x1785#define PROC_DIRTY_ALLOWS_IDLE_EXIT 0x2786#define PROC_DIRTY_IS_DIRTY 0x4787#define PROC_DIRTY_LAUNCH_IS_IN_PROGRESS 0x8788789/* Flavors for proc_udata_info */790#define PROC_UDATA_INFO_GET 1791#define PROC_UDATA_INFO_SET 2792793794795796__END_DECLS797798#endif /*_SYS_PROC_INFO_H */799800801