mirror of https://github.com/mkerrisk/man-pages
netlink.7: Fix incorrect variable names in example code
s/snl/sa/ * 2 Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
parent
48011c24d7
commit
6304255391
|
@ -4,7 +4,7 @@
|
|||
.\" Based on the original comments from Alexey Kuznetsov
|
||||
.\" Modified 2005-12-27 by Hasso Tepper <hasso@estpak.ee>
|
||||
.\" $Id: netlink.7,v 1.8 2000/06/22 13:23:00 ak Exp $
|
||||
.TH NETLINK 7 2008-08-08 "Linux" "Linux Programmer's Manual"
|
||||
.TH NETLINK 7 2008-11-11 "Linux" "Linux Programmer's Manual"
|
||||
.SH NAME
|
||||
netlink \- Communication between kernel and userspace (AF_NETLINK)
|
||||
.SH SYNOPSIS
|
||||
|
@ -384,8 +384,8 @@ netlink socket which will listen to the
|
|||
struct sockaddr_nl sa;
|
||||
|
||||
memset(&sa, 0, sizeof(sa));
|
||||
snl.nl_family = AF_NETLINK;
|
||||
snl.nl_groups = RTMGRP_LINK | RTMGRP_IPV4_IFADDR;
|
||||
sa.nl_family = AF_NETLINK;
|
||||
sa.nl_groups = RTMGRP_LINK | RTMGRP_IPV4_IFADDR;
|
||||
|
||||
fd = socket(AF_NETLINK, SOCK_RAW, NETLINK_ROUTE);
|
||||
bind(fd, (struct sockaddr *) &sa, sizeof(sa));
|
||||
|
|
Loading…
Reference in New Issue