summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--epan/dissectors/packet-ceph.c1
-rw-r--r--epan/dissectors/packet-cfdp.c2
-rw-r--r--epan/dissectors/packet-etsi_card_app_toolkit.c3
-rw-r--r--epan/dissectors/packet-gsm_a_gm.c1
-rw-r--r--epan/dissectors/packet-gsm_a_rr.c159
-rw-r--r--epan/dissectors/packet-gsm_sim.c30
-rw-r--r--epan/dissectors/packet-gsmtap.c1
-rw-r--r--epan/dissectors/packet-juniper.c22
-rw-r--r--epan/dissectors/packet-mih.c15
-rw-r--r--epan/dissectors/packet-mpeg-pat.c1
-rw-r--r--epan/dissectors/packet-nflog.c1
-rw-r--r--epan/dissectors/packet-null.c206
-rw-r--r--epan/dissectors/packet-openflow_v1.c14
-rw-r--r--epan/dissectors/packet-raw.c74
-rw-r--r--epan/dissectors/packet-rmt-fec.c1
-rw-r--r--epan/dissectors/packet-sll.c19
-rw-r--r--epan/dissectors/packet-ssl-utils.h2
17 files changed, 315 insertions, 237 deletions
diff --git a/epan/dissectors/packet-ceph.c b/epan/dissectors/packet-ceph.c
index 94af3d09bf..85121ebaff 100644
--- a/epan/dissectors/packet-ceph.c
+++ b/epan/dissectors/packet-ceph.c
@@ -27,7 +27,6 @@
#include <epan/packet.h>
#include <epan/expert.h>
-#include <epan/prefs.h>
#include <epan/conversation.h>
#include <epan/to_str.h>
diff --git a/epan/dissectors/packet-cfdp.c b/epan/dissectors/packet-cfdp.c
index 369a55bcfa..bfa6ecb509 100644
--- a/epan/dissectors/packet-cfdp.c
+++ b/epan/dissectors/packet-cfdp.c
@@ -24,8 +24,6 @@
#include "config.h"
#include <glib.h>
#include <epan/packet.h>
-#include <epan/expert.h>
-#include <epan/prefs.h>
/* The CFDP standard can be found here:
diff --git a/epan/dissectors/packet-etsi_card_app_toolkit.c b/epan/dissectors/packet-etsi_card_app_toolkit.c
index 2b41977074..7235704f6a 100644
--- a/epan/dissectors/packet-etsi_card_app_toolkit.c
+++ b/epan/dissectors/packet-etsi_card_app_toolkit.c
@@ -31,7 +31,6 @@
#include <epan/packet.h>
#include <epan/emem.h>
#include <epan/lapd_sapi.h>
-#include <epan/prefs.h>
#include "packet-e212.h"
#include "packet-gsm_a_common.h"
@@ -1883,8 +1882,6 @@ proto_register_card_app_toolkit(void)
new_register_dissector("etsi_cat", dissect_cat, proto_cat);
}
-/* This function is called once at startup and every time the user hits
- * 'apply' in the preferences dialogue */
void
proto_reg_handoff_card_app_toolkit(void)
{
diff --git a/epan/dissectors/packet-gsm_a_gm.c b/epan/dissectors/packet-gsm_a_gm.c
index abb686fcdc..ba506b6298 100644
--- a/epan/dissectors/packet-gsm_a_gm.c
+++ b/epan/dissectors/packet-gsm_a_gm.c
@@ -72,7 +72,6 @@
#include <epan/packet.h>
#include <epan/expert.h>
-#include <epan/prefs.h>
#include <epan/tap.h>
#include <epan/asn1.h>
#include <epan/wmem/wmem.h>
diff --git a/epan/dissectors/packet-gsm_a_rr.c b/epan/dissectors/packet-gsm_a_rr.c
index 239809a247..b7257363e3 100644
--- a/epan/dissectors/packet-gsm_a_rr.c
+++ b/epan/dissectors/packet-gsm_a_rr.c
@@ -45,7 +45,6 @@
#include "config.h"
#include <epan/packet.h>
-#include <epan/prefs.h>
#include <epan/tap.h>
#include <epan/asn1.h>
#include <epan/expert.h>
@@ -1083,86 +1082,86 @@ gint f_k(gint k, gint *w, gint range)
static void dissect_channel_list_n_range(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len, gint range)
{
- gint curr_offset = offset, bit_offset, f0, arfcn_orig, w[64], wsize, i;
- gint octet, nwi = 1, jwi=0, imax, iused, arfcn;
- guint8 list[1024];
- proto_tree *subtree;
-
- memset((void*)list,0,sizeof(list));
-
- subtree = proto_tree_add_subtree_format(tree,tvb, curr_offset, len,
- ett_gsm_rr_elem[DE_RR_NEIGH_CELL_DESC], NULL, "Range %d format", range);
-
- octet = tvb_get_guint8(tvb, curr_offset);
- if (range == 1024) {
- f0 = (octet>>2)&1;
- if (f0)
- list[0] = 1;
- arfcn_orig = 0;
- wsize = 10;
- imax = 16;
- bit_offset = curr_offset*8 + 6;
- }
- else {
- bit_offset = curr_offset*8 + 7;
- arfcn_orig = (gint) tvb_get_bits(tvb, bit_offset, 10, FALSE);
- proto_tree_add_bits_item(subtree, hf_n_range_orig_arfcn, tvb, bit_offset, 10, ENC_BIG_ENDIAN);
- bit_offset+=10;
-
- list[arfcn_orig] = 1;
-
- switch (range) {
- case 512:
- wsize=9;
- imax = 17;
- break;
- case 256:
- wsize=8;
- imax = 21;
- break;
- case 128:
- wsize=7;
- imax = 28;
- break;
- default:
- DISSECTOR_ASSERT_NOT_REACHED();
- }
- }
- iused = imax; /* in case the list is actually full */
+ gint curr_offset = offset, bit_offset, f0, arfcn_orig, w[64], wsize, i;
+ gint octet, nwi = 1, jwi=0, imax, iused, arfcn;
+ guint8 list[1024];
+ proto_tree *subtree;
- /* extract the variable size w[] elements */
- for (i=1; i<=imax; i++) {
- w[i] = (gint) tvb_get_bits(tvb, bit_offset, wsize, FALSE);
- proto_tree_add_text(subtree, tvb, bit_offset>>3, ((bit_offset+wsize-1)>>3) - (bit_offset>>3) + 1 , "%s %s(%d): %d",
- decode_bits_in_field(bit_offset, wsize, w[i]),
- "W",
- i,
- w[i]);
- bit_offset += wsize;
- curr_offset = bit_offset>>3;
+ memset((void*)list,0,sizeof(list));
- if ((iused == imax) && (w[i] == 0) ) {
- iused = i - 1;
+ subtree = proto_tree_add_subtree_format(tree,tvb, curr_offset, len,
+ ett_gsm_rr_elem[DE_RR_NEIGH_CELL_DESC], NULL, "Range %d format", range);
+
+ octet = tvb_get_guint8(tvb, curr_offset);
+ if (range == 1024) {
+ f0 = (octet>>2)&1;
+ if (f0)
+ list[0] = 1;
+ arfcn_orig = 0;
+ wsize = 10;
+ imax = 16;
+ bit_offset = curr_offset*8 + 6;
}
- if ((curr_offset-offset)>len) {
- iused = i - 1;
- break;
+ else {
+ bit_offset = curr_offset*8 + 7;
+ arfcn_orig = (gint) tvb_get_bits(tvb, bit_offset, 10, FALSE);
+ proto_tree_add_bits_item(subtree, hf_n_range_orig_arfcn, tvb, bit_offset, 10, ENC_BIG_ENDIAN);
+ bit_offset+=10;
+
+ list[arfcn_orig] = 1;
+
+ switch (range) {
+ case 512:
+ wsize=9;
+ imax = 17;
+ break;
+ case 256:
+ wsize=8;
+ imax = 21;
+ break;
+ case 128:
+ wsize=7;
+ imax = 28;
+ break;
+ default:
+ DISSECTOR_ASSERT_NOT_REACHED();
+ }
}
- if (++jwi == nwi) { /* check if the number of wi at this wsize has been extracted */
- jwi = 0; /* reset the count of wi at this size */
- nwi <<= 1; /* get twice as many of the next size */
- wsize--; /* make the next size 1 bit smaller */
+ iused = imax; /* in case the list is actually full */
+
+ /* extract the variable size w[] elements */
+ for (i=1; i<=imax; i++) {
+ w[i] = (gint) tvb_get_bits(tvb, bit_offset, wsize, FALSE);
+ proto_tree_add_text(subtree, tvb, bit_offset>>3, ((bit_offset+wsize-1)>>3) - (bit_offset>>3) + 1 , "%s %s(%d): %d",
+ decode_bits_in_field(bit_offset, wsize, w[i]),
+ "W",
+ i,
+ w[i]);
+ bit_offset += wsize;
+ curr_offset = bit_offset>>3;
+
+ if ((iused == imax) && (w[i] == 0) ) {
+ iused = i - 1;
+ }
+ if ((curr_offset-offset)>len) {
+ iused = i - 1;
+ break;
+ }
+ if (++jwi == nwi) { /* check if the number of wi at this wsize has been extracted */
+ jwi = 0; /* reset the count of wi at this size */
+ nwi <<= 1; /* get twice as many of the next size */
+ wsize--; /* make the next size 1 bit smaller */
+ }
}
- }
- for (i=1; i<=iused; i++) {
- arfcn = (f_k(i, w, range) + arfcn_orig)%1024;
- list[arfcn] = 1;
- }
+ for (i=1; i<=iused; i++) {
+ arfcn = (f_k(i, w, range) + arfcn_orig)%1024;
+ list[arfcn] = 1;
+ }
- display_channel_list(list, tvb, tree, offset, curr_offset-offset);
+ display_channel_list(list, tvb, tree, offset, curr_offset-offset);
- return;
+ return;
}
static guint16
@@ -12696,3 +12695,17 @@ proto_reg_handoff_gsm_a_rr(void)
rrc_irat_ho_to_utran_cmd_handle = find_dissector("rrc.irat.ho_to_utran_cmd");
rrlp_dissector = find_dissector("rrlp");
}
+
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 4
+ * tab-width: 8
+ * indent-tabs-mode: nil
+ * End:
+ *
+ * vi: set shiftwidth=4 tabstop=8 expandtab:
+ * :indentSize=4:tabSize=8:noTabs=true:
+ */
diff --git a/epan/dissectors/packet-gsm_sim.c b/epan/dissectors/packet-gsm_sim.c
index 9dc1c933ed..028a5d1d86 100644
--- a/epan/dissectors/packet-gsm_sim.c
+++ b/epan/dissectors/packet-gsm_sim.c
@@ -31,7 +31,6 @@
#include <epan/packet.h>
#include <epan/emem.h>
#include <epan/lapd_sapi.h>
-#include <epan/prefs.h>
void proto_register_gsm_sim(void);
void proto_reg_handoff_gsm_sim(void);
@@ -2861,20 +2860,25 @@ proto_register_gsm_sim(void)
register_dissector("gsm_sim.bertlv", dissect_bertlv, proto_gsm_sim);
}
-/* This function is called once at startup and every time the user hits
- * 'apply' in the preferences dialogue */
void
proto_reg_handoff_gsm_sim(void)
{
- static gboolean initialized = FALSE;
+ dissector_handle_t sim_handle;
+ sim_handle = find_dissector("gsm_sim");
+ dissector_add_uint("gsmtap.type", 4, sim_handle);
- if (!initialized) {
- dissector_handle_t sim_handle;
- sim_handle = find_dissector("gsm_sim");
- dissector_add_uint("gsmtap.type", 4, sim_handle);
-
- sub_handle_cap = find_dissector("etsi_cat");
- } else {
- /* preferences have been changed */
- }
+ sub_handle_cap = find_dissector("etsi_cat");
}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 8
+ * tab-width: 8
+ * indent-tabs-mode: t
+ * End:
+ *
+ * vi: set shiftwidth=8 tabstop=8 noexpandtab:
+ * :indentSize=8:tabSize=8:noTabs=false:
+ */
diff --git a/epan/dissectors/packet-gsmtap.c b/epan/dissectors/packet-gsmtap.c
index 33deab366f..1e1ba17183 100644
--- a/epan/dissectors/packet-gsmtap.c
+++ b/epan/dissectors/packet-gsmtap.c
@@ -42,7 +42,6 @@
#include <glib.h>
#include <epan/packet.h>
-#include <epan/prefs.h>
#include "packet-tetra.h"
#include "packet-rrc.h"
diff --git a/epan/dissectors/packet-juniper.c b/epan/dissectors/packet-juniper.c
index e35c5275c4..191457cdaf 100644
--- a/epan/dissectors/packet-juniper.c
+++ b/epan/dissectors/packet-juniper.c
@@ -26,7 +26,6 @@
#include <glib.h>
#include <epan/packet.h>
#include <epan/etypes.h>
-#include <epan/prefs.h>
#include <epan/addr_resolv.h>
#include <epan/ppptypes.h>
#include "packet-ppp.h"
@@ -670,10 +669,10 @@ dissect_juniper_payload_proto(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tre
call_dissector(chdlc_handle, next_tvb, pinfo, tree);
break;
case 0xa248:
- proto_tree_add_text (juniper_subtree, tvb, offset, 4,"[Unknown data]");
- next_tvb = tvb_new_subset_remaining(tvb, offset+4);
- call_dissector(ipv4_handle, next_tvb, pinfo, tree);
- break;
+ proto_tree_add_text (juniper_subtree, tvb, offset, 4,"[Unknown data]");
+ next_tvb = tvb_new_subset_remaining(tvb, offset+4);
+ call_dissector(ipv4_handle, next_tvb, pinfo, tree);
+ break;
case PROTO_OAM: /* FIXME call OAM disector without leading HEC byte */
default:
call_dissector(data_handle, next_tvb, pinfo, tree);
@@ -1517,3 +1516,16 @@ proto_reg_handoff_juniper(void)
}
+
+/*
+ * 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:
+ */
diff --git a/epan/dissectors/packet-mih.c b/epan/dissectors/packet-mih.c
index 9de528e211..8689b12e36 100644
--- a/epan/dissectors/packet-mih.c
+++ b/epan/dissectors/packet-mih.c
@@ -34,7 +34,6 @@
#include <epan/packet.h>
#include <epan/exceptions.h>
-#include <epan/prefs.h>
#include <epan/reassemble.h>
#include <epan/proto.h>
#include <epan/etypes.h>
@@ -4755,3 +4754,17 @@ void proto_reg_handoff_mih(void)
/*Layer 2 handle*/
dissector_add_uint("ethertype", ETHERTYPE_MIH, mih_handle);
}
+
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 8
+ * tab-width: 8
+ * indent-tabs-mode: nil
+ * End:
+ *
+ * vi: set shiftwidth=8 tabstop=8 expandtab:
+ * :indentSize=8:tabSize=8:noTabs=true:
+ */
diff --git a/epan/dissectors/packet-mpeg-pat.c b/epan/dissectors/packet-mpeg-pat.c
index 61b8602f54..6832f4a41f 100644
--- a/epan/dissectors/packet-mpeg-pat.c
+++ b/epan/dissectors/packet-mpeg-pat.c
@@ -26,7 +26,6 @@
#include <glib.h>
#include <epan/packet.h>
-#include <epan/prefs.h>
#include <epan/dissectors/packet-mpeg-sect.h>
void proto_register_mpeg_pat(void);
diff --git a/epan/dissectors/packet-nflog.c b/epan/dissectors/packet-nflog.c
index 3d786a195e..c82bc97485 100644
--- a/epan/dissectors/packet-nflog.c
+++ b/epan/dissectors/packet-nflog.c
@@ -27,7 +27,6 @@
#include <glib.h>
#include <epan/packet.h>
-#include <epan/prefs.h>
#include <epan/aftypes.h>
#include <wiretap/wtap.h>
diff --git a/epan/dissectors/packet-null.c b/epan/dissectors/packet-null.c
index 075c948ef3..6925fc0c4b 100644
--- a/epan/dissectors/packet-null.c
+++ b/epan/dissectors/packet-null.c
@@ -30,7 +30,6 @@
#include <epan/packet.h>
#include "packet-null.h"
#include <epan/atalk-utils.h>
-#include <epan/prefs.h>
#include "packet-ip.h"
#include "packet-ipv6.h"
#include "packet-ipx.h"
@@ -57,14 +56,14 @@ static gint ett_null = -1;
/* Family values. */
static const value_string family_vals[] = {
- {BSD_AF_INET, "IP" },
- {BSD_AF_ISO, "OSI" },
- {BSD_AF_APPLETALK, "Appletalk" },
- {BSD_AF_IPX, "Netware IPX/SPX"},
- {BSD_AF_INET6_BSD, "IPv6" },
- {BSD_AF_INET6_FREEBSD, "IPv6" },
- {BSD_AF_INET6_DARWIN, "IPv6" },
- {0, NULL }
+ {BSD_AF_INET, "IP" },
+ {BSD_AF_ISO, "OSI" },
+ {BSD_AF_APPLETALK, "Appletalk" },
+ {BSD_AF_IPX, "Netware IPX/SPX"},
+ {BSD_AF_INET6_BSD, "IPv6" },
+ {BSD_AF_INET6_FREEBSD, "IPv6" },
+ {BSD_AF_INET6_DARWIN, "IPv6" },
+ {0, NULL }
};
static dissector_handle_t ppp_hdlc_handle;
@@ -86,11 +85,11 @@ capture_null( const guchar *pd, int len, packet_counts *ld )
* on loopback devices, a 4-byte header that has a 2 byte (big-endian)
* AF_ value and 2 bytes of 0, so it's
*
- * 0000AAAA
+ * 0000AAAA
*
* when read on a little-endian machine and
*
- * AAAA0000
+ * AAAA0000
*
* when read on a big-endian machine. The current CVS version of libpcap
* compensates for this by converting it to standard 4-byte format before
@@ -103,35 +102,35 @@ capture_null( const guchar *pd, int len, packet_counts *ld )
* This means that, in practice, if you look at the header as a 32-bit
* integer in host byte order:
*
- * on a little-endian machine:
+ * on a little-endian machine:
*
- * a little-endian DLT_NULL header looks like
+ * a little-endian DLT_NULL header looks like
*
- * 000000AA
+ * 000000AA
*
- * a big-endian DLT_NULL header, or a DLT_LOOP header, looks
- * like
+ * a big-endian DLT_NULL header, or a DLT_LOOP header, looks
+ * like
*
- * AA000000
+ * AA000000
*
- * an IRIX or UNICOS/mp DLT_NULL header looks like
+ * an IRIX or UNICOS/mp DLT_NULL header looks like
*
- * 0000AA00
+ * 0000AA00
*
- * on a big-endian machine:
+ * on a big-endian machine:
*
- * a big-endian DLT_NULL header, or a DLT_LOOP header, looks
- * like
+ * a big-endian DLT_NULL header, or a DLT_LOOP header, looks
+ * like
*
- * 000000AA
+ * 000000AA
*
- * a little-endian DLT_NULL header looks like
+ * a little-endian DLT_NULL header looks like
*
- * AA000000
+ * AA000000
*
- * an IRIX or UNICOS/mp DLT_NULL header looks like
+ * an IRIX or UNICOS/mp DLT_NULL header looks like
*
- * 00AA0000
+ * 00AA0000
*
* However, according to Gerald Combs, a FreeBSD ISDN PPP dump that
* Andreas Klemm sent to wireshark-dev has a packet type of DLT_NULL,
@@ -141,19 +140,19 @@ capture_null( const guchar *pd, int len, packet_counts *ld )
* RFC 1549, wherein the first two octets of the frame are 0xFF
* (address) and 0x03 (control), so the header bytes are, in order:
*
- * 0xFF
- * 0x03
- * high-order byte of a PPP protocol field
- * low-order byte of a PPP protocol field
+ * 0xFF
+ * 0x03
+ * high-order byte of a PPP protocol field
+ * low-order byte of a PPP protocol field
*
* If we treat that as a 32-bit host-byte-order value, it looks like
*
- * PPPP03FF
+ * PPPP03FF
*
* where PPPP is a byte-swapped PPP protocol type if we read it on
* a little-endian machine and
*
- * FF03PPPP
+ * FF03PPPP
*
* where PPPP is a PPP protocol type if we read it on a big-endian
* machine. 0x0000 does not appear to be a valid PPP protocol type
@@ -170,41 +169,41 @@ capture_null( const guchar *pd, int len, packet_counts *ld )
* This means that if we're reading the capture on a little-endian
* machine, the header, treated as a 32-bit integer, looks like
*
- * EEEE0000
+ * EEEE0000
*
* where EEEE is a byte-swapped Ethernet type, and if we're reading it
* on a big-endian machine, it looks like
*
- * 0000EEEE
+ * 0000EEEE
*
* where EEEE is an Ethernet type.
*
* If the first 2 bytes of the header are FF 03:
*
- * it can't be a big-endian BSD DLT_NULL header, or a DLT_LOOP
- * header, as AF_ values are small so the first 2 bytes of the
- * header would be 0;
+ * it can't be a big-endian BSD DLT_NULL header, or a DLT_LOOP
+ * header, as AF_ values are small so the first 2 bytes of the
+ * header would be 0;
*
- * it can't be a little-endian BSD DLT_NULL header, as the
- * resulting AF_ value would be >= 0x03FF, which is too big
- * for an AF_ value;
+ * it can't be a little-endian BSD DLT_NULL header, as the
+ * resulting AF_ value would be >= 0x03FF, which is too big
+ * for an AF_ value;
*
- * it can't be an IRIX or UNICOS/mp DLT_NULL header, as the
- * resulting AF_ value with be 0x03FF.
+ * it can't be an IRIX or UNICOS/mp DLT_NULL header, as the
+ * resulting AF_ value with be 0x03FF.
*
* So the first thing we do is check the first two bytes of the
* header; if it's FF 03, we treat the packet as a PPP frame.
*
* Otherwise, if the upper 16 bits are non-zero, either:
*
- * it's a BSD DLT_NULL or DLT_LOOP header whose AF_ value
- * is not in our byte order;
+ * it's a BSD DLT_NULL or DLT_LOOP header whose AF_ value
+ * is not in our byte order;
*
- * it's an IRIX or UNICOS/mp DLT_NULL header being read on
- * a big-endian machine;
+ * it's an IRIX or UNICOS/mp DLT_NULL header being read on
+ * a big-endian machine;
*
- * it's a Linux DLT_NULL header being read on a little-endian
- * machine.
+ * it's a Linux DLT_NULL header being read on a little-endian
+ * machine.
*
* In all those cases except for the IRIX or UNICOS/mp DLT_NULL header,
* we should byte-swap it (if it's a Linux DLT_NULL header, that'll
@@ -230,22 +229,22 @@ capture_null( const guchar *pd, int len, packet_counts *ld )
*
* So, if the upper 16 bits are non-zero:
*
- * if the upper 2 hex digits are 0 and the next 2 hex digits are
- * in the range 0x00-0x5F, we treat it as a big-endian IRIX or
- * UNICOS/mp DLT_NULL header;
+ * if the upper 2 hex digits are 0 and the next 2 hex digits are
+ * in the range 0x00-0x5F, we treat it as a big-endian IRIX or
+ * UNICOS/mp DLT_NULL header;
*
- * otherwise, we byte-swap it and do the next stage.
+ * otherwise, we byte-swap it and do the next stage.
*
* If the upper 16 bits are zero, either:
*
- * it's a BSD DLT_NULLor DLT_LOOP header whose AF_ value is in
- * our byte order;
+ * it's a BSD DLT_NULLor DLT_LOOP header whose AF_ value is in
+ * our byte order;
*
- * it's an IRIX or UNICOS/mp DLT_NULL header being read on
- * a little-endian machine;
+ * it's an IRIX or UNICOS/mp DLT_NULL header being read on
+ * a little-endian machine;
*
- * it's a Linux DLT_NULL header being read on a big-endian
- * machine.
+ * it's a Linux DLT_NULL header being read on a big-endian
+ * machine.
*
* In all of those cases except for the IRIX or UNICOS/mp DLT_NULL header,
* we should *not* byte-swap it. In the case of the IRIX or UNICOS/mp
@@ -349,10 +348,10 @@ capture_null( const guchar *pd, int len, packet_counts *ld )
static void
dissect_null(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
- guint32 null_header;
- proto_tree *fh_tree;
- proto_item *ti;
- tvbuff_t *next_tvb;
+ guint32 null_header;
+ proto_tree *fh_tree;
+ proto_item *ti;
+ tvbuff_t *next_tvb;
/*
* See comment in "capture_null()" for an explanation of what we're
@@ -432,7 +431,7 @@ dissect_null(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
next_tvb = tvb_new_subset_remaining(tvb, 4);
if (!dissector_try_uint(ethertype_dissector_table,
(guint16) null_header, next_tvb, pinfo, tree))
- call_dissector(data_handle, next_tvb, pinfo, tree);
+ call_dissector(data_handle, next_tvb, pinfo, tree);
} else {
/* populate a tree in the second pane with the status of the link
layer (ie none) */
@@ -444,7 +443,7 @@ dissect_null(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
next_tvb = tvb_new_subset_remaining(tvb, 4);
if (!dissector_try_uint(null_dissector_table, null_header,
- next_tvb, pinfo, tree)) {
+ next_tvb, pinfo, tree)) {
/* No sub-dissector found. Label rest of packet as "Data" */
call_dissector(data_handle,next_tvb, pinfo, tree);
}
@@ -455,44 +454,57 @@ dissect_null(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
void
proto_register_null(void)
{
- static hf_register_info hf[] = {
-
- /* registered here but handled in ethertype.c */
- { &hf_null_etype,
- { "Type", "null.type", FT_UINT16, BASE_HEX, VALS(etype_vals), 0x0,
- NULL, HFILL }},
-
- { &hf_null_family,
- { "Family", "null.family", FT_UINT32, BASE_DEC, VALS(family_vals), 0x0,
- NULL, HFILL }}
- };
- static gint *ett[] = {
- &ett_null,
- };
-
- proto_null = proto_register_protocol("Null/Loopback", "Null", "null");
- proto_register_field_array(proto_null, hf, array_length(hf));
- proto_register_subtree_array(ett, array_length(ett));
-
- /* subdissector code */
- null_dissector_table = register_dissector_table("null.type",
- "Null type", FT_UINT32, BASE_DEC);
+ static hf_register_info hf[] = {
+
+ /* registered here but handled in ethertype.c */
+ { &hf_null_etype,
+ { "Type", "null.type", FT_UINT16, BASE_HEX, VALS(etype_vals), 0x0,
+ NULL, HFILL }},
+
+ { &hf_null_family,
+ { "Family", "null.family", FT_UINT32, BASE_DEC, VALS(family_vals), 0x0,
+ NULL, HFILL }}
+ };
+ static gint *ett[] = {
+ &ett_null,
+ };
+
+ proto_null = proto_register_protocol("Null/Loopback", "Null", "null");
+ proto_register_field_array(proto_null, hf, array_length(hf));
+ proto_register_subtree_array(ett, array_length(ett));
+
+ /* subdissector code */
+ null_dissector_table = register_dissector_table("null.type",
+ "Null type", FT_UINT32, BASE_DEC);
}
void
proto_reg_handoff_null(void)
{
- dissector_handle_t null_handle;
+ dissector_handle_t null_handle;
- /*
- * Get a handle for the PPP-in-HDLC-like-framing dissector and
- * the "I don't know what this is" dissector.
- */
- ppp_hdlc_handle = find_dissector("ppp_hdlc");
- data_handle = find_dissector("data");
+ /*
+ * Get a handle for the PPP-in-HDLC-like-framing dissector and
+ * the "I don't know what this is" dissector.
+ */
+ ppp_hdlc_handle = find_dissector("ppp_hdlc");
+ data_handle = find_dissector("data");
- ethertype_dissector_table = find_dissector_table("ethertype");
+ ethertype_dissector_table = find_dissector_table("ethertype");
- null_handle = create_dissector_handle(dissect_null, proto_null);
- dissector_add_uint("wtap_encap", WTAP_ENCAP_NULL, null_handle);
+ null_handle = create_dissector_handle(dissect_null, proto_null);
+ dissector_add_uint("wtap_encap", WTAP_ENCAP_NULL, null_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:
+ */
diff --git a/epan/dissectors/packet-openflow_v1.c b/epan/dissectors/packet-openflow_v1.c
index 0b03bfcfd1..2b93a773b1 100644
--- a/epan/dissectors/packet-openflow_v1.c
+++ b/epan/dissectors/packet-openflow_v1.c
@@ -29,7 +29,6 @@
#include <glib.h>
#include <epan/packet.h>
-#include <epan/prefs.h>
void proto_register_openflow_v1(void);
void proto_reg_handoff_openflow_v1(void);
@@ -1288,3 +1287,16 @@ proto_register_openflow_v1(void)
proto_register_field_array(proto_openflow_v1, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 4
+ * tab-width: 8
+ * indent-tabs-mode: nil
+ * End:
+ *
+ * vi: set shiftwidth=4 tabstop=8 expandtab:
+ * :indentSize=4:tabSize=8:noTabs=true:
+ */
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:
+ */
diff --git a/epan/dissectors/packet-rmt-fec.c b/epan/dissectors/packet-rmt-fec.c
index 3e08704165..e5c7c5d7eb 100644
--- a/epan/dissectors/packet-rmt-fec.c
+++ b/epan/dissectors/packet-rmt-fec.c
@@ -41,7 +41,6 @@
#include <glib.h>
#include <epan/packet.h>
-#include <epan/prefs.h>
#include <epan/expert.h>
#include <epan/wmem/wmem.h>
diff --git a/epan/dissectors/packet-sll.c b/epan/dissectors/packet-sll.c
index 517fa5e8ff..a6fef766b3 100644
--- a/epan/dissectors/packet-sll.c
+++ b/epan/dissectors/packet-sll.c
@@ -25,9 +25,9 @@
#include "config.h"
#include <glib.h>
-#include <epan/arptypes.h>
-#include <epan/prefs.h>
+
#include <epan/packet.h>
+#include <epan/arptypes.h>
#include <wsutil/pint.h>
#include "packet-sll.h"
#include "packet-ipx.h"
@@ -329,7 +329,7 @@ proto_register_sll(void)
&hfi_sll_gretype,
/* registered here but handled in ethertype.c */
&hfi_sll_etype,
- &hfi_sll_trailer,
+ &hfi_sll_trailer,
};
#endif
@@ -368,3 +368,16 @@ proto_reg_handoff_sll(void)
dissector_add_uint("wtap_encap", WTAP_ENCAP_SLL, sll_handle);
}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 8
+ * tab-width: 8
+ * indent-tabs-mode: t
+ * End:
+ *
+ * vi: set shiftwidth=8 tabstop=8 noexpandtab:
+ * :indentSize=8:tabSize=8:noTabs=false:
+ */
diff --git a/epan/dissectors/packet-ssl-utils.h b/epan/dissectors/packet-ssl-utils.h
index 8342e03d5f..6b9f2f5688 100644
--- a/epan/dissectors/packet-ssl-utils.h
+++ b/epan/dissectors/packet-ssl-utils.h
@@ -30,8 +30,6 @@
#include <epan/packet.h>
#include <epan/prefs.h>
#include <epan/wmem/wmem.h>
-#include <epan/tvbuff.h>
-#include <epan/proto.h>
#include <epan/expert.h>
#include <wsutil/wsgcrypt.h>