Skip to content

Commit

Permalink
netlink: fix setsockopt in mmap examples in documentation
Browse files Browse the repository at this point in the history
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@networkplumber.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
stephen hemminger authored and David S. Miller committed Mar 20, 2014
1 parent ae99615 commit 8805004
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Documentation/networking/netlink_mmap.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit 8805004

Please sign in to comment.