add new interface for init configuration (#15)

This commit is contained in:
Song Gao 2017-01-08 19:29:40 -08:00 committed by GitHub
parent 98078a8ac5
commit 37d6645a51
5 changed files with 109 additions and 0 deletions

18
params_unix.go Normal file
View file

@ -0,0 +1,18 @@
// +build linux darwin
package water
// PlatformSpecificParams defines parameters in Config that are specific to
// Linux and macOS. A zero-value of such type is valid, yielding an interface
// with OS defined name.
type PlatformSpecificParams struct {
// Name is the name to be set for the interface to be created. This overrides
// the default name assigned by OS such as tap0 or tun0. A zero-value of this
// field, i.e. an emapty string, indicates that the default name should be
// used.
Name string
}
func defaultPlatformSpecificParams() PlatformSpecificParams {
return PlatformSpecificParams{}
}