diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2012-08-16 13:06:22 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2012-08-16 14:19:51 +0200 |
commit | 5d8772acb878b16b89f6c8c0787603a24fd07088 (patch) | |
tree | a3e076a29e16210ab2364cf05e66b67165887482 /examples/netfilter/nfct-event.c | |
parent | 496cb13e3a04bdc18739b7e60d066dbe6f730ca4 (diff) | |
download | libmnl-5d8772acb878b16b89f6c8c0787603a24fd07088.tar.gz |
src: add new callback infrastructure and deprecate old one
This patch deprecates the following functions:
- mnl_cb_run
- mnl_cb_run2
since they have been replaced by:
- mnl_callback_run
- mnl_callback_run2
The new name is just a trick to keep the old around for a while, to avoid the
breakage of existing applications while slightly changing the semantics of the
callback runqueue functions.
The main change regarding the old mnl_cb_run functions is the new flags
parameter:
int mnl_callback_run(const void *buf, size_t numbytes, unsigned int seq,
unsigned int portid, mnl_cb_t cb_data, void *data,
unsigned int flags);
This parameters can any combination of MNL_CB_F_ANY_PORTID and
MNL_CB_F_ANY_SEQ. These allows you to explicitly disable portID validation
and sequence tracking.
In the old runqueue API, the way to disable these validations consists of
passing zero to the portid and seq parameters. This is ambiguous though,
since portID number 0 is reserved for message originating from the kernel
(usually asynchronous event notifications). Thus, allowing the acceptance
of any message directed to the client application.
The idea is to leave the old API for a while tagged as deprecated since I
want to avoid breaking existing client applications.
This patch also deprecates the following functions:
- mnl_nlmsg_seq_ok
- mnl_nlmsg_portid_ok
They are fairly small and, as discussed, their semantics is ambiguous.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'examples/netfilter/nfct-event.c')
0 files changed, 0 insertions, 0 deletions