File: types_illumos.go

package info (click to toggle)
golang-golang-x-sys 0.0~git20211216.1d35b9e-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 8,844 kB
  • sloc: asm: 1,987; sh: 900; ansic: 44; makefile: 3
file content (49 lines) | stat: -rw-r--r-- 1,008 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
// Copyright 2021 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

//go:build ignore
// +build ignore

/*
Input to cgo -godefs.  See README.md
*/

package unix

/*
#include <net/if.h>
#include <sys/sockio.h>
#include <sys/stropts.h>

// Many illumos distributions ship a 3rd party tun/tap driver
// from https://github.com/kaizawa/tuntap
// It supports a pair of IOCTLs defined at
// https://github.com/kaizawa/tuntap/blob/master/if_tun.h#L91-L93
#define TUNNEWPPA	(('T'<<16) | 0x0001)
#define TUNSETPPA	(('T'<<16) | 0x0002)
*/
import "C"

const (
	TUNNEWPPA = C.TUNNEWPPA
	TUNSETPPA = C.TUNSETPPA

	// sys/stropts.h:
	I_STR     = C.I_STR
	I_POP     = C.I_POP
	I_PUSH    = C.I_PUSH
	I_LINK    = C.I_LINK
	I_UNLINK  = C.I_UNLINK
	I_PLINK   = C.I_PLINK
	I_PUNLINK = C.I_PUNLINK

	// sys/sockio.h:
	IF_UNITSEL = C.IF_UNITSEL
)

type strbuf C.struct_strbuf

type Strioctl C.struct_strioctl

type Lifreq C.struct_lifreq