[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140319215420.49a6408d@nehalam.linuxnetplumber.net>
Date: Wed, 19 Mar 2014 21:54:20 -0700
From: Stephen Hemminger <shemming@...cade.com>
To: David Miller <davem@...emloft.net>,
Patrick McHardy <kaber@...sh.net>
CC: <netdev@...r.kernel.org>
Subject: [PATCH net] netlink: fix setsockopt in mmap examples in
documentation
The documentation for how to use netlink mmap interface is incorrect.
The calls to setsockopt() require an additional argument.
Signed-off-by: Stephen Hemminger <stephen@...workplumber.org>
--- a/Documentation/networking/netlink_mmap.txt 2013-11-21 17:22:02.719654412 -0800
+++ b/Documentation/networking/netlink_mmap.txt 2014-03-19 21:13:51.994890229 -0700
@@ -226,9 +226,9 @@ Ring setup:
void *rx_ring, *tx_ring;
/* Configure ring parameters */
- if (setsockopt(fd, NETLINK_RX_RING, &req, sizeof(req)) < 0)
+ if (setsockopt(fd, SOL_NETLINK, NETLINK_RX_RING, &req, sizeof(req)) < 0)
exit(1);
- if (setsockopt(fd, NETLINK_TX_RING, &req, sizeof(req)) < 0)
+ if (setsockopt(fd, SOL_NETLINK, NETLINK_TX_RING, &req, sizeof(req)) < 0)
exit(1)
/* Calculate size of each individual ring */
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists