.gitignore added
[dotfiles/.git] / .config / coc / extensions / coc-go-data / tools / pkg / mod / golang.org / x / sys@v0.0.0-20210124154548-22da62e12c0c / unix / types_netbsd.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 KERNEL
18 #include <dirent.h>
19 #include <fcntl.h>
20 #include <poll.h>
21 #include <signal.h>
22 #include <termios.h>
23 #include <stdio.h>
24 #include <unistd.h>
25 #include <sys/param.h>
26 #include <sys/types.h>
27 #include <sys/event.h>
28 #include <sys/mman.h>
29 #include <sys/mount.h>
30 #include <sys/ptrace.h>
31 #include <sys/resource.h>
32 #include <sys/select.h>
33 #include <sys/signal.h>
34 #include <sys/socket.h>
35 #include <sys/stat.h>
36 #include <sys/statvfs.h>
37 #include <sys/sysctl.h>
38 #include <sys/time.h>
39 #include <sys/uio.h>
40 #include <sys/un.h>
41 #include <sys/utsname.h>
42 #include <sys/wait.h>
43 #include <net/bpf.h>
44 #include <net/if.h>
45 #include <net/if_dl.h>
46 #include <net/route.h>
47 #include <netinet/in.h>
48 #include <netinet/icmp6.h>
49 #include <netinet/tcp.h>
50
51 enum {
52         sizeofPtr = sizeof(void*),
53 };
54
55 union sockaddr_all {
56         struct sockaddr s1;     // this one gets used for fields
57         struct sockaddr_in s2;  // these pad it out
58         struct sockaddr_in6 s3;
59         struct sockaddr_un s4;
60         struct sockaddr_dl s5;
61 };
62
63 struct sockaddr_any {
64         struct sockaddr addr;
65         char pad[sizeof(union sockaddr_all) - sizeof(struct sockaddr)];
66 };
67
68 */
69 import "C"
70
71 // Machine characteristics
72
73 const (
74         SizeofPtr      = C.sizeofPtr
75         SizeofShort    = C.sizeof_short
76         SizeofInt      = C.sizeof_int
77         SizeofLong     = C.sizeof_long
78         SizeofLongLong = C.sizeof_longlong
79 )
80
81 // Basic types
82
83 type (
84         _C_short     C.short
85         _C_int       C.int
86         _C_long      C.long
87         _C_long_long C.longlong
88 )
89
90 // Time
91
92 type Timespec C.struct_timespec
93
94 type Timeval C.struct_timeval
95
96 // Processes
97
98 type Rusage C.struct_rusage
99
100 type Rlimit C.struct_rlimit
101
102 type _Gid_t C.gid_t
103
104 // Files
105
106 type Stat_t C.struct_stat
107
108 type Statfs_t C.struct_statfs
109
110 type Statvfs_t C.struct_statvfs
111
112 type Flock_t C.struct_flock
113
114 type Dirent C.struct_dirent
115
116 type Fsid C.fsid_t
117
118 // File system limits
119
120 const (
121         PathMax = C.PATH_MAX
122 )
123
124 // Fstatvfs/Statvfs flags
125
126 const (
127         ST_WAIT   = C.ST_WAIT
128         ST_NOWAIT = C.ST_NOWAIT
129 )
130
131 // Advice to Fadvise
132
133 const (
134         FADV_NORMAL     = C.POSIX_FADV_NORMAL
135         FADV_RANDOM     = C.POSIX_FADV_RANDOM
136         FADV_SEQUENTIAL = C.POSIX_FADV_SEQUENTIAL
137         FADV_WILLNEED   = C.POSIX_FADV_WILLNEED
138         FADV_DONTNEED   = C.POSIX_FADV_DONTNEED
139         FADV_NOREUSE    = C.POSIX_FADV_NOREUSE
140 )
141
142 // Sockets
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 Inet6Pktinfo C.struct_in6_pktinfo
171
172 type IPv6MTUInfo C.struct_ip6_mtuinfo
173
174 type ICMPv6Filter C.struct_icmp6_filter
175
176 const (
177         SizeofSockaddrInet4    = C.sizeof_struct_sockaddr_in
178         SizeofSockaddrInet6    = C.sizeof_struct_sockaddr_in6
179         SizeofSockaddrAny      = C.sizeof_struct_sockaddr_any
180         SizeofSockaddrUnix     = C.sizeof_struct_sockaddr_un
181         SizeofSockaddrDatalink = C.sizeof_struct_sockaddr_dl
182         SizeofLinger           = C.sizeof_struct_linger
183         SizeofIovec            = C.sizeof_struct_iovec
184         SizeofIPMreq           = C.sizeof_struct_ip_mreq
185         SizeofIPv6Mreq         = C.sizeof_struct_ipv6_mreq
186         SizeofMsghdr           = C.sizeof_struct_msghdr
187         SizeofCmsghdr          = C.sizeof_struct_cmsghdr
188         SizeofInet6Pktinfo     = C.sizeof_struct_in6_pktinfo
189         SizeofIPv6MTUInfo      = C.sizeof_struct_ip6_mtuinfo
190         SizeofICMPv6Filter     = C.sizeof_struct_icmp6_filter
191 )
192
193 // Ptrace requests
194
195 const (
196         PTRACE_TRACEME = C.PT_TRACE_ME
197         PTRACE_CONT    = C.PT_CONTINUE
198         PTRACE_KILL    = C.PT_KILL
199 )
200
201 // Events (kqueue, kevent)
202
203 type Kevent_t C.struct_kevent
204
205 // Select
206
207 type FdSet C.fd_set
208
209 // Routing and interface messages
210
211 const (
212         SizeofIfMsghdr         = C.sizeof_struct_if_msghdr
213         SizeofIfData           = C.sizeof_struct_if_data
214         SizeofIfaMsghdr        = C.sizeof_struct_ifa_msghdr
215         SizeofIfAnnounceMsghdr = C.sizeof_struct_if_announcemsghdr
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 IfAnnounceMsghdr C.struct_if_announcemsghdr
227
228 type RtMsghdr C.struct_rt_msghdr
229
230 type RtMetrics C.struct_rt_metrics
231
232 type Mclpool C.struct_mclpool
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 type BpfTimeval C.struct_bpf_timeval
255
256 // Terminal handling
257
258 type Termios C.struct_termios
259
260 type Winsize C.struct_winsize
261
262 type Ptmget C.struct_ptmget
263
264 // fchmodat-like syscalls.
265
266 const (
267         AT_FDCWD            = C.AT_FDCWD
268         AT_SYMLINK_FOLLOW   = C.AT_SYMLINK_FOLLOW
269         AT_SYMLINK_NOFOLLOW = C.AT_SYMLINK_NOFOLLOW
270 )
271
272 // poll
273
274 type PollFd C.struct_pollfd
275
276 const (
277         POLLERR    = C.POLLERR
278         POLLHUP    = C.POLLHUP
279         POLLIN     = C.POLLIN
280         POLLNVAL   = C.POLLNVAL
281         POLLOUT    = C.POLLOUT
282         POLLPRI    = C.POLLPRI
283         POLLRDBAND = C.POLLRDBAND
284         POLLRDNORM = C.POLLRDNORM
285         POLLWRBAND = C.POLLWRBAND
286         POLLWRNORM = C.POLLWRNORM
287 )
288
289 // Sysctl
290
291 type Sysctlnode C.struct_sysctlnode
292
293 // Uname
294
295 type Utsname C.struct_utsname
296
297 // Clockinfo
298
299 const SizeofClockinfo = C.sizeof_struct_clockinfo
300
301 type Clockinfo C.struct_clockinfo