2 <!DOCTYPE manpage SYSTEM "xmltoman.dtd">
3 <?xml-stylesheet type="text/xsl" href="xmltoman.xsl" ?>
5 <!-- $Id: ifplugstatus.8.xml.in 110 2004-05-10 21:32:00Z lennart $ -->
8 This file is part of ifplugd.
10 ifplugd is free software; you can redistribute it and/or modify it under
11 the terms of the GNU General Public License as published by the Free
12 Software Foundation; either version 2 of the License, or (at your
13 option) any later version.
15 ifplugd is distributed in the hope that it will be useful, but WITHOUT
16 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
17 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
20 You should have received a copy of the GNU General Public License
21 along with ifplugd; if not, write to the Free Software Foundation,
22 Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
25 <manpage name="ifplugstatus" section="8" desc="A link beat detection tool">
28 <cmd>ifplugstatus [<arg>options</arg>] [<arg>INTERFACE</arg>]</cmd>
32 <p>ifplugstatus is an utility which may be used to detect the link
33 status of a local Linux ethernet device, much in the same way
34 mii-diag, mii-tool and ethtool work. In fact it supports all
35 three different APIs these three tools use. In addition it supports
36 link checking with the IFF_RUNNING interface flag, which most modern
37 drivers (not only ethernet) support, and association status checking
38 with the wireless extension API for WLAN devices.</p>
40 <p>The APIs are tried in the following order:</p>
42 <p>First the newest API: <arg>SIOCETHTOOL</arg> (aka ethtool API)</p>
43 <p>Second the next older API: <arg>SIOCGMIIREG</arg> (aka mii-diag API)</p>
44 <p>Than the WLAN API: <arg>wireless extension</arg> (aka iwconfig API)</p>
45 <p>Followed by the cleanest API: <arg>IFF_RUNNING</arg> (aka ifconfig API)</p>
47 <p>The oldest API (<arg>SIOCPRIV</arg> aka mii-tool API) is not tested since it is obsolete.</p>
49 <p>ifplugstatus may be used in shell script since it returns the
50 current status as return value. It is especially useful to
51 detect the available APIs on the used network driver. (Option
57 <p>You may specify an ethernet device on the command
58 line. Otherwise ifplugstatus will check all available network interfaces.</p>
61 <p><opt>-a | --auto</opt></p>
63 Enable interface automatically before querying (default: off)
69 <p><opt>-h | --help</opt></p>
76 <p><opt>-q | --quiet</opt></p> <optdesc><p>Decrease verbosity
77 by one. If the verbosity is < 0, no text will be shown,
78 only the return value is relevant; if the verbosity is = 0, a
79 terse status will be shown; If the verbosity is > 0,
80 detailed information about the used API is returned. (By
81 default the verbosity is 0)</p></optdesc>
85 <p><opt>-v | --verbose</opt></p>
87 Increase verbosity by one. See option <opt>-q</opt>.
92 <p><opt>-V | --version</opt></p>
100 <section name="Return values">
101 <p><arg>0</arg> Success</p>
102 <p><arg>1</arg> Failure</p>
103 <p><arg>2</arg> Link beat detected (only available when an interface is specified)</p>
104 <p><arg>3</arg> Unplugged (same here)</p>
107 <section name="Author">
108 <p>ifplugd was written by Lennart Poettering
109 <@PACKAGE_BUGREPORT@>. ifplugd is available
111 href="@PACKAGE_URL@"/>
115 <section name="See also">
117 <manref name="mii-diag" section="8"/>, <manref name="mii-tool"
118 section="8"/>, <manref name="ethtool" section="8"/>, <manref name="ifplugd" section="8"/>
122 <section name="Comments">
123 <p>This man page was written using <manref name="xml2man" section="1"
124 href="http://masqmail.cx/xml2man/"/> by Oliver Kurth.</p>