Struct async_tun::TunBuilder [−][src]
pub struct TunBuilder<'a> { /* fields omitted */ }
Expand description
Represents a factory to build new instances of Tun
.
Implementations
Creates a new instance of TunBuilder
.
Sets the name of device (max length: 16 characters), if it is empty, then device name is set by kernel. Default value is empty.
If is_tap
is true, a TAP device is allocated, otherwise, a TUN device is created. Default value is false
.
If packet_info
is false, then IFF_NO_PI
flag is set. Default value is true
.
Sets IPv4 destination address of device.
Sets Ethernet MAC address of device (for tap mode).