Open wb14123 opened 3 weeks ago
I would say... let's promote this from a reify to a full (defrecord IPTables [dev ...] ...)
. It'll be more friendly for printing. We can't get away from the static (def iptables)
without breaking compatibility, but it might make sense to add (defn iptables* [option-map] ...)
as an underlying constructor--that'll set the groundwork for breaking compat in a later release.
Or, if you just need a one-off, you can reify your own implementation of net
in your test. I'm for parameterizing the device though! I haven't needed it so far but it makes total sense.
In
net/iptables
, it uses the network deviceeth0
for network operations. But the network device may be different on some machines. So create a function to accept a network device parameter.