summaryrefslogtreecommitdiff
path: root/examples/netfilter/nf-log.c
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2012-08-16 13:45:22 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2012-08-16 14:19:57 +0200
commit81f13e18e455615ca7e81a0e48ebe83f1407eb9e (patch)
treed8e8b6f7dd5a54f030cf8a957ca64b7043a2d2af /examples/netfilter/nf-log.c
parent5d8772acb878b16b89f6c8c0787603a24fd07088 (diff)
downloadlibmnl-81f13e18e455615ca7e81a0e48ebe83f1407eb9e.tar.gz
examples: update to use the new callback APInew-api
This patch updates all examples to use the new callback API. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'examples/netfilter/nf-log.c')
-rw-r--r--examples/netfilter/nf-log.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/examples/netfilter/nf-log.c b/examples/netfilter/nf-log.c
index a862912..2bb2add 100644
--- a/examples/netfilter/nf-log.c
+++ b/examples/netfilter/nf-log.c
@@ -151,7 +151,7 @@ int main(int argc, char *argv[])
char buf[MNL_SOCKET_BUFFER_SIZE];
struct nlmsghdr *nlh;
int ret;
- unsigned int portid, qnum;
+ unsigned int qnum;
if (argc != 2) {
printf("Usage: %s [queue_num]\n", argv[0]);
@@ -169,7 +169,6 @@ int main(int argc, char *argv[])
perror("mnl_socket_bind");
exit(EXIT_FAILURE);
}
- portid = mnl_socket_get_portid(nl);
nlh = nflog_build_cfg_pf_request(buf, NFULNL_CFG_CMD_PF_UNBIND);
@@ -205,9 +204,9 @@ int main(int argc, char *argv[])
exit(EXIT_FAILURE);
}
while (ret > 0) {
- ret = mnl_cb_run(buf, ret, 0, portid, log_cb, NULL);
+ ret = mnl_callback_run(buf, ret, 0, 0, log_cb, NULL, 0);
if (ret < 0){
- perror("mnl_cb_run");
+ perror("mnl_callback_run");
exit(EXIT_FAILURE);
}