netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* libmnl [PATCH 8/8] examples: use mnl_socket_setsockopt
@ 2013-12-07 11:32 Ken-ichirou MATSUZAWA
  0 siblings, 0 replies; only message in thread
From: Ken-ichirou MATSUZAWA @ 2013-12-07 11:32 UTC (permalink / raw)
  To: netfilter-devel; +Cc: Pablo Neira Ayuso


instead of raw setsockopt()

Signed-off-by: Ken-ichirou MATSUZAWA <chamas@h4.dion.ne.jp>

---
 examples/netfilter/nfct-daemon.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/examples/netfilter/nfct-daemon.c b/examples/netfilter/nfct-daemon.c
index a9b93db..a4ef0af 100644
--- a/examples/netfilter/nfct-daemon.c
+++ b/examples/netfilter/nfct-daemon.c
@@ -293,10 +293,8 @@ int main(int argc, char *argv[])
 	 * b) if the user-space process does not pull messages from the
 	 *    receiver buffer so often.
 	 */
-	setsockopt(mnl_socket_get_fd(nl), SOL_NETLINK,
-		   NETLINK_BROADCAST_ERROR, &on, sizeof(int));
-	setsockopt(mnl_socket_get_fd(nl), SOL_NETLINK, NETLINK_NO_ENOBUFS,
-		   &on, sizeof(int));
+	mnl_socket_setsockopt(nl, NETLINK_BROADCAST_ERROR, &on, sizeof(int));
+	mnl_socket_setsockopt(nl, NETLINK_NO_ENOBUFS, &on, sizeof(int));
 
 	nlh = mnl_nlmsg_put_header(buf);
 	/* Counters are atomically zeroed in each dump */
-- 
1.8.4.rc3


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2013-12-07 11:32 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-07 11:32 libmnl [PATCH 8/8] examples: use mnl_socket_setsockopt Ken-ichirou MATSUZAWA

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).