.gitignore added
[dotfiles/.git] / .config / coc / extensions / coc-go-data / tools / pkg / mod / golang.org / x / sys@v0.0.0-20210124154548-22da62e12c0c / unix / types_darwin.go
1 // Copyright 2009 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
4
5 // +build ignore
6
7 /*
8 Input to cgo -godefs.  See README.md
9 */
10
11 // +godefs map struct_in_addr [4]byte /* in_addr */
12 // +godefs map struct_in6_addr [16]byte /* in6_addr */
13
14 package unix
15
16 /*
17 #define __DARWIN_UNIX03 0
18 #define KERNEL
19 #define _DARWIN_USE_64_BIT_INODE
20 #include <dirent.h>
21 #include <fcntl.h>
22 #include <poll.h>
23 #include <signal.h>
24 #include <termios.h>
25 #include <unistd.h>
26 #include <mach/mach.h>
27 #include <mach/message.h>
28 #include <sys/event.h>
29 #include <sys/kern_control.h>
30 #include <sys/mman.h>
31 #include <sys/mount.h>
32 #include <sys/param.h>
33 #include <sys/ptrace.h>
34 #include <sys/resource.h>
35 #include <sys/select.h>
36 #include <sys/signal.h>
37 #include <sys/socket.h>
38 #include <sys/stat.h>
39 #include <sys/time.h>
40 #include <sys/types.h>
41 #include <sys/uio.h>
42 #include <sys/un.h>
43 #include <sys/utsname.h>
44 #include <sys/wait.h>
45 #include <net/bpf.h>
46 #include <net/if.h>
47 #include <net/if_dl.h>
48 #include <net/if_var.h>
49 #include <net/route.h>
50 #include <netinet/in.h>
51 #include <netinet/icmp6.h>
52 #include <netinet/tcp.h>
53
54 enum {
55         sizeofPtr = sizeof(void*),
56 };
57
58 union sockaddr_all {
59         struct sockaddr s1;     // this one gets used for fields
60         struct sockaddr_in s2;  // these pad it out
61         struct sockaddr_in6 s3;
62         struct sockaddr_un s4;
63         struct sockaddr_dl s5;
64 };
65
66 struct sockaddr_any {
67         struct sockaddr addr;
68         char pad[sizeof(union sockaddr_all) - sizeof(struct sockaddr)];
69 };
70
71 */
72 import "C"
73
74 // Machine characteristics
75
76 const (
77         SizeofPtr      = C.sizeofPtr
78         SizeofShort    = C.sizeof_short
79         SizeofInt      = C.sizeof_int
80         SizeofLong     = C.sizeof_long
81         SizeofLongLong = C.sizeof_longlong
82 )
83
84 // Basic types
85
86 type (
87         _C_short     C.short
88         _C_int       C.int
89         _C_long      C.long
90         _C_long_long C.longlong
91 )
92
93 // Time
94
95 type Timespec C.struct_timespec
96
97 type Timeval C.struct_timeval
98
99 type Timeval32 C.struct_timeval32
100
101 // Processes
102
103 type Rusage C.struct_rusage
104
105 type Rlimit C.struct_rlimit
106
107 type _Gid_t C.gid_t
108
109 // Files
110
111 type Stat_t C.struct_stat64
112
113 type Statfs_t C.struct_statfs64
114
115 type Flock_t C.struct_flock
116
117 type Fstore_t C.struct_fstore
118
119 type Radvisory_t C.struct_radvisory
120
121 type Fbootstraptransfer_t C.struct_fbootstraptransfer
122
123 type Log2phys_t C.struct_log2phys
124
125 type Fsid C.struct_fsid
126
127 type Dirent C.struct_dirent
128
129 // File system limits
130
131 const (
132         PathMax = C.PATH_MAX
133 )
134
135 // Sockets
136
137 type RawSockaddrInet4 C.struct_sockaddr_in
138
139 type RawSockaddrInet6 C.struct_sockaddr_in6
140
141 type RawSockaddrUnix C.struct_sockaddr_un
142
143 type RawSockaddrDatalink C.struct_sockaddr_dl
144
145 type RawSockaddr C.struct_sockaddr
146
147 type RawSockaddrAny C.struct_sockaddr_any
148
149 type RawSockaddrCtl C.struct_sockaddr_ctl
150
151 type _Socklen C.socklen_t
152
153 type Linger C.struct_linger
154
155 type Iovec C.struct_iovec
156
157 type IPMreq C.struct_ip_mreq
158
159 type IPv6Mreq C.struct_ipv6_mreq
160
161 type Msghdr C.struct_msghdr
162
163 type Cmsghdr C.struct_cmsghdr
164
165 type Inet4Pktinfo C.struct_in_pktinfo
166
167 type Inet6Pktinfo C.struct_in6_pktinfo
168
169 type IPv6MTUInfo C.struct_ip6_mtuinfo
170
171 type ICMPv6Filter C.struct_icmp6_filter
172
173 const (
174         SizeofSockaddrInet4    = C.sizeof_struct_sockaddr_in
175         SizeofSockaddrInet6    = C.sizeof_struct_sockaddr_in6
176         SizeofSockaddrAny      = C.sizeof_struct_sockaddr_any
177         SizeofSockaddrUnix     = C.sizeof_struct_sockaddr_un
178         SizeofSockaddrDatalink = C.sizeof_struct_sockaddr_dl
179         SizeofSockaddrCtl      = C.sizeof_struct_sockaddr_ctl
180         SizeofLinger           = C.sizeof_struct_linger
181         SizeofIovec            = C.sizeof_struct_iovec
182         SizeofIPMreq           = C.sizeof_struct_ip_mreq
183         SizeofIPv6Mreq         = C.sizeof_struct_ipv6_mreq
184         SizeofMsghdr           = C.sizeof_struct_msghdr
185         SizeofCmsghdr          = C.sizeof_struct_cmsghdr
186         SizeofInet4Pktinfo     = C.sizeof_struct_in_pktinfo
187         SizeofInet6Pktinfo     = C.sizeof_struct_in6_pktinfo
188         SizeofIPv6MTUInfo      = C.sizeof_struct_ip6_mtuinfo
189         SizeofICMPv6Filter     = C.sizeof_struct_icmp6_filter
190 )
191
192 // Ptrace requests
193
194 const (
195         PTRACE_TRACEME = C.PT_TRACE_ME
196         PTRACE_CONT    = C.PT_CONTINUE
197         PTRACE_KILL    = C.PT_KILL
198 )
199
200 // Events (kqueue, kevent)
201
202 type Kevent_t C.struct_kevent
203
204 // Select
205
206 type FdSet C.fd_set
207
208 // Routing and interface messages
209
210 const (
211         SizeofIfMsghdr    = C.sizeof_struct_if_msghdr
212         SizeofIfData      = C.sizeof_struct_if_data
213         SizeofIfaMsghdr   = C.sizeof_struct_ifa_msghdr
214         SizeofIfmaMsghdr  = C.sizeof_struct_ifma_msghdr
215         SizeofIfmaMsghdr2 = C.sizeof_struct_ifma_msghdr2
216         SizeofRtMsghdr    = C.sizeof_struct_rt_msghdr
217         SizeofRtMetrics   = C.sizeof_struct_rt_metrics
218 )
219
220 type IfMsghdr C.struct_if_msghdr
221
222 type IfData C.struct_if_data
223
224 type IfaMsghdr C.struct_ifa_msghdr
225
226 type IfmaMsghdr C.struct_ifma_msghdr
227
228 type IfmaMsghdr2 C.struct_ifma_msghdr2
229
230 type RtMsghdr C.struct_rt_msghdr
231
232 type RtMetrics C.struct_rt_metrics
233
234 // Berkeley packet filter
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 BpfHdr C.struct_bpf_hdr
253
254 // Terminal handling
255
256 type Termios C.struct_termios
257
258 type Winsize C.struct_winsize
259
260 // fchmodat-like syscalls.
261
262 const (
263         AT_FDCWD            = C.AT_FDCWD
264         AT_REMOVEDIR        = C.AT_REMOVEDIR
265         AT_SYMLINK_FOLLOW   = C.AT_SYMLINK_FOLLOW
266         AT_SYMLINK_NOFOLLOW = C.AT_SYMLINK_NOFOLLOW
267 )
268
269 // poll
270
271 type PollFd C.struct_pollfd
272
273 const (
274         POLLERR    = C.POLLERR
275         POLLHUP    = C.POLLHUP
276         POLLIN     = C.POLLIN
277         POLLNVAL   = C.POLLNVAL
278         POLLOUT    = C.POLLOUT
279         POLLPRI    = C.POLLPRI
280         POLLRDBAND = C.POLLRDBAND
281         POLLRDNORM = C.POLLRDNORM
282         POLLWRBAND = C.POLLWRBAND
283         POLLWRNORM = C.POLLWRNORM
284 )
285
286 // uname
287
288 type Utsname C.struct_utsname
289
290 // Clockinfo
291
292 const SizeofClockinfo = C.sizeof_struct_clockinfo
293
294 type Clockinfo C.struct_clockinfo
295
296 // ctl_info
297
298 type CtlInfo C.struct_ctl_info