...
1
2
3
4 package process
5
6 const (
7 sizeofPtr = 0x8
8 sizeofShort = 0x2
9 sizeofInt = 0x4
10 sizeofLong = 0x8
11 sizeofLongLong = 0x8
12 )
13
14 type (
15 _C_short int16
16 _C_int int32
17 _C_long int64
18 _C_long_long int64
19 )
20
21 type Timespec struct {
22 Sec int64
23 Nsec int64
24 }
25
26 type Timeval struct {
27 Sec int64
28 Usec int32
29 Pad_cgo_0 [4]byte
30 }
31
32 type Rusage struct {
33 Utime Timeval
34 Stime Timeval
35 Maxrss int64
36 Ixrss int64
37 Idrss int64
38 Isrss int64
39 Minflt int64
40 Majflt int64
41 Nswap int64
42 Inblock int64
43 Oublock int64
44 Msgsnd int64
45 Msgrcv int64
46 Nsignals int64
47 Nvcsw int64
48 Nivcsw int64
49 }
50
51 type Rlimit struct {
52 Cur uint64
53 Max uint64
54 }
55
56 type UGid_t uint32
57
58 type KinfoProc struct {
59 Proc ExternProc
60 Eproc Eproc
61 }
62
63 type Eproc struct {
64 Paddr *uint64
65 Sess *Session
66 Pcred Upcred
67 Ucred Uucred
68 Pad_cgo_0 [4]byte
69 Vm Vmspace
70 Ppid int32
71 Pgid int32
72 Jobc int16
73 Pad_cgo_1 [2]byte
74 Tdev int32
75 Tpgid int32
76 Pad_cgo_2 [4]byte
77 Tsess *Session
78 Wmesg [8]int8
79 Xsize int32
80 Xrssize int16
81 Xccount int16
82 Xswrss int16
83 Pad_cgo_3 [2]byte
84 Flag int32
85 Login [12]int8
86 Spare [4]int32
87 Pad_cgo_4 [4]byte
88 }
89
90 type Proc struct{}
91
92 type Session struct{}
93
94 type ucred struct {
95 Link _Ctype_struct___0
96 Ref uint64
97 Posix Posix_cred
98 Label *Label
99 Audit Au_session
100 }
101
102 type Uucred struct {
103 Ref int32
104 UID uint32
105 Ngroups int16
106 Pad_cgo_0 [2]byte
107 Groups [16]uint32
108 }
109
110 type Upcred struct {
111 Pc_lock [72]int8
112 Pc_ucred *ucred
113 P_ruid uint32
114 P_svuid uint32
115 P_rgid uint32
116 P_svgid uint32
117 P_refcnt int32
118 Pad_cgo_0 [4]byte
119 }
120
121 type Vmspace struct {
122 Dummy int32
123 Pad_cgo_0 [4]byte
124 Dummy2 *int8
125 Dummy3 [5]int32
126 Pad_cgo_1 [4]byte
127 Dummy4 [3]*int8
128 }
129
130 type Sigacts struct{}
131
132 type ExternProc struct {
133 P_un [16]byte
134 P_vmspace uint64
135 P_sigacts uint64
136 Pad_cgo_0 [3]byte
137 P_flag int32
138 P_stat int8
139 P_pid int32
140 P_oppid int32
141 P_dupfd int32
142 Pad_cgo_1 [4]byte
143 User_stack uint64
144 Exit_thread uint64
145 P_debugger int32
146 Sigwait int32
147 P_estcpu uint32
148 P_cpticks int32
149 P_pctcpu uint32
150 Pad_cgo_2 [4]byte
151 P_wchan uint64
152 P_wmesg uint64
153 P_swtime uint32
154 P_slptime uint32
155 P_realtimer Itimerval
156 P_rtime Timeval
157 P_uticks uint64
158 P_sticks uint64
159 P_iticks uint64
160 P_traceflag int32
161 Pad_cgo_3 [4]byte
162 P_tracep uint64
163 P_siglist int32
164 Pad_cgo_4 [4]byte
165 P_textvp uint64
166 P_holdcnt int32
167 P_sigmask uint32
168 P_sigignore uint32
169 P_sigcatch uint32
170 P_priority uint8
171 P_usrpri uint8
172 P_nice int8
173 P_comm [17]int8
174 Pad_cgo_5 [4]byte
175 P_pgrp uint64
176 P_addr uint64
177 P_xstat uint16
178 P_acflag uint16
179 Pad_cgo_6 [4]byte
180 P_ru uint64
181 }
182
183 type Itimerval struct {
184 Interval Timeval
185 Value Timeval
186 }
187
188 type Vnode struct{}
189
190 type Pgrp struct{}
191
192 type UserStruct struct{}
193
194 type Au_session struct {
195 Aia_p *AuditinfoAddr
196 Mask AuMask
197 }
198
199 type Posix_cred struct {
200 UID uint32
201 Ruid uint32
202 Svuid uint32
203 Ngroups int16
204 Pad_cgo_0 [2]byte
205 Groups [16]uint32
206 Rgid uint32
207 Svgid uint32
208 Gmuid uint32
209 Flags int32
210 }
211
212 type Label struct{}
213
214 type AuditinfoAddr struct {
215 Auid uint32
216 Mask AuMask
217 Termid AuTidAddr
218 Asid int32
219 Flags uint64
220 }
221 type AuMask struct {
222 Success uint32
223 Failure uint32
224 }
225 type AuTidAddr struct {
226 Port int32
227 Type uint32
228 Addr [4]uint32
229 }
230
231 type UcredQueue struct {
232 Next *ucred
233 Prev **ucred
234 }
235
View as plain text