Versions in this module Expand all Collapse all v1 v1.0.1 Mar 3, 2025 Changes in this version + const Nested + const NetByteOrder + func IsNotExist(err error) bool + func MarshalAttributes(attrs []Attribute) ([]byte, error) + func Validate(request Message, replies []Message) error + type Attribute struct + Data []byte + Length uint16 + Type uint16 + func UnmarshalAttributes(b []byte) ([]Attribute, error) + type AttributeDecoder struct + ByteOrder binary.ByteOrder + func NewAttributeDecoder(b []byte) (*AttributeDecoder, error) + func (ad *AttributeDecoder) Bytes() []byte + func (ad *AttributeDecoder) Do(fn func(b []byte) error) + func (ad *AttributeDecoder) Err() error + func (ad *AttributeDecoder) Flag() bool + func (ad *AttributeDecoder) Int16() int16 + func (ad *AttributeDecoder) Int32() int32 + func (ad *AttributeDecoder) Int64() int64 + func (ad *AttributeDecoder) Int8() int8 + func (ad *AttributeDecoder) Len() int + func (ad *AttributeDecoder) Nested(fn func(nad *AttributeDecoder) error) + func (ad *AttributeDecoder) Next() bool + func (ad *AttributeDecoder) String() string + func (ad *AttributeDecoder) Type() uint16 + func (ad *AttributeDecoder) TypeFlags() uint16 + func (ad *AttributeDecoder) Uint16() uint16 + func (ad *AttributeDecoder) Uint32() uint32 + func (ad *AttributeDecoder) Uint64() uint64 + func (ad *AttributeDecoder) Uint8() uint8 + type AttributeEncoder struct + ByteOrder binary.ByteOrder + func NewAttributeEncoder() *AttributeEncoder + func (ae *AttributeEncoder) Bytes(typ uint16, b []byte) + func (ae *AttributeEncoder) Do(typ uint16, fn func() ([]byte, error)) + func (ae *AttributeEncoder) Encode() ([]byte, error) + func (ae *AttributeEncoder) Flag(typ uint16, v bool) + func (ae *AttributeEncoder) Int16(typ uint16, v int16) + func (ae *AttributeEncoder) Int32(typ uint16, v int32) + func (ae *AttributeEncoder) Int64(typ uint16, v int64) + func (ae *AttributeEncoder) Int8(typ uint16, v int8) + func (ae *AttributeEncoder) Nested(typ uint16, fn func(nae *AttributeEncoder) error) + func (ae *AttributeEncoder) String(typ uint16, s string) + func (ae *AttributeEncoder) Uint16(typ uint16, v uint16) + func (ae *AttributeEncoder) Uint32(typ uint16, v uint32) + func (ae *AttributeEncoder) Uint64(typ uint16, v uint64) + func (ae *AttributeEncoder) Uint8(typ uint16, v uint8) + type Config struct + DisableNSLockThread bool + Groups uint32 + NetNS int + PID uint32 + Strict bool + type Conn struct + func Dial(family int, config *Config) (*Conn, error) + func NewConn(sock Socket, pid uint32) *Conn + func (c *Conn) Close() error + func (c *Conn) Execute(m Message) ([]Message, error) + func (c *Conn) JoinGroup(group uint32) error + func (c *Conn) LeaveGroup(group uint32) error + func (c *Conn) Receive() ([]Message, error) + func (c *Conn) ReceiveToBuf(buf []byte) ([]Message, error) + func (c *Conn) RemoveBPF() error + func (c *Conn) Send(m Message) (Message, error) + func (c *Conn) SendMessages(msgs []Message) ([]Message, error) + func (c *Conn) SetBPF(filter []bpf.RawInstruction) error + func (c *Conn) SetDeadline(t time.Time) error + func (c *Conn) SetOption(option ConnOption, enable bool) error + func (c *Conn) SetReadBuffer(bytes int) error + func (c *Conn) SetReadDeadline(t time.Time) error + func (c *Conn) SetWriteBuffer(bytes int) error + func (c *Conn) SetWriteDeadline(t time.Time) error + func (c *Conn) SyscallConn() (syscall.RawConn, error) + type ConnOption int + const BroadcastError + const CapAcknowledge + const ExtendedAcknowledge + const GetStrictCheck + const ListenAllNSID + const NoENOBUFS + const PacketInfo + type Header struct + Flags HeaderFlags + Length uint32 + PID uint32 + Sequence uint32 + Type HeaderType + type HeaderFlags uint16 + const Acknowledge + const AcknowledgeTLVs + const Append + const Atomic + const Capped + const Create + const Dump + const DumpFiltered + const DumpInterrupted + const Echo + const Excl + const Match + const Multi + const Replace + const Request + const Root + func (f HeaderFlags) String() string + type HeaderType uint16 + const Done + const Error + const Noop + const Overrun + func (t HeaderType) String() string + type Message struct + Data []byte + Header Header + func (m *Message) UnmarshalBinary(b []byte) error + func (m Message) MarshalBinary() ([]byte, error) + type OpError struct + Err error + Message string + Offset int + Op string + func (e *OpError) Error() string + func (e *OpError) Temporary() bool + func (e *OpError) Timeout() bool + func (e *OpError) Unwrap() error + type Socket interface + Close func() error + Receive func() ([]Message, error) + ReceiveToBuf func(buf []byte) ([]Message, error) + Send func(m Message) error + SendMessages func(m []Message) error