From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ken-ichirou MATSUZAWA Subject: libmnl [PATCH 7/8] examples: fix display condition Date: Sat, 07 Dec 2013 20:30:47 +0900 Message-ID: <87eh5oaoew.wl%chamaken@gmail.com> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Cc: Pablo Neira Ayuso To: netfilter-devel@vger.kernel.org Return-path: Received: from mail-pb0-f52.google.com ([209.85.160.52]:38580 "EHLO mail-pb0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754531Ab3LGLbA (ORCPT ); Sat, 7 Dec 2013 06:31:00 -0500 Received: by mail-pb0-f52.google.com with SMTP id uo5so2570265pbc.11 for ; Sat, 07 Dec 2013 03:31:00 -0800 (PST) Sender: netfilter-devel-owner@vger.kernel.org List-ID: Signed-off-by: Ken-ichirou MATSUZAWA --- examples/netfilter/nf-queue.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/examples/netfilter/nf-queue.c b/examples/netfilter/nf-queue.c index 6b7c30e..72779f0 100644 --- a/examples/netfilter/nf-queue.c +++ b/examples/netfilter/nf-queue.c @@ -67,9 +67,10 @@ static int queue_cb(const struct nlmsghdr *nlh, void *data) if (tb[NFQA_PACKET_HDR]) { ph = mnl_attr_get_payload(tb[NFQA_PACKET_HDR]); id = ntohl(ph->packet_id); + + printf("packet received (id=%u hw=0x%04x hook=%u)\n", + id, ntohs(ph->hw_protocol), ph->hook); } - printf("packet received (id=%u hw=0x%04x hook=%u)\n", - id, ntohs(ph->hw_protocol), ph->hook); return MNL_CB_OK + id; } -- 1.8.4.rc3