aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-raw.c
diff options
context:
space:
mode:
authorBill Meier <wmeier@newsguy.com>2014-08-14 13:51:36 -0400
committerBill Meier <wmeier@newsguy.com>2014-08-15 14:44:15 +0000
commit43afcb4b18a4227cac4f0c28ebf940ab616fb055 (patch)
treef732544d2400cee8dfd1717829d05c83f4b27062 /epan/dissectors/packet-raw.c
parentfacb76ad8f47e6428b7c84b47dd8326ff9ad4f3f (diff)
Remove unneeded #include <epan/prefs.h>; As needed: Add editor-modelines & adjust whitespaxcce.
Change-Id: I6f79357e0f3906f6ccc5b68eb451b69b68636335 Reviewed-on: https://code.wireshark.org/review/3613 Reviewed-by: Bill Meier <wmeier@newsguy.com>
Diffstat (limited to 'epan/dissectors/packet-raw.c')
-rw-r--r--epan/dissectors/packet-raw.c74
1 files changed, 43 insertions, 31 deletions
diff --git a/epan/dissectors/packet-raw.c b/epan/dissectors/packet-raw.c
index 41ccd47de3..572e02e945 100644
--- a/epan/dissectors/packet-raw.c
+++ b/epan/dissectors/packet-raw.c
@@ -27,7 +27,6 @@
#include <string.h>
#include <glib.h>
#include <epan/packet.h>
-#include <epan/prefs.h>
#include <wiretap/wtap.h>
#include "packet-raw.h"
#include "packet-ip.h"
@@ -100,9 +99,9 @@ capture_raw(const guchar *pd, int len, packet_counts *ld)
static void
dissect_raw(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
- proto_tree *fh_tree;
- proto_item *ti;
- tvbuff_t *next_tvb;
+ proto_tree *fh_tree;
+ proto_item *ti;
+ tvbuff_t *next_tvb;
/* load the top pane info. This should be overwritten by
the next protocol in the stack */
@@ -136,46 +135,46 @@ dissect_raw(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
* sometimes. This check should be removed when 2.2 is out.
*/
if (tvb_get_ntohs(tvb, 0) == 0xff03) {
- call_dissector(ppp_hdlc_handle, tvb, pinfo, tree);
+ call_dissector(ppp_hdlc_handle, tvb, pinfo, tree);
}
/* The Linux ISDN driver sends a fake MAC address before the PPP header
* on its ippp interfaces... */
else if (tvb_get_ntohs(tvb, 6) == 0xff03) {
- next_tvb = tvb_new_subset_remaining(tvb, 6);
- call_dissector(ppp_hdlc_handle, next_tvb, pinfo, tree);
+ next_tvb = tvb_new_subset_remaining(tvb, 6);
+ call_dissector(ppp_hdlc_handle, next_tvb, pinfo, tree);
}
/* ...except when it just puts out one byte before the PPP header... */
else if (tvb_get_ntohs(tvb, 1) == 0xff03) {
- next_tvb = tvb_new_subset_remaining(tvb, 1);
- call_dissector(ppp_hdlc_handle, next_tvb, pinfo, tree);
+ next_tvb = tvb_new_subset_remaining(tvb, 1);
+ call_dissector(ppp_hdlc_handle, next_tvb, pinfo, tree);
}
/* ...and if the connection is currently down, it sends 10 bytes of zeroes
* instead of a fake MAC address and PPP header. */
else if (tvb_memeql(tvb, 0, zeroes,10) == 0) {
- next_tvb = tvb_new_subset_remaining(tvb, 10);
- call_dissector(ip_handle, next_tvb, pinfo, tree);
+ next_tvb = tvb_new_subset_remaining(tvb, 10);
+ call_dissector(ip_handle, next_tvb, pinfo, tree);
}
else {
- /*
- * OK, is this IPv4 or IPv6?
- */
- switch (tvb_get_guint8(tvb, 0) & 0xF0) {
-
- case 0x40:
- /* IPv4 */
- call_dissector(ip_handle, tvb, pinfo, tree);
- break;
-
- case 0x60:
- /* IPv6 */
- call_dissector(ipv6_handle, tvb, pinfo, tree);
- break;
-
- default:
- /* None of the above. */
- call_dissector(data_handle, tvb, pinfo, tree);
- break;
- }
+ /*
+ * OK, is this IPv4 or IPv6?
+ */
+ switch (tvb_get_guint8(tvb, 0) & 0xF0) {
+
+ case 0x40:
+ /* IPv4 */
+ call_dissector(ip_handle, tvb, pinfo, tree);
+ break;
+
+ case 0x60:
+ /* IPv6 */
+ call_dissector(ipv6_handle, tvb, pinfo, tree);
+ break;
+
+ default:
+ /* None of the above. */
+ call_dissector(data_handle, tvb, pinfo, tree);
+ break;
+ }
}
}
@@ -208,3 +207,16 @@ proto_reg_handoff_raw(void)
dissector_add_uint("wtap_encap", WTAP_ENCAP_RAW_IP4, raw_handle);
dissector_add_uint("wtap_encap", WTAP_ENCAP_RAW_IP6, raw_handle);
}
+
+/*
+ * Editor modelines
+ *
+ * Local Variables:
+ * c-basic-offset: 2
+ * tab-width: 8
+ * indent-tabs-mode: nil
+ * End:
+ *
+ * ex: set shiftwidth=2 tabstop=8 expandtab:
+ * :indentSize=2:tabSize=8:noTabs=true:
+ */