]> git.ipfire.org Git - thirdparty/man-pages.git/blobdiff - man7/netdevice.7
signal.7: Some reworking of Michal Sekletar's text
[thirdparty/man-pages.git] / man7 / netdevice.7
index a7b47e3c0c9513931f77c139f17bc85a1940adfa..65e0a0d2a18d2e54bb61d5a56ffb9094af523abd 100644 (file)
@@ -15,7 +15,7 @@
 .\" Modified, 2011-11-02, <bidulock@openss7.org>, added many basic
 .\"  but missing ioctls, such as SIOCGIFADDR.
 .\"
-.TH NETDEVICE  7 2014-01-24 "Linux" "Linux Programmer's Manual"
+.TH NETDEVICE  7 2017-09-15 "Linux" "Linux Programmer's Manual"
 .SH NAME
 netdevice \- low-level access to Linux network devices
 .SH SYNOPSIS
@@ -25,16 +25,16 @@ netdevice \- low-level access to Linux network devices
 .SH DESCRIPTION
 This man page describes the sockets interface which is used to configure
 network devices.
-
+.PP
 Linux supports some standard ioctls to configure network devices.
 They can be used on any socket's file descriptor regardless of the
 family or type.
 Most of them pass an
 .I ifreq
 structure:
-
+.PP
 .in +4n
-.nf
+.EX
 struct ifreq {
     char ifr_name[IFNAMSIZ]; /* Interface name */
     union {
@@ -53,9 +53,9 @@ struct ifreq {
         char           *ifr_data;
     };
 };
-.fi
+.EE
 .in
-
+.PP
 Normally, the user specifies which device to affect by setting
 .I ifr_name
 to the name of the interface.
@@ -116,9 +116,9 @@ T}
 IFF_LOWER_UP:Driver signals L1 up (since Linux 2.6.17)
 IFF_DORMANT:Driver signals dormant (since Linux 2.6.17)
 IFF_ECHO:Echo sent packets (since Linux 2.6.25)
-
 .TE
 .ad
+.PP
 Setting the active flag word is a privileged operation, but any
 process may read it.
 .TP
@@ -140,7 +140,7 @@ 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
+.PP
 Setting the extended (private) interface flags is a privileged operation.
 .TP
 .BR SIOCGIFADDR ", " SIOCSIFADDR
@@ -211,9 +211,9 @@ This is a privileged operation.
 Get or set the interface's hardware parameters using
 .IR ifr_map .
 Setting the parameters is a privileged operation.
-
+.IP
 .in +4n
-.nf
+.EX
 struct ifmap {
     unsigned long   mem_start;
     unsigned long   mem_end;
@@ -222,9 +222,9 @@ struct ifmap {
     unsigned char   dma;
     unsigned char   port;
 };
-.fi
+.EE
 .in
-
+.IP
 The interpretation of the ifmap structure depends on the device driver
 and the architecture.
 .TP
@@ -260,9 +260,9 @@ means only addresses of the
 Unlike the others, this ioctl passes an
 .I ifconf
 structure:
-
+.IP
 .in +4n
-.nf
+.EX
 struct ifconf {
     int                 ifc_len; /* size of buffer */
     union {
@@ -270,9 +270,9 @@ struct ifconf {
         struct ifreq   *ifc_req; /* array of structures */
     };
 };
-.fi
+.EE
 .in
-
+.IP
 If
 .I ifc_req
 is NULL,
@@ -296,7 +296,7 @@ will receive the interface name, and
 the address.
 The actual number of bytes transferred is returned in
 .IR ifc_len .
-
+.IP
 If the size specified by
 .I ifc_len
 is insufficient to store all the addresses,
@@ -312,7 +312,7 @@ set to NULL, or to retry the call with a bigger buffer whenever
 upon return differs by less than
 .I sizeof(struct ifreq)
 from its original value.
-
+.IP
 If an error occurs accessing the
 .I ifconf
 or
@@ -346,12 +346,12 @@ and the other ioctls that accept or return only
 socket addresses,
 are IP-specific and belong in
 .BR ip (7).
-.LP
+.PP
 The names of interfaces with no addresses or that don't have the
 .B IFF_RUNNING
 flag set can be found via
 .IR /proc/net/dev .
-.LP
+.PP
 Local IPv6 IP addresses can be found via
 .I /proc/net
 or via
@@ -362,13 +362,13 @@ glibc 2.1 is missing the
 macro in
 .IR <net/if.h> .
 Add the following to your program as a workaround:
-.sp
+.PP
 .in +4n
-.nf
+.EX
 #ifndef ifr_newname
 #define ifr_newname     ifr_ifru.ifru_slave
 #endif
-.fi
+.EE
 .in
 .SH SEE ALSO
 .BR proc (5),