github.com/clmul/water@v0.0.3-0.20221017135504-100d910a03ab/params_linux.go (about)

     1  package water
     2  
     3  type DevicePermissions struct {
     4  	// ID of the user which will be granted ownership of the device.
     5  	// If set to a negative value, the owner value will not be changed.
     6  	// By default, Linux sets the owner to -1, which allows any user.
     7  	Owner uint
     8  
     9  	// ID of the group which will be granted access to the device.
    10  	// If set to a negative value, the group value will not be changed.
    11  	// By default, Linux sets the group to -1, which allows any group.
    12  	Group uint
    13  }
    14  
    15  type Config struct {
    16  	// Name is the name to be set for the interface to be created. This overrides
    17  	// the default name assigned by OS such as tap0 or tun0. A zero-value of this
    18  	// field, i.e. an empty string, indicates that the default name should be
    19  	// used.
    20  	Name string
    21  
    22  	// Enable or disable persistence mode for the interface device.
    23  	Persist bool
    24  
    25  	// Owner and Group permissions for the device.
    26  	// A zero-value of this field, i.e. nil, indicates that no changes to owner
    27  	// or group will be made.
    28  	Permissions *DevicePermissions
    29  
    30  	// Support multiqueue tun/tap interface.
    31  	// From version 3.8, Linux supports multiqueue tuntap which can uses multiple
    32  	// file descriptors (queues) to parallelize packets sending or receiving.
    33  	MultiQueue bool
    34  }