...
1
2
3
4
5
6
7
10
11
12
13
14 package unix
15
16
59 import "C"
60
61
62
63 const (
64 SizeofPtr = C.sizeofPtr
65 SizeofShort = C.sizeof_short
66 SizeofInt = C.sizeof_int
67 SizeofLong = C.sizeof_long
68 SizeofLongLong = C.sizeof_longlong
69 PathMax = C.PATH_MAX
70 )
71
72
73
74 type (
75 _C_short C.short
76 _C_int C.int
77 _C_long C.long
78 _C_long_long C.longlong
79 )
80
81 type off64 C.off64_t
82 type off C.off_t
83 type Mode_t C.mode_t
84
85
86
87 type Timespec C.struct_timespec
88
89 type Timeval C.struct_timeval
90
91 type Timeval32 C.struct_timeval32
92
93 type Timex C.struct_timex
94
95 type Time_t C.time_t
96
97 type Tms C.struct_tms
98
99 type Utimbuf C.struct_utimbuf
100
101 type Timezone C.struct_timezone
102
103
104
105 type Rusage C.struct_rusage
106
107 type Rlimit C.struct_rlimit64
108
109 type Pid_t C.pid_t
110
111 type _Gid_t C.gid_t
112
113 type dev_t C.dev_t
114
115
116
117 type Stat_t C.struct_stat
118
119 type StatxTimestamp C.struct_statx_timestamp
120
121 type Statx_t C.struct_statx
122
123 type Dirent C.struct_dirent
124
125
126
127 type RawSockaddrInet4 C.struct_sockaddr_in
128
129 type RawSockaddrInet6 C.struct_sockaddr_in6
130
131 type RawSockaddrUnix C.struct_sockaddr_un
132
133 type RawSockaddrDatalink C.struct_sockaddr_dl
134
135 type RawSockaddr C.struct_sockaddr
136
137 type RawSockaddrAny C.struct_sockaddr_any
138
139 type _Socklen C.socklen_t
140
141 type Cmsghdr C.struct_cmsghdr
142
143 type ICMPv6Filter C.struct_icmp6_filter
144
145 type Iovec C.struct_iovec
146
147 type IPMreq C.struct_ip_mreq
148
149 type IPv6Mreq C.struct_ipv6_mreq
150
151 type IPv6MTUInfo C.struct_ip6_mtuinfo
152
153 type Linger C.struct_linger
154
155 type Msghdr C.struct_msghdr
156
157 const (
158 SizeofSockaddrInet4 = C.sizeof_struct_sockaddr_in
159 SizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6
160 SizeofSockaddrAny = C.sizeof_struct_sockaddr_any
161 SizeofSockaddrUnix = C.sizeof_struct_sockaddr_un
162 SizeofSockaddrDatalink = C.sizeof_struct_sockaddr_dl
163 SizeofLinger = C.sizeof_struct_linger
164 SizeofIovec = C.sizeof_struct_iovec
165 SizeofIPMreq = C.sizeof_struct_ip_mreq
166 SizeofIPv6Mreq = C.sizeof_struct_ipv6_mreq
167 SizeofIPv6MTUInfo = C.sizeof_struct_ip6_mtuinfo
168 SizeofMsghdr = C.sizeof_struct_msghdr
169 SizeofCmsghdr = C.sizeof_struct_cmsghdr
170 SizeofICMPv6Filter = C.sizeof_struct_icmp6_filter
171 )
172
173
174
175 const (
176 SizeofIfMsghdr = C.sizeof_struct_if_msghdr
177 )
178
179 type IfMsgHdr C.struct_if_msghdr
180
181
182
183 type FdSet C.fd_set
184
185 type Utsname C.struct_utsname
186
187 type Ustat_t C.struct_ustat
188
189 type Sigset_t C.sigset_t
190
191 const (
192 AT_FDCWD = C.AT_FDCWD
193 AT_REMOVEDIR = C.AT_REMOVEDIR
194 AT_SYMLINK_NOFOLLOW = C.AT_SYMLINK_NOFOLLOW
195 )
196
197
198
199 type Termios C.struct_termios
200
201 type Termio C.struct_termio
202
203 type Winsize C.struct_winsize
204
205
206
207 type PollFd struct {
208 Fd int32
209 Events uint16
210 Revents uint16
211 }
212
213 const (
214 POLLERR = C.POLLERR
215 POLLHUP = C.POLLHUP
216 POLLIN = C.POLLIN
217 POLLNVAL = C.POLLNVAL
218 POLLOUT = C.POLLOUT
219 POLLPRI = C.POLLPRI
220 POLLRDBAND = C.POLLRDBAND
221 POLLRDNORM = C.POLLRDNORM
222 POLLWRBAND = C.POLLWRBAND
223 POLLWRNORM = C.POLLWRNORM
224 )
225
226
227
228 type Flock_t C.struct_flock64
229
230
231
232 type Fsid_t C.struct_fsid_t
233 type Fsid64_t C.struct_fsid64_t
234
235 type Statfs_t C.struct_statfs
236
237 const RNDGETENTCNT = 0x80045200
238
View as plain text