std library
The std library provides utility function for scripts. It can be imported
into a script as follows:
local std = require("pktizr.std")
The provided functions can then be used by prepending std. to the name (e.g.
std.print(...)).
Functions
-
get_addr()
Returns the local IP address of the network interface used to send and
received packets.
-
get_time()
Returns the current date and time in seconds.
-
print(fmt, v1, v2, ...)
Prints a string containing the values v1, v2, etc. stringified according
to the format string fmt. The string is generated using the string.format()
standard function. See the Lua reference for more information.