releasing version 0.20
[moreutils.git] / ifdata.docbook
blob5f2837f71cb7ea8e1aa8481d854d975174e19ab9
1 <?xml version="1.0" encoding="utf-8"?>
3 <!--
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
21 -->
23 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.4//EN"
24 "file:///usr/share/xml/docbook/schema/dtd/4.4/docbookx.dtd"
25 []>
27 <refentry>
29 <refentryinfo>
30 <author>
31 <firstname>Joey</firstname>
32 <surname>Hess</surname>
33 </author>
34 <date>2006-03-07</date>
35 </refentryinfo>
37 <refmeta>
38 <refentrytitle>ifdata</refentrytitle>
39 <manvolnum>1</manvolnum>
40 </refmeta>
42 <refnamediv>
43 <refname>ifdata</refname>
44 <refpurpose>get network interface info without
45 parsing ifconfig output</refpurpose>
46 </refnamediv>
48 <refsynopsisdiv>
49 <cmdsynopsis>
50 <command>ifdata</command>
51 <arg>options</arg>
52 <arg><replaceable>iface</replaceable></arg>
53 </cmdsynopsis>
54 </refsynopsisdiv>
56 <refsect1>
57 <title>DESCRIPTION</title>
59 <para>
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.
67 </para>
69 </refsect1>
71 <refsect1>
72 <title>OPTIONS</title>
74 <variablelist>
76 <varlistentry>
77 <term><option>-h</option></term>
78 <listitem>
79 <para>Print out a help summary.</para>
80 </listitem>
81 </varlistentry>
83 <varlistentry>
84 <term><option>-e</option></term>
85 <listitem>
86 <para>Test to see if the interface exists,
87 exit nonzero if it does not.</para>
88 </listitem>
89 </varlistentry>
91 <varlistentry>
92 <term><option>-p</option></term>
93 <listitem>
94 <para>Prints out the whole configuration of
95 the interface.</para>
96 </listitem>
97 </varlistentry>
99 <varlistentry>
100 <term><option>-pe</option></term>
101 <listitem>
102 <para>Prints "yes" or "no" if the interface
103 exists or not.</para>
104 </listitem>
105 </varlistentry>
107 <varlistentry>
108 <term><option>-ph</option></term>
109 <listitem>
110 <para>Prints the hardware address of the
111 interface.</para>
112 </listitem>
113 </varlistentry>
115 <varlistentry>
116 <term><option>-pa</option></term>
117 <listitem>
118 <para>Prints the IPv4 address of the
119 interface.</para>
120 </listitem>
121 </varlistentry>
123 <varlistentry>
124 <term><option>-pn</option></term>
125 <listitem>
126 <para>Prints the netmask of the
127 interface.</para>
128 </listitem>
129 </varlistentry>
131 <varlistentry>
132 <term><option>-pN</option></term>
133 <listitem>
134 <para>Prints the network address of the
135 interface.</para>
136 </listitem>
137 </varlistentry>
139 <varlistentry>
140 <term><option>-pb</option></term>
141 <listitem>
142 <para>Prints the broadcast address of the
143 interface.</para>
144 </listitem>
145 </varlistentry>
147 <varlistentry>
148 <term><option>-pm</option></term>
149 <listitem>
150 <para>Prints the MTU of the interface.</para>
151 </listitem>
152 </varlistentry>
154 <varlistentry>
155 <term><option>-pf</option></term>
156 <listitem>
157 <para>Prints the flags of the
158 interface.</para>
159 </listitem>
160 </varlistentry>
162 <varlistentry>
163 <term><option>-si</option></term>
164 <listitem>
165 <para>Prints out all the input statistics
166 of the interface.</para>
167 </listitem>
168 </varlistentry>
170 <varlistentry>
171 <term><option>-sip</option></term>
172 <listitem>
173 <para>Prints the number of input packets.</para>
174 </listitem>
175 </varlistentry>
177 <varlistentry>
178 <term><option>-sib</option></term>
179 <listitem>
180 <para>Prints the number of input bytes.</para>
181 </listitem>
182 </varlistentry>
184 <varlistentry>
185 <term><option>-sie</option></term>
186 <listitem>
187 <para>Prints the number of input errors.</para>
188 </listitem>
189 </varlistentry>
191 <varlistentry>
192 <term><option>-sid</option></term>
193 <listitem>
194 <para>Prints the number of dropped input
195 packets.</para>
196 </listitem>
197 </varlistentry>
199 <varlistentry>
200 <term><option>-sif</option></term>
201 <listitem>
202 <para>Prints the number of input fifo overruns.</para>
203 </listitem>
204 </varlistentry>
206 <varlistentry>
207 <term><option>-sic</option></term>
208 <listitem>
209 <para>Print the number of compressed input
210 packets.</para>
211 </listitem>
212 </varlistentry>
214 <varlistentry>
215 <term><option>-sim</option></term>
216 <listitem>
217 <para>Prints the number of input
218 multicast packets.</para>
219 </listitem>
220 </varlistentry>
222 <varlistentry>
223 <term><option>-so</option></term>
224 <listitem>
225 <para>Prints out all the output statistics
226 of the interface.</para>
227 </listitem>
228 </varlistentry>
230 <varlistentry>
231 <term><option>-sop</option></term>
232 <listitem>
233 <para>Prints the number of output packets.</para>
234 </listitem>
235 </varlistentry>
237 <varlistentry>
238 <term><option>-sob</option></term>
239 <listitem>
240 <para>Prints the number of output bytes.</para>
241 </listitem>
242 </varlistentry>
244 <varlistentry>
245 <term><option>-soe</option></term>
246 <listitem>
247 <para>Prints the number of output errors.</para>
248 </listitem>
249 </varlistentry>
251 <varlistentry>
252 <term><option>-sod</option></term>
253 <listitem>
254 <para>Prints the number of dropped
255 output packets.</para>
256 </listitem>
257 </varlistentry>
259 <varlistentry>
260 <term><option>-sof</option></term>
261 <listitem>
262 <para>Prints the number of output fifo overruns.</para>
263 </listitem>
264 </varlistentry>
266 <varlistentry>
267 <term><option>-sox</option></term>
268 <listitem>
269 <para>Print the number of output collisions.</para>
270 </listitem>
271 </varlistentry>
273 <varlistentry>
274 <term><option>-soc</option></term>
275 <listitem>
276 <para>Prints the number of output carrier
277 losses.</para>
278 </listitem>
279 </varlistentry>
281 <varlistentry>
282 <term><option>-som</option></term>
283 <listitem>
284 <para>Prints the number of output multicast
285 packets.</para>
286 </listitem>
287 </varlistentry>
289 <varlistentry>
290 <term><option>-bips</option></term>
291 <listitem>
292 <para>Prints the number of bytes of
293 incoming traffic measured in one second.</para>
294 </listitem>
295 </varlistentry>
297 <varlistentry>
298 <term><option>-bops</option></term>
299 <listitem>
300 <para>Prints the number of bytes of
301 outgoing traffic measured in one second.</para>
302 </listitem>
303 </varlistentry>
305 </variablelist>
306 </refsect1>
307 </refentry>