Documentation ¶
Index ¶
- func CreateIpv4Tun(ctx *CreateIpv4TunContext) (err error)
- func GetErrPlatformNotSupport() error
- func MustCreateIpv4Tun(ctx *CreateIpv4TunContext)
- func SetP2PIpAndUp(req SetP2PIpRequest) error
- type CreateIpv4TunContext
- type DeviceType
- type SetP2PIpRequest
- type TunTapInterface
- type TunTapObj
- func (ifce *TunTapObj) Close() (err error)
- func (ifce *TunTapObj) GetDeviceType() DeviceType
- func (ifce *TunTapObj) Name() string
- func (ifce *TunTapObj) Read(p []byte) (n int, err error)
- func (ifce *TunTapObj) StartWriteBufferThread(printErrorMsg string)
- func (ifce *TunTapObj) Write(p []byte) (n int, err error)
- func (ifce *TunTapObj) WriteFastNoLock(p []byte) (err error)
- func (ifce *TunTapObj) WriteWithBuffer(buf []byte)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateIpv4Tun ¶
func CreateIpv4Tun(ctx *CreateIpv4TunContext) (err error)
func GetErrPlatformNotSupport ¶
func GetErrPlatformNotSupport() error
func MustCreateIpv4Tun ¶
func MustCreateIpv4Tun(ctx *CreateIpv4TunContext)
func SetP2PIpAndUp ¶
func SetP2PIpAndUp(req SetP2PIpRequest) error
Types ¶
type CreateIpv4TunContext ¶
type DeviceType ¶
type DeviceType string
var DeviceTypeTap DeviceType = "tap"
var DeviceTypeTun DeviceType = "tun"
func (DeviceType) String ¶
func (s DeviceType) String() string
type SetP2PIpRequest ¶
type TunTapInterface ¶
type TunTapInterface interface { io.ReadWriteCloser GetDeviceType() DeviceType Name() string }
type TunTapObj ¶
type TunTapObj struct {
// contains filtered or unexported fields
}
func NewTunNoName ¶
func (*TunTapObj) GetDeviceType ¶
func (ifce *TunTapObj) GetDeviceType() DeviceType
func (*TunTapObj) StartWriteBufferThread ¶
func (*TunTapObj) WriteFastNoLock ¶
func (*TunTapObj) WriteWithBuffer ¶
Click to show internal directories.
Click to hide internal directories.