Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 88050049 authored by stephen hemminger's avatar stephen hemminger Committed by David S. Miller
Browse files

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: default avatarStephen Hemminger <stephen@networkplumber.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent ae996154
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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 */