summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
author/C=DE/ST=Berlin/L=Berlin/O=Netfilter Project/OU=Development/CN=laforge/emailAddress=laforge@netfilter.org </C=DE/ST=Berlin/L=Berlin/O=Netfilter Project/OU=Development/CN=laforge/emailAddress=laforge@netfilter.org>2005-11-05 10:00:43 +0000
committer/C=DE/ST=Berlin/L=Berlin/O=Netfilter Project/OU=Development/CN=laforge/emailAddress=laforge@netfilter.org </C=DE/ST=Berlin/L=Berlin/O=Netfilter Project/OU=Development/CN=laforge/emailAddress=laforge@netfilter.org>2005-11-05 10:00:43 +0000
commit61a5ea46c92ecc1533240e3fd1aa2f51b25dc81f (patch)
tree3d67b78997145c2b99965cf6efd31d0dd254ab8d
parent5093e086d86c7f7fc617fd6d5a950cc233c64c0b (diff)
use nflog_fd() instead of netlink based function
-rw-r--r--utils/nfulnl_test.c21
1 files changed, 1 insertions, 20 deletions
diff --git a/utils/nfulnl_test.c b/utils/nfulnl_test.c
index a41d7a6..69245df 100644
--- a/utils/nfulnl_test.c
+++ b/utils/nfulnl_test.c
@@ -63,7 +63,6 @@ int main(int argc, char **argv)
struct nflog_handle *h;
struct nflog_g_handle *qh;
struct nflog_g_handle *qh100;
- struct nfnl_handle *nh;
int rv, fd;
char buf[4096];
@@ -104,8 +103,7 @@ int main(int argc, char **argv)
exit(1);
}
- nh = nflog_nfnlh(h);
- fd = nfnl_fd(nh);
+ fd = nflog_fd(h);
printf("registering callback for group 0\n");
nflog_callback_register(qh, &cb, NULL);
@@ -115,25 +113,8 @@ int main(int argc, char **argv)
struct nlmsghdr *nlh;
printf("pkt received (len=%u)\n", rv);
-#if 0
- for (nlh = nfnl_get_msg_first(nh, buf, rv);
- nlh; nlh = nfnl_get_msg_next(nh, buf, rv)) {
- struct nfattr *tb[NFULA_MAX];
- struct nfgenmsg *nfmsg;
-
- printf("msg received: ");
- nfnl_parse_hdr(nh, nlh, &nfmsg);
- rv = nfnl_parse_attr(tb, NFULA_MAX, NFM_NFA(NLMSG_DATA(nlh)), nlh->nlmsg_len-NLMSG_ALIGN(sizeof(struct nfgenmsg)));
- if (rv < 0) {
- printf("error during parse: %d\n", rv);
- break;
- }
- print_pkt(tb);
- }
-#else
/* handle messages in just-received packet */
nflog_handle_packet(h, buf, rv);
-#endif
}
printf("unbinding from group 100\n");