From bab7e1c781b5437fafa7c8d5031f291e20b03537 Mon Sep 17 00:00:00 2001 From: Michael Kerrisk Date: Thu, 25 Nov 2004 08:11:36 +0000 Subject: [PATCH] formatting and a few wording fixes --- man7/netdevice.7 | 71 +++++++++++++++++++++++------------------------- 1 file changed, 34 insertions(+), 37 deletions(-) diff --git a/man7/netdevice.7 b/man7/netdevice.7 index 4274136ae..6b63a56c8 100644 --- a/man7/netdevice.7 +++ b/man7/netdevice.7 @@ -6,6 +6,9 @@ .\" and in case of nontrivial modification author and date .\" of the modification is added to the header. .\" $Id: netdevice.7,v 1.10 2000/08/17 10:09:54 ak Exp $ +.\" +.\" Modified, 2004-11-25, mtk, formatting and a few wording fixes +.\" .TH NETDEVICE 7 1999-05-02 "Linux Man Page" "Linux Programmer's Manual" .SH NAME netdevice \- Low level access to Linux network devices @@ -24,34 +27,32 @@ They pass an structure: .nf -.ta 4 12 20 struct ifreq { - char ifr_name[IFNAMSIZ]; /* Interface name */ - union { - struct sockaddr ifr_addr; - struct sockaddr ifr_dstaddr; - struct sockaddr ifr_broadaddr; - struct sockaddr ifr_netmask; - struct sockaddr ifr_hwaddr; - short ifr_flags; - int ifr_ifindex; - int ifr_metric; - int ifr_mtu; - struct ifmap ifr_map; - char ifr_slave[IFNAMSIZ]; - char ifr_newname[IFNAMSIZ]; - char * ifr_data; - }; + char ifr_name[IFNAMSIZ]; /* Interface name */ + union { + struct sockaddr ifr_addr; + struct sockaddr ifr_dstaddr; + struct sockaddr ifr_broadaddr; + struct sockaddr ifr_netmask; + struct sockaddr ifr_hwaddr; + short ifr_flags; + int ifr_ifindex; + int ifr_metric; + int ifr_mtu; + struct ifmap ifr_map; + char ifr_slave[IFNAMSIZ]; + char ifr_newname[IFNAMSIZ]; + char * ifr_data; + }; }; struct ifconf { - int ifc_len; /* size of buffer */ - union { - char * ifc_buf; /* buffer address */ - struct ifreq *ifc_req; /* array of structures */ - }; -}; -.ta + int ifc_len; /* size of buffer */ + union { + char * ifc_buf; /* buffer address */ + struct ifreq * ifc_req; /* array of structures */ + }; +}; .fi Normally, the user specifies which device to affect by setting @@ -152,17 +153,15 @@ Get or set the interface's hardware parameters using Setting the parameters is a privileged operation. .nf -.ta 4 20 42 struct ifmap { - unsigned long mem_start; - unsigned long mem_end; - unsigned short base_addr; - unsigned char irq; - unsigned char dma; - unsigned char port; + unsigned long mem_start; + unsigned long mem_end; + unsigned short base_addr; + unsigned char irq; + unsigned char dma; + unsigned char port; }; -.ta .fi The interpretation of the ifmap structure depends on the device driver @@ -214,7 +213,7 @@ If is equal to the original length the buffer probably has overflowed and you should retry with a bigger buffer to get all addresses. When no error occurs the ioctl returns 0; -otherwise \-1. Overflow is no error. +otherwise \-1. Overflow is not an error. \" XXX Slaving isn't supported in 2.2 .\" .TP .\" .BR SIOCGIFSLAVE ", " SIOCSIFSLAVE @@ -231,7 +230,7 @@ For configuring IP addresses see .PP In addition some devices support private ioctls. These are not described here. .SH NOTES -Strictly seen, +Strictly speaking, .B SIOCGIFCONF is IP specific and belongs in .BR ip (7). @@ -246,15 +245,13 @@ Local IPv6 IP addresses can be found via /proc/net or via .SH BUGS glibc 2.1 is missing the .I ifr_newname -macro in net/if.h. Add the following to your program as workaround: +macro in net/if.h. Add the following to your program as a workaround: .sp .RS .nf -.ta 4 20 42 #ifndef ifr_newname #define ifr_newname ifr_ifru.ifru_slave #endif -.ta .fi .RE .SH "SEE ALSO"