path: root/include/libnftnl/gen.h
Commit message (Collapse)AuthorAgeFilesLines
* Deprecate untyped data settersPhil Sutter2019-10-311-1/+1
| | | | | | | | | These functions make assumptions on size of passed data pointer and therefore tend to hide programming mistakes. Instead either one of the type-specific setters or the generic *_set_data() setter should be used. Signed-off-by: Phil Sutter <> Acked-by: Pablo Neira Ayuso <>
* include: Remove redundant declaration of nftnl_gen_nlmsg_parse()Phil Sutter2019-05-141-1/+0
| | | | | | | | | The duplicated declaration was there since the functions initial introduction as 'nft_gen_nlmsg_parse()'. Fixes: 2e66fb09d6936 ("src: add ruleset generation class") Signed-off-by: Phil Sutter <> Signed-off-by: Pablo Neira Ayuso <>
* src: get rid of aliases and compatPablo Neira Ayuso2016-12-201-36/+0
| | | | | | | | | | | This machinery was introduced to avoid sudden compilation breakage of old nftables releases. With the upcoming release of 0.7 (and 0.6 which is now 6 months old) this is not required anymore. Moreover, users gain nothing from older releases since they are half-boiled and buggy. So let's get rid of aliases now. Bump LIBVERSION and update map file. Signed-off-by: Pablo Neira Ayuso <>
* src: return value on setters that internally allocate memoryPablo Neira Ayuso2016-06-151-3/+3
| | | | | | | | So the client can bail out of memory allocation errors. Or in case of daemon, make sure things are left in consistent state before bailing out. Signed-off-by: Pablo Neira Ayuso <>
* libnftnl: constify object arguments to various functionsPatrick McHardy2016-05-091-7/+7
| | | | | | | | | flow table support needs constant object arguments to printing functions to avoid ugly casts. While at it, also constify object arguments to message construction, destructor and a few helper functions. Signed-off-by: Patrick McHardy <> Signed-off-by: Pablo Neira Ayuso <>
* src: get rid of _attr_ infix in new nftnl_ definitionsPablo Neira Ayuso2015-09-071-8/+8
| | | | | | | The function names are already large, trim off the _ATTR_ infix in the attribute definitions. Signed-off-by: Pablo Neira Ayuso <>
* src: add compat header file definitionsPablo Neira Ayuso2015-09-071-0/+36
| | | | | | | | | | | This patch restores the original nft_* definitions from the header files to avoid sudden compilation breakage of the existing clients of this library. Then, moving forward the idea is to deprecate the old nft_* symbols anytime soon using __attribute__((deprecated)) from the header files to warn our users that they need to update their code. Signed-off-by: Pablo Neira Ayuso <>
* src: rename existing functions to use the nftnl_ prefixPablo Neira Ayuso2015-09-071-19/+19
| | | | | | | | | So we can use the nft_* prefix anytime soon for our upcoming higher level library. After this patch, the nft_* symbols become an alias of the nftnl_* symbols. Signed-off-by: Pablo Neira Ayuso <>
* src: add ruleset generation classPablo Neira Ayuso2014-09-191-0/+51
The generation object currently only contains the uint32_t that indicates the generation ID. I could have just add the API to return the uint32_t ID instead, but I think this API is easier to extend without adding new APIs. We can probably include meaningful statistics in the generation message in the future without much hassle. This patch also extends examples/nft-events.c. Signed-off-by: Pablo Neira Ayuso <>