github.com/HACKERALERT/Picocrypt/src/external/sys@v0.0.0-20210609020157-e519952f829f/unix/types_illumos.go (about)

     1  // Copyright 2021 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  //go:build ignore
     6  // +build ignore
     7  
     8  /*
     9  Input to cgo -godefs.  See README.md
    10  */
    11  
    12  package unix
    13  
    14  /*
    15  #include <net/if.h>
    16  #include <sys/sockio.h>
    17  #include <sys/stropts.h>
    18  
    19  // Many illumos distributions ship a 3rd party tun/tap driver
    20  // from https://github.com/kaizawa/tuntap
    21  // It supports a pair of IOCTLs defined at
    22  // https://github.com/kaizawa/tuntap/blob/master/if_tun.h#L91-L93
    23  #define TUNNEWPPA	(('T'<<16) | 0x0001)
    24  #define TUNSETPPA	(('T'<<16) | 0x0002)
    25  */
    26  import "C"
    27  
    28  const (
    29  	TUNNEWPPA = C.TUNNEWPPA
    30  	TUNSETPPA = C.TUNSETPPA
    31  
    32  	// sys/stropts.h:
    33  	I_STR     = C.I_STR
    34  	I_POP     = C.I_POP
    35  	I_PUSH    = C.I_PUSH
    36  	I_PLINK   = C.I_PLINK
    37  	I_PUNLINK = C.I_PUNLINK
    38  
    39  	// sys/sockio.h:
    40  	IF_UNITSEL = C.IF_UNITSEL
    41  )
    42  
    43  type strbuf C.struct_strbuf
    44  
    45  type Strioctl C.struct_strioctl
    46  
    47  type Lifreq C.struct_lifreq