Skip to contentSkip to conversation

Patch for netdevice.7

DISCUSSION Michael Kerrisk (man-pages) 1 participant 1 message Apr 22, 2012 2 messages not in the archive Man-pages: manual pages for Linux -- Sections 2, 3, 4, 5, and 7

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

#2 lore raw

Hello Brian,

Quoted 8 lines · Brian F. G. Bidulock

This patch adds common but missing SIOC configuration ioctls to the netdevice.7 manual pages that are not documented anywhere else.  SIOCSIFPFLAGS and SIOCGIFPFLAGS are linux-specific.  Flag values come from Linux 2.6.25 kernel headers for sockios.  The others are standard BSD ioctls that have alwasy been implemented by Linux and were verified from inspecting netdevice.c kernel code.

Patch follows (and attached):

Thanks! Applied for 3.40.

Cheers,

Michael

Quoted 94 lines
netdevice.7 2011-11-02 02:09:08.000000000 -0600 renamed from netdevice.7.orig    2011-11-02 01:34:18.000000000 -0600 +0 -0
@@ -9,7 +9,10 @@

 .\"
 .\" Modified, 2004-11-25, mtk, formatting and a few wording fixes
 .\"
-.TH NETDEVICE  7 2009-01-14 "Linux" "Linux Programmer's Manual"
+.\" Modified, 2011-11-02, <[email protected]>, added many basic +.\"  but missing ioctls, such as SIOCGIFADDR.
+.\"
+.TH NETDEVICE  7 2011-11-02 "Linux" "Linux Programmer's Manual"
 .SH NAME
 netdevice \- Low level access to Linux network devices
 .SH SYNOPSIS

netdevice.7 2011-11-02 02:09:08.000000000 -0600 renamed from netdevice.7.orig    2011-11-02 01:34:18.000000000 -0600 +0 -0
@@ -120,6 +123,59 @@

 Setting the active flag word is a privileged operation, but any process may read it.
 .TP
+.BR SIOCGIFPFLAGS ", " SIOCSIFPFLAGS

netdevice.7 2011-11-02 02:09:08.000000000 -0600 renamed from netdevice.7.orig    2011-11-02 01:34:18.000000000 -0600 +52 -0
+Get or set extended (private) flags for the device.
+.I ifr_flags
+contains a bit mask of the following values:
+.TS
+tab(:);
+c s
+l l.
+Private flags
+IFF_802_1Q_VLAN:Interface is 802.1Q VLAN device.
+IFF_EBRIDGE:Interface is Ethernet bridging device.
+IFF_SLAVE_INACTIVE:Interface is inactive bonding slave.
+IFF_MASTER_8023AD:Interface is 802.3ad bonding master.
+IFF_MASTER_ALB:Interface is balanced-alb bonding master.
+IFF_BONDING:Interface is a bonding master or slave.
+IFF_SLAVE_NEEDARP:Interface needs ARPs for validation.
+IFF_ISATAP:Interface is RFC4214 ISATAP interface.
+.TE
+.sp
+Setting the extended (private) interface flags is a privileged operation.
+.TP
+.BR SIOCGIFADDR ", " SIOCSIFADDR
+Get or set the address of the device using
+.IR ifr_addr .
+Setting the interface address is a privileged operation.
+For compatibility, only
+.B AF_INET
+addresses are accepted or returned.
+.TP
+.BR SIOCGIFDSTADDR ", " SIOCSIFDSTADDR
+Get or set the destination address of a point-to-point device using
+.IR ifr_dstaddr .
+For compatibility, only
+.B AF_INET
+addresses are accepted or returned.
+Setting the destination address is a privileged operation.
+.TP
+.BR SIOCGIFBRDADDR ", " SIOCSIFBRDADDR
+Get or set the broadcast address for a device using
+.IR ifr_brdaddr .
+For compatibility, only
+.B AF_INET
+addresses are accepted or returned.
+Setting the broadcast address is a privileged operation.
+.TP
+.BR SIOCGIFNETMASK ", " SIOCSIFNETMASK
+Get or set the network mask for a device using
+.IR ifr_netmask .
+For compatibility, only
+.B AF_INET
+addresses are accepted or returned.
+Setting the network mask is a privileged operation.
+.TP

 .BR SIOCGIFMETRIC ", " SIOCSIFMETRIC
 Get or set the metric of the device using
 .IR ifr_metric .

netdevice.7 2011-11-02 02:09:08.000000000 -0600 renamed from netdevice.7.orig    2011-11-02 01:34:18.000000000 -0600 +0 -0
@@ -247,7 +303,10 @@

 .SH NOTES
 Strictly speaking,
 .B SIOCGIFCONF

netdevice.7 2011-11-02 02:09:08.000000000 -0600 renamed from netdevice.7.orig    2011-11-02 01:34:18.000000000 -0600 +4 -1
-is IP specific and belongs in
+and the other ioctls that only accept or return
+.B AF_INET
+socket addresses,
+are IP specific and belong in

 .BR ip (7).
 .LP
 The names of interfaces with no addresses or that don't have the

--
Brian F. G. Bidulock    ¦ The reasonable man adapts himself to the ¦ [email protected]    ¦ world; the unreasonable one persists in  ¦
http://www.openss7.org/ ¦ trying  to adapt the  world  to himself. ¦
                       ¦ Therefore  all  progress  depends on the ¦
                       ¦ unreasonable man. -- George Bernard Shaw ¦

Signature · 7 lines
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Author of "The Linux Programming Interface"; http://man7.org/tlpi/
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html