1 <?xml version=
"1.0" encoding=
"utf-8"?>
5 Copyright 2006 Joey Hess
7 This program is free software; you can redistribute it and/or modify it
8 under the terms of the GNU General Public License as published by the
9 Free Software Foundation; either version 2 of the License, or (at your
10 option) any later version.
12 This program is distributed in the hope that it will be useful, but
13 WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
15 Public License for more details.
17 You should have received a copy of the GNU General Public License along
18 with this program; if not, write to the Free Software Foundation, Inc.,
19 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 <!DOCTYPE refentry PUBLIC
"-//OASIS//DTD DocBook V4.4//EN"
24 "file:///usr/share/xml/docbook/schema/dtd/4.4/docbookx.dtd"
31 <firstname>Joey
</firstname>
32 <surname>Hess
</surname>
34 <date>2006-
03-
07</date>
38 <refentrytitle>ifdata
</refentrytitle>
39 <manvolnum>1</manvolnum>
43 <refname>ifdata
</refname>
44 <refpurpose>get network interface info without
45 parsing ifconfig output
</refpurpose>
50 <command>ifdata
</command>
52 <arg choice=
"req"><replaceable>iface
</replaceable></arg>
57 <title>DESCRIPTION
</title>
60 <command>ifdata
</command> can be used to check for
61 the existence of a network interface, or to get
62 information abut the interface, such as its IP
63 address. Unlike
<command>ifconfig
</command> or
64 <command>ip
</command>,
<command>ifdata
</command>
65 has simple to parse output that is designed to be
66 easily used by a shell script.
72 <title>OPTIONS
</title>
77 <term><option>-h
</option></term>
79 <para>Print out a help summary.
</para>
84 <term><option>-e
</option></term>
86 <para>Test to see if the interface exists,
87 exit nonzero if it does not.
</para>
92 <term><option>-p
</option></term>
94 <para>Prints out the whole configuration of
100 <term><option>-pe
</option></term>
102 <para>Prints
"yes" or
"no" if the interface
103 exists or not.
</para>
108 <term><option>-pa
</option></term>
110 <para>Prints the IPv4 address of the
116 <term><option>-pn
</option></term>
118 <para>Prints the netmask of the
124 <term><option>-pN
</option></term>
126 <para>Prints the network address of the
132 <term><option>-pb
</option></term>
134 <para>Prints the broadcast address of the
140 <term><option>-pm
</option></term>
142 <para>Prints the MTU of the interface.
</para>
148 <para>Following options are Linux only.
</para>
153 <term><option>-ph
</option></term>
155 <para>Prints the hardware address of the
161 <term><option>-pf
</option></term>
163 <para>Prints the flags of the
169 <term><option>-si
</option></term>
171 <para>Prints out all the input statistics
172 of the interface.
</para>
177 <term><option>-sip
</option></term>
179 <para>Prints the number of input packets.
</para>
184 <term><option>-sib
</option></term>
186 <para>Prints the number of input bytes.
</para>
191 <term><option>-sie
</option></term>
193 <para>Prints the number of input errors.
</para>
198 <term><option>-sid
</option></term>
200 <para>Prints the number of dropped input
206 <term><option>-sif
</option></term>
208 <para>Prints the number of input fifo overruns.
</para>
213 <term><option>-sic
</option></term>
215 <para>Print the number of compressed input
221 <term><option>-sim
</option></term>
223 <para>Prints the number of input
224 multicast packets.
</para>
229 <term><option>-so
</option></term>
231 <para>Prints out all the output statistics
232 of the interface.
</para>
237 <term><option>-sop
</option></term>
239 <para>Prints the number of output packets.
</para>
244 <term><option>-sob
</option></term>
246 <para>Prints the number of output bytes.
</para>
251 <term><option>-soe
</option></term>
253 <para>Prints the number of output errors.
</para>
258 <term><option>-sod
</option></term>
260 <para>Prints the number of dropped
261 output packets.
</para>
266 <term><option>-sof
</option></term>
268 <para>Prints the number of output fifo overruns.
</para>
273 <term><option>-sox
</option></term>
275 <para>Print the number of output collisions.
</para>
280 <term><option>-soc
</option></term>
282 <para>Prints the number of output carrier
288 <term><option>-som
</option></term>
290 <para>Prints the number of output multicast
296 <term><option>-bips
</option></term>
298 <para>Prints the number of bytes of
299 incoming traffic measured in one second.
</para>
304 <term><option>-bops
</option></term>
306 <para>Prints the number of bytes of
307 outgoing traffic measured in one second.
</para>
315 <title>AUTHOR
</title>