Documentation ¶
Index ¶
- Constants
- type Device
- type DeviceFactory
- type Route
- type UserDevice
- func (d *UserDevice) Activate() error
- func (d *UserDevice) Cidr() *net.IPNet
- func (d *UserDevice) Close() error
- func (d *UserDevice) Name() string
- func (d *UserDevice) NewMultiQueueReader() (io.ReadWriteCloser, error)
- func (d *UserDevice) Pipe() (*io.PipeReader, *io.PipeWriter)
- func (d *UserDevice) Read(p []byte) (n int, err error)
- func (d *UserDevice) RouteFor(ip iputil.VpnIp) iputil.VpnIp
- func (d *UserDevice) Write(p []byte) (n int, err error)
Constants ¶
View Source
const DefaultMTU = 1300
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Device ¶
type Device interface { io.ReadWriteCloser Activate() error Cidr() *net.IPNet Name() string RouteFor(iputil.VpnIp) iputil.VpnIp NewMultiQueueReader() (io.ReadWriteCloser, error) }
func NewDeviceFromConfig ¶
type DeviceFactory ¶
type DeviceFactory func(c *config.C, l *logrus.Logger, tunCidr *net.IPNet, routines int) (Device, error)
TODO: We may be able to remove routines
func NewFdDeviceFromConfig ¶
func NewFdDeviceFromConfig(fd *int) DeviceFactory
type Route ¶
type UserDevice ¶
type UserDevice struct {
// contains filtered or unexported fields
}
func (*UserDevice) Activate ¶
func (d *UserDevice) Activate() error
func (*UserDevice) Cidr ¶
func (d *UserDevice) Cidr() *net.IPNet
func (*UserDevice) Close ¶
func (d *UserDevice) Close() error
func (*UserDevice) Name ¶
func (d *UserDevice) Name() string
func (*UserDevice) NewMultiQueueReader ¶
func (d *UserDevice) NewMultiQueueReader() (io.ReadWriteCloser, error)
func (*UserDevice) Pipe ¶
func (d *UserDevice) Pipe() (*io.PipeReader, *io.PipeWriter)
Click to show internal directories.
Click to hide internal directories.