]> The Tcpdump Group git mirrors - libpcap/commitdiff
Clean up indentation.
authorGuy Harris <[email protected]>
Wed, 19 May 2010 00:50:49 +0000 (17:50 -0700)
committerGuy Harris <[email protected]>
Wed, 19 May 2010 00:50:49 +0000 (17:50 -0700)
pcap-linux.c

index de3239aaba9a6415ccd50f125859d6c226866d9f..70068b56c373dc42ec0e97c42afd8bdc0ff115ca 100644 (file)
@@ -416,47 +416,46 @@ pcap_create(const char *device, char *ebuf)
 
 #ifdef HAVE_LIBNL
 /*
-        *
-        * If interface {if} is a mac80211 driver, the file
-        * /sys/class/net/{if}/phy80211 is a symlink to
-        * /sys/class/ieee80211/{phydev}, for some {phydev}.
-        *
-        * On Fedora 9, with a 2.6.26.3-29 kernel, my Zydas stick, at
-        * least, has a "wmaster0" device and a "wlan0" device; the
-        * latter is the one with the IP address.  Both show up in
-        * "tcpdump -D" output.  Capturing on the wmaster0 device
-        * captures with 802.11 headers.
-        *
-        * airmon-ng searches through /sys/class/net for devices named
-        * monN, starting with mon0; as soon as one *doesn't* exist,
-        * it chooses that as the monitor device name.  If the "iw"
-        * command exists, it does "iw dev {if} interface add {monif}
-        * type monitor", where {monif} is the monitor device.  It
-        * then (sigh) sleeps .1 second, and then configures the
-        * device up.  Otherwise, if /sys/class/ieee80211/{phydev}/add_iface
-        * is a file, it writes {mondev}, without a newline, to that file,
-        * and again (sigh) sleeps .1 second, and then iwconfig's that
-        * device into monitor mode and configures it up.  Otherwise,
-        * you can't do monitor mode.
-        *
-        * All these devices are "glued" together by having the
-        * /sys/class/net/{device}/phy80211 links pointing to the same
-        * place, so, given a wmaster, wlan, or mon device, you can
-        * find the other devices by looking for devices with
-        * the same phy80211 link.
-        *
-        * To turn monitor mode off, delete the monitor interface,
-        * either with "iw dev {monif} interface del" or by sending
-        * {monif}, with no NL, down /sys/class/ieee80211/{phydev}/remove_iface
-        *
-        * Note: if you try to create a monitor device named "monN", and
-        * there's already a "monN" device, it fails, as least with
-        * the netlink interface (which is what iw uses), with a return
-        * value of -ENFILE.  (Return values are negative errnos.)  We
-        * could probably use that to find an unused device.
-        *
-        * Yes, you can have multiple monitor devices for a given
-        * physical device.
+ * If interface {if} is a mac80211 driver, the file
+ * /sys/class/net/{if}/phy80211 is a symlink to
+ * /sys/class/ieee80211/{phydev}, for some {phydev}.
+ *
+ * On Fedora 9, with a 2.6.26.3-29 kernel, my Zydas stick, at
+ * least, has a "wmaster0" device and a "wlan0" device; the
+ * latter is the one with the IP address.  Both show up in
+ * "tcpdump -D" output.  Capturing on the wmaster0 device
+ * captures with 802.11 headers.
+ *
+ * airmon-ng searches through /sys/class/net for devices named
+ * monN, starting with mon0; as soon as one *doesn't* exist,
+ * it chooses that as the monitor device name.  If the "iw"
+ * command exists, it does "iw dev {if} interface add {monif}
+ * type monitor", where {monif} is the monitor device.  It
+ * then (sigh) sleeps .1 second, and then configures the
+ * device up.  Otherwise, if /sys/class/ieee80211/{phydev}/add_iface
+ * is a file, it writes {mondev}, without a newline, to that file,
+ * and again (sigh) sleeps .1 second, and then iwconfig's that
+ * device into monitor mode and configures it up.  Otherwise,
+ * you can't do monitor mode.
+ *
+ * All these devices are "glued" together by having the
+ * /sys/class/net/{device}/phy80211 links pointing to the same
+ * place, so, given a wmaster, wlan, or mon device, you can
+ * find the other devices by looking for devices with
+ * the same phy80211 link.
+ *
+ * To turn monitor mode off, delete the monitor interface,
+ * either with "iw dev {monif} interface del" or by sending
+ * {monif}, with no NL, down /sys/class/ieee80211/{phydev}/remove_iface
+ *
+ * Note: if you try to create a monitor device named "monN", and
+ * there's already a "monN" device, it fails, as least with
+ * the netlink interface (which is what iw uses), with a return
+ * value of -ENFILE.  (Return values are negative errnos.)  We
+ * could probably use that to find an unused device.
+ *
+ * Yes, you can have multiple monitor devices for a given
+ * physical device.
 */
 
 /*