dnsjit.filter.timing(3)

πŸ“¦
version 1.5.1 Β· 5 versions
, in epel 10, epel 9, fedora 43, fedora 44, ubuntu resolute, ubuntu stonking

✨ dnsjit.filter.timing ✨

okay bestie, so this is a page from the Library Functions Manual β€” it's dnsjit.filter.timing, and it's literally the little timing bouncer for your packet pipeline πŸ’…


πŸ’– NAME πŸ’–

dnsjit.filter.timing β€” a filter that passes objects along to the next receiver based on the timing between packets. like, it's the vibe-checker for when packets get to move. πŸ•βœ¨


πŸŽ€ SYNOPSIS πŸŽ€

local filter = require("dnsjit.filter.timing").new()
...
filter:receiver(...)

πŸ¦‹ DESCRIPTION πŸ¦‹

So the whole point of this filter is to manipulate processing β€” either so it simulates the actual timing of when packets arrived, or so it just delays processing on purpose. it's giving "time travel but make it a filter" fr fr 😭

🌸 Functions 🌸

  • Timing.new() β€” creates a brand new Timing filter. fresh out the box, no cap. ✨
  • Timing:log() β€” hands you back the Log object so you can control logging for this instance or module. go off, log queen πŸ‘‘
  • Timing:keep() β€” sets the timing mode to keep the timing between packets. i.e. leave it exactly as it is, we're not touching a thing πŸ’…
  • Timing:increase(ns) β€” sets the timing mode to increase the timing between packets by the given number of nanoseconds. stretch that gap out bestie 🫢
  • Timing:reduce(ns) β€” sets the timing mode to reduce the timing between packets by the given number of nanoseconds. squeeze it in, we're speeding up ⚑
  • Timing:multiply(factor) β€” sets the timing mode to multiply the timing between packets by the given factor. and the factor is a float/double, so decimals are welcome here πŸ“
  • Timing:fixed(ns) β€” sets the timing mode to a fixed number of nanoseconds between packets. every packet gets the same little pause. consistent, iconic, periodt.
  • Timing:realtime(drift, batch_size) β€” sets the timing mode to simulate the timing of packets in realtime. Packets are processed in batches of given size (batch_size, default 128) before adjusting time. It aborts if real time drifts ahead more than the given number of seconds (drift, default 1.0s). so like, it's got a limit and it WILL pull the plug, no cap πŸ’€
  • Timing:receive() β€” returns the C functions and context for receiving objects. lowkey the plumbing ✨
  • Timing:receiver(o) β€” sets the receiver to pass objects to. this is your bestie downstream, o 🫢
  • Timing:produce() β€” returns the C functions and context for producing objects. more plumbing, but make it cute πŸŽ€
  • Timing:producer(o) β€” sets the producer to get objects from. that's where the objects come from, o πŸ’œ

πŸ‘‘ AUTHORS and CONTRIBUTORS πŸ‘‘

The absolute legends behind this:

  • Jerry LundstrΓΆm (DNS-OARC)
  • TomΓ‘Ε‘ KΕ™Γ­ΕΎek (CZ.NIC)
  • Petr Ε paček (ISC)

Maintained by DNS-OARC

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

🌈 BUGS 🌈

found a bug? want a feature? don't be shy, spill:

https://codeberg.org/DNS-OARC/dnsjit/issues

got a question or need a hand? hit up:

admin@dns-oarc.net

and that's the whole page bestie, you ate it πŸ’…βœ¨ this was dnsjit version 1.5.1, page dnsjit.filter.timing(3) β€” go forth and time those packets, mwah πŸŽ€πŸ¦‹πŸ’–