...
1
2
3
4
5
6
7
10
11
12
13
14 package unix
15
16
111 import "C"
112
113
114
115 const (
116 SizeofPtr = C.sizeofPtr
117 SizeofShort = C.sizeof_short
118 SizeofInt = C.sizeof_int
119 SizeofLong = C.sizeof_long
120 SizeofLongLong = C.sizeof_longlong
121 )
122
123
124
125 type (
126 _C_short C.short
127 _C_int C.int
128 _C_long C.long
129 _C_long_long C.longlong
130 )
131
132
133
134 type Timespec C.struct_timespec
135
136 type Timeval C.struct_timeval
137
138 type Time_t C.time_t
139
140
141
142 type Rusage C.struct_rusage
143
144 type Rlimit C.struct_rlimit
145
146 type _Gid_t C.gid_t
147
148
149
150 const (
151 _statfsVersion = C.STATFS_VERSION
152 _dirblksiz = C.DIRBLKSIZ
153 )
154
155 type Stat_t C.struct_stat
156
157 type Statfs_t C.struct_statfs
158
159 type Flock_t C.struct_flock
160
161 type Dirent C.struct_dirent
162
163 type Fsid C.struct_fsid
164
165
166
167 const (
168 PathMax = C.PATH_MAX
169 )
170
171
172
173 const (
174 FADV_NORMAL = C.POSIX_FADV_NORMAL
175 FADV_RANDOM = C.POSIX_FADV_RANDOM
176 FADV_SEQUENTIAL = C.POSIX_FADV_SEQUENTIAL
177 FADV_WILLNEED = C.POSIX_FADV_WILLNEED
178 FADV_DONTNEED = C.POSIX_FADV_DONTNEED
179 FADV_NOREUSE = C.POSIX_FADV_NOREUSE
180 )
181
182
183
184 type RawSockaddrInet4 C.struct_sockaddr_in
185
186 type RawSockaddrInet6 C.struct_sockaddr_in6
187
188 type RawSockaddrUnix C.struct_sockaddr_un
189
190 type RawSockaddrDatalink C.struct_sockaddr_dl
191
192 type RawSockaddr C.struct_sockaddr
193
194 type RawSockaddrAny C.struct_sockaddr_any
195
196 type _Socklen C.socklen_t
197
198 type Xucred C.struct_xucred
199
200 type Linger C.struct_linger
201
202 type Iovec C.struct_iovec
203
204 type IPMreq C.struct_ip_mreq
205
206 type IPMreqn C.struct_ip_mreqn
207
208 type IPv6Mreq C.struct_ipv6_mreq
209
210 type Msghdr C.struct_msghdr
211
212 type Cmsghdr C.struct_cmsghdr
213
214 type Inet6Pktinfo C.struct_in6_pktinfo
215
216 type IPv6MTUInfo C.struct_ip6_mtuinfo
217
218 type ICMPv6Filter C.struct_icmp6_filter
219
220 const (
221 SizeofSockaddrInet4 = C.sizeof_struct_sockaddr_in
222 SizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6
223 SizeofSockaddrAny = C.sizeof_struct_sockaddr_any
224 SizeofSockaddrUnix = C.sizeof_struct_sockaddr_un
225 SizeofSockaddrDatalink = C.sizeof_struct_sockaddr_dl
226 SizeofXucred = C.sizeof_struct_xucred
227 SizeofLinger = C.sizeof_struct_linger
228 SizeofIovec = C.sizeof_struct_iovec
229 SizeofIPMreq = C.sizeof_struct_ip_mreq
230 SizeofIPMreqn = C.sizeof_struct_ip_mreqn
231 SizeofIPv6Mreq = C.sizeof_struct_ipv6_mreq
232 SizeofMsghdr = C.sizeof_struct_msghdr
233 SizeofCmsghdr = C.sizeof_struct_cmsghdr
234 SizeofInet6Pktinfo = C.sizeof_struct_in6_pktinfo
235 SizeofIPv6MTUInfo = C.sizeof_struct_ip6_mtuinfo
236 SizeofICMPv6Filter = C.sizeof_struct_icmp6_filter
237 )
238
239
240 const (
241 PTRACE_TRACEME = C.PT_TRACE_ME
242 PTRACE_CONT = C.PT_CONTINUE
243 PTRACE_KILL = C.PT_KILL
244 )
245
246 type PtraceLwpInfoStruct C.struct_ptrace_lwpinfo
247
248 type __Siginfo C.struct___siginfo
249
250 type Sigset_t C.sigset_t
251
252 type Reg C.struct_reg
253
254 type FpReg C.struct_fpreg
255
256
257 type FpExtendedPrecision C.struct_fp_extended_precision
258
259 type PtraceIoDesc C.struct_ptrace_io_desc
260
261
262
263 type Kevent_t C.struct_kevent
264
265
266
267 type FdSet C.fd_set
268
269
270
271 const (
272 sizeofIfMsghdr = C.sizeof_struct_if_msghdr
273 SizeofIfMsghdr = C.sizeof_struct_if_msghdr8
274 sizeofIfData = C.sizeof_struct_if_data
275 SizeofIfData = C.sizeof_struct_if_data8
276 SizeofIfaMsghdr = C.sizeof_struct_ifa_msghdr
277 SizeofIfmaMsghdr = C.sizeof_struct_ifma_msghdr
278 SizeofIfAnnounceMsghdr = C.sizeof_struct_if_announcemsghdr
279 SizeofRtMsghdr = C.sizeof_struct_rt_msghdr
280 SizeofRtMetrics = C.sizeof_struct_rt_metrics
281 )
282
283 type ifMsghdr C.struct_if_msghdr
284
285 type IfMsghdr C.struct_if_msghdr8
286
287 type ifData C.struct_if_data
288
289 type IfData C.struct_if_data8
290
291 type IfaMsghdr C.struct_ifa_msghdr
292
293 type IfmaMsghdr C.struct_ifma_msghdr
294
295 type IfAnnounceMsghdr C.struct_if_announcemsghdr
296
297 type RtMsghdr C.struct_rt_msghdr
298
299 type RtMetrics C.struct_rt_metrics
300
301
302
303 const (
304 SizeofBpfVersion = C.sizeof_struct_bpf_version
305 SizeofBpfStat = C.sizeof_struct_bpf_stat
306 SizeofBpfZbuf = C.sizeof_struct_bpf_zbuf
307 SizeofBpfProgram = C.sizeof_struct_bpf_program
308 SizeofBpfInsn = C.sizeof_struct_bpf_insn
309 SizeofBpfHdr = C.sizeof_struct_bpf_hdr
310 SizeofBpfZbufHeader = C.sizeof_struct_bpf_zbuf_header
311 )
312
313 type BpfVersion C.struct_bpf_version
314
315 type BpfStat C.struct_bpf_stat
316
317 type BpfZbuf C.struct_bpf_zbuf
318
319 type BpfProgram C.struct_bpf_program
320
321 type BpfInsn C.struct_bpf_insn
322
323 type BpfHdr C.struct_bpf_hdr
324
325 type BpfZbufHeader C.struct_bpf_zbuf_header
326
327
328
329 type Termios C.struct_termios
330
331 type Winsize C.struct_winsize
332
333
334
335 const (
336 AT_FDCWD = C.AT_FDCWD
337 AT_EACCESS = C.AT_EACCESS
338 AT_SYMLINK_NOFOLLOW = C.AT_SYMLINK_NOFOLLOW
339 AT_SYMLINK_FOLLOW = C.AT_SYMLINK_FOLLOW
340 AT_REMOVEDIR = C.AT_REMOVEDIR
341 )
342
343
344
345 type PollFd C.struct_pollfd
346
347 const (
348 POLLERR = C.POLLERR
349 POLLHUP = C.POLLHUP
350 POLLIN = C.POLLIN
351 POLLINIGNEOF = C.POLLINIGNEOF
352 POLLNVAL = C.POLLNVAL
353 POLLOUT = C.POLLOUT
354 POLLPRI = C.POLLPRI
355 POLLRDBAND = C.POLLRDBAND
356 POLLRDNORM = C.POLLRDNORM
357 POLLWRBAND = C.POLLWRBAND
358 POLLWRNORM = C.POLLWRNORM
359 )
360
361
362
363 type CapRights C.struct_cap_rights
364
365
366
367 type Utsname C.struct_utsname
368
369
370
371 const SizeofClockinfo = C.sizeof_struct_clockinfo
372
373 type Clockinfo C.struct_clockinfo
374
View as plain text