fqconfig

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2017 License: GPL-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultQueueSeperation specifies if we should use separate queues for packet types
	DefaultQueueSeperation = true
	// DefaultNumberOfQueues  is the default number of queues used in NFQUEUE
	DefaultNumberOfQueues = 4
	// DefaultQueueStart represents the queue number to start
	DefaultQueueStart = 0
	// DefaultQueueSize is the size of the queues
	DefaultQueueSize = 500
	// DefaultMarkValue is the default Mark for packets in the raw chain
	DefaultMarkValue = 0x1111
)

Default parameters for the NFQUEUE configuration. Parameters can be changed after an isolator has been created and before its started. Change in parameters after the isolator is started has no effect

Variables

This section is empty.

Functions

This section is empty.

Types

type FilterQueue

type FilterQueue struct {
	// QueueSeparation specifies if we should use separate queues per packet type
	QueueSeparation bool
	// MarkValue is the default mark to set in packets in the RAW chain
	MarkValue int
	// NetworkQueue is the queue number of the base queue for network packets
	NetworkQueue uint16
	// NumberOfApplicationQueues is the number of queues that must be allocated
	NumberOfApplicationQueues uint16
	// numberOfNetworkQueues is the number of network queues allocated
	NumberOfNetworkQueues uint16
	// ApplicationQueue is the queue number of the first application queue
	ApplicationQueue uint16
	// ApplicationQueueSize is the size of the application queue
	ApplicationQueueSize uint32
	// NetworkQueueSize is the size of the network queue
	NetworkQueueSize uint32
	// NetworkQueuesSynStr is the queue string for network syn
	NetworkQueuesSynStr string
	// NetworkQueuesAckStr is the queue string for network ack
	NetworkQueuesAckStr string
	// NetworkQueuesSynAckStr is the queue string for network synack packets
	NetworkQueuesSynAckStr string
	// NetworkQueuesSvcStr is the queue string for services
	NetworkQueuesSvcStr string
	// ApplicationQueuesSynStr is the queue string for application syn packets
	ApplicationQueuesSynStr string
	// ApplicationQueuesAckStr is the queue string for application ack packets
	ApplicationQueuesAckStr string
	// ApplicationQueuesSvcStr is the queue string for application service packets
	ApplicationQueuesSvcStr string
	// ApplicationQueuesSynAckStr is the queue string for application synack packets
	ApplicationQueuesSynAckStr string
}

FilterQueue captures all the configuration parameters of the NFQUEUEs

func NewFilterQueue

func NewFilterQueue(queueSeparation bool, MarkValue int, QueueStart, NumberOfNetworkQueues, NumberOfApplicationQueues uint16, NetworkQueueSize, ApplicationQueueSize uint32) *FilterQueue

NewFilterQueue returns an instance of FilterQueue

func NewFilterQueueWithDefaults

func NewFilterQueueWithDefaults() *FilterQueue

NewFilterQueueWithDefaults return a default filter queue config

func (*FilterQueue) GetApplicationQueueAckStr

func (f *FilterQueue) GetApplicationQueueAckStr() string

GetApplicationQueueAckStr returns a queue id string to be used by iptables action

func (*FilterQueue) GetApplicationQueueSize

func (f *FilterQueue) GetApplicationQueueSize() uint32

GetApplicationQueueSize returns size of application queues to be used by iptables action

func (*FilterQueue) GetApplicationQueueStart

func (f *FilterQueue) GetApplicationQueueStart() uint16

GetApplicationQueueStart returns start of application queues to be used by iptables action

func (*FilterQueue) GetApplicationQueueSvcStr

func (f *FilterQueue) GetApplicationQueueSvcStr() string

GetApplicationQueueSvcStr returns a queue id string to be used by iptables action

func (*FilterQueue) GetApplicationQueueSynAckStr

func (f *FilterQueue) GetApplicationQueueSynAckStr() string

GetApplicationQueueSynAckStr returns a queue id string to be used by iptables action

func (*FilterQueue) GetApplicationQueueSynStr

func (f *FilterQueue) GetApplicationQueueSynStr() string

GetApplicationQueueSynStr returns a queue id string to be used by iptables action

func (*FilterQueue) GetMarkValue

func (f *FilterQueue) GetMarkValue() int

GetMarkValue returns a mark value to be used by iptables action

func (*FilterQueue) GetNetworkQueueAckStr

func (f *FilterQueue) GetNetworkQueueAckStr() string

GetNetworkQueueAckStr returns a queue id string to be used by iptables action

func (*FilterQueue) GetNetworkQueueSize

func (f *FilterQueue) GetNetworkQueueSize() uint32

GetNetworkQueueSize returns size of network queues to be used by iptables action

func (*FilterQueue) GetNetworkQueueStart

func (f *FilterQueue) GetNetworkQueueStart() uint16

GetNetworkQueueStart returns start of network queues to be used by iptables action

func (*FilterQueue) GetNetworkQueueSvcStr

func (f *FilterQueue) GetNetworkQueueSvcStr() string

GetNetworkQueueSvcStr returns a queue id string to be used by iptables action

func (*FilterQueue) GetNetworkQueueSynAckStr

func (f *FilterQueue) GetNetworkQueueSynAckStr() string

GetNetworkQueueSynAckStr returns a queue id string to be used by iptables action

func (*FilterQueue) GetNetworkQueueSynStr

func (f *FilterQueue) GetNetworkQueueSynStr() string

GetNetworkQueueSynStr returns a queue id string to be used by iptables action

func (*FilterQueue) GetNumApplicationQueues

func (f *FilterQueue) GetNumApplicationQueues() uint16

GetNumApplicationQueues returns number of application queues to be used by iptables action

func (*FilterQueue) GetNumNetworkQueues

func (f *FilterQueue) GetNumNetworkQueues() uint16

GetNumNetworkQueues returns number of network queues to be used by iptables action

Jump to

Keyboard shortcuts

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