diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2012-08-16 13:45:22 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2012-08-16 14:19:57 +0200 |
commit | 81f13e18e455615ca7e81a0e48ebe83f1407eb9e (patch) | |
tree | d8e8b6f7dd5a54f030cf8a957ca64b7043a2d2af /examples/netfilter/nf-queue.c | |
parent | 5d8772acb878b16b89f6c8c0787603a24fd07088 (diff) | |
download | libmnl-new-api.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-queue.c')
-rw-r--r-- | examples/netfilter/nf-queue.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/netfilter/nf-queue.c b/examples/netfilter/nf-queue.c index c66611f..1dad6ef 100644 --- a/examples/netfilter/nf-queue.c +++ b/examples/netfilter/nf-queue.c @@ -165,7 +165,7 @@ int main(int argc, char *argv[]) char buf[MNL_SOCKET_BUFFER_SIZE]; struct nlmsghdr *nlh; int ret; - unsigned int portid, queue_num; + unsigned int queue_num; if (argc != 2) { printf("Usage: %s [queue_num]\n", argv[0]); @@ -183,7 +183,6 @@ int main(int argc, char *argv[]) perror("mnl_socket_bind"); exit(EXIT_FAILURE); } - portid = mnl_socket_get_portid(nl); nlh = nfq_build_cfg_pf_request(buf, NFQNL_CFG_CMD_PF_UNBIND); @@ -221,9 +220,10 @@ int main(int argc, char *argv[]) while (ret > 0) { uint32_t id; - ret = mnl_cb_run(buf, ret, 0, portid, queue_cb, NULL); + ret = mnl_callback_run(buf, ret, 0, 0, queue_cb, NULL, + MNL_CB_F_ANY_SEQ); if (ret < 0){ - perror("mnl_cb_run"); + perror("mnl_callback_run"); exit(EXIT_FAILURE); } |