...
1
2
3
4
5
6
7
10
11
12
13
14 package unix
15
16
70 import "C"
71
72
73
74 const (
75 SizeofPtr = C.sizeofPtr
76 SizeofShort = C.sizeof_short
77 SizeofInt = C.sizeof_int
78 SizeofLong = C.sizeof_long
79 SizeofLongLong = C.sizeof_longlong
80 )
81
82
83
84 type (
85 _C_short C.short
86 _C_int C.int
87 _C_long C.long
88 _C_long_long C.longlong
89 )
90
91
92
93 type Timespec C.struct_timespec
94
95 type Timeval C.struct_timeval
96
97
98
99 type Rusage C.struct_rusage
100
101 type Rlimit C.struct_rlimit
102
103 type _Gid_t C.gid_t
104
105
106
107 type Stat_t C.struct_stat
108
109 type Statfs_t C.struct_statfs
110
111 type Statvfs_t C.struct_statvfs
112
113 type Flock_t C.struct_flock
114
115 type Dirent C.struct_dirent
116
117 type Fsid C.fsid_t
118
119
120
121 const (
122 PathMax = C.PATH_MAX
123 )
124
125
126
127 const (
128 ST_WAIT = C.ST_WAIT
129 ST_NOWAIT = C.ST_NOWAIT
130 )
131
132
133
134 const (
135 FADV_NORMAL = C.POSIX_FADV_NORMAL
136 FADV_RANDOM = C.POSIX_FADV_RANDOM
137 FADV_SEQUENTIAL = C.POSIX_FADV_SEQUENTIAL
138 FADV_WILLNEED = C.POSIX_FADV_WILLNEED
139 FADV_DONTNEED = C.POSIX_FADV_DONTNEED
140 FADV_NOREUSE = C.POSIX_FADV_NOREUSE
141 )
142
143
144
145 type RawSockaddrInet4 C.struct_sockaddr_in
146
147 type RawSockaddrInet6 C.struct_sockaddr_in6
148
149 type RawSockaddrUnix C.struct_sockaddr_un
150
151 type RawSockaddrDatalink C.struct_sockaddr_dl
152
153 type RawSockaddr C.struct_sockaddr
154
155 type RawSockaddrAny C.struct_sockaddr_any
156
157 type _Socklen C.socklen_t
158
159 type Linger C.struct_linger
160
161 type Iovec C.struct_iovec
162
163 type IPMreq C.struct_ip_mreq
164
165 type IPv6Mreq C.struct_ipv6_mreq
166
167 type Msghdr C.struct_msghdr
168
169 type Cmsghdr C.struct_cmsghdr
170
171 type Inet6Pktinfo C.struct_in6_pktinfo
172
173 type IPv6MTUInfo C.struct_ip6_mtuinfo
174
175 type ICMPv6Filter C.struct_icmp6_filter
176
177 const (
178 SizeofSockaddrInet4 = C.sizeof_struct_sockaddr_in
179 SizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6
180 SizeofSockaddrAny = C.sizeof_struct_sockaddr_any
181 SizeofSockaddrUnix = C.sizeof_struct_sockaddr_un
182 SizeofSockaddrDatalink = C.sizeof_struct_sockaddr_dl
183 SizeofLinger = C.sizeof_struct_linger
184 SizeofIovec = C.sizeof_struct_iovec
185 SizeofIPMreq = C.sizeof_struct_ip_mreq
186 SizeofIPv6Mreq = C.sizeof_struct_ipv6_mreq
187 SizeofMsghdr = C.sizeof_struct_msghdr
188 SizeofCmsghdr = C.sizeof_struct_cmsghdr
189 SizeofInet6Pktinfo = C.sizeof_struct_in6_pktinfo
190 SizeofIPv6MTUInfo = C.sizeof_struct_ip6_mtuinfo
191 SizeofICMPv6Filter = C.sizeof_struct_icmp6_filter
192 )
193
194
195
196 const (
197 PTRACE_TRACEME = C.PT_TRACE_ME
198 PTRACE_CONT = C.PT_CONTINUE
199 PTRACE_KILL = C.PT_KILL
200 )
201
202
203
204 type Kevent_t C.struct_kevent
205
206
207
208 type FdSet C.fd_set
209
210
211
212 const (
213 SizeofIfMsghdr = C.sizeof_struct_if_msghdr
214 SizeofIfData = C.sizeof_struct_if_data
215 SizeofIfaMsghdr = C.sizeof_struct_ifa_msghdr
216 SizeofIfAnnounceMsghdr = C.sizeof_struct_if_announcemsghdr
217 SizeofRtMsghdr = C.sizeof_struct_rt_msghdr
218 SizeofRtMetrics = C.sizeof_struct_rt_metrics
219 )
220
221 type IfMsghdr C.struct_if_msghdr
222
223 type IfData C.struct_if_data
224
225 type IfaMsghdr C.struct_ifa_msghdr
226
227 type IfAnnounceMsghdr C.struct_if_announcemsghdr
228
229 type RtMsghdr C.struct_rt_msghdr
230
231 type RtMetrics C.struct_rt_metrics
232
233 type Mclpool C.struct_mclpool
234
235
236
237 const (
238 SizeofBpfVersion = C.sizeof_struct_bpf_version
239 SizeofBpfStat = C.sizeof_struct_bpf_stat
240 SizeofBpfProgram = C.sizeof_struct_bpf_program
241 SizeofBpfInsn = C.sizeof_struct_bpf_insn
242 SizeofBpfHdr = C.sizeof_struct_bpf_hdr
243 )
244
245 type BpfVersion C.struct_bpf_version
246
247 type BpfStat C.struct_bpf_stat
248
249 type BpfProgram C.struct_bpf_program
250
251 type BpfInsn C.struct_bpf_insn
252
253 type BpfHdr C.struct_bpf_hdr
254
255 type BpfTimeval C.struct_bpf_timeval
256
257
258
259 type Termios C.struct_termios
260
261 type Winsize C.struct_winsize
262
263 type Ptmget C.struct_ptmget
264
265
266
267 const (
268 AT_FDCWD = C.AT_FDCWD
269 AT_EACCESS = C.AT_EACCESS
270 AT_SYMLINK_NOFOLLOW = C.AT_SYMLINK_NOFOLLOW
271 AT_SYMLINK_FOLLOW = C.AT_SYMLINK_FOLLOW
272 AT_REMOVEDIR = C.AT_REMOVEDIR
273 )
274
275
276
277 type PollFd C.struct_pollfd
278
279 const (
280 POLLERR = C.POLLERR
281 POLLHUP = C.POLLHUP
282 POLLIN = C.POLLIN
283 POLLNVAL = C.POLLNVAL
284 POLLOUT = C.POLLOUT
285 POLLPRI = C.POLLPRI
286 POLLRDBAND = C.POLLRDBAND
287 POLLRDNORM = C.POLLRDNORM
288 POLLWRBAND = C.POLLWRBAND
289 POLLWRNORM = C.POLLWRNORM
290 )
291
292
293
294 type Sysctlnode C.struct_sysctlnode
295
296
297
298 type Utsname C.struct_utsname
299
300
301
302 const SizeofUvmexp = C.sizeof_struct_uvmexp_sysctl
303
304 type Uvmexp C.struct_uvmexp_sysctl
305
306
307
308 const SizeofClockinfo = C.sizeof_struct_clockinfo
309
310 type Clockinfo C.struct_clockinfo
311
View as plain text