#, fuzzy msgid "" msgstr "" "Project-Id-Version: man-pages-l10n VERSION\n" "POT-Creation-Date: 2014-07-17 17:57+0900\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #. type: TH #: man-pages/man7/netdevice.7:18 #, no-wrap msgid "NETDEVICE" msgstr "" #. type: TH #: man-pages/man7/netdevice.7:18 #, no-wrap msgid "2014-01-24" msgstr "" #. type: TH #: man-pages/man7/netdevice.7:18 #, no-wrap msgid "Linux" msgstr "" #. type: TH #: man-pages/man7/netdevice.7:18 #, no-wrap msgid "Linux Programmer's Manual" msgstr "" #. type: SH #: man-pages/man7/netdevice.7:19 #, no-wrap msgid "NAME" msgstr "" #. type: Plain text #: man-pages/man7/netdevice.7:21 msgid "netdevice - low-level access to Linux network devices" msgstr "" #. type: SH #: man-pages/man7/netdevice.7:21 #, no-wrap msgid "SYNOPSIS" msgstr "" #. type: Plain text #: man-pages/man7/netdevice.7:23 msgid "B<#include Esys/ioctl.hE>" msgstr "" #. type: Plain text #: man-pages/man7/netdevice.7:25 msgid "B<#include Enet/if.hE>" msgstr "" #. type: SH #: man-pages/man7/netdevice.7:25 #, no-wrap msgid "DESCRIPTION" msgstr "" #. type: Plain text #: man-pages/man7/netdevice.7:28 msgid "" "This man page describes the sockets interface which is used to configure " "network devices." msgstr "" #. type: Plain text #: man-pages/man7/netdevice.7:35 msgid "" "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 structure:" msgstr "" #. type: Plain text #: man-pages/man7/netdevice.7:56 #, no-wrap msgid "" "struct ifreq {\n" " char ifr_name[IFNAMSIZ]; /* Interface name */\n" " union {\n" " struct sockaddr ifr_addr;\n" " struct sockaddr ifr_dstaddr;\n" " struct sockaddr ifr_broadaddr;\n" " struct sockaddr ifr_netmask;\n" " struct sockaddr ifr_hwaddr;\n" " short ifr_flags;\n" " int ifr_ifindex;\n" " int ifr_metric;\n" " int ifr_mtu;\n" " struct ifmap ifr_map;\n" " char ifr_slave[IFNAMSIZ];\n" " char ifr_newname[IFNAMSIZ];\n" " char *ifr_data;\n" " };\n" "};\n" msgstr "" #. type: Plain text #: man-pages/man7/netdevice.7:64 msgid "" "Normally, the user specifies which device to affect by setting I " "to the name of the interface. All other members of the structure may share " "memory." msgstr "" #. type: SS #: man-pages/man7/netdevice.7:64 #, no-wrap msgid "Ioctls" msgstr "" #. type: Plain text #: man-pages/man7/netdevice.7:72 msgid "" "If an ioctl is marked as privileged, then using it requires an effective " "user ID of 0 or the B capability. If this is not the case, " "B will be returned." msgstr "" #. type: TP #: man-pages/man7/netdevice.7:72 #, no-wrap msgid "B" msgstr "" #. type: Plain text #: man-pages/man7/netdevice.7:80 msgid "" "Given the I, return the name of the interface in I. " "This is the only ioctl which returns its result in I." msgstr "" #. type: TP #: man-pages/man7/netdevice.7:80 #, no-wrap msgid "B" msgstr "" #. type: Plain text #: man-pages/man7/netdevice.7:84 msgid "Retrieve the interface index of the interface into I." msgstr "" #. type: TP #: man-pages/man7/netdevice.7:84 #, no-wrap msgid "B, B" msgstr "" #. Do not right adjust text blocks in tables #. type: Plain text #: man-pages/man7/netdevice.7:90 msgid "" "Get or set the active flag word of the device. I contains a bit " "mask of the following values:" msgstr "" #. type: tbl table #: man-pages/man7/netdevice.7:95 #, no-wrap msgid "Device flags\n" msgstr "" #. type: tbl table #: man-pages/man7/netdevice.7:96 #, no-wrap msgid "IFF_UP:Interface is running.\n" msgstr "" #. type: tbl table #: man-pages/man7/netdevice.7:97 #, no-wrap msgid "IFF_BROADCAST:Valid broadcast address set.\n" msgstr "" #. type: tbl table #: man-pages/man7/netdevice.7:98 #, no-wrap msgid "IFF_DEBUG:Internal debugging flag.\n" msgstr "" #. type: tbl table #: man-pages/man7/netdevice.7:99 #, no-wrap msgid "IFF_LOOPBACK:Interface is a loopback interface.\n" msgstr "" #. type: tbl table #: man-pages/man7/netdevice.7:100 #, no-wrap msgid "IFF_POINTOPOINT:Interface is a point-to-point link.\n" msgstr "" #. type: tbl table #: man-pages/man7/netdevice.7:101 #, no-wrap msgid "IFF_RUNNING:Resources allocated.\n" msgstr "" #. type: tbl table #: man-pages/man7/netdevice.7:102 #, no-wrap msgid "IFF_NOARP:T{\n" msgstr "" #. type: tbl table #: man-pages/man7/netdevice.7:103 #, no-wrap msgid "No arp protocol, L2 destination address not set.\n" msgstr "" #. type: tbl table #: man-pages/man7/netdevice.7:104 man-pages/man7/netdevice.7:115 #, no-wrap msgid "T}\n" msgstr "" #. type: tbl table #: man-pages/man7/netdevice.7:105 #, no-wrap msgid "IFF_PROMISC:Interface is in promiscuous mode.\n" msgstr "" #. type: tbl table #: man-pages/man7/netdevice.7:106 #, no-wrap msgid "IFF_NOTRAILERS:Avoid use of trailers.\n" msgstr "" #. type: tbl table #: man-pages/man7/netdevice.7:107 #, no-wrap msgid "IFF_ALLMULTI:Receive all multicast packets.\n" msgstr "" #. type: tbl table #: man-pages/man7/netdevice.7:108 #, no-wrap msgid "IFF_MASTER:Master of a load balancing bundle.\n" msgstr "" #. type: tbl table #: man-pages/man7/netdevice.7:109 #, no-wrap msgid "IFF_SLAVE:Slave of a load balancing bundle.\n" msgstr "" #. type: tbl table #: man-pages/man7/netdevice.7:110 #, no-wrap msgid "IFF_MULTICAST:Supports multicast\n" msgstr "" #. type: tbl table #: man-pages/man7/netdevice.7:111 #, no-wrap msgid "IFF_PORTSEL:Is able to select media type via ifmap.\n" msgstr "" #. type: tbl table #: man-pages/man7/netdevice.7:112 #, no-wrap msgid "IFF_AUTOMEDIA:Auto media selection active.\n" msgstr "" #. type: tbl table #: man-pages/man7/netdevice.7:113 #, no-wrap msgid "IFF_DYNAMIC:T{\n" msgstr "" #. type: tbl table #: man-pages/man7/netdevice.7:114 #, no-wrap msgid "The addresses are lost when the interface goes down.\n" msgstr "" #. type: tbl table #: man-pages/man7/netdevice.7:116 #, no-wrap msgid "IFF_LOWER_UP:Driver signals L1 up (since Linux 2.6.17)\n" msgstr "" #. type: tbl table #: man-pages/man7/netdevice.7:117 #, no-wrap msgid "IFF_DORMANT:Driver signals dormant (since Linux 2.6.17)\n" msgstr "" #. type: tbl table #: man-pages/man7/netdevice.7:118 #, no-wrap msgid "IFF_ECHO:Echo sent packets (since Linux 2.6.25)\n" msgstr "" #. type: Plain text #: man-pages/man7/netdevice.7:124 msgid "" "Setting the active flag word is a privileged operation, but any process may " "read it." msgstr "" #. type: TP #: man-pages/man7/netdevice.7:124 #, no-wrap msgid "B, B" msgstr "" #. type: Plain text #: man-pages/man7/netdevice.7:129 msgid "" "Get or set extended (private) flags for the device. I contains a " "bit mask of the following values:" msgstr "" #. type: tbl table #: man-pages/man7/netdevice.7:133 #, no-wrap msgid "Private flags\n" msgstr "" #. type: tbl table #: man-pages/man7/netdevice.7:134 #, no-wrap msgid "IFF_802_1Q_VLAN:Interface is 802.1Q VLAN device.\n" msgstr "" #. type: tbl table #: man-pages/man7/netdevice.7:135 #, no-wrap msgid "IFF_EBRIDGE:Interface is Ethernet bridging device.\n" msgstr "" #. type: tbl table #: man-pages/man7/netdevice.7:136 #, no-wrap msgid "IFF_SLAVE_INACTIVE:Interface is inactive bonding slave.\n" msgstr "" #. type: tbl table #: man-pages/man7/netdevice.7:137 #, no-wrap msgid "IFF_MASTER_8023AD:Interface is 802.3ad bonding master.\n" msgstr "" #. type: tbl table #: man-pages/man7/netdevice.7:138 #, no-wrap msgid "IFF_MASTER_ALB:Interface is balanced-alb bonding master.\n" msgstr "" #. type: tbl table #: man-pages/man7/netdevice.7:139 #, no-wrap msgid "IFF_BONDING:Interface is a bonding master or slave.\n" msgstr "" #. type: tbl table #: man-pages/man7/netdevice.7:140 #, no-wrap msgid "IFF_SLAVE_NEEDARP:Interface needs ARPs for validation.\n" msgstr "" #. type: tbl table #: man-pages/man7/netdevice.7:141 #, no-wrap msgid "IFF_ISATAP:Interface is RFC4214 ISATAP interface.\n" msgstr "" #. type: Plain text #: man-pages/man7/netdevice.7:145 msgid "" "Setting the extended (private) interface flags is a privileged operation." msgstr "" #. type: TP #: man-pages/man7/netdevice.7:145 #, no-wrap msgid "B, B" msgstr "" #. type: Plain text #: man-pages/man7/netdevice.7:153 msgid "" "Get or set the address of the device using I. Setting the " "interface address is a privileged operation. For compatibility, only " "B addresses are accepted or returned." msgstr "" #. type: TP #: man-pages/man7/netdevice.7:153 #, no-wrap msgid "B, B" msgstr "" #. type: Plain text #: man-pages/man7/netdevice.7:161 msgid "" "Get or set the destination address of a point-to-point device using " "I. For compatibility, only B addresses are accepted " "or returned. Setting the destination address is a privileged operation." msgstr "" #. type: TP #: man-pages/man7/netdevice.7:161 #, no-wrap msgid "B, B" msgstr "" #. type: Plain text #: man-pages/man7/netdevice.7:169 msgid "" "Get or set the broadcast address for a device using I. For " "compatibility, only B addresses are accepted or returned. Setting " "the broadcast address is a privileged operation." msgstr "" #. type: TP #: man-pages/man7/netdevice.7:169 #, no-wrap msgid "B, B" msgstr "" #. type: Plain text #: man-pages/man7/netdevice.7:177 msgid "" "Get or set the network mask for a device using I. For " "compatibility, only B addresses are accepted or returned. Setting " "the network mask is a privileged operation." msgstr "" #. type: TP #: man-pages/man7/netdevice.7:177 #, no-wrap msgid "B, B" msgstr "" #. type: Plain text #: man-pages/man7/netdevice.7:186 msgid "" "Get or set the metric of the device using I. This is currently " "not implemented; it sets I to 0 if you attempt to read it and " "returns B if you attempt to set it." msgstr "" #. type: TP #: man-pages/man7/netdevice.7:186 #, no-wrap msgid "B, B" msgstr "" #. type: Plain text #: man-pages/man7/netdevice.7:193 msgid "" "Get or set the MTU (Maximum Transfer Unit) of a device using I. " "Setting the MTU is a privileged operation. Setting the MTU to too small " "values may cause kernel crashes." msgstr "" #. type: TP #: man-pages/man7/netdevice.7:193 #, no-wrap msgid "B, B" msgstr "" #. type: Plain text #: man-pages/man7/netdevice.7:204 msgid "" "Get or set the hardware address of a device using I. The " "hardware address is specified in a struct I. I " "contains the ARPHRD_* device type, I the L2 hardware address " "starting from byte 0. Setting the hardware address is a privileged " "operation." msgstr "" #. type: TP #: man-pages/man7/netdevice.7:204 #, no-wrap msgid "B" msgstr "" #. type: Plain text #: man-pages/man7/netdevice.7:209 msgid "" "Set the hardware broadcast address of a device from I. This is " "a privileged operation." msgstr "" #. type: TP #: man-pages/man7/netdevice.7:209 #, no-wrap msgid "B, B" msgstr "" #. type: Plain text #: man-pages/man7/netdevice.7:214 msgid "" "Get or set the interface's hardware parameters using I. Setting " "the parameters is a privileged operation." msgstr "" #. type: Plain text #: man-pages/man7/netdevice.7:225 #, no-wrap msgid "" "struct ifmap {\n" " unsigned long mem_start;\n" " unsigned long mem_end;\n" " unsigned short base_addr;\n" " unsigned char irq;\n" " unsigned char dma;\n" " unsigned char port;\n" "};\n" msgstr "" #. type: Plain text #: man-pages/man7/netdevice.7:230 msgid "" "The interpretation of the ifmap structure depends on the device driver and " "the architecture." msgstr "" #. type: TP #: man-pages/man7/netdevice.7:230 #, no-wrap msgid "B, B" msgstr "" #. type: Plain text #: man-pages/man7/netdevice.7:239 msgid "" "Add an address to or delete an address from the device's link layer " "multicast filters using I. These are privileged operations. " "See also B(7) for an alternative." msgstr "" #. type: TP #: man-pages/man7/netdevice.7:239 #, no-wrap msgid "B, B" msgstr "" #. type: Plain text #: man-pages/man7/netdevice.7:244 msgid "" "Get or set the transmit queue length of a device using I. Setting " "the transmit queue length is a privileged operation." msgstr "" #. type: TP #: man-pages/man7/netdevice.7:244 #, no-wrap msgid "B" msgstr "" #. type: Plain text #: man-pages/man7/netdevice.7:253 msgid "" "Changes the name of the interface specified in I to I." " This is a privileged operation. It is allowed only when the interface is " "not up." msgstr "" #. type: TP #: man-pages/man7/netdevice.7:253 #, no-wrap msgid "B" msgstr "" #. type: Plain text #: man-pages/man7/netdevice.7:263 msgid "" "Return a list of interface (transport layer) addresses. This currently " "means only addresses of the B (IPv4) family for compatibility. " "Unlike the others, this ioctl passes an I structure:" msgstr "" #. type: Plain text #: man-pages/man7/netdevice.7:273 #, no-wrap msgid "" "struct ifconf {\n" " int ifc_len; /* size of buffer */\n" " union {\n" " char *ifc_buf; /* buffer address */\n" " struct ifreq *ifc_req; /* array of structures */\n" " };\n" "};\n" msgstr "" #. type: Plain text #: man-pages/man7/netdevice.7:299 msgid "" "If I is NULL, B returns the necessary buffer size in " "bytes for receiving all available addresses in I. Otherwise, " "I contains a pointer to an array of I structures to be " "filled with all currently active L3 interface addresses. I " "contains the size of the array in bytes. Within each I structure, " "I will receive the interface name, and I the address. " "The actual number of bytes transferred is returned in I." msgstr "" #. type: Plain text #: man-pages/man7/netdevice.7:315 msgid "" "If the size specified by I is insufficient to store all the " "addresses, the kernel will skip the exceeding ones and return success. " "There is no reliable way of detecting this condition once it has occurred. " "It is therefore recommended to either determine the necessary buffer size " "beforehand by calling B with I set to NULL, or to " "retry the call with a bigger buffer whenever I upon return differs " "by less than I from its original value." msgstr "" #. Slaving isn't supported in 2.2 #. . #. .TP #. .BR SIOCGIFSLAVE ", " SIOCSIFSLAVE #. Get or set the slave device using #. .IR ifr_slave . #. Setting the slave device is a privileged operation. #. .PP #. FIXME add amateur radio stuff. #. type: Plain text #: man-pages/man7/netdevice.7:332 msgid "" "If an error occurs accessing the I or I structures, B " "will be returned." msgstr "" #. type: Plain text #: man-pages/man7/netdevice.7:338 msgid "" "Most protocols support their own ioctls to configure protocol-specific " "interface options. See the protocol man pages for a description. For " "configuring IP addresses, see B(7)." msgstr "" #. type: Plain text #: man-pages/man7/netdevice.7:341 msgid "" "In addition, some devices support private ioctls. These are not described " "here." msgstr "" #. type: SH #: man-pages/man7/netdevice.7:341 #, no-wrap msgid "NOTES" msgstr "" #. type: Plain text #: man-pages/man7/netdevice.7:349 msgid "" "Strictly speaking, B and the other ioctls that accept or return " "only B socket addresses, are IP-specific and belong in B(7)." msgstr "" #. type: Plain text #: man-pages/man7/netdevice.7:354 msgid "" "The names of interfaces with no addresses or that don't have the " "B flag set can be found via I." msgstr "" #. type: Plain text #: man-pages/man7/netdevice.7:359 msgid "" "Local IPv6 IP addresses can be found via I or via B(7)." "" msgstr "" #. type: SH #: man-pages/man7/netdevice.7:359 #, no-wrap msgid "BUGS" msgstr "" #. type: Plain text #: man-pages/man7/netdevice.7:365 msgid "" "glibc 2.1 is missing the I macro in Inet/if.hE>. Add " "the following to your program as a workaround:" msgstr "" #. type: Plain text #: man-pages/man7/netdevice.7:371 #, no-wrap msgid "" "#ifndef ifr_newname\n" "#define ifr_newname ifr_ifru.ifru_slave\n" "#endif\n" msgstr "" #. type: SH #: man-pages/man7/netdevice.7:373 #, no-wrap msgid "SEE ALSO" msgstr "" #. type: Plain text #: man-pages/man7/netdevice.7:378 msgid "B(5), B(7), B(7), B(7)" msgstr "" #. type: SH #: man-pages/man7/netdevice.7:378 #, no-wrap msgid "COLOPHON" msgstr "" #. type: Plain text #: man-pages/man7/netdevice.7:386 msgid "" "This page is part of release 3.70 of the Linux I project. A " "description of the project, information about reporting bugs, and the latest " "version of this page, can be found at \\%http://www.kernel.org/doc/man-pages/" "." msgstr ""