Versions in this module Expand all Collapse all v1 v1.0.1 Apr 30, 2024 Changes in this version + func AddressAndFamily(addr []byte) (tcpip.FullAddress, uint16, *syserr.Error) + func BytesToIPAddress(addr []byte) tcpip.Address + func ConvertAddress(family int, addr tcpip.FullAddress) (linux.SockAddr, uint32) + func Htons(v uint16) uint16 + func IsICMP(s Socket) bool + func IsRaw(s Socket) bool + func IsTCP(s Socket) bool + func IsUDP(s Socket) bool + func New(t *kernel.Task, family int, stype linux.SockType, protocol int) (*vfs.FileDescription, *syserr.Error) + func Ntohs(v uint16) uint16 + func Pair(t *kernel.Task, family int, stype linux.SockType, protocol int) (*vfs.FileDescription, *vfs.FileDescription, *syserr.Error) + func RegisterProvider(family int, provider Provider) + func UnmarshalSockAddr(family int, data []byte) linux.SockAddr + type ControlMessages struct + IP IPControlMessages + Unix transport.ControlMessages + func (c *ControlMessages) Release(ctx context.Context) + type IPControlMessages struct + HasHopLimit bool + HasIPPacketInfo bool + HasIPv6PacketInfo bool + HasInq bool + HasTClass bool + HasTOS bool + HasTTL bool + HasTimestamp bool + HopLimit uint32 + IPv6PacketInfo linux.ControlMessageIPv6PacketInfo + Inq int32 + OriginalDstAddress linux.SockAddr + PacketInfo linux.ControlMessageIPPacketInfo + SockErr linux.SockErrCMsg + TClass uint32 + TOS uint8 + TTL uint32 + Timestamp time.Time + func NewIPControlMessages(family int, cmgs tcpip.ReceivableControlMessages) IPControlMessages + type Provider interface + Pair func(t *kernel.Task, stype linux.SockType, protocol int) (*vfs.FileDescription, *vfs.FileDescription, *syserr.Error) + Socket func(t *kernel.Task, stype linux.SockType, protocol int) (*vfs.FileDescription, *syserr.Error) + type SendReceiveTimeout struct + func (to *SendReceiveTimeout) RecvTimeout() int64 + func (to *SendReceiveTimeout) SendTimeout() int64 + func (to *SendReceiveTimeout) SetRecvTimeout(nanoseconds int64) + func (to *SendReceiveTimeout) SetSendTimeout(nanoseconds int64) + type Socket interface + Accept func(t *kernel.Task, peerRequested bool, flags int, blocking bool) (int32, linux.SockAddr, uint32, *syserr.Error) + Bind func(t *kernel.Task, sockaddr []byte) *syserr.Error + Connect func(t *kernel.Task, sockaddr []byte, blocking bool) *syserr.Error + GetPeerName func(t *kernel.Task) (addr linux.SockAddr, addrLen uint32, err *syserr.Error) + GetSockName func(t *kernel.Task) (addr linux.SockAddr, addrLen uint32, err *syserr.Error) + GetSockOpt func(t *kernel.Task, level int, name int, outPtr hostarch.Addr, outLen int) (marshal.Marshallable, *syserr.Error) + Listen func(t *kernel.Task, backlog int) *syserr.Error + RecvMsg func(t *kernel.Task, dst usermem.IOSequence, flags int, haveDeadline bool, ...) (n int, msgFlags int, senderAddr linux.SockAddr, senderAddrLen uint32, ...) + RecvTimeout func() int64 + SendMsg func(t *kernel.Task, src usermem.IOSequence, to []byte, flags int, ...) (n int, err *syserr.Error) + SendTimeout func() int64 + SetRecvTimeout func(nanoseconds int64) + SetSendTimeout func(nanoseconds int64) + SetSockOpt func(t *kernel.Task, level int, name int, opt []byte) *syserr.Error + Shutdown func(t *kernel.Task, how int) *syserr.Error + State func() uint32 + Type func() (family int, skType linux.SockType, protocol int)