Documentation
¶
Index ¶
- func BuildRawInstructions(cond Condition) (retList []bpf.RawInstruction, retErr error)
- func CalculateChunkLinkInstructionsNumBy(chunk IChunk) (retNum int)
- type Assembler
- type BaseCell
- type BaseChunk
- func (t *BaseChunk) BuildInstructions(reject bool, instructions *[]bpf.Instruction) error
- func (t *BaseChunk) GetCellLinkLen() int
- func (t *BaseChunk) GetFirstCellIndex() (retIdx int)
- func (t *BaseChunk) GetInstructionsNum() int
- func (t *BaseChunk) GetNextChunk() IChunk
- func (t *BaseChunk) GetPreviousChunk() IChunk
- func (t *BaseChunk) SetNextChunk(chunk IChunk)
- func (t *BaseChunk) SetPreviousChunk(chunk IChunk)
- type CellLink
- type Condition
- type DstIPV4AddrChunk
- type DstIPV6AddrChunk
- type DstIPV6AddrValueCell
- type EthTypeCell
- type EthTypeIPV4Cell
- type EthTypeIPV6Cell
- type EthernetLayerChunk
- type ICell
- func NewDstIPV6AddrValueCell(index int, nIP net.IP) ICell
- func NewEthTypeIPV4Cell(index int) ICell
- func NewEthTypeIPV6Cell(index int) ICell
- func NewIPProtoCell(index int, proto layers.IPProtocol) (ICell, error)
- func NewIPProtoIPV6FragCell(index int, proto layers.IPProtocol) ICell
- func NewIPProtoTCPCell(index int, proto layers.IPProtocol) ICell
- func NewIPProtoUDPCell(index int, proto layers.IPProtocol) ICell
- func NewIPV4AddrValueCell(index int, nIP net.IP) ICell
- func NewLoadAbsoluteCell(index int, off uint32, size int) ICell
- func NewSrcIPV6AddrValueCell(index int, nIP net.IP) ICell
- type IChunk
- func CheckAndCreateDstIPV4AddrChunk(idx int, cond *Condition) (IChunk, error)
- func CheckAndCreateDstIPV6AddrChunk(idx int, cond *Condition) (IChunk, error)
- func CheckAndCreateIPProtoIPV4Chunk(idx int, cond *Condition) (IChunk, error)
- func CheckAndCreateIPProtoIPV6Chunk(idx int, cond *Condition) (IChunk, error)
- func CheckAndCreateIPProtoIPv6FragChunk(idx int, cond *Condition) (IChunk, error)
- func CheckAndCreateSrcIPV4AddrChunk(idx int, cond *Condition) (IChunk, error)
- func CheckAndCreateSrcIPV6AddrChunk(idx int, cond *Condition) (IChunk, error)
- type IPProtoCell
- type IPProtocolIPV4Chunk
- type IPProtocolIPV6Chunk
- type IPProtocolIPv6FragChunk
- type IPV4AddrChunk
- type IPV4AddrValueCell
- type IPV6AddrChunk
- type IPV6AddrValueCell
- type LoadAbsoluteCell
- type SrcIPV4AddrChunk
- type SrcIPV6AddrChunk
- type SrcIPV6AddrValueCell
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildRawInstructions ¶
func BuildRawInstructions(cond Condition) (retList []bpf.RawInstruction, retErr error)
Types ¶
type BaseCell ¶
type BaseCell struct {
// contains filtered or unexported fields
}
func (*BaseCell) GetNextCell ¶
func (*BaseCell) GetSkipRetConstantIndex ¶
func (*BaseCell) IsTailCell ¶
func (*BaseCell) SetNextCell ¶
type BaseChunk ¶
type BaseChunk struct {
// contains filtered or unexported fields
}
func (*BaseChunk) BuildInstructions ¶
func (t *BaseChunk) BuildInstructions(reject bool, instructions *[]bpf.Instruction) error
func (*BaseChunk) GetCellLinkLen ¶
func (*BaseChunk) GetFirstCellIndex ¶
func (*BaseChunk) GetInstructionsNum ¶
func (*BaseChunk) GetNextChunk ¶
func (*BaseChunk) GetPreviousChunk ¶
func (*BaseChunk) SetNextChunk ¶
func (*BaseChunk) SetPreviousChunk ¶
type CellLink ¶
type CellLink struct {
// contains filtered or unexported fields
}
func NewCellLink ¶
func NewCellLink() *CellLink
type DstIPV4AddrChunk ¶
type DstIPV4AddrChunk struct {
IPV4AddrChunk
}
func NewDstIPV4Chunk ¶
func NewDstIPV4Chunk(index int) *DstIPV4AddrChunk
type DstIPV6AddrChunk ¶
type DstIPV6AddrChunk struct {
IPV6AddrChunk
}
func NewDstIPV6AddrChunk ¶
func NewDstIPV6AddrChunk(index int) *DstIPV6AddrChunk
type DstIPV6AddrValueCell ¶
type DstIPV6AddrValueCell struct {
IPV6AddrValueCell
}
type EthTypeCell ¶
type EthTypeCell struct {
BaseCell
// contains filtered or unexported fields
}
func (*EthTypeCell) BuildInstructions ¶
func (t *EthTypeCell) BuildInstructions(reject bool, chunk IChunk, instructions *[]bpf.Instruction, retAllowIndex int) (retErr error)
type EthTypeIPV4Cell ¶
type EthTypeIPV4Cell struct {
EthTypeCell
}
type EthTypeIPV6Cell ¶
type EthTypeIPV6Cell struct {
EthTypeCell
}
type EthernetLayerChunk ¶
type EthernetLayerChunk struct {
BaseChunk
}
func NewEthernetLayerChunk ¶
func NewEthernetLayerChunk() *EthernetLayerChunk
type ICell ¶
type ICell interface {
GetIndex() int
IsTailCell() bool
GetNextCell() ICell
SetNextCell(cell ICell)
BuildInstructions(reject bool, chunk IChunk, instructions *[]bpf.Instruction, retAllowIndex int) error
GetSkipRetConstantIndex(retAllowIndex int) (skipToAllowNum, skipToRejectNum uint8)
}
func NewEthTypeIPV4Cell ¶
func NewEthTypeIPV6Cell ¶
func NewIPProtoCell ¶
func NewIPProtoCell(index int, proto layers.IPProtocol) (ICell, error)
func NewIPProtoIPV6FragCell ¶
func NewIPProtoIPV6FragCell(index int, proto layers.IPProtocol) ICell
func NewIPProtoTCPCell ¶
func NewIPProtoTCPCell(index int, proto layers.IPProtocol) ICell
func NewIPProtoUDPCell ¶
func NewIPProtoUDPCell(index int, proto layers.IPProtocol) ICell
type IChunk ¶
type IChunk interface {
GetFirstCellIndex() int
GetCellLinkLen() int
GetPreviousChunk() IChunk
GetNextChunk() IChunk
SetNextChunk(chunk IChunk)
SetPreviousChunk(chunk IChunk)
GetInstructionsNum() int
// contains filtered or unexported methods
}
type IPProtoCell ¶
type IPProtoCell struct {
BaseCell
// contains filtered or unexported fields
}
func (*IPProtoCell) BuildInstructions ¶
func (t *IPProtoCell) BuildInstructions(reject bool, chunk IChunk, instructions *[]bpf.Instruction, retAllowIndex int) (retErr error)
type IPProtocolIPV4Chunk ¶
type IPProtocolIPV4Chunk struct {
BaseChunk
}
func NewIPProtocolIPV4Chunk ¶
func NewIPProtocolIPV4Chunk(index int) *IPProtocolIPV4Chunk
type IPProtocolIPV6Chunk ¶
type IPProtocolIPV6Chunk struct {
BaseChunk
}
func NewIPProtocolIPV6Chunk ¶
func NewIPProtocolIPV6Chunk(index int) *IPProtocolIPV6Chunk
type IPProtocolIPv6FragChunk ¶
type IPProtocolIPv6FragChunk struct {
BaseChunk
}
func NewIPProtocolIPv6FragChunk ¶
func NewIPProtocolIPv6FragChunk(index int) *IPProtocolIPv6FragChunk
type IPV4AddrChunk ¶
type IPV4AddrChunk struct {
BaseChunk
// contains filtered or unexported fields
}
type IPV4AddrValueCell ¶
func (*IPV4AddrValueCell) BuildInstructions ¶
func (t *IPV4AddrValueCell) BuildInstructions(reject bool, chunk IChunk, instructions *[]bpf.Instruction, retAllowIndex int) (retErr error)
type IPV6AddrChunk ¶
type IPV6AddrChunk struct {
BaseChunk
// contains filtered or unexported fields
}
type IPV6AddrValueCell ¶
type IPV6AddrValueCell struct {
BaseCell
// contains filtered or unexported fields
}
func (*IPV6AddrValueCell) BuildInstructions ¶
func (t *IPV6AddrValueCell) BuildInstructions(reject bool, chunk IChunk, instructions *[]bpf.Instruction, retAllowIndex int) (retErr error)
type LoadAbsoluteCell ¶
type LoadAbsoluteCell struct {
BaseCell
// contains filtered or unexported fields
}
func (*LoadAbsoluteCell) BuildInstructions ¶
func (t *LoadAbsoluteCell) BuildInstructions(reject bool, chunk IChunk, instructions *[]bpf.Instruction, retAllowIndex int) (retErr error)
type SrcIPV4AddrChunk ¶
type SrcIPV4AddrChunk struct {
IPV4AddrChunk
}
func NewSrcIPV4Chunk ¶
func NewSrcIPV4Chunk(index int) *SrcIPV4AddrChunk
type SrcIPV6AddrChunk ¶
type SrcIPV6AddrChunk struct {
IPV6AddrChunk
}
func NewSrcIPV6AddrChunk ¶
func NewSrcIPV6AddrChunk(index int) *SrcIPV6AddrChunk
type SrcIPV6AddrValueCell ¶
type SrcIPV6AddrValueCell struct {
IPV6AddrValueCell
}
Source Files
¶
- assembler.go
- cell.go
- chunk.go
- condition.go
- ethernetlayer_cell.go
- ethernetlayer_chunk.go
- loadabsolute_cell.go
- networklayer_ipproto_cell.go
- networklayer_ipproto_ipv4_chunk.go
- networklayer_ipproto_ipv6_chunk.go
- networklayer_ipv4addr_cell.go
- networklayer_ipv4addr_chunk.go
- networklayer_ipv6addr_cell.go
- networklayer_ipv6addr_chunk.go
- networklayer_ipv6fragproto_chunk.go
- wrap_instruction.go
Click to show internal directories.
Click to hide internal directories.