Documentation
¶
Index ¶
- Constants
- type ConfingInvalid
- type IfBuilder
- type IfFlag
- type IfInterface
- type IffFlag
- type VirtIf
- func (v *VirtIf) Close() error
- func (v *VirtIf) Down() error
- func (v *VirtIf) Read(b []byte) (int, error)
- func (v *VirtIf) SetHWAddr(mac net.HardwareAddr) error
- func (v *VirtIf) SetIPv4(ip net.IP, mask net.IP) error
- func (v *VirtIf) SetMTU(mtu int32) error
- func (v *VirtIf) Up() error
- func (v *VirtIf) Write(b []byte) (int, error)
Constants ¶
View Source
const ( IFF_UP = unix.IFF_UP IFF_RUNNING = unix.IFF_RUNNING )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConfingInvalid ¶
type ConfingInvalid string
const (
INVALID_FLAG_COMBINATION ConfingInvalid = "invalid flags combination"
)
func (ConfingInvalid) Error ¶
func (c ConfingInvalid) Error() string
type IfBuilder ¶
type IfBuilder struct {
// contains filtered or unexported fields
}
VirtIf builder. Can chain options and settings to configure the new VirtIf
func NewIfBuilder ¶
func NewIfBuilder() IfBuilder
Creates a new VirtIf builder without any parameters preset
func (IfBuilder) Build ¶
func (b IfBuilder) Build() (IfInterface, error)
Build returns the Virtual Interface with the specified flags and options.
func (IfBuilder) SetNoPktInfo ¶
The the Virtual Interface to not contain packets info
type IfInterface ¶
type VirtIf ¶
type VirtIf struct { io.ReadWriteCloser // contains filtered or unexported fields }
Struct object that represents the TUN/TAP Virtual Interface
func (*VirtIf) SetHWAddr ¶
func (v *VirtIf) SetHWAddr(mac net.HardwareAddr) error
Set Virtual Interface MAC address
Click to show internal directories.
Click to hide internal directories.