#include <sys/proc_info.h>

sys/proc_info.h

198 macros · 46 structs · 1 enum · 1 typedef

macroPROC_ALL_PIDS

#define PROC_ALL_PIDS 1

macroPROC_PGRP_ONLY

#define PROC_PGRP_ONLY 2

macroPROC_TTY_ONLY

#define PROC_TTY_ONLY 3

macroPROC_UID_ONLY

#define PROC_UID_ONLY 4

macroPROC_RUID_ONLY

#define PROC_RUID_ONLY 5

macroPROC_PPID_ONLY

#define PROC_PPID_ONLY 6

macroPROC_KDBG_ONLY

#define PROC_KDBG_ONLY 7

structproc_bsdinfo

size 136, align 8
uint32_tpbi_flags64bit; emulated etc
uint32_tpbi_status
uint32_tpbi_xstatus
uint32_tpbi_pid
uint32_tpbi_ppid
uid_tpbi_uid
gid_tpbi_gid
uid_tpbi_ruid
gid_tpbi_rgid
uid_tpbi_svuid
gid_tpbi_svgid
uint32_trfu_1reserved
char[16]pbi_comm
char[32]pbi_nameempty if no name is registered
uint32_tpbi_nfiles
uint32_tpbi_pgid
uint32_tpbi_pjobc
uint32_te_tdevcontrolling tty dev
uint32_te_tpgidtty process group id
int32_tpbi_nice
uint64_tpbi_start_tvsec
uint64_tpbi_start_tvusec

structproc_bsdshortinfo

size 64, align 4
uint32_tpbsi_pidprocess id
uint32_tpbsi_ppidprocess parent id
uint32_tpbsi_pgidprocess perp id
uint32_tpbsi_statusp_stat value, SZOMB, SRUN, etc
char[16]pbsi_commupto 16 characters of process name
uint32_tpbsi_flags64bit; emulated etc
uid_tpbsi_uidcurrent uid on process
gid_tpbsi_gidcurrent gid on process
uid_tpbsi_ruidcurrent ruid on process
gid_tpbsi_rgidcurrent tgid on process
uid_tpbsi_svuidcurrent svuid on process
gid_tpbsi_svgidcurrent svgid on process
uint32_tpbsi_rfureserved for future use

macroPROC_FLAG_SYSTEM

pbi_flags values
#define PROC_FLAG_SYSTEM 1
System process

macroPROC_FLAG_TRACED

#define PROC_FLAG_TRACED 2
process currently being traced, possibly by gdb

macroPROC_FLAG_INEXIT

#define PROC_FLAG_INEXIT 4
process is working its way in exit()

macroPROC_FLAG_PPWAIT

#define PROC_FLAG_PPWAIT 8

macroPROC_FLAG_LP64

#define PROC_FLAG_LP64 0x10
64bit process

macroPROC_FLAG_SLEADER

#define PROC_FLAG_SLEADER 0x20
The process is the session leader

macroPROC_FLAG_CTTY

#define PROC_FLAG_CTTY 0x40
process has a control tty

macroPROC_FLAG_CONTROLT

#define PROC_FLAG_CONTROLT 0x80
Has a controlling terminal

macroPROC_FLAG_THCWD

#define PROC_FLAG_THCWD 0x100
process has a thread with cwd

macroPROC_FLAG_PC_THROTTLE

process control bits for resource starvation
#define PROC_FLAG_PC_THROTTLE 0x200
In resource starvation situations, this process is to be throttled

macroPROC_FLAG_PC_SUSP

#define PROC_FLAG_PC_SUSP 0x400
In resource starvation situations, this process is to be suspended

macroPROC_FLAG_PC_KILL

#define PROC_FLAG_PC_KILL 0x600
In resource starvation situations, this process is to be terminated

macroPROC_FLAG_PC_MASK

#define PROC_FLAG_PC_MASK 0x600

macroPROC_FLAG_PA_THROTTLE

process action bits for resource starvation
#define PROC_FLAG_PA_THROTTLE 0x800
The process is currently throttled due to resource starvation

macroPROC_FLAG_PA_SUSP

#define PROC_FLAG_PA_SUSP 0x1000
The process is currently suspended due to resource starvation

macroPROC_FLAG_PSUGID

#define PROC_FLAG_PSUGID 0x2000
process has set privileges since last exec

macroPROC_FLAG_EXEC

#define PROC_FLAG_EXEC 0x4000
process has called exec

structproc_taskinfo

size 96, align 8
uint64_tpti_virtual_sizevirtual memory size (bytes)
uint64_tpti_resident_sizeresident memory size (bytes)
uint64_tpti_total_usertotal time
uint64_tpti_total_system
uint64_tpti_threads_userexisting threads only
uint64_tpti_threads_system
int32_tpti_policydefault policy for new threads
int32_tpti_faultsnumber of page faults
int32_tpti_pageinsnumber of actual pageins
int32_tpti_cow_faultsnumber of copy-on-write faults
int32_tpti_messages_sentnumber of messages sent
int32_tpti_messages_receivednumber of messages received
int32_tpti_syscalls_machnumber of mach system calls
int32_tpti_syscalls_unixnumber of unix system calls
int32_tpti_cswnumber of context switches
int32_tpti_threadnumnumber of threads in the task
int32_tpti_numrunningnumber of running threads
int32_tpti_prioritytask priority

structproc_taskallinfo

size 232, align 8
struct proc_bsdinfopbsd
struct proc_taskinfoptinfo

macroMAXTHREADNAMESIZE

#define MAXTHREADNAMESIZE 64

structproc_threadinfo

size 112, align 8
uint64_tpth_user_timeuser run time
uint64_tpth_system_timesystem run time
int32_tpth_cpu_usagescaled cpu usage percentage
int32_tpth_policyscheduling policy in effect
int32_tpth_run_staterun state (see below)
int32_tpth_flagsvarious flags (see below)
int32_tpth_sleep_timenumber of seconds that thread
int32_tpth_curpricur priority
int32_tpth_prioritypriority
int32_tpth_maxprioritymax priority
char[64]pth_namethread name, if any

structproc_regioninfo

size 96, align 8
uint32_tpri_protection
uint32_tpri_max_protection
uint32_tpri_inheritance
uint32_tpri_flagsshared, external pager, is submap
uint64_tpri_offset
uint32_tpri_behavior
uint32_tpri_user_wired_count
uint32_tpri_user_tag
uint32_tpri_pages_resident
uint32_tpri_pages_shared_now_private
uint32_tpri_pages_swapped_out
uint32_tpri_pages_dirtied
uint32_tpri_ref_count
uint32_tpri_shadow_depth
uint32_tpri_share_mode
uint32_tpri_private_pages_resident
uint32_tpri_shared_pages_resident
uint32_tpri_obj_id
uint32_tpri_depth
uint64_tpri_address
uint64_tpri_size

macroPROC_REGION_SUBMAP

#define PROC_REGION_SUBMAP 1

macroPROC_REGION_SHARED

#define PROC_REGION_SHARED 2

macroSM_COW

#define SM_COW 1

macroSM_PRIVATE

#define SM_PRIVATE 2

macroSM_EMPTY

#define SM_EMPTY 3

macroSM_SHARED

#define SM_SHARED 4

macroSM_TRUESHARED

#define SM_TRUESHARED 5

macroSM_PRIVATE_ALIASED

#define SM_PRIVATE_ALIASED 6

macroSM_SHARED_ALIASED

#define SM_SHARED_ALIASED 7

macroSM_LARGE_PAGE

#define SM_LARGE_PAGE 8

macroTH_STATE_RUNNING

#define TH_STATE_RUNNING 1
thread is running normally

macroTH_STATE_STOPPED

#define TH_STATE_STOPPED 2
thread is stopped

macroTH_STATE_WAITING

#define TH_STATE_WAITING 3
thread is waiting normally

macroTH_STATE_UNINTERRUPTIBLE

#define TH_STATE_UNINTERRUPTIBLE 4
thread is in an uninterruptible wait

macroTH_STATE_HALTED

#define TH_STATE_HALTED 5
thread is halted at a clean point

macroTH_FLAGS_SWAPPED

Thread flags (flags field).
#define TH_FLAGS_SWAPPED 0x1
thread is swapped out

macroTH_FLAGS_IDLE

#define TH_FLAGS_IDLE 0x2
thread is an idle thread

structproc_workqueueinfo

size 16, align 4
uint32_tpwq_nthreadstotal number of workqueue threads
uint32_tpwq_runthreadstotal number of running workqueue threads
uint32_tpwq_blockedthreadstotal number of blocked workqueue threads
uint32_tpwq_state

macroWQ_EXCEEDED_CONSTRAINED_THREAD_LIMIT

workqueue state (pwq_state field)
#define WQ_EXCEEDED_CONSTRAINED_THREAD_LIMIT 0x1

macroWQ_EXCEEDED_TOTAL_THREAD_LIMIT

#define WQ_EXCEEDED_TOTAL_THREAD_LIMIT 0x2

macroWQ_FLAGS_AVAILABLE

#define WQ_FLAGS_AVAILABLE 0x4

macroWQ_EXCEEDED_COOPERATIVE_THREAD_LIMIT

WQ_EXCEEDED_COOPERATIVE_THREAD_LIMIT is set if wq has scheduled cooperative threads upto the cooperative thread pool limit and there is still more work pending in the cooperative pool that require a thread.
#define WQ_EXCEEDED_COOPERATIVE_THREAD_LIMIT 0x8

macroWQ_EXCEEDED_ACTIVE_CONSTRAINED_THREAD_LIMIT

WQ_EXCEEDED_ACTIVE_CONSTRAINED_THREAD_LIMIT is set when wq has pending thread requests for the constrained thread pool; but, has failed the allowance check because of active thread limit.
#define WQ_EXCEEDED_ACTIVE_CONSTRAINED_THREAD_LIMIT 0x10

structproc_fileinfo

size 24, align 8
uint32_tfi_openflags
uint32_tfi_status
off_tfi_offset
int32_tfi_type
uint32_tfi_guardflags

macroPROC_FP_SHARED

stats flags in proc_fileinfo
#define PROC_FP_SHARED 1
shared by more than one fd

macroPROC_FP_CLEXEC

#define PROC_FP_CLEXEC 2
close on exec

macroPROC_FP_GUARDED

#define PROC_FP_GUARDED 4
guarded fd

macroPROC_FP_CLFORK

#define PROC_FP_CLFORK 8
close on fork

macroPROC_FI_GUARD_CLOSE

#define PROC_FI_GUARD_CLOSE (1u << 0)

macroPROC_FI_GUARD_DUP

#define PROC_FI_GUARD_DUP (1u << 1)

macroPROC_FI_GUARD_SOCKET_IPC

#define PROC_FI_GUARD_SOCKET_IPC (1u << 2)

macroPROC_FI_GUARD_FILEPORT

#define PROC_FI_GUARD_FILEPORT (1u << 3)

structproc_exitreasonbasicinfo

size 24, align 1 · packed
uint32_tberi_namespace
uint64_tberi_code
uint64_tberi_flags
uint32_tberi_reason_buf_size

structproc_exitreasoninfo

size 32, align 1 · packed
uint32_teri_namespace
uint64_teri_code
uint64_teri_flags
uint32_teri_reason_buf_size
uint64_teri_kcd_buf

structvinfo_stat

A copy of stat64 with static sized fields.
size 136, align 8
uint32_tvst_dev[XSI] ID of device containing file
uint16_tvst_mode[XSI] Mode of file (see below)
uint16_tvst_nlink[XSI] Number of hard links
uint64_tvst_ino[XSI] File serial number
uid_tvst_uid[XSI] User ID of the file
gid_tvst_gid[XSI] Group ID of the file
int64_tvst_atime[XSI] Time of last access
int64_tvst_atimensecnsec of last access
int64_tvst_mtime[XSI] Last data modification time
int64_tvst_mtimenseclast data modification nsec
int64_tvst_ctime[XSI] Time of last status change
int64_tvst_ctimensecnsec of last status change
int64_tvst_birthtimeFile creation time(birth)
int64_tvst_birthtimensecnsec of File creation time
off_tvst_size[XSI] file size, in bytes
int64_tvst_blocks[XSI] blocks allocated for file
int32_tvst_blksize[XSI] optimal blocksize for I/O
uint32_tvst_flagsuser defined flags for file
uint32_tvst_genfile generation number
uint32_tvst_rdev[XSI] Device ID
int64_t[2]vst_qspareRESERVED: DO NOT USE!

structvnode_info

size 152, align 8
struct vinfo_statvi_stat
intvi_type
intvi_pad
fsid_tvi_fsid

structvnode_info_path

size 1176, align 8
struct vnode_infovip_vi
char[1024]vip_pathtail end of it

structvnode_fdinfo

size 176, align 8
struct proc_fileinfopfi
struct vnode_infopvi

structvnode_fdinfowithpath

size 1200, align 8
struct proc_fileinfopfi
struct vnode_info_pathpvip

structproc_regionwithpathinfo

size 1272, align 8
struct proc_regioninfoprp_prinfo
struct vnode_info_pathprp_vip

structproc_regionpath

size 1040, align 8
uint64_tprpo_addr
uint64_tprpo_regionlength
char[1024]prpo_path

structproc_vnodepathinfo

size 2352, align 8
struct vnode_info_pathpvi_cdir
struct vnode_info_pathpvi_rdir

structproc_threadwithpathinfo

size 1288, align 8
struct proc_threadinfopt
struct vnode_info_pathpvip

structproc_archinfo

size 8, align 4
cpu_type_tp_cputype
cpu_subtype_tp_cpusubtype

macroINI_IPV4

#define INI_IPV4 0x1

macroINI_IPV6

#define INI_IPV6 0x2

structin4in6_addr

size 16, align 4
u_int32_t[3]i46a_pad32
struct in_addri46a_addr4

structin_sockinfo

size 80, align 8
intinsi_fportforeign port
intinsi_lportlocal port
uint64_tinsi_gencntgeneration count of this instance
uint32_tinsi_flagsgeneric IP/datagram flags
uint32_tinsi_flow
uint8_tinsi_vflagini_IPV4 or ini_IPV6
uint8_tinsi_ip_ttltime to live proto
uint32_trfu_1reserved
unnamed union at sys/proc_info.h:385:2insi_faddrprotocol dependent part
struct in4in6_addrina_46
struct in6_addrina_6
unnamed union at sys/proc_info.h:389:2insi_laddr
struct in4in6_addrina_46
struct in6_addrina_6
unnamed struct at sys/proc_info.h:393:2insi_v4
u_charin4_tostype of service
unnamed struct at sys/proc_info.h:396:2insi_v6
uint8_tin6_hlim
intin6_cksum
u_shortin6_ifindex
shortin6_hops

macroTSI_T_REXMT

#define TSI_T_REXMT 0
retransmit

macroTSI_T_PERSIST

#define TSI_T_PERSIST 1
retransmit persistence

macroTSI_T_KEEP

#define TSI_T_KEEP 2
keep alive

macroTSI_T_2MSL

#define TSI_T_2MSL 3
2*msl quiet time timer

macroTSI_T_NTIMERS

#define TSI_T_NTIMERS 4

macroTSI_S_CLOSED

#define TSI_S_CLOSED 0
closed

macroTSI_S_LISTEN

#define TSI_S_LISTEN 1
listening for connection

macroTSI_S_SYN_SENT

#define TSI_S_SYN_SENT 2
active, have sent syn

macroTSI_S_SYN_RECEIVED

#define TSI_S_SYN_RECEIVED 3
have send and received syn

macroTSI_S_ESTABLISHED

#define TSI_S_ESTABLISHED 4
established

macroTSI_S__CLOSE_WAIT

#define TSI_S__CLOSE_WAIT 5
rcvd fin, waiting for close

macroTSI_S_FIN_WAIT_1

#define TSI_S_FIN_WAIT_1 6
have closed, sent fin

macroTSI_S_CLOSING

#define TSI_S_CLOSING 7
closed xchd FIN; await FIN ACK

macroTSI_S_LAST_ACK

#define TSI_S_LAST_ACK 8
had fin and close; await FIN ACK

macroTSI_S_FIN_WAIT_2

#define TSI_S_FIN_WAIT_2 9
have closed, fin is acked

macroTSI_S_TIME_WAIT

#define TSI_S_TIME_WAIT 10
in 2*msl quiet wait after close

macroTSI_S_RESERVED

#define TSI_S_RESERVED 11
pseudo state: reserved

structtcp_sockinfo

size 120, align 8
struct in_sockinfotcpsi_ini
inttcpsi_state
int[4]tcpsi_timer
inttcpsi_mss
uint32_ttcpsi_flags
uint32_trfu_1reserved
uint64_ttcpsi_tpopaque handle of TCP protocol control block

structun_sockinfo

size 528, align 8
uint64_tunsi_conn_soopaque handle of connected socket
uint64_tunsi_conn_pcbopaque handle of connected protocol control block
unnamed union at sys/proc_info.h:445:2unsi_addr
struct sockaddr_unua_sun
char[255]ua_dummy
unnamed union at sys/proc_info.h:449:2unsi_caddr
struct sockaddr_unua_sun
char[255]ua_dummy

structndrv_info

size 24, align 4
uint32_tndrvsi_if_family
uint32_tndrvsi_if_unit
char[16]ndrvsi_if_name

structkern_event_info

size 12, align 4
uint32_tkesi_vendor_code_filter
uint32_tkesi_class_filter
uint32_tkesi_subclass_filter

structkern_ctl_info

size 120, align 4
uint32_tkcsi_id
uint32_tkcsi_reg_unit
uint32_tkcsi_flagssupport flags
uint32_tkcsi_recvbufsizerequest more than the default buffer size
uint32_tkcsi_sendbufsizerequest more than the default buffer size
uint32_tkcsi_unit
char[96]kcsi_nameunique nke identifier, provided by DTS

structvsock_sockinfo

size 16, align 4
uint32_tlocal_cid
uint32_tlocal_port
uint32_tremote_cid
uint32_tremote_port

macroSOI_S_NOFDREF

#define SOI_S_NOFDREF 0x0001
no file table ref any more

macroSOI_S_ISCONNECTED

#define SOI_S_ISCONNECTED 0x0002
socket connected to a peer

macroSOI_S_ISCONNECTING

#define SOI_S_ISCONNECTING 0x0004
in process of connecting to peer

macroSOI_S_ISDISCONNECTING

#define SOI_S_ISDISCONNECTING 0x0008
in process of disconnecting

macroSOI_S_CANTSENDMORE

#define SOI_S_CANTSENDMORE 0x0010
can't send more data to peer

macroSOI_S_CANTRCVMORE

#define SOI_S_CANTRCVMORE 0x0020
can't receive more data from peer

macroSOI_S_RCVATMARK

#define SOI_S_RCVATMARK 0x0040
at mark on input

macroSOI_S_PRIV

#define SOI_S_PRIV 0x0080
privileged for broadcast, raw...

macroSOI_S_NBIO

#define SOI_S_NBIO 0x0100
non-blocking ops

macroSOI_S_ASYNC

#define SOI_S_ASYNC 0x0200
async i/o notify

macroSOI_S_INCOMP

#define SOI_S_INCOMP 0x0800
Unaccepted, incomplete connection

macroSOI_S_COMP

#define SOI_S_COMP 0x1000
unaccepted, complete connection

macroSOI_S_ISDISCONNECTED

#define SOI_S_ISDISCONNECTED 0x2000
socket disconnected from peer

macroSOI_S_DRAINING

#define SOI_S_DRAINING 0x4000
close waiting for blocked system calls to drain

structsockbuf_info

size 24, align 4
uint32_tsbi_cc
uint32_tsbi_hiwatSO_RCVBUF, SO_SNDBUF
uint32_tsbi_mbcnt
uint32_tsbi_mbmax
uint32_tsbi_lowat
shortsbi_flags
shortsbi_timeo

enum(anonymous)

underlying type unsigned int
SOCKINFO_GENERIC0
SOCKINFO_IN1
SOCKINFO_TCP2
SOCKINFO_UN3
SOCKINFO_NDRV4
SOCKINFO_KERN_EVENT5
SOCKINFO_KERN_CTL6
SOCKINFO_VSOCK7

structsocket_info

size 768, align 8
struct vinfo_statsoi_stat
uint64_tsoi_soopaque handle of socket
uint64_tsoi_pcbopaque handle of protocol control block
intsoi_type
intsoi_protocol
intsoi_family
shortsoi_options
shortsoi_linger
shortsoi_state
shortsoi_qlen
shortsoi_incqlen
shortsoi_qlimit
shortsoi_timeo
u_shortsoi_error
uint32_tsoi_oobmark
struct sockbuf_infosoi_rcv
struct sockbuf_infosoi_snd
intsoi_kind
uint32_trfu_1reserved
unnamed union at sys/proc_info.h:558:2soi_proto
struct in_sockinfopri_inSOCKINFO_IN
struct tcp_sockinfopri_tcpSOCKINFO_TCP
struct un_sockinfopri_unSOCKINFO_UN
struct ndrv_infopri_ndrvSOCKINFO_NDRV
struct kern_event_infopri_kern_eventSOCKINFO_KERN_EVENT
struct kern_ctl_infopri_kern_ctlSOCKINFO_KERN_CTL
struct vsock_sockinfopri_vsockSOCKINFO_VSOCK

structsocket_fdinfo

size 792, align 8
struct proc_fileinfopfi
struct socket_infopsi

structpsem_info

size 1160, align 8
struct vinfo_statpsem_stat
char[1024]psem_name

structpsem_fdinfo

size 1184, align 8
struct proc_fileinfopfi
struct psem_infopseminfo

structpshm_info

size 1168, align 8
struct vinfo_statpshm_stat
uint64_tpshm_mappaddr
char[1024]pshm_name

structpshm_fdinfo

size 1192, align 8
struct proc_fileinfopfi
struct pshm_infopshminfo

structpipe_info

size 160, align 8
struct vinfo_statpipe_stat
uint64_tpipe_handle
uint64_tpipe_peerhandle
intpipe_status
intrfu_1reserved

structpipe_fdinfo

size 184, align 8
struct proc_fileinfopfi
struct pipe_infopipeinfo

structkqueue_info

size 144, align 8
struct vinfo_statkq_stat
uint32_tkq_state
uint32_trfu_1reserved

structkqueue_dyninfo

size 208, align 8
struct kqueue_infokqdi_info
uint64_tkqdi_servicer
uint64_tkqdi_owner
uint32_tkqdi_sync_waiters
uint8_tkqdi_sync_waiter_qos
uint8_tkqdi_async_qos
uint16_tkqdi_request_state
uint8_tkqdi_events_qos
uint8_tkqdi_pri
uint8_tkqdi_pol
uint8_tkqdi_cpupercent
uint8_t[4]_kqdi_reserved0
uint64_t[4]_kqdi_reserved1

macroPROC_KQUEUE_SELECT

keep in sync with KQ_* in sys/eventvar.h
#define PROC_KQUEUE_SELECT 0x0001

macroPROC_KQUEUE_SLEEP

#define PROC_KQUEUE_SLEEP 0x0002

macroPROC_KQUEUE_32

#define PROC_KQUEUE_32 0x0008

macroPROC_KQUEUE_64

#define PROC_KQUEUE_64 0x0010

macroPROC_KQUEUE_QOS

#define PROC_KQUEUE_QOS 0x0020

structkqueue_fdinfo

size 168, align 8
struct proc_fileinfopfi
struct kqueue_infokqueueinfo

structappletalk_info

size 136, align 8
struct vinfo_statatalk_stat

structappletalk_fdinfo

size 160, align 8
struct proc_fileinfopfi
struct appletalk_infoappletalkinfo

typedefproc_info_udata_t

typedef uint64_t proc_info_udata_t

macroPROX_FDTYPE_ATALK

defns of process file desc type
#define PROX_FDTYPE_ATALK 0

macroPROX_FDTYPE_VNODE

#define PROX_FDTYPE_VNODE 1

macroPROX_FDTYPE_SOCKET

#define PROX_FDTYPE_SOCKET 2

macroPROX_FDTYPE_PSHM

#define PROX_FDTYPE_PSHM 3

macroPROX_FDTYPE_PSEM

#define PROX_FDTYPE_PSEM 4

macroPROX_FDTYPE_KQUEUE

#define PROX_FDTYPE_KQUEUE 5

macroPROX_FDTYPE_PIPE

#define PROX_FDTYPE_PIPE 6

macroPROX_FDTYPE_FSEVENTS

#define PROX_FDTYPE_FSEVENTS 7

macroPROX_FDTYPE_NETPOLICY

#define PROX_FDTYPE_NETPOLICY 9

macroPROX_FDTYPE_CHANNEL

#define PROX_FDTYPE_CHANNEL 10

macroPROX_FDTYPE_NEXUS

#define PROX_FDTYPE_NEXUS 11

structproc_fdinfo

size 8, align 4
int32_tproc_fd
uint32_tproc_fdtype

structproc_fileportinfo

size 8, align 4
uint32_tproc_fileport
uint32_tproc_fdtype

macroPROC_CHANNEL_TYPE_USER_PIPE

type
#define PROC_CHANNEL_TYPE_USER_PIPE 0

macroPROC_CHANNEL_TYPE_KERNEL_PIPE

#define PROC_CHANNEL_TYPE_KERNEL_PIPE 1

macroPROC_CHANNEL_TYPE_NET_IF

#define PROC_CHANNEL_TYPE_NET_IF 2

macroPROC_CHANNEL_TYPE_FLOW_SWITCH

#define PROC_CHANNEL_TYPE_FLOW_SWITCH 3

macroPROC_CHANNEL_FLAGS_MONITOR_TX

flags
#define PROC_CHANNEL_FLAGS_MONITOR_TX 0x1

macroPROC_CHANNEL_FLAGS_MONITOR_RX

#define PROC_CHANNEL_FLAGS_MONITOR_RX 0x2

macroPROC_CHANNEL_FLAGS_MONITOR_NO_COPY

#define PROC_CHANNEL_FLAGS_MONITOR_NO_COPY 0x4

macroPROC_CHANNEL_FLAGS_EXCLUSIVE

#define PROC_CHANNEL_FLAGS_EXCLUSIVE 0x10

macroPROC_CHANNEL_FLAGS_USER_PACKET_POOL

#define PROC_CHANNEL_FLAGS_USER_PACKET_POOL 0x20

macroPROC_CHANNEL_FLAGS_DEFUNCT_OK

#define PROC_CHANNEL_FLAGS_DEFUNCT_OK 0x40

macroPROC_CHANNEL_FLAGS_LOW_LATENCY

#define PROC_CHANNEL_FLAGS_LOW_LATENCY 0x80

structproc_channel_info

size 32, align 4
uuid_tchi_instance
uint32_tchi_port
uint32_tchi_type
uint32_tchi_flags
uint32_trfu_1reserved

structchannel_fdinfo

size 56, align 8
struct proc_fileinfopfi
struct proc_channel_infochannelinfo

macroPROC_PIDLISTFDS

Flavors for proc_pidinfo()
#define PROC_PIDLISTFDS 1

macroPROC_PIDLISTFD_SIZE

#define PROC_PIDLISTFD_SIZE (sizeof(struct proc_fdinfo))

macroPROC_PIDTASKALLINFO

#define PROC_PIDTASKALLINFO 2

macroPROC_PIDTASKALLINFO_SIZE

#define PROC_PIDTASKALLINFO_SIZE (sizeof(struct proc_taskallinfo))

macroPROC_PIDTBSDINFO

#define PROC_PIDTBSDINFO 3

macroPROC_PIDTBSDINFO_SIZE

#define PROC_PIDTBSDINFO_SIZE (sizeof(struct proc_bsdinfo))

macroPROC_PIDTASKINFO

#define PROC_PIDTASKINFO 4

macroPROC_PIDTASKINFO_SIZE

#define PROC_PIDTASKINFO_SIZE (sizeof(struct proc_taskinfo))

macroPROC_PIDTHREADINFO

#define PROC_PIDTHREADINFO 5

macroPROC_PIDTHREADINFO_SIZE

#define PROC_PIDTHREADINFO_SIZE (sizeof(struct proc_threadinfo))

macroPROC_PIDLISTTHREADS

#define PROC_PIDLISTTHREADS 6

macroPROC_PIDLISTTHREADS_SIZE

#define PROC_PIDLISTTHREADS_SIZE (2* sizeof(uint32_t))

macroPROC_PIDREGIONINFO

#define PROC_PIDREGIONINFO 7

macroPROC_PIDREGIONINFO_SIZE

#define PROC_PIDREGIONINFO_SIZE (sizeof(struct proc_regioninfo))

macroPROC_PIDREGIONPATHINFO

#define PROC_PIDREGIONPATHINFO 8

macroPROC_PIDREGIONPATHINFO_SIZE

#define PROC_PIDREGIONPATHINFO_SIZE (sizeof(struct proc_regionwithpathinfo))

macroPROC_PIDVNODEPATHINFO

#define PROC_PIDVNODEPATHINFO 9

macroPROC_PIDVNODEPATHINFO_SIZE

#define PROC_PIDVNODEPATHINFO_SIZE (sizeof(struct proc_vnodepathinfo))

macroPROC_PIDTHREADPATHINFO

#define PROC_PIDTHREADPATHINFO 10

macroPROC_PIDTHREADPATHINFO_SIZE

#define PROC_PIDTHREADPATHINFO_SIZE (sizeof(struct proc_threadwithpathinfo))

macroPROC_PIDPATHINFO

#define PROC_PIDPATHINFO 11

macroPROC_PIDPATHINFO_SIZE

#define PROC_PIDPATHINFO_SIZE (MAXPATHLEN)

macroPROC_PIDPATHINFO_MAXSIZE

#define PROC_PIDPATHINFO_MAXSIZE (4*MAXPATHLEN)

macroPROC_PIDWORKQUEUEINFO

#define PROC_PIDWORKQUEUEINFO 12

macroPROC_PIDWORKQUEUEINFO_SIZE

#define PROC_PIDWORKQUEUEINFO_SIZE (sizeof(struct proc_workqueueinfo))

macroPROC_PIDT_SHORTBSDINFO

#define PROC_PIDT_SHORTBSDINFO 13

macroPROC_PIDT_SHORTBSDINFO_SIZE

#define PROC_PIDT_SHORTBSDINFO_SIZE (sizeof(struct proc_bsdshortinfo))

macroPROC_PIDLISTFILEPORTS

#define PROC_PIDLISTFILEPORTS 14

macroPROC_PIDLISTFILEPORTS_SIZE

#define PROC_PIDLISTFILEPORTS_SIZE (sizeof(struct proc_fileportinfo))

macroPROC_PIDTHREADID64INFO

#define PROC_PIDTHREADID64INFO 15

macroPROC_PIDTHREADID64INFO_SIZE

#define PROC_PIDTHREADID64INFO_SIZE (sizeof(struct proc_threadinfo))

macroPROC_PID_RUSAGE

#define PROC_PID_RUSAGE 16

macroPROC_PID_RUSAGE_SIZE

#define PROC_PID_RUSAGE_SIZE 0

macroPROC_PIDARCHINFO

#define PROC_PIDARCHINFO 19

macroPROC_PIDARCHINFO_SIZE

#define PROC_PIDARCHINFO_SIZE (sizeof(struct proc_archinfo))

macroPROC_PIDFDVNODEINFO

#define PROC_PIDFDVNODEINFO 1

macroPROC_PIDFDVNODEINFO_SIZE

#define PROC_PIDFDVNODEINFO_SIZE (sizeof(struct vnode_fdinfo))

macroPROC_PIDFDVNODEPATHINFO

#define PROC_PIDFDVNODEPATHINFO 2

macroPROC_PIDFDVNODEPATHINFO_SIZE

#define PROC_PIDFDVNODEPATHINFO_SIZE (sizeof(struct vnode_fdinfowithpath))

macroPROC_PIDFDSOCKETINFO

#define PROC_PIDFDSOCKETINFO 3

macroPROC_PIDFDSOCKETINFO_SIZE

#define PROC_PIDFDSOCKETINFO_SIZE (sizeof(struct socket_fdinfo))

macroPROC_PIDFDPSEMINFO

#define PROC_PIDFDPSEMINFO 4

macroPROC_PIDFDPSEMINFO_SIZE

#define PROC_PIDFDPSEMINFO_SIZE (sizeof(struct psem_fdinfo))

macroPROC_PIDFDPSHMINFO

#define PROC_PIDFDPSHMINFO 5

macroPROC_PIDFDPSHMINFO_SIZE

#define PROC_PIDFDPSHMINFO_SIZE (sizeof(struct pshm_fdinfo))

macroPROC_PIDFDPIPEINFO

#define PROC_PIDFDPIPEINFO 6

macroPROC_PIDFDPIPEINFO_SIZE

#define PROC_PIDFDPIPEINFO_SIZE (sizeof(struct pipe_fdinfo))

macroPROC_PIDFDKQUEUEINFO

#define PROC_PIDFDKQUEUEINFO 7

macroPROC_PIDFDKQUEUEINFO_SIZE

#define PROC_PIDFDKQUEUEINFO_SIZE (sizeof(struct kqueue_fdinfo))

macroPROC_PIDFDATALKINFO

#define PROC_PIDFDATALKINFO 8

macroPROC_PIDFDATALKINFO_SIZE

#define PROC_PIDFDATALKINFO_SIZE (sizeof(struct appletalk_fdinfo))

macroPROC_PIDFDCHANNELINFO

#define PROC_PIDFDCHANNELINFO 10

macroPROC_PIDFDCHANNELINFO_SIZE

#define PROC_PIDFDCHANNELINFO_SIZE (sizeof(struct channel_fdinfo))

macroPROC_PIDFILEPORTVNODEPATHINFO

#define PROC_PIDFILEPORTVNODEPATHINFO 2

macroPROC_PIDFILEPORTVNODEPATHINFO_SIZE

#define PROC_PIDFILEPORTVNODEPATHINFO_SIZE PROC_PIDFDVNODEPATHINFO_SIZE

macroPROC_PIDFILEPORTSOCKETINFO

#define PROC_PIDFILEPORTSOCKETINFO 3

macroPROC_PIDFILEPORTSOCKETINFO_SIZE

#define PROC_PIDFILEPORTSOCKETINFO_SIZE PROC_PIDFDSOCKETINFO_SIZE

macroPROC_PIDFILEPORTPSHMINFO

#define PROC_PIDFILEPORTPSHMINFO 5

macroPROC_PIDFILEPORTPSHMINFO_SIZE

#define PROC_PIDFILEPORTPSHMINFO_SIZE PROC_PIDFDPSHMINFO_SIZE

macroPROC_PIDFILEPORTPIPEINFO

#define PROC_PIDFILEPORTPIPEINFO 6

macroPROC_PIDFILEPORTPIPEINFO_SIZE

#define PROC_PIDFILEPORTPIPEINFO_SIZE PROC_PIDFDPIPEINFO_SIZE

macroPROC_SELFSET_PCONTROL

used for proc_setcontrol
#define PROC_SELFSET_PCONTROL 1

macroPROC_SELFSET_THREADNAME

#define PROC_SELFSET_THREADNAME 2

macroPROC_SELFSET_THREADNAME_SIZE

#define PROC_SELFSET_THREADNAME_SIZE (MAXTHREADNAMESIZE -1)

macroPROC_SELFSET_VMRSRCOWNER

#define PROC_SELFSET_VMRSRCOWNER 3

macroPROC_SELFSET_DELAYIDLESLEEP

#define PROC_SELFSET_DELAYIDLESLEEP 4

macroPROC_DIRTYCONTROL_TRACK

used for proc_dirtycontrol
#define PROC_DIRTYCONTROL_TRACK 1

macroPROC_DIRTYCONTROL_SET

#define PROC_DIRTYCONTROL_SET 2

macroPROC_DIRTYCONTROL_GET

#define PROC_DIRTYCONTROL_GET 3

macroPROC_DIRTYCONTROL_CLEAR

#define PROC_DIRTYCONTROL_CLEAR 4

macroPROC_DIRTY_TRACK

#define PROC_DIRTY_TRACK 0x1

macroPROC_DIRTY_ALLOW_IDLE_EXIT

#define PROC_DIRTY_ALLOW_IDLE_EXIT 0x2

macroPROC_DIRTY_DEFER

#define PROC_DIRTY_DEFER 0x4

macroPROC_DIRTY_LAUNCH_IN_PROGRESS

#define PROC_DIRTY_LAUNCH_IN_PROGRESS 0x8

macroPROC_DIRTY_DEFER_ALWAYS

#define PROC_DIRTY_DEFER_ALWAYS 0x10

macroPROC_DIRTY_SHUTDOWN_ON_CLEAN

#define PROC_DIRTY_SHUTDOWN_ON_CLEAN 0x20

macroPROC_DIRTY_TRACKED

#define PROC_DIRTY_TRACKED 0x1

macroPROC_DIRTY_ALLOWS_IDLE_EXIT

#define PROC_DIRTY_ALLOWS_IDLE_EXIT 0x2

macroPROC_DIRTY_IS_DIRTY

#define PROC_DIRTY_IS_DIRTY 0x4

macroPROC_DIRTY_LAUNCH_IS_IN_PROGRESS

#define PROC_DIRTY_LAUNCH_IS_IN_PROGRESS 0x8

macroPROC_UDATA_INFO_GET

Flavors for proc_udata_info
#define PROC_UDATA_INFO_GET 1

macroPROC_UDATA_INFO_SET

#define PROC_UDATA_INFO_SET 2