state

package
v1.11.0-cni-plu...-ddfc3b1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 20, 2024 License: Apache-2.0, Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MapParameters = maps.MapParameters{
	Type:       "percpu_array",
	KeySize:    4,
	ValueSize:  expectedSize,
	MaxEntries: 2,
	Name:       "cali_state",
	Version:    4,
}

Functions

func Map

func Map() maps.Map

func MapForTest

func MapForTest() maps.Map

Types

type PolicyResult

type PolicyResult int32
const (
	PolicyNoMatch PolicyResult = iota
	PolicyAllow
	PolicyDeny
	PolicyTailCallFailed = 10
	MaxRuleIDs           = 32
)

type State

type State struct {
	SrcAddr         uint32
	SrcAddr1        uint32
	SrcAddr2        uint32
	SrcAddr3        uint32
	DstAddr         uint32
	DstAddr1        uint32
	DstAddr2        uint32
	DstAddr3        uint32
	PreNATDstAddr   uint32
	PreNATDstAddr1  uint32
	PreNATDstAddr2  uint32
	PreNATDstAddr3  uint32
	PostNATDstAddr  uint32
	PostNATDstAddr1 uint32
	PostNATDstAddr2 uint32
	PostNATDstAddr3 uint32
	TunIP           uint32
	TunIP1          uint32
	TunIP2          uint32
	TunIP3          uint32

	PolicyRC       PolicyResult
	SrcPort        uint16
	DstPort        uint16
	PreNATDstPort  uint16
	PostNATDstPort uint16
	IPProto        uint8

	IPSize           uint16
	RulesHit         uint32
	RuleIDs          [MaxRuleIDs]uint64
	Flags            uint64
	ConntrackRCFlags uint32

	ConntrackNATIPPort  uint64
	ConntrackTunIP      uint32
	ConntrackIfIndexFwd uint32
	ConntrackIfIndexCtd uint32

	NATData       uint64
	ProgStartTime uint64
	SrcAddrMasq   uint32
	SrcAddrMasq1  uint32
	SrcAddrMasq2  uint32
	SrcAddrMasq3  uint32
	// contains filtered or unexported fields
}
struct cali_tc_state {
   __be32 ip_src;
   __be32 ip_src1;
   __be32 ip_src2;
   __be32 ip_src3;
   __be32 ip_dst;
   __be32 ip_dst1;
   __be32 ip_dst2;
   __be32 ip_dst3;
   __be32 pre_nat_ip_dst;
   __be32 pre_nat_ip_dst1;
   __be32 pre_nat_ip_dst2;
   __be32 pre_nat_ip_dst3;
   __be32 post_nat_ip_dst;
   __be32 post_nat_ip_dst1;
   __be32 post_nat_ip_dst2;
   __be32 post_nat_ip_dst3;
   __be32 tun_ip;
   __be32 tun_ip1;
   __be32 tun_ip2;
   __be32 tun_ip3;
   __u32 unused;
   __s32 pol_rc;
   __u16 sport;
   __u16 dport;
   __u16 pre_nat_dport;
   __u16 post_nat_dport;
   __u8 ip_proto;
   __u8 __pad;
   __be16 ip_size;
   __u32 rules_hit;
   __u64 rule_ids[MAX_RULE_IDS];
   struct calico_ct_result ct_result;
   struct calico_nat_dest nat_dest;
   __u64 prog_start_time;
   __u64 flags;
};

func StateFromBytes

func StateFromBytes(bytes []byte) State

func (*State) AsBytes

func (s *State) AsBytes() []byte

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL