DOKK / manpages / debian 12 / dnsjit / dnsjit.filter.ipsplit.3.en
dnsjit.filter.ipsplit(3) Library Functions Manual dnsjit.filter.ipsplit(3)

dnsjit.filter.ipsplit - Pass objects to receivers based on the source IP address


local ipsplit = require("dnsjit.filter.ipsplit").new()
ipsplit.receiver(...)
ipsplit.receiver(...)
ipsplit.receiver(...)
input.receiver(ipsplit)

The filter passes objects to other receivers. Object chains without IPv4/IPv6 packet are discarded. Packets which have the same source IP address are considered to be sent from the same "client". When the first packet from a client is processed, the client is assigned to a receiver. All objects from this client will be passed to the assigned receiver. The filter can also write a receiver-specific client ID (starting from 1) to the source or destination IP in the packet.

Create a new IpSplit filter.
Return the Log object to control logging of this instance or module.
Return the C functions and context for receiving objects.
Set the receiver to pass objects to, this can be called multiple times to set additional receivers. The weight parameter can be used to adjust distribution of clients among receivers. Weight must be a positive integer (default is 1).
Number of input packets discarded due to various reasons. To investigate causes, run with increased logging level.
Set the client assignment mode to sequential. Assigns `weight` clients to a receiver before continuing with the next receiver (default mode).
Set the client assignment mode to random. Each client is randomly assigned to a receiver (weight affects the probability). The client assignment is stable (and portable) for given seed.
Don't overwrite source or destination IP (default).
Write receiver-specific client ID to bytes 0-3 of source IP (host byte order).
Write receiver-specific client ID to bytes 0-3 of destination IP (host byte order).

Jerry Lundström (DNS-OARC), Tomáš Křížek (CZ.NIC), Petr Špaček (ISC)

Maintained by DNS-OARC

https://www.dns-oarc.net/

For issues and feature requests please use:

https://github.com/DNS-OARC/dnsjit/issues

For question and help please use:

admin@dns-oarc.net
1.2.3 dnsjit