eBPF functions and objects

These are all the functions, objects and methods related to the eBPF Socket Filtering.

newBPFFilter(maxV4, maxV6, maxQNames) → BPFFilter

Return a new eBPF socket filter with a maximum of maxV4 IPv4, maxV6 IPv6 and maxQNames qname entries in the block table.

  • maxV4 (int) – Maximum number of IPv4 entries in this filter
  • maxV6 (int) – Maximum number of IPv6 entries in this filter
  • maxQNames (int) – Maximum number of QName entries in this filter

When used at configuration time, the corresponding BPFFilter will be attached to every bind.

Parameters:filter (BPFFilter) – The filter ro attach
class BPFFilter

Represents an eBPF filter

classmethod BPFFilter:attachToAllBinds()

Attach this filter to every bind already defined. This is the run-time equivalent of setDefaultBPFFilter()

classmethod BPFFilter:block(address)

Block this address

Parameters:address (ComboAddress) – The address to block
classmethod BPFFilter:blockQName(name[, qtype=255])

Block queries for this exact qname. An optional qtype can be used, defaults to 255.

  • name (DNSName) – The name to block
  • qtype (int) – QType to block
classmethod BPFFilter:getStats()

Print the block tables.

classmethod BPFFilter:unblock(address)

Unblock this address.

Parameters:address (ComboAddress) – The address to unblock
classmethod BPFFilter:unblockQName(name[, qtype=255])

Remove this qname from the block list.

  • name (DNSName) – the name to unblock
  • qtype (int) – The qtype to unblock