1// cgo -godefs types_netbsd.go | go run mkpost.go
2// Code generated by the command above; see README.md. DO NOT EDIT.
3
4// +build 386,netbsd
5
6package unix
7
8const (
9	SizeofPtr      = 0x4
10	SizeofShort    = 0x2
11	SizeofInt      = 0x4
12	SizeofLong     = 0x4
13	SizeofLongLong = 0x8
14)
15
16type (
17	_C_short     int16
18	_C_int       int32
19	_C_long      int32
20	_C_long_long int64
21)
22
23type Timespec struct {
24	Sec  int64
25	Nsec int32
26}
27
28type Timeval struct {
29	Sec  int64
30	Usec int32
31}
32
33type Rusage struct {
34	Utime    Timeval
35	Stime    Timeval
36	Maxrss   int32
37	Ixrss    int32
38	Idrss    int32
39	Isrss    int32
40	Minflt   int32
41	Majflt   int32
42	Nswap    int32
43	Inblock  int32
44	Oublock  int32
45	Msgsnd   int32
46	Msgrcv   int32
47	Nsignals int32
48	Nvcsw    int32
49	Nivcsw   int32
50}
51
52type Rlimit struct {
53	Cur uint64
54	Max uint64
55}
56
57type _Gid_t uint32
58
59type Stat_t struct {
60	Dev     uint64
61	Mode    uint32
62	Ino     uint64
63	Nlink   uint32
64	Uid     uint32
65	Gid     uint32
66	Rdev    uint64
67	Atim    Timespec
68	Mtim    Timespec
69	Ctim    Timespec
70	Btim    Timespec
71	Size    int64
72	Blocks  int64
73	Blksize uint32
74	Flags   uint32
75	Gen     uint32
76	Spare   [2]uint32
77}
78
79type Statfs_t [0]byte
80
81type Flock_t struct {
82	Start  int64
83	Len    int64
84	Pid    int32
85	Type   int16
86	Whence int16
87}
88
89type Dirent struct {
90	Fileno    uint64
91	Reclen    uint16
92	Namlen    uint16
93	Type      uint8
94	Name      [512]int8
95	Pad_cgo_0 [3]byte
96}
97
98type Fsid struct {
99	X__fsid_val [2]int32
100}
101
102const (
103	PathMax = 0x400
104)
105
106const (
107	FADV_NORMAL     = 0x0
108	FADV_RANDOM     = 0x1
109	FADV_SEQUENTIAL = 0x2
110	FADV_WILLNEED   = 0x3
111	FADV_DONTNEED   = 0x4
112	FADV_NOREUSE    = 0x5
113)
114
115type RawSockaddrInet4 struct {
116	Len    uint8
117	Family uint8
118	Port   uint16
119	Addr   [4]byte /* in_addr */
120	Zero   [8]int8
121}
122
123type RawSockaddrInet6 struct {
124	Len      uint8
125	Family   uint8
126	Port     uint16
127	Flowinfo uint32
128	Addr     [16]byte /* in6_addr */
129	Scope_id uint32
130}
131
132type RawSockaddrUnix struct {
133	Len    uint8
134	Family uint8
135	Path   [104]int8
136}
137
138type RawSockaddrDatalink struct {
139	Len    uint8
140	Family uint8
141	Index  uint16
142	Type   uint8
143	Nlen   uint8
144	Alen   uint8
145	Slen   uint8
146	Data   [12]int8
147}
148
149type RawSockaddr struct {
150	Len    uint8
151	Family uint8
152	Data   [14]int8
153}
154
155type RawSockaddrAny struct {
156	Addr RawSockaddr
157	Pad  [92]int8
158}
159
160type _Socklen uint32
161
162type Linger struct {
163	Onoff  int32
164	Linger int32
165}
166
167type Iovec struct {
168	Base *byte
169	Len  uint32
170}
171
172type IPMreq struct {
173	Multiaddr [4]byte /* in_addr */
174	Interface [4]byte /* in_addr */
175}
176
177type IPv6Mreq struct {
178	Multiaddr [16]byte /* in6_addr */
179	Interface uint32
180}
181
182type Msghdr struct {
183	Name       *byte
184	Namelen    uint32
185	Iov        *Iovec
186	Iovlen     int32
187	Control    *byte
188	Controllen uint32
189	Flags      int32
190}
191
192type Cmsghdr struct {
193	Len   uint32
194	Level int32
195	Type  int32
196}
197
198type Inet6Pktinfo struct {
199	Addr    [16]byte /* in6_addr */
200	Ifindex uint32
201}
202
203type IPv6MTUInfo struct {
204	Addr RawSockaddrInet6
205	Mtu  uint32
206}
207
208type ICMPv6Filter struct {
209	Filt [8]uint32
210}
211
212const (
213	SizeofSockaddrInet4    = 0x10
214	SizeofSockaddrInet6    = 0x1c
215	SizeofSockaddrAny      = 0x6c
216	SizeofSockaddrUnix     = 0x6a
217	SizeofSockaddrDatalink = 0x14
218	SizeofLinger           = 0x8
219	SizeofIPMreq           = 0x8
220	SizeofIPv6Mreq         = 0x14
221	SizeofMsghdr           = 0x1c
222	SizeofCmsghdr          = 0xc
223	SizeofInet6Pktinfo     = 0x14
224	SizeofIPv6MTUInfo      = 0x20
225	SizeofICMPv6Filter     = 0x20
226)
227
228const (
229	PTRACE_TRACEME = 0x0
230	PTRACE_CONT    = 0x7
231	PTRACE_KILL    = 0x8
232)
233
234type Kevent_t struct {
235	Ident  uint32
236	Filter uint32
237	Flags  uint32
238	Fflags uint32
239	Data   int64
240	Udata  int32
241}
242
243type FdSet struct {
244	Bits [8]uint32
245}
246
247const (
248	SizeofIfMsghdr         = 0x98
249	SizeofIfData           = 0x84
250	SizeofIfaMsghdr        = 0x18
251	SizeofIfAnnounceMsghdr = 0x18
252	SizeofRtMsghdr         = 0x78
253	SizeofRtMetrics        = 0x50
254)
255
256type IfMsghdr struct {
257	Msglen    uint16
258	Version   uint8
259	Type      uint8
260	Addrs     int32
261	Flags     int32
262	Index     uint16
263	Pad_cgo_0 [2]byte
264	Data      IfData
265	Pad_cgo_1 [4]byte
266}
267
268type IfData struct {
269	Type       uint8
270	Addrlen    uint8
271	Hdrlen     uint8
272	Pad_cgo_0  [1]byte
273	Link_state int32
274	Mtu        uint64
275	Metric     uint64
276	Baudrate   uint64
277	Ipackets   uint64
278	Ierrors    uint64
279	Opackets   uint64
280	Oerrors    uint64
281	Collisions uint64
282	Ibytes     uint64
283	Obytes     uint64
284	Imcasts    uint64
285	Omcasts    uint64
286	Iqdrops    uint64
287	Noproto    uint64
288	Lastchange Timespec
289}
290
291type IfaMsghdr struct {
292	Msglen    uint16
293	Version   uint8
294	Type      uint8
295	Addrs     int32
296	Flags     int32
297	Metric    int32
298	Index     uint16
299	Pad_cgo_0 [6]byte
300}
301
302type IfAnnounceMsghdr struct {
303	Msglen  uint16
304	Version uint8
305	Type    uint8
306	Index   uint16
307	Name    [16]int8
308	What    uint16
309}
310
311type RtMsghdr struct {
312	Msglen    uint16
313	Version   uint8
314	Type      uint8
315	Index     uint16
316	Pad_cgo_0 [2]byte
317	Flags     int32
318	Addrs     int32
319	Pid       int32
320	Seq       int32
321	Errno     int32
322	Use       int32
323	Inits     int32
324	Pad_cgo_1 [4]byte
325	Rmx       RtMetrics
326}
327
328type RtMetrics struct {
329	Locks    uint64
330	Mtu      uint64
331	Hopcount uint64
332	Recvpipe uint64
333	Sendpipe uint64
334	Ssthresh uint64
335	Rtt      uint64
336	Rttvar   uint64
337	Expire   int64
338	Pksent   int64
339}
340
341type Mclpool [0]byte
342
343const (
344	SizeofBpfVersion = 0x4
345	SizeofBpfStat    = 0x80
346	SizeofBpfProgram = 0x8
347	SizeofBpfInsn    = 0x8
348	SizeofBpfHdr     = 0x14
349)
350
351type BpfVersion struct {
352	Major uint16
353	Minor uint16
354}
355
356type BpfStat struct {
357	Recv    uint64
358	Drop    uint64
359	Capt    uint64
360	Padding [13]uint64
361}
362
363type BpfProgram struct {
364	Len   uint32
365	Insns *BpfInsn
366}
367
368type BpfInsn struct {
369	Code uint16
370	Jt   uint8
371	Jf   uint8
372	K    uint32
373}
374
375type BpfHdr struct {
376	Tstamp    BpfTimeval
377	Caplen    uint32
378	Datalen   uint32
379	Hdrlen    uint16
380	Pad_cgo_0 [2]byte
381}
382
383type BpfTimeval struct {
384	Sec  int32
385	Usec int32
386}
387
388type Termios struct {
389	Iflag  uint32
390	Oflag  uint32
391	Cflag  uint32
392	Lflag  uint32
393	Cc     [20]uint8
394	Ispeed int32
395	Ospeed int32
396}
397
398type Winsize struct {
399	Row    uint16
400	Col    uint16
401	Xpixel uint16
402	Ypixel uint16
403}
404
405type Ptmget struct {
406	Cfd int32
407	Sfd int32
408	Cn  [1024]byte
409	Sn  [1024]byte
410}
411
412const (
413	AT_FDCWD            = -0x64
414	AT_SYMLINK_FOLLOW   = 0x400
415	AT_SYMLINK_NOFOLLOW = 0x200
416)
417
418type PollFd struct {
419	Fd      int32
420	Events  int16
421	Revents int16
422}
423
424const (
425	POLLERR    = 0x8
426	POLLHUP    = 0x10
427	POLLIN     = 0x1
428	POLLNVAL   = 0x20
429	POLLOUT    = 0x4
430	POLLPRI    = 0x2
431	POLLRDBAND = 0x80
432	POLLRDNORM = 0x40
433	POLLWRBAND = 0x100
434	POLLWRNORM = 0x4
435)
436
437type Sysctlnode struct {
438	Flags           uint32
439	Num             int32
440	Name            [32]int8
441	Ver             uint32
442	X__rsvd         uint32
443	Un              [16]byte
444	X_sysctl_size   [8]byte
445	X_sysctl_func   [8]byte
446	X_sysctl_parent [8]byte
447	X_sysctl_desc   [8]byte
448}
449
450type Utsname struct {
451	Sysname  [256]byte
452	Nodename [256]byte
453	Release  [256]byte
454	Version  [256]byte
455	Machine  [256]byte
456}
457
458const SizeofClockinfo = 0x14
459
460type Clockinfo struct {
461	Hz      int32
462	Tick    int32
463	Tickadj int32
464	Stathz  int32
465	Profhz  int32
466}
467