[netfilter-cvslog] r4145 - trunk/libnfnetlink
laforge at netfilter.org
laforge at netfilter.org
Fri Jul 22 08:14:57 CEST 2005
Author: laforge at netfilter.org
Date: 2005-07-22 08:14:55 +0200 (Fri, 22 Jul 2005)
New Revision: 4145
Modified:
trunk/libnfnetlink/libnfnetlink.c
Log:
- add include file for htons
- use C99 format string modifiers
Modified: trunk/libnfnetlink/libnfnetlink.c
===================================================================
--- trunk/libnfnetlink/libnfnetlink.c 2005-07-21 23:37:52 UTC (rev 4144)
+++ trunk/libnfnetlink/libnfnetlink.c 2005-07-22 06:14:55 UTC (rev 4145)
@@ -15,6 +15,7 @@
#include <errno.h>
#include <string.h>
#include <time.h>
+#include <netinet/in.h>
#include <sys/socket.h>
@@ -37,9 +38,9 @@
printf("%s called from %s\n", __FUNCTION__, desc);
printf(" nlmsghdr = %p, received_len = %u\n", nlh, received_len);
- printf(" NLMSG_DATA(nlh) = %p (+%u bytes)\n", nlmsg_data,
+ printf(" NLMSG_DATA(nlh) = %p (+%td bytes)\n", nlmsg_data,
(nlmsg_data - (void *)nlh));
- printf(" NFM_NFA(NLMSG_DATA(nlh)) = %p (+%u bytes)\n",
+ printf(" NFM_NFA(NLMSG_DATA(nlh)) = %p (+%td bytes)\n",
nfa, ((void *)nfa - (void *)nlh));
printf(" nlmsg_type = %u, nlmsg_len = %u, nlmsg_seq = %u "
"nlmsg_flags = 0x%x\n", nlh->nlmsg_type, nlh->nlmsg_len,
@@ -87,7 +88,7 @@
err = getsockname(nfnlh->fd, (struct sockaddr *)&nfnlh->local,
&addr_len);
if (addr_len != sizeof(nfnlh->local)) {
- nfnl_error("Bad address length (%d != %d)", addr_len,
+ nfnl_error("Bad address length (%u != %zd)", addr_len,
sizeof(nfnlh->local));
return -1;
}
More information about the netfilter-cvslog
mailing list