How to add set element with libnftnl?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I have some C code that uses libmnl to add entries to old style IP sets.
I am trying to port this code to nftables, using libnftnl.

I haven't found any documentation other than the examples, and
unfortunately nft-set-elem-add.c seems to completely ignore the actual
type of the data that it's putting into the set.

Can anyone help me figure out how do use libnftnl to perform the
equivalent of the following?

  * nft add element TYPE TABLE SET_NAME '{ IPV4_ADDRESS }'
  * nft add element TYPE TABLE SET_NAME '{ IPV4_ADDRESS timeout TIME }'
  * nft add element TYPE TABLE SET_NAME '{ IPV6_ADDRESS }'
  * nft add element TYPE TABLE SET_NAME '{ IPV6_ADDRESS timeout TIME }'

TIA!

--
========================================================================
Google                                      Where SkyNet meets Idiocracy
========================================================================




[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux