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