Documentation ¶
Index ¶
- Constants
- func ReadStats(id string, cfn core.Work[string]) *ifstats
- type ErrUDPGSODisabled
- type StdNetBind
- func (s *StdNetBind) BatchSize() int
- func (bind *StdNetBind) Close() error
- func (bind *StdNetBind) Open(uport uint16) ([]conn.ReceiveFunc, uint16, error)
- func (e *StdNetBind) ParseEndpoint(s string) (conn.Endpoint, error)
- func (s *StdNetBind) RemoteAddr() netip.AddrPort
- func (s *StdNetBind) Send(buf [][]byte, peer conn.Endpoint) (err error)
- func (s *StdNetBind) SetMark(mark uint32) (err error)
- type StdNetBind2
- func (s *StdNetBind2) BatchSize() int
- func (s *StdNetBind2) Close() error
- func (s *StdNetBind2) Open(uport uint16) ([]conn.ReceiveFunc, uint16, error)
- func (e *StdNetBind2) ParseEndpoint(s string) (conn.Endpoint, error)
- func (s *StdNetBind2) RemoteAddr() netip.AddrPort
- func (s *StdNetBind2) Send(bufs [][]byte, peer conn.Endpoint) (err error)
- func (s *StdNetBind2) SetMark(mark uint32) (err error)
- type StdNetEndpoint
- type StdNetEndpoint2
- func (e *StdNetEndpoint2) ClearSrc()
- func (e *StdNetEndpoint2) DstIP() netip.Addr
- func (e *StdNetEndpoint2) DstToBytes() []byte
- func (e *StdNetEndpoint2) DstToString() string
- func (e *StdNetEndpoint2) SrcIP() netip.Addr
- func (e *StdNetEndpoint2) SrcIfidx() int32
- func (e *StdNetEndpoint2) SrcToString() string
Constants ¶
const ( // github.com/WireGuard/wireguard-go/blob/12269c276/device/queueconstants_android.go#L13 IdealBatchSize = conn.IdealBatchSize )
const StdNetSupportsStickySockets = false
no netlink on Androids: github.com/WireGuard/wireguard-go/blob/12269c2761/device/sticky_linux.go#L28 for linux: StdNetSupportsStickySockets = true
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ErrUDPGSODisabled ¶
type ErrUDPGSODisabled struct { RetryErr error // err, if any, on retry; may be nil // contains filtered or unexported fields }
func (ErrUDPGSODisabled) Error ¶
func (e ErrUDPGSODisabled) Error() string
func (ErrUDPGSODisabled) Unwrap ¶
func (e ErrUDPGSODisabled) Unwrap() error
type StdNetBind ¶
type StdNetBind struct {
// contains filtered or unexported fields
}
func NewEndpoint ¶
func NewEndpoint(id string, d connector, ep *multihost.MH, f rwobserver, rb [3]byte) *StdNetBind
TODO: get d, ep, f, rb through an Opts bag?
func (*StdNetBind) BatchSize ¶
func (s *StdNetBind) BatchSize() int
func (*StdNetBind) Close ¶
func (bind *StdNetBind) Close() error
func (*StdNetBind) Open ¶
func (bind *StdNetBind) Open(uport uint16) ([]conn.ReceiveFunc, uint16, error)
func (*StdNetBind) ParseEndpoint ¶
func (e *StdNetBind) ParseEndpoint(s string) (conn.Endpoint, error)
func (*StdNetBind) RemoteAddr ¶
func (s *StdNetBind) RemoteAddr() netip.AddrPort
func (*StdNetBind) SetMark ¶
func (s *StdNetBind) SetMark(mark uint32) (err error)
from: github.com/WireGuard/wireguard-go/blob/1417a47c8/conn/mark_unix.go
type StdNetBind2 ¶
type StdNetBind2 struct {
// contains filtered or unexported fields
}
StdNetBind2 implements Bind for all platforms. TODO: Remove usage of ipv{4,6}.PacketConn when net.UDPConn has comparable methods for sending and receiving multiple datagrams per-syscall. See the proposal in https://github.com/golang/go/issues/45886#issuecomment-1218301564.
func NewEndpoint2 ¶
func NewEndpoint2(id string, ctl protect.Controller, ep *multihost.MH, f rwobserver) *StdNetBind2
func (*StdNetBind2) BatchSize ¶
func (s *StdNetBind2) BatchSize() int
TODO: When all Binds handle IdealBatchSize, remove this dynamic function and rename the IdealBatchSize constant to BatchSize.
func (*StdNetBind2) Close ¶
func (s *StdNetBind2) Close() error
func (*StdNetBind2) Open ¶
func (s *StdNetBind2) Open(uport uint16) ([]conn.ReceiveFunc, uint16, error)
func (*StdNetBind2) ParseEndpoint ¶
func (e *StdNetBind2) ParseEndpoint(s string) (conn.Endpoint, error)
func (*StdNetBind2) RemoteAddr ¶
func (s *StdNetBind2) RemoteAddr() netip.AddrPort
func (*StdNetBind2) Send ¶
func (s *StdNetBind2) Send(bufs [][]byte, peer conn.Endpoint) (err error)
func (*StdNetBind2) SetMark ¶
func (s *StdNetBind2) SetMark(mark uint32) (err error)
from: github.com/WireGuard/wireguard-go/blob/1417a47c8/conn/mark_unix.go
type StdNetEndpoint ¶
func (StdNetEndpoint) ClearSrc ¶
func (StdNetEndpoint) ClearSrc()
func (StdNetEndpoint) DstIP ¶
func (e StdNetEndpoint) DstIP() netip.Addr
func (StdNetEndpoint) DstToBytes ¶
func (e StdNetEndpoint) DstToBytes() []byte
func (StdNetEndpoint) DstToString ¶
func (e StdNetEndpoint) DstToString() string
func (StdNetEndpoint) SrcIP ¶
func (e StdNetEndpoint) SrcIP() netip.Addr
func (StdNetEndpoint) SrcToString ¶
func (e StdNetEndpoint) SrcToString() string
type StdNetEndpoint2 ¶
type StdNetEndpoint2 struct { // AddrPort is the endpoint destination. netip.AddrPort // contains filtered or unexported fields }
func (*StdNetEndpoint2) ClearSrc ¶
func (e *StdNetEndpoint2) ClearSrc()
func (*StdNetEndpoint2) DstIP ¶
func (e *StdNetEndpoint2) DstIP() netip.Addr
func (*StdNetEndpoint2) DstToBytes ¶
func (e *StdNetEndpoint2) DstToBytes() []byte
func (*StdNetEndpoint2) DstToString ¶
func (e *StdNetEndpoint2) DstToString() string
func (*StdNetEndpoint2) SrcIP ¶
func (e *StdNetEndpoint2) SrcIP() netip.Addr
func (*StdNetEndpoint2) SrcIfidx ¶
func (e *StdNetEndpoint2) SrcIfidx() int32
func (*StdNetEndpoint2) SrcToString ¶
func (e *StdNetEndpoint2) SrcToString() string