...
1
2
3
4
5
6
7
10
11
12
13
14 package unix
15
16
85 import "C"
86
87
88
89 const (
90 SizeofPtr = C.sizeofPtr
91 SizeofShort = C.sizeof_short
92 SizeofInt = C.sizeof_int
93 SizeofLong = C.sizeof_long
94 SizeofLongLong = C.sizeof_longlong
95 )
96
97
98
99 type (
100 _C_short C.short
101 _C_int C.int
102 _C_long C.long
103 _C_long_long C.longlong
104 )
105
106
107
108 type Timespec C.struct_timespec
109
110 type Timeval C.struct_timeval
111
112 type Timeval32 C.struct_timeval32
113
114
115
116 type Rusage C.struct_rusage
117
118 type Rlimit C.struct_rlimit
119
120 type _Gid_t C.gid_t
121
122
123
124 type Stat_t C.stat_t
125
126 type Statfs_t C.statfs_t
127
128 type Flock_t C.struct_flock
129
130 type Fstore_t C.struct_fstore
131
132 type Radvisory_t C.struct_radvisory
133
134 type Fbootstraptransfer_t C.struct_fbootstraptransfer
135
136 type Log2phys_t C.struct_log2phys
137
138 type Fsid C.struct_fsid
139
140 type Dirent C.struct_dirent
141
142 type Attrlist C.struct_attrlist
143
144
145
146 const (
147 PathMax = C.PATH_MAX
148 )
149
150
151
152 type RawSockaddrInet4 C.struct_sockaddr_in
153
154 type RawSockaddrInet6 C.struct_sockaddr_in6
155
156 type RawSockaddrUnix C.struct_sockaddr_un
157
158 type RawSockaddrDatalink C.struct_sockaddr_dl
159
160 type RawSockaddr C.struct_sockaddr
161
162 type RawSockaddrAny C.struct_sockaddr_any
163
164 type RawSockaddrCtl C.struct_sockaddr_ctl
165
166 type RawSockaddrVM C.struct_sockaddr_vm
167
168 type XVSockPCB C.struct_xvsockpcb
169
170 type XSocket C.struct_xsocket
171
172 type XSocket64 C.struct_xsocket64
173
174 type XSockbuf C.struct_xsockbuf
175
176 type XVSockPgen C.struct_xvsockpgen
177
178 type _Socklen C.socklen_t
179
180 type Xucred C.struct_xucred
181
182 type Linger C.struct_linger
183
184 type Iovec C.struct_iovec
185
186 type IPMreq C.struct_ip_mreq
187
188 type IPMreqn C.struct_ip_mreqn
189
190 type IPv6Mreq C.struct_ipv6_mreq
191
192 type Msghdr C.struct_msghdr
193
194 type Cmsghdr C.struct_cmsghdr
195
196 type Inet4Pktinfo C.struct_in_pktinfo
197
198 type Inet6Pktinfo C.struct_in6_pktinfo
199
200 type IPv6MTUInfo C.struct_ip6_mtuinfo
201
202 type ICMPv6Filter C.struct_icmp6_filter
203
204 type TCPConnectionInfo C.struct_tcp_connection_info
205
206 const (
207 SizeofSockaddrInet4 = C.sizeof_struct_sockaddr_in
208 SizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6
209 SizeofSockaddrAny = C.sizeof_struct_sockaddr_any
210 SizeofSockaddrUnix = C.sizeof_struct_sockaddr_un
211 SizeofSockaddrDatalink = C.sizeof_struct_sockaddr_dl
212 SizeofSockaddrCtl = C.sizeof_struct_sockaddr_ctl
213 SizeofSockaddrVM = C.sizeof_struct_sockaddr_vm
214 SizeofXvsockpcb = C.sizeof_struct_xvsockpcb
215 SizeofXSocket = C.sizeof_struct_xsocket
216 SizeofXSockbuf = C.sizeof_struct_xsockbuf
217 SizeofXVSockPgen = C.sizeof_struct_xvsockpgen
218 SizeofXucred = C.sizeof_struct_xucred
219 SizeofLinger = C.sizeof_struct_linger
220 SizeofIovec = C.sizeof_struct_iovec
221 SizeofIPMreq = C.sizeof_struct_ip_mreq
222 SizeofIPMreqn = C.sizeof_struct_ip_mreqn
223 SizeofIPv6Mreq = C.sizeof_struct_ipv6_mreq
224 SizeofMsghdr = C.sizeof_struct_msghdr
225 SizeofCmsghdr = C.sizeof_struct_cmsghdr
226 SizeofInet4Pktinfo = C.sizeof_struct_in_pktinfo
227 SizeofInet6Pktinfo = C.sizeof_struct_in6_pktinfo
228 SizeofIPv6MTUInfo = C.sizeof_struct_ip6_mtuinfo
229 SizeofICMPv6Filter = C.sizeof_struct_icmp6_filter
230 SizeofTCPConnectionInfo = C.sizeof_struct_tcp_connection_info
231 )
232
233
234
235 const (
236 PTRACE_TRACEME = C.PT_TRACE_ME
237 PTRACE_CONT = C.PT_CONTINUE
238 PTRACE_KILL = C.PT_KILL
239 )
240
241
242
243 type Kevent_t C.struct_kevent
244
245
246
247 type FdSet C.fd_set
248
249
250
251 const (
252 SizeofIfMsghdr = C.sizeof_struct_if_msghdr
253 SizeofIfData = C.sizeof_struct_if_data
254 SizeofIfaMsghdr = C.sizeof_struct_ifa_msghdr
255 SizeofIfmaMsghdr = C.sizeof_struct_ifma_msghdr
256 SizeofIfmaMsghdr2 = C.sizeof_struct_ifma_msghdr2
257 SizeofRtMsghdr = C.sizeof_struct_rt_msghdr
258 SizeofRtMetrics = C.sizeof_struct_rt_metrics
259 )
260
261 type IfMsghdr C.struct_if_msghdr
262
263 type IfData C.struct_if_data
264
265 type IfaMsghdr C.struct_ifa_msghdr
266
267 type IfmaMsghdr C.struct_ifma_msghdr
268
269 type IfmaMsghdr2 C.struct_ifma_msghdr2
270
271 type RtMsghdr C.struct_rt_msghdr
272
273 type RtMetrics C.struct_rt_metrics
274
275
276
277 const (
278 SizeofBpfVersion = C.sizeof_struct_bpf_version
279 SizeofBpfStat = C.sizeof_struct_bpf_stat
280 SizeofBpfProgram = C.sizeof_struct_bpf_program
281 SizeofBpfInsn = C.sizeof_struct_bpf_insn
282 SizeofBpfHdr = C.sizeof_struct_bpf_hdr
283 )
284
285 type BpfVersion C.struct_bpf_version
286
287 type BpfStat C.struct_bpf_stat
288
289 type BpfProgram C.struct_bpf_program
290
291 type BpfInsn C.struct_bpf_insn
292
293 type BpfHdr C.struct_bpf_hdr
294
295
296
297 type Termios C.struct_termios
298
299 type Winsize C.struct_winsize
300
301
302
303 const (
304 AT_FDCWD = C.AT_FDCWD
305 AT_REMOVEDIR = C.AT_REMOVEDIR
306 AT_SYMLINK_FOLLOW = C.AT_SYMLINK_FOLLOW
307 AT_SYMLINK_NOFOLLOW = C.AT_SYMLINK_NOFOLLOW
308 AT_EACCESS = C.AT_EACCESS
309 )
310
311
312
313 type PollFd C.struct_pollfd
314
315 const (
316 POLLERR = C.POLLERR
317 POLLHUP = C.POLLHUP
318 POLLIN = C.POLLIN
319 POLLNVAL = C.POLLNVAL
320 POLLOUT = C.POLLOUT
321 POLLPRI = C.POLLPRI
322 POLLRDBAND = C.POLLRDBAND
323 POLLRDNORM = C.POLLRDNORM
324 POLLWRBAND = C.POLLWRBAND
325 POLLWRNORM = C.POLLWRNORM
326 )
327
328
329
330 type Utsname C.struct_utsname
331
332
333
334 const SizeofClockinfo = C.sizeof_struct_clockinfo
335
336 type Clockinfo C.struct_clockinfo
337
338
339
340 type CtlInfo C.struct_ctl_info
341
342
343
344 const SizeofKinfoProc = C.sizeof_struct_kinfo_proc
345
346 type Eproc C.struct_eproc
347
348 type ExternProc C.struct_extern_proc
349
350 type Itimerval C.struct_itimerval
351
352 type KinfoProc C.struct_kinfo_proc
353
354 type Vmspace C.struct_vmspace
355
356 type Pcred C.struct__pcred
357
358 type Ucred C.struct__ucred
359
360
361
362 type SysvIpcPerm C.struct_ipc_perm
363 type SysvShmDesc C.struct_shmid_ds
364
365 const (
366 IPC_CREAT = C.IPC_CREAT
367 IPC_EXCL = C.IPC_EXCL
368 IPC_NOWAIT = C.IPC_NOWAIT
369 IPC_PRIVATE = C.IPC_PRIVATE
370 )
371
372 const (
373 IPC_RMID = C.IPC_RMID
374 IPC_SET = C.IPC_SET
375 IPC_STAT = C.IPC_STAT
376 )
377
378 const (
379 SHM_RDONLY = C.SHM_RDONLY
380 SHM_RND = C.SHM_RND
381 )
382
View as plain text