summaryrefslogtreecommitdiff
path: root/wiretap/daintree-sna.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2011-09-01 09:43:10 +0000
committerGuy Harris <guy@alum.mit.edu>2011-09-01 09:43:10 +0000
commite9fc1b72aabaae01cd6cad613dfc88168d8aed9a (patch)
treec1bdbe16d5579966f05db9cb334a115e011e08ff /wiretap/daintree-sna.c
parent10a3cb6e0f30290ccce97c01d482f05d083915a6 (diff)
downloadwireshark-e9fc1b72aabaae01cd6cad613dfc88168d8aed9a.tar.gz
Use guint8 rather than guchar for raw octets and pointers to arrays of
same. Add to wiretap/pcap-common.c a routine to fill in the pseudo-header for ATM (by looking at the VPI, VCI, and packet data, and guessing) and Ethernet (setting the FCS length appropriately). Use it for both pcap and pcap-ng files. svn path=/trunk/; revision=38840
Diffstat (limited to 'wiretap/daintree-sna.c')
-rw-r--r--wiretap/daintree-sna.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/wiretap/daintree-sna.c b/wiretap/daintree-sna.c
index 4c39b1524c..113ed4a78f 100644
--- a/wiretap/daintree-sna.c
+++ b/wiretap/daintree-sna.c
@@ -94,7 +94,7 @@ static gboolean daintree_sna_read(wtap *wth, int *err, gchar **err_info,
static gboolean daintree_sna_seek_read(wtap *wth, gint64 seek_off,
union wtap_pseudo_header *pseudo_header _U_,
- guchar *pd, int len, int *err,
+ guint8 *pd, int len, int *err,
gchar **err_info);
static guint daintree_sna_hex_char(guchar *str, int *err);
@@ -199,7 +199,7 @@ daintree_sna_read(wtap *wth, int *err, gchar **err_info, gint64 *data_offset)
* Wireshark opens the capture file for random access when displaying user-selected packets */
static gboolean
daintree_sna_seek_read(wtap *wth, gint64 seek_off, union wtap_pseudo_header
- *pseudo_header _U_, guchar *pd, int len, int *err,
+ *pseudo_header _U_, guint8 *pd, int len, int *err,
gchar **err_info)
{
guint pkt_len;
@@ -244,15 +244,15 @@ daintree_sna_seek_read(wtap *wth, gint64 seek_off, union wtap_pseudo_header
return TRUE;
}
-/* Convert an ASCII hex string to guchar */
+/* Convert an ASCII hex string to guint8 */
static guint
daintree_sna_hex_char(guchar *str, int *err _U_) {
guint bytes;
- guchar *p;
+ guint8 *p;
p = str; /* overlay source buffer */
bytes = 0;
- /* convert hex string to guchar */
+ /* convert hex string to guint8 */
while(*str) {
if (!isxdigit((guchar)*str)) return 0;
/* most significant nibble */