Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Filters []*Filter `json:"filters"`
}
type Filter ¶
type Filter struct {
MinLen *int `json:"min_len"` // Minimum frame length (ethernet header, IP header, L4 header, and data)
MaxLen *int `json:"max_len"` // Maximum frame length (ethernet header, IP header, L4 header, and data)
PacketsPerSecond *int `json:"pps"` // Packets per second that a source IP can send before matching
BytesPerSecond *int `json:"bps"` // Bytes per second that a source IP can send before matching
BlockTime *int `json:"blocktime"` // Time in seconds to block the source IP if the rule matches and the action is block (0). Default value is 1.
// IP options
TypeOfService *int `json:"tos"` // IP TOS field
SrcIP *string `json:"srcip"` // Source IPv4 address
DstIP *string `json:"dstip"` // Destination IPv4 address
SrcIP6 *string `json:"srcip6"` // Source IPv6 address
DstIP6 *string `json:"dstip6"` // Destination IPv6 address
MinTTL *int `json:"min_ttl"` // Minimum TTL that the packet must match
MaxTTL *int `json:"max_ttl"` // Maximum TTL that the packet must match
// TCP Options
TCPEnabled *bool `json:"tcp_enabled"` // Should TCP options be checked?
TCPSrcPort *int `json:"tcp_sport"` // Source TCP port
TCPDstPort *int `json:"tcp_dport"` // Destination TCP port
TCPFlagURG *bool `json:"tcp_urg"` // TCP URG flag
TCPFlagACK *bool `json:"tcp_ack"` // TCP ACK flag
TCPFlagRST *bool `json:"tcp_rst"` // TCP RST flag
TCPFlagPSH *bool `json:"tcp_psh"` // TCP PSH flag
TCPFlagSYN *bool `json:"tcp_syn"` // TCP SYN flag
TCPFlagFIN *bool `json:"tcp_fin"` // TCP FIN flag
// UDP Options
UDPEnabled *bool `json:"udp_enabled"` // Should UDP options be checked?
UDPSrcPort *int `json:"udp_sport"` // Source UDP port
UDPDstPort *int `json:"udp_dport"` // Destination UDP port
// ICMP Options
ICMPEnabled *bool `json:"icmp_enabled"` // Should ICMP options be checked?
ICMPCode *int `json:"icmp_code"` // ICMP code
ICMPType *int `json:"icmp_type"` // ICMP type
}
Filter represents a xdpfw filter policy
Click to show internal directories.
Click to hide internal directories.