Skip to contentSkip to conversation

netlink: fix setsockopt in mmap examples in documentation

PATCH Applied Stephen Hemminger 2 participants 2 messages Mar 20, 2014

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

Documentation/networking/netlink_mmap.txt +2 -2
@@ -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 */