aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap/netscreen.c
diff options
context:
space:
mode:
authorBill Meier <wmeier@newsguy.com>2015-01-01 19:45:22 -0500
committerBill Meier <wmeier@newsguy.com>2015-01-02 00:49:09 +0000
commit454fd6e9eb3009cd346443ba06498904d6cea228 (patch)
treed7b5e3e699e0992a0d767b7017fbac44a0531069 /wiretap/netscreen.c
parent887cce4a5f4a03a74899d8f7388550aeaed7edc5 (diff)
Add "Editor modelines"; Adjust whitespace as needed.
Change-Id: Ic5a5acb0f36d3aa144edbfb1ae71097b18426db4 Reviewed-on: https://code.wireshark.org/review/6216 Reviewed-by: Bill Meier <wmeier@newsguy.com>
Diffstat (limited to 'wiretap/netscreen.c')
-rw-r--r--wiretap/netscreen.c47
1 files changed, 30 insertions, 17 deletions
diff --git a/wiretap/netscreen.c b/wiretap/netscreen.c
index cce6924463..11c5fea7fd 100644
--- a/wiretap/netscreen.c
+++ b/wiretap/netscreen.c
@@ -389,8 +389,8 @@ parse_netscreen_hex_dump(FILE_T fh, int pkt_len, const char *cap_int,
*/
if(offset > pkt_len) {
*err = WTAP_ERR_BAD_FILE;
- *err_info = g_strdup("netscreen: too much hex-data");
- return FALSE;
+ *err_info = g_strdup("netscreen: too much hex-data");
+ return FALSE;
}
}
@@ -398,23 +398,23 @@ parse_netscreen_hex_dump(FILE_T fh, int pkt_len, const char *cap_int,
* Determine the encapsulation type, based on the
* first 4 characters of the interface name
*
- * XXX convert this to a 'case' structure when adding more
- * (non-ethernet) interfacetypes
+ * XXX convert this to a 'case' structure when adding more
+ * (non-ethernet) interfacetypes
*/
if (strncmp(cap_int, "adsl", 4) == 0) {
- /* The ADSL interface can be bridged with or without
- * PPP encapsulation. Check whether the first six bytes
- * of the hex data are the same as the destination mac
- * address in the header. If they are, assume ethernet
- * LinkLayer or else PPP
- */
- g_snprintf(dststr, 13, "%02x%02x%02x%02x%02x%02x",
- pd[0], pd[1], pd[2], pd[3], pd[4], pd[5]);
- if (strncmp(dststr, cap_dst, 12) == 0)
- phdr->pkt_encap = WTAP_ENCAP_ETHERNET;
- else
- phdr->pkt_encap = WTAP_ENCAP_PPP;
- }
+ /* The ADSL interface can be bridged with or without
+ * PPP encapsulation. Check whether the first six bytes
+ * of the hex data are the same as the destination mac
+ * address in the header. If they are, assume ethernet
+ * LinkLayer or else PPP
+ */
+ g_snprintf(dststr, 13, "%02x%02x%02x%02x%02x%02x",
+ pd[0], pd[1], pd[2], pd[3], pd[4], pd[5]);
+ if (strncmp(dststr, cap_dst, 12) == 0)
+ phdr->pkt_encap = WTAP_ENCAP_ETHERNET;
+ else
+ phdr->pkt_encap = WTAP_ENCAP_PPP;
+ }
else if (strncmp(cap_int, "seri", 4) == 0)
phdr->pkt_encap = WTAP_ENCAP_PPP;
else
@@ -476,3 +476,16 @@ parse_single_hex_dump_line(char* rec, guint8 *buf, guint byte_offset)
return num_items_scanned;
}
+
+/*
+ * 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:
+ */