Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func EmptyNidPortSeq ¶
func EmptyNidPortSeq(func(identity.NumericIdentity, uint16) bool)
func NewNamedPortMultiMap ¶
func NewNamedPortMultiMap() *namedPortMultiMap
func ValidatePortName ¶
ValidatePortName checks that the port name conforms to the IANA Service Names spec and converts the port name to lower case for case-insensitive comparisons.
Types ¶
type IPv4 ¶
type IPv4 [4]byte
IPv4 is the binary representation for encoding in binary structs.
type IPv6 ¶
type IPv6 [16]byte
IPv6 is the binary representation for encoding in binary structs.
type MACAddr ¶
type MACAddr [6]byte
MACAddr is the binary representation for encoding in binary structs.
type NamedPortMap ¶
NamedPortMap maps port names to port numbers and protocols.
func (NamedPortMap) AddPort ¶
func (npm NamedPortMap) AddPort(name string, port int, protocol string) error
AddPort adds a new PortProto to the NamedPortMap
func (NamedPortMap) GetNamedPort ¶
GetNamedPort returns the port number for the named port, if any. proto must be a concrete protocol; u8proto.ANY does not match named ports.
type NamedPortMultiMap ¶
type NamedPortMultiMap interface {
// GetNamedPort returns the port number for the named port, if any. proto
// must be a concrete protocol; u8proto.ANY does not match named ports.
GetNamedPort(name string, proto u8proto.U8proto, nids iter.Seq[identity.NumericIdentity]) (uint16, error)
// GetNamedPorts returns the port numbers for the named port, if any, by
// numeric identity. proto must be a concrete protocol; u8proto.ANY does
// not match named ports.
GetNamedPorts(name string, proto u8proto.U8proto, nids iter.Seq[identity.NumericIdentity]) NidPortSeq
// Len returns the number of named port/protocol mappings known.
Len() int
}
NamedPortMultiMap may have multiple entries for a name if multiple PODs define the same name with different values.
type NidPortSeq ¶
type NidPortSeq iter.Seq2[identity.NumericIdentity, uint16]
func (NidPortSeq) Ports ¶
func (s NidPortSeq) Ports() []uint16
type PortProto ¶
type PortProto struct {
Proto u8proto.U8proto // concrete protocol; u8proto.ANY is invalid
Port uint16 // non-0
}
PortProto is a pair of port number and protocol and is used as the value type in named port maps.
type XfrmStateInfo ¶ added in v1.19.0
type XfrmStateInfo struct {
Encrypt bool `json:"encrypt"`
Src string `json:"src"`
Dst string `json:"dst"`
SPI uint32 `json:"spi"`
ReqID uint32 `json:"reqid"`
AuthAlg string `json:"auth_alg,omitempty"`
AuthKey string `json:"auth_key,omitempty"`
CryptAlg string `json:"crypt_alg,omitempty"`
CryptKey string `json:"crypt_key,omitempty"`
AeadAlg string `json:"aead_alg,omitempty"`
AeadKey string `json:"aead_key,omitempty"`
}
XfrmStateInfo represents the key information from an XFRM state This struct is used for JSON serialization of XFRM state information and is shared between cilium-dbg and cilium-cli for consistency