const DefaultExternalIPTimeout = "500ms"
DefaultExternalIPTimeout is the default used for the cache for External IPTimeout.
GetUDPRawSocket is placeholder for createSocket function. It is useful to mock tcp unit tests.
Accessor is an interface for datapth to access contexts/rules/tokens
ContextProcessor is an interface to provide context checks
Datapath is the structure holding all information about a connection filter
func New( mutualAuth bool, filterQueue *fqconfig.FilterQueue, collector collector.EventCollector, serverID string, validity time.Duration, service packetprocessor.PacketProcessor, secrets secrets.Secrets, mode constants.ModeType, procMountPoint string, ExternalIPCacheTimeout time.Duration, packetLogs bool, tokenaccessor tokenaccessor.TokenAccessor, puFromContextID cache.DataStore, targetNetworks string, ) *Datapath
New will create a new data path structure. It instantiates the data stores needed to track sessions. The data path is started with a different call. Only required parameters must be provided. Rest a pre-populated with defaults.
func NewWithDefaults( serverID string, collector collector.EventCollector, service packetprocessor.PacketProcessor, secrets secrets.Secrets, mode constants.ModeType, procMountPoint string, targetNetworks string, ) *Datapath
NewWithDefaults create a new data path with most things used by default
CreateUDPAuthMarker creates a UDP auth marker.
Enforce implements the Enforce interface method and configures the data path for a new PU
GetFilterQueue returns the filter queues used by the data path
ProcessApplicationUDPPacket processes packets arriving from an application and are destined to the network
ProcessNetworkUDPPacket processes packets arriving from network and are destined to the application.
Run starts the application and network interceptors
SetTargetNetworks sets new target networks used by datapath
Unenforce removes the configuration for the given PU
UpdateSecrets updates the secrets used for signing communication between trireme instances
RuleProcessor is an interface to access rules