summaryrefslogtreecommitdiff
path: root/src/callback.c
AgeCommit message (Collapse)Author
2010-09-08doxygen documentationPablo Neira Ayuso
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
2010-05-07change errno values for mnl_cb_run[2]()Pablo Neira Ayuso
This patch changes the errno value of mnl_cb_run[2]() in the following two cases: * Invalid expected portID: ESRCH. * Invalid sequence number: EPROTO. I didn't find any better generic errno value. EINVAL is reserved for malformed messages, to avoid confusions. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
2010-04-22fix warning in mnl_cb_run2()Pablo Neira Ayuso
callback.c: In function ‘mnl_cb_run2’: callback.c:106: warning: pointer targets in passing argument 2 of ‘mnl_nlmsg_next’ differ in signednes Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
2010-04-22use size_t to indicate the buffer size in mnl_cb_run*()Pablo Neira Ayuso
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
2010-04-05more consistency name issues: rename get_data*() to get_payload*()Pablo Neira Ayuso
This includes renaming get_tail() to get_payload_tail() Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
2010-04-04check source of the netlink message and fix sequence tracking logicPablo Neira Ayuso
This patch changes the callback handlers to include netlink portID checking. Thus, we avoid that any malicious process can spoof messages. If portid, sequence number of the message is != 0, we check if the message is what we expect. This allows to use the same netlink channel for dumps (portid, seq != 0) and event-based notifications (portid, seq == 0). Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
2010-03-28partially revert previous commitPablo Neira Ayuso
the use of unsigned int in the number of bytes affects other message handling helper function, hold on with this.
2010-03-28use `unsigned int' for number of bytes and array size in callback APIPablo Neira Ayuso
2010-03-26add COPYING filePablo Neira Ayuso
This library is distributed under GPLv2+. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
2010-03-26fix mnl_cb_run() and mnl_cb_run2() return value logicPablo Neira Ayuso
2010-03-22finish API documentationPablo Neira Ayuso
This patch may contain errors but we can review them and fix them later, better to have it in the tree (to allow others to contribute) to keep it in my local tree.
2010-03-19initial libmnl importPablo Neira Ayuso