github.com/borderzero/water@v0.0.1/params_darwin.go (about) 1 package water 2 3 // MacOSDriverProvider enumerates possible MacOS TUN/TAP implementations 4 type MacOSDriverProvider int 5 6 const ( 7 // MacOSDriverSystem refers to the default P2P driver 8 MacOSDriverSystem MacOSDriverProvider = 0 9 // MacOSDriverTunTapOSX refers to the third-party tuntaposx driver 10 // see https://sourceforge.net/p/tuntaposx 11 MacOSDriverTunTapOSX MacOSDriverProvider = 1 12 ) 13 14 // PlatformSpecificParams defines parameters in Config that are specific to 15 // macOS. A zero-value of such type is valid, yielding an interface 16 // with OS defined name. 17 // Currently it is not possible to set the interface name in macOS. 18 type PlatformSpecificParams struct { 19 // Name is the name for the interface to be used. 20 // 21 // For TunTapOSXDriver, it should be something like "tap0". 22 // For SystemDriver, the name should match `utun[0-9]+`, e.g. utun233 23 Name string 24 25 // Driver should be set if an alternative driver is desired 26 // e.g. TunTapOSXDriver 27 Driver MacOSDriverProvider 28 } 29 30 func defaultPlatformSpecificParams() PlatformSpecificParams { 31 return PlatformSpecificParams{} 32 }