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