Documentation ¶
Overview ¶
Package filter provides the implementation of packet filter.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddOutgoingService ¶
Types ¶
type Filter ¶
type Filter struct {
// contains filtered or unexported fields
}
func (*Filter) RemovedNIC ¶
type TCPDestinationPortMatcher ¶
type TCPDestinationPortMatcher struct {
// contains filtered or unexported fields
}
TCPDestinationPortMatcher matches TCP packets and ports.
func NewTCPDestinationPortMatcher ¶
func NewTCPDestinationPortMatcher(start, end uint16) *TCPDestinationPortMatcher
func (*TCPDestinationPortMatcher) Match ¶
func (m *TCPDestinationPortMatcher) Match(_ stack.Hook, pkt *stack.PacketBuffer, _, _ string) (matches bool, hotdrop bool)
Match implements stack.Matcher.
func (*TCPDestinationPortMatcher) Name ¶
func (*TCPDestinationPortMatcher) Name() string
Name implements stack.Matcher.
type TCPSourcePortMatcher ¶
type TCPSourcePortMatcher struct {
// contains filtered or unexported fields
}
TCPSourcePortMatcher matches TCP packets and ports.
func NewTCPSourcePortMatcher ¶
func NewTCPSourcePortMatcher(start, end uint16) *TCPSourcePortMatcher
func (*TCPSourcePortMatcher) Match ¶
func (m *TCPSourcePortMatcher) Match(_ stack.Hook, pkt *stack.PacketBuffer, _, _ string) (matches bool, hotdrop bool)
Match implements stack.Matcher.
func (*TCPSourcePortMatcher) Name ¶
func (*TCPSourcePortMatcher) Name() string
Name implements stack.Matcher.
type UDPDestinationPortMatcher ¶
type UDPDestinationPortMatcher struct {
// contains filtered or unexported fields
}
UDPDestinationPortMatcher matches UDP packets and ports.
func NewUDPDestinationPortMatcher ¶
func NewUDPDestinationPortMatcher(start, end uint16) *UDPDestinationPortMatcher
func (*UDPDestinationPortMatcher) Match ¶
func (m *UDPDestinationPortMatcher) Match(_ stack.Hook, pkt *stack.PacketBuffer, _, _ string) (matches bool, hotdrop bool)
Match implements stack.Matcher.
func (*UDPDestinationPortMatcher) Name ¶
func (*UDPDestinationPortMatcher) Name() string
Name implements stack.Matcher.
type UDPSourcePortMatcher ¶
type UDPSourcePortMatcher struct {
// contains filtered or unexported fields
}
UDPSourcePortMatcher matches UDP packets and ports.
func NewUDPSourcePortMatcher ¶
func NewUDPSourcePortMatcher(start, end uint16) *UDPSourcePortMatcher
func (*UDPSourcePortMatcher) Match ¶
func (m *UDPSourcePortMatcher) Match(_ stack.Hook, pkt *stack.PacketBuffer, _, _ string) (matches bool, hotdrop bool)
Match implements stack.Matcher.
func (*UDPSourcePortMatcher) Name ¶
func (*UDPSourcePortMatcher) Name() string
Name implements stack.Matcher.
Click to show internal directories.
Click to hide internal directories.