github.com/hxx258456/ccgo@v0.0.5-0.20230213014102-48b35f46f66f/net/lif/defs_solaris.go (about) 1 // Copyright 2016 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 // +godefs map struct_in_addr [4]byte /* in_addr */ 9 // +godefs map struct_in6_addr [16]byte /* in6_addr */ 10 11 package lif 12 13 /* 14 #include <sys/socket.h> 15 #include <sys/sockio.h> 16 17 #include <net/if.h> 18 #include <net/if_types.h> 19 */ 20 import "C" 21 22 const ( 23 sysAF_UNSPEC = C.AF_UNSPEC 24 sysAF_INET = C.AF_INET 25 sysAF_INET6 = C.AF_INET6 26 27 sysSOCK_DGRAM = C.SOCK_DGRAM 28 ) 29 30 type sockaddrStorage C.struct_sockaddr_storage 31 32 const ( 33 sysLIFC_NOXMIT = C.LIFC_NOXMIT 34 sysLIFC_EXTERNAL_SOURCE = C.LIFC_EXTERNAL_SOURCE 35 sysLIFC_TEMPORARY = C.LIFC_TEMPORARY 36 sysLIFC_ALLZONES = C.LIFC_ALLZONES 37 sysLIFC_UNDER_IPMP = C.LIFC_UNDER_IPMP 38 sysLIFC_ENABLED = C.LIFC_ENABLED 39 40 sysSIOCGLIFADDR = C.SIOCGLIFADDR 41 sysSIOCGLIFDSTADDR = C.SIOCGLIFDSTADDR 42 sysSIOCGLIFFLAGS = C.SIOCGLIFFLAGS 43 sysSIOCGLIFMTU = C.SIOCGLIFMTU 44 sysSIOCGLIFNETMASK = C.SIOCGLIFNETMASK 45 sysSIOCGLIFMETRIC = C.SIOCGLIFMETRIC 46 sysSIOCGLIFNUM = C.SIOCGLIFNUM 47 sysSIOCGLIFINDEX = C.SIOCGLIFINDEX 48 sysSIOCGLIFSUBNET = C.SIOCGLIFSUBNET 49 sysSIOCGLIFLNKINFO = C.SIOCGLIFLNKINFO 50 sysSIOCGLIFCONF = C.SIOCGLIFCONF 51 sysSIOCGLIFHWADDR = C.SIOCGLIFHWADDR 52 ) 53 54 const ( 55 sysIFF_UP = C.IFF_UP 56 sysIFF_BROADCAST = C.IFF_BROADCAST 57 sysIFF_DEBUG = C.IFF_DEBUG 58 sysIFF_LOOPBACK = C.IFF_LOOPBACK 59 sysIFF_POINTOPOINT = C.IFF_POINTOPOINT 60 sysIFF_NOTRAILERS = C.IFF_NOTRAILERS 61 sysIFF_RUNNING = C.IFF_RUNNING 62 sysIFF_NOARP = C.IFF_NOARP 63 sysIFF_PROMISC = C.IFF_PROMISC 64 sysIFF_ALLMULTI = C.IFF_ALLMULTI 65 sysIFF_INTELLIGENT = C.IFF_INTELLIGENT 66 sysIFF_MULTICAST = C.IFF_MULTICAST 67 sysIFF_MULTI_BCAST = C.IFF_MULTI_BCAST 68 sysIFF_UNNUMBERED = C.IFF_UNNUMBERED 69 sysIFF_PRIVATE = C.IFF_PRIVATE 70 ) 71 72 const ( 73 sizeofLifnum = C.sizeof_struct_lifnum 74 sizeofLifreq = C.sizeof_struct_lifreq 75 sizeofLifconf = C.sizeof_struct_lifconf 76 sizeofLifIfinfoReq = C.sizeof_struct_lif_ifinfo_req 77 ) 78 79 type lifnum C.struct_lifnum 80 81 type lifreq C.struct_lifreq 82 83 type lifconf C.struct_lifconf 84 85 type lifIfinfoReq C.struct_lif_ifinfo_req 86 87 const ( 88 sysIFT_IPV4 = C.IFT_IPV4 89 sysIFT_IPV6 = C.IFT_IPV6 90 sysIFT_6TO4 = C.IFT_6TO4 91 )