Documentation ¶
Index ¶
- func ExecCommand(name, sargs string) error
- func GetCfg() water.Config
- func GetWaterIfF(ifce *water.Interface) *os.File
- func Ifconfig(tunName, network string, _ uint32)
- func Ipv4MaskString(m []byte) string
- func MakeTcpipError(msg string, ignoreStats bool) *tcpip.Error
- func New(opts *Options) (stack.LinkEndpoint, error)
- func SetUnexportedField(v reflect.Value) reflect.Value
- type NonBlockingRWInterface
- type Options
- type WaterRWNormal
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Ipv4MaskString ¶
Types ¶
type NonBlockingRWInterface ¶
type Options ¶
type Options struct { // ifce is tun device of songgao/water Ifce *water.Interface // MTU is the mtu to use for this endpoint. MTU uint32 // EthernetHeader if true, indicates that the *endpoint should read/write // ethernet frames instead of IP packets. EthernetHeader bool // ClosedFunc is a function to be called when an endpoint's peer (if // any) closes its end of the communication pipe. ClosedFunc func(*tcpip.Error) // Address is the link address for this endpoint. Only used if // EthernetHeader is true. Address tcpip.LinkAddress // SaveRestore if true, indicates that this NIC capability set should // include CapabilitySaveRestore SaveRestore bool // DisconnectOk if true, indicates that this NIC capability set should // include CapabilityDisconnectOk. DisconnectOk bool // TXChecksumOffload if true, indicates that this endpoints capability // set should include CapabilityTXChecksumOffload. TXChecksumOffload bool // RXChecksumOffload if true, indicates that this endpoints capability // set should include CapabilityRXChecksumOffload. RXChecksumOffload bool }
Options specify the details about the fd-based endpoint to be created.
type WaterRWNormal ¶
type WaterRWNormal struct {
// contains filtered or unexported fields
}
func NewWriterNormal ¶
func NewWriterNormal(e *endpoint, ifce *water.Interface) *WaterRWNormal
func (*WaterRWNormal) DispatchInboundLoop ¶
func (w *WaterRWNormal) DispatchInboundLoop() *tcpip.Error
func (*WaterRWNormal) NonBlockingWrite ¶
func (w *WaterRWNormal) NonBlockingWrite(buf []byte) *tcpip.Error
func (*WaterRWNormal) NonBlockingWrite3 ¶
func (w *WaterRWNormal) NonBlockingWrite3(b1, b2, b3 []byte) *tcpip.Error
Source Files ¶
Click to show internal directories.
Click to hide internal directories.