...
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 PathMax = C.PATH_MAX
96 MaxHostNameLen = C.MAXHOSTNAMELEN
97 )
98
99
100
101 type (
102 _C_short C.short
103 _C_int C.int
104 _C_long C.long
105 _C_long_long C.longlong
106 )
107
108
109
110 type Timespec C.struct_timespec
111
112 type Timeval C.struct_timeval
113
114 type Timeval32 C.struct_timeval32
115
116 type Tms C.struct_tms
117
118 type Utimbuf C.struct_utimbuf
119
120
121
122 type Rusage C.struct_rusage
123
124 type Rlimit C.struct_rlimit
125
126 type _Gid_t C.gid_t
127
128
129
130 type Stat_t C.struct_stat
131
132 type Flock_t C.struct_flock
133
134 type Dirent C.struct_dirent
135
136
137
138 type _Fsblkcnt_t C.fsblkcnt_t
139
140 type Statvfs_t C.struct_statvfs
141
142
143
144 type RawSockaddrInet4 C.struct_sockaddr_in
145
146 type RawSockaddrInet6 C.struct_sockaddr_in6
147
148 type RawSockaddrUnix C.struct_sockaddr_un
149
150 type RawSockaddrDatalink C.struct_sockaddr_dl
151
152 type RawSockaddr C.struct_sockaddr
153
154 type RawSockaddrAny C.struct_sockaddr_any
155
156 type _Socklen C.socklen_t
157
158 type Linger C.struct_linger
159
160 type Iovec C.struct_iovec
161
162 type IPMreq C.struct_ip_mreq
163
164 type IPv6Mreq C.struct_ipv6_mreq
165
166 type Msghdr C.struct_msghdr
167
168 type Cmsghdr C.struct_cmsghdr
169
170 type Inet4Pktinfo C.struct_in_pktinfo
171
172 type Inet6Pktinfo C.struct_in6_pktinfo
173
174 type IPv6MTUInfo C.struct_ip6_mtuinfo
175
176 type ICMPv6Filter C.struct_icmp6_filter
177
178 const (
179 SizeofSockaddrInet4 = C.sizeof_struct_sockaddr_in
180 SizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6
181 SizeofSockaddrAny = C.sizeof_struct_sockaddr_any
182 SizeofSockaddrUnix = C.sizeof_struct_sockaddr_un
183 SizeofSockaddrDatalink = C.sizeof_struct_sockaddr_dl
184 SizeofLinger = C.sizeof_struct_linger
185 SizeofIovec = C.sizeof_struct_iovec
186 SizeofIPMreq = C.sizeof_struct_ip_mreq
187 SizeofIPv6Mreq = C.sizeof_struct_ipv6_mreq
188 SizeofMsghdr = C.sizeof_struct_msghdr
189 SizeofCmsghdr = C.sizeof_struct_cmsghdr
190 SizeofInet4Pktinfo = C.sizeof_struct_in_pktinfo
191 SizeofInet6Pktinfo = C.sizeof_struct_in6_pktinfo
192 SizeofIPv6MTUInfo = C.sizeof_struct_ip6_mtuinfo
193 SizeofICMPv6Filter = C.sizeof_struct_icmp6_filter
194 )
195
196
197
198 type FdSet C.fd_set
199
200
201
202 type Utsname C.struct_utsname
203
204 type Ustat_t C.struct_ustat
205
206 const (
207 AT_FDCWD = C.AT_FDCWD
208 AT_SYMLINK_NOFOLLOW = C.AT_SYMLINK_NOFOLLOW
209 AT_SYMLINK_FOLLOW = C.AT_SYMLINK_FOLLOW
210 AT_REMOVEDIR = C.AT_REMOVEDIR
211 AT_EACCESS = C.AT_EACCESS
212 )
213
214
215
216 const (
217 SizeofIfMsghdr = C.sizeof_struct_if_msghdr
218 SizeofIfData = C.sizeof_struct_if_data
219 SizeofIfaMsghdr = C.sizeof_struct_ifa_msghdr
220 SizeofRtMsghdr = C.sizeof_struct_rt_msghdr
221 SizeofRtMetrics = C.sizeof_struct_rt_metrics
222 )
223
224 type IfMsghdr C.struct_if_msghdr
225
226 type IfData C.struct_if_data
227
228 type IfaMsghdr C.struct_ifa_msghdr
229
230 type RtMsghdr C.struct_rt_msghdr
231
232 type RtMetrics C.struct_rt_metrics
233
234
235
236 const (
237 SizeofBpfVersion = C.sizeof_struct_bpf_version
238 SizeofBpfStat = C.sizeof_struct_bpf_stat
239 SizeofBpfProgram = C.sizeof_struct_bpf_program
240 SizeofBpfInsn = C.sizeof_struct_bpf_insn
241 SizeofBpfHdr = C.sizeof_struct_bpf_hdr
242 )
243
244 type BpfVersion C.struct_bpf_version
245
246 type BpfStat C.struct_bpf_stat
247
248 type BpfProgram C.struct_bpf_program
249
250 type BpfInsn C.struct_bpf_insn
251
252 type BpfTimeval C.struct_bpf_timeval
253
254 type BpfHdr C.struct_bpf_hdr
255
256
257
258 type Termios C.struct_termios
259
260 type Termio C.struct_termio
261
262 type Winsize C.struct_winsize
263
264
265
266 type PollFd C.struct_pollfd
267
268 const (
269 POLLERR = C.POLLERR
270 POLLHUP = C.POLLHUP
271 POLLIN = C.POLLIN
272 POLLNVAL = C.POLLNVAL
273 POLLOUT = C.POLLOUT
274 POLLPRI = C.POLLPRI
275 POLLRDBAND = C.POLLRDBAND
276 POLLRDNORM = C.POLLRDNORM
277 POLLWRBAND = C.POLLWRBAND
278 POLLWRNORM = C.POLLWRNORM
279 )
280
281
282
283 type fileObj C.struct_file_obj
284
285 type portEvent C.struct_port_event
286
287 const (
288 PORT_SOURCE_AIO = C.PORT_SOURCE_AIO
289 PORT_SOURCE_TIMER = C.PORT_SOURCE_TIMER
290 PORT_SOURCE_USER = C.PORT_SOURCE_USER
291 PORT_SOURCE_FD = C.PORT_SOURCE_FD
292 PORT_SOURCE_ALERT = C.PORT_SOURCE_ALERT
293 PORT_SOURCE_MQ = C.PORT_SOURCE_MQ
294 PORT_SOURCE_FILE = C.PORT_SOURCE_FILE
295 PORT_ALERT_SET = C.PORT_ALERT_SET
296 PORT_ALERT_UPDATE = C.PORT_ALERT_UPDATE
297 PORT_ALERT_INVALID = C.PORT_ALERT_INVALID
298 FILE_ACCESS = C.FILE_ACCESS
299 FILE_MODIFIED = C.FILE_MODIFIED
300 FILE_ATTRIB = C.FILE_ATTRIB
301 FILE_TRUNC = C.FILE_TRUNC
302 FILE_NOFOLLOW = C.FILE_NOFOLLOW
303 FILE_DELETE = C.FILE_DELETE
304 FILE_RENAME_TO = C.FILE_RENAME_TO
305 FILE_RENAME_FROM = C.FILE_RENAME_FROM
306 UNMOUNTED = C.UNMOUNTED
307 MOUNTEDOVER = C.MOUNTEDOVER
308 FILE_EXCEPTION = C.FILE_EXCEPTION
309 )
310
311
312
313 const (
314 TUNNEWPPA = C.TUNNEWPPA
315 TUNSETPPA = C.TUNSETPPA
316
317
318 I_STR = C.I_STR
319 I_POP = C.I_POP
320 I_PUSH = C.I_PUSH
321 I_LINK = C.I_LINK
322 I_UNLINK = C.I_UNLINK
323 I_PLINK = C.I_PLINK
324 I_PUNLINK = C.I_PUNLINK
325
326
327 IF_UNITSEL = C.IF_UNITSEL
328 )
329
330 type strbuf C.struct_strbuf
331
332 type Strioctl C.struct_strioctl
333
334 type Lifreq C.struct_lifreq
335
View as plain text