prep release
[moreutils.git] / ifdata.docbook
blob47f414301c47a69a81694c3b5affd71261207d49
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 "http://www.oasis-open.org/docbook/xml/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 <refmiscinfo class="manual">moreutils</refmiscinfo>
41 <refmiscinfo class="source">moreutils</refmiscinfo>
42 </refmeta>
44 <refnamediv>
45 <refname>ifdata</refname>
46 <refpurpose>get network interface info without
47 parsing ifconfig output</refpurpose>
48 </refnamediv>
50 <refsynopsisdiv>
51 <cmdsynopsis>
52 <command>ifdata</command>
53 <arg>options</arg>
54 <arg choice="req"><replaceable>iface</replaceable></arg>
55 </cmdsynopsis>
56 </refsynopsisdiv>
58 <refsect1>
59 <title>DESCRIPTION</title>
61 <para>
62 <command>ifdata</command> can be used to check for
63 the existence of a network interface, or to get
64 information abut the interface, such as its IP
65 address. Unlike <command>ifconfig</command> or
66 <command>ip</command>, <command>ifdata</command>
67 has simple to parse output that is designed to be
68 easily used by a shell script.
69 </para>
71 </refsect1>
73 <refsect1>
74 <title>OPTIONS</title>
76 <variablelist>
78 <varlistentry>
79 <term><option>-h</option></term>
80 <listitem>
81 <para>Print out a help summary.</para>
82 </listitem>
83 </varlistentry>
85 <varlistentry>
86 <term><option>-e</option></term>
87 <listitem>
88 <para>Test to see if the interface exists,
89 exit nonzero if it does not.</para>
90 </listitem>
91 </varlistentry>
93 <varlistentry>
94 <term><option>-p</option></term>
95 <listitem>
96 <para>Prints out the whole configuration of
97 the interface.</para>
98 </listitem>
99 </varlistentry>
101 <varlistentry>
102 <term><option>-pe</option></term>
103 <listitem>
104 <para>Prints "yes" or "no" if the interface
105 exists or not.</para>
106 </listitem>
107 </varlistentry>
109 <varlistentry>
110 <term><option>-pa</option></term>
111 <listitem>
112 <para>Prints the IPv4 address of the
113 interface.</para>
114 </listitem>
115 </varlistentry>
117 <varlistentry>
118 <term><option>-pn</option></term>
119 <listitem>
120 <para>Prints the netmask of the
121 interface.</para>
122 </listitem>
123 </varlistentry>
125 <varlistentry>
126 <term><option>-pN</option></term>
127 <listitem>
128 <para>Prints the network address of the
129 interface.</para>
130 </listitem>
131 </varlistentry>
133 <varlistentry>
134 <term><option>-pb</option></term>
135 <listitem>
136 <para>Prints the broadcast address of the
137 interface.</para>
138 </listitem>
139 </varlistentry>
141 <varlistentry>
142 <term><option>-pm</option></term>
143 <listitem>
144 <para>Prints the MTU of the interface.</para>
145 </listitem>
146 </varlistentry>
148 </variablelist>
150 <para>Following options are Linux only.</para>
152 <variablelist>
154 <varlistentry>
155 <term><option>-ph</option></term>
156 <listitem>
157 <para>Prints the hardware address of the
158 interface.</para>
159 </listitem>
160 </varlistentry>
162 <varlistentry>
163 <term><option>-pf</option></term>
164 <listitem>
165 <para>Prints the flags of the
166 interface.</para>
167 </listitem>
168 </varlistentry>
170 <varlistentry>
171 <term><option>-si</option></term>
172 <listitem>
173 <para>Prints out all the input statistics
174 of the interface.</para>
175 </listitem>
176 </varlistentry>
178 <varlistentry>
179 <term><option>-sip</option></term>
180 <listitem>
181 <para>Prints the number of input packets.</para>
182 </listitem>
183 </varlistentry>
185 <varlistentry>
186 <term><option>-sib</option></term>
187 <listitem>
188 <para>Prints the number of input bytes.</para>
189 </listitem>
190 </varlistentry>
192 <varlistentry>
193 <term><option>-sie</option></term>
194 <listitem>
195 <para>Prints the number of input errors.</para>
196 </listitem>
197 </varlistentry>
199 <varlistentry>
200 <term><option>-sid</option></term>
201 <listitem>
202 <para>Prints the number of dropped input
203 packets.</para>
204 </listitem>
205 </varlistentry>
207 <varlistentry>
208 <term><option>-sif</option></term>
209 <listitem>
210 <para>Prints the number of input fifo overruns.</para>
211 </listitem>
212 </varlistentry>
214 <varlistentry>
215 <term><option>-sic</option></term>
216 <listitem>
217 <para>Print the number of compressed input
218 packets.</para>
219 </listitem>
220 </varlistentry>
222 <varlistentry>
223 <term><option>-sim</option></term>
224 <listitem>
225 <para>Prints the number of input
226 multicast packets.</para>
227 </listitem>
228 </varlistentry>
230 <varlistentry>
231 <term><option>-so</option></term>
232 <listitem>
233 <para>Prints out all the output statistics
234 of the interface.</para>
235 </listitem>
236 </varlistentry>
238 <varlistentry>
239 <term><option>-sop</option></term>
240 <listitem>
241 <para>Prints the number of output packets.</para>
242 </listitem>
243 </varlistentry>
245 <varlistentry>
246 <term><option>-sob</option></term>
247 <listitem>
248 <para>Prints the number of output bytes.</para>
249 </listitem>
250 </varlistentry>
252 <varlistentry>
253 <term><option>-soe</option></term>
254 <listitem>
255 <para>Prints the number of output errors.</para>
256 </listitem>
257 </varlistentry>
259 <varlistentry>
260 <term><option>-sod</option></term>
261 <listitem>
262 <para>Prints the number of dropped
263 output packets.</para>
264 </listitem>
265 </varlistentry>
267 <varlistentry>
268 <term><option>-sof</option></term>
269 <listitem>
270 <para>Prints the number of output fifo overruns.</para>
271 </listitem>
272 </varlistentry>
274 <varlistentry>
275 <term><option>-sox</option></term>
276 <listitem>
277 <para>Print the number of output collisions.</para>
278 </listitem>
279 </varlistentry>
281 <varlistentry>
282 <term><option>-soc</option></term>
283 <listitem>
284 <para>Prints the number of output carrier
285 losses.</para>
286 </listitem>
287 </varlistentry>
289 <varlistentry>
290 <term><option>-som</option></term>
291 <listitem>
292 <para>Prints the number of output multicast
293 packets.</para>
294 </listitem>
295 </varlistentry>
297 <varlistentry>
298 <term><option>-bips</option></term>
299 <listitem>
300 <para>Prints the number of bytes of
301 incoming traffic measured in one second.</para>
302 </listitem>
303 </varlistentry>
305 <varlistentry>
306 <term><option>-bops</option></term>
307 <listitem>
308 <para>Prints the number of bytes of
309 outgoing traffic measured in one second.</para>
310 </listitem>
311 </varlistentry>
313 </variablelist>
314 </refsect1>
316 <refsect1>
317 <title>AUTHOR</title>
319 <para>
320 Benjamin BAYART
321 </para>
322 </refsect1>
323 </refentry>