aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2000-05-19 08:18:17 +0000
committerGuy Harris <guy@alum.mit.edu>2000-05-19 08:18:17 +0000
commit0cc75a35697b455b29f0111c0d100639bed35ea8 (patch)
treecae7f818bec5f894f09f67cc380f7fd15aa17f58
parent17ccdafa03331d860c55f6ecd4093ca520d0737b (diff)
In Wiretap, a file stream handle is a "FILE_T", not a "FILE_T *" (a
"FILE_T" is either a "gzFile" or a "FILE *", depending on whether zlib support is enabled or not). Fix various function declarations and definitions. svn path=/trunk/; revision=1984
-rw-r--r--wiretap/ascend-grammar.y4
-rw-r--r--wiretap/ascend-int.h6
-rw-r--r--wiretap/ascend-scanner.l6
-rw-r--r--wiretap/i4btrace.c10
-rw-r--r--wiretap/iptrace.c10
-rw-r--r--wiretap/nettl.c10
-rw-r--r--wiretap/ngsniffer.c18
-rw-r--r--wiretap/radcom.c10
-rw-r--r--wiretap/snoop.c10
-rw-r--r--wiretap/toshiba.c10
10 files changed, 47 insertions, 47 deletions
diff --git a/wiretap/ascend-grammar.y b/wiretap/ascend-grammar.y
index 41d7dad015..c218c2ddb1 100644
--- a/wiretap/ascend-grammar.y
+++ b/wiretap/ascend-grammar.y
@@ -1,7 +1,7 @@
%{
/* ascend-grammar.y
*
- * $Id: ascend-grammar.y,v 1.11 2000/05/18 09:09:17 guy Exp $
+ * $Id: ascend-grammar.y,v 1.12 2000/05/19 08:18:14 guy Exp $
*
* Wiretap Library
* Copyright (c) 1998 by Gilbert Ramirez <gram@xiexie.org>
@@ -231,7 +231,7 @@ init_parse_ascend()
/* Parse the capture file. Return the offset of the next packet, or zero
if there is none. */
int
-parse_ascend(FILE_T *fh, void *pd, struct ascend_phdr *phdr,
+parse_ascend(FILE_T fh, void *pd, struct ascend_phdr *phdr,
ascend_pkthdr *hdr, int len)
{
/* yydebug = 1; */
diff --git a/wiretap/ascend-int.h b/wiretap/ascend-int.h
index d376fe259e..2b0f143c41 100644
--- a/wiretap/ascend-int.h
+++ b/wiretap/ascend-int.h
@@ -2,7 +2,7 @@
* Definitions for routines common to multiple modules in the Lucent/Ascend
* capture file reading code code, but not used outside that code.
*
- * $Id: ascend-int.h,v 1.5 2000/05/18 09:09:19 guy Exp $
+ * $Id: ascend-int.h,v 1.6 2000/05/19 08:18:14 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -43,8 +43,8 @@ extern struct ascend_phdr *pseudo_header;
int ascendlex(void);
void init_parse_ascend(void);
-void ascend_init_lexer(FILE_T *fh, FILE *nfh);
-int parse_ascend(FILE_T *fh, void *pd, struct ascend_phdr *phdr,
+void ascend_init_lexer(FILE_T fh, FILE *nfh);
+int parse_ascend(FILE_T fh, void *pd, struct ascend_phdr *phdr,
ascend_pkthdr *hdr, int len);
#endif /* ! __ASCEND_INT_H__ */
diff --git a/wiretap/ascend-scanner.l b/wiretap/ascend-scanner.l
index 2121066120..8f11adb35c 100644
--- a/wiretap/ascend-scanner.l
+++ b/wiretap/ascend-scanner.l
@@ -1,7 +1,7 @@
%{
/* ascend-scanner.l
*
- * $Id: ascend-scanner.l,v 1.14 2000/05/18 09:09:21 guy Exp $
+ * $Id: ascend-scanner.l,v 1.15 2000/05/19 08:18:14 guy Exp $
*
* Wiretap Library
* Copyright (c) 1998 by Gilbert Ramirez <gram@xiexie.org>
@@ -40,7 +40,7 @@
#include "ascend-int.h"
#include "file_wrappers.h"
-void *yy_fh;
+FILE_T yy_fh;
extern char *ascend_ra_ptr;
extern char *ascend_ra_last;
#define YY_INPUT(buf,result,max_size) { int c = file_getc(yy_fh); \
@@ -253,7 +253,7 @@ task:|time:|octets { return KEYWORD; }
int ascendwrap() { return 1; }
-void ascend_init_lexer(FILE_T *fh, FILE *nfh)
+void ascend_init_lexer(FILE_T fh, FILE *nfh)
{
yyrestart(0);
yyout = nfh;
diff --git a/wiretap/i4btrace.c b/wiretap/i4btrace.c
index 04b52c4ff1..4cee96cfbe 100644
--- a/wiretap/i4btrace.c
+++ b/wiretap/i4btrace.c
@@ -1,6 +1,6 @@
/* i4btrace.c
*
- * $Id: i4btrace.c,v 1.5 2000/05/18 09:09:27 guy Exp $
+ * $Id: i4btrace.c,v 1.6 2000/05/19 08:18:15 guy Exp $
*
* Wiretap Library
* Copyright (c) 1999 by Bert Driehuis <driehuis@playbeing.org>
@@ -35,9 +35,9 @@
static int i4btrace_read(wtap *wth, int *err);
static int i4btrace_seek_read(wtap *wth, int seek_off,
union pseudo_header *pseudo_header, u_char *pd, int length);
-static int i4b_read_rec_header(FILE_T *fh, i4b_trace_hdr_t *hdr, int *err);
+static int i4b_read_rec_header(FILE_T fh, i4b_trace_hdr_t *hdr, int *err);
static void i4b_byte_swap_header(wtap *wth, i4b_trace_hdr_t *hdr);
-static int i4b_read_rec_data(FILE_T *fh, char *pd, int length, int *err);
+static int i4b_read_rec_data(FILE_T fh, char *pd, int length, int *err);
/*
* Test some fields in the header to see if they make sense.
@@ -224,7 +224,7 @@ i4btrace_seek_read(wtap *wth, int seek_off,
}
static int
-i4b_read_rec_header(FILE_T *fh, i4b_trace_hdr_t *hdr, int *err)
+i4b_read_rec_header(FILE_T fh, i4b_trace_hdr_t *hdr, int *err)
{
int bytes_read;
@@ -262,7 +262,7 @@ i4b_byte_swap_header(wtap *wth, i4b_trace_hdr_t *hdr)
}
static int
-i4b_read_rec_data(FILE_T *fh, char *pd, int length, int *err)
+i4b_read_rec_data(FILE_T fh, char *pd, int length, int *err)
{
int bytes_read;
diff --git a/wiretap/iptrace.c b/wiretap/iptrace.c
index 79eeb1336b..73e6f189b5 100644
--- a/wiretap/iptrace.c
+++ b/wiretap/iptrace.c
@@ -1,6 +1,6 @@
/* iptrace.c
*
- * $Id: iptrace.c,v 1.27 2000/05/18 09:09:30 guy Exp $
+ * $Id: iptrace.c,v 1.28 2000/05/19 08:18:15 guy Exp $
*
* Wiretap Library
* Copyright (c) 1998 by Gilbert Ramirez <gram@xiexie.org>
@@ -38,9 +38,9 @@ static int iptrace_seek_read_1_0(wtap *wth, int seek_off,
static int iptrace_read_2_0(wtap *wth, int *err);
static int iptrace_seek_read_2_0(wtap *wth, int seek_off,
union pseudo_header *pseudo_header, u_char *pd, int packet_size);
-static int iptrace_read_rec_header(FILE_T *fh, guint8 *header, int header_len,
+static int iptrace_read_rec_header(FILE_T fh, guint8 *header, int header_len,
int *err);
-static int iptrace_read_rec_data(FILE_T *fh, guint8 *data_ptr, int packet_size,
+static int iptrace_read_rec_data(FILE_T fh, guint8 *data_ptr, int packet_size,
int *err);
static void get_atm_pseudo_header(union pseudo_header *pseudo_header,
guint8 *header);
@@ -301,7 +301,7 @@ static int iptrace_seek_read_2_0(wtap *wth, int seek_off,
}
static int
-iptrace_read_rec_header(FILE_T *fh, guint8 *header, int header_len, int *err)
+iptrace_read_rec_header(FILE_T fh, guint8 *header, int header_len, int *err)
{
int bytes_read;
@@ -321,7 +321,7 @@ iptrace_read_rec_header(FILE_T *fh, guint8 *header, int header_len, int *err)
}
static int
-iptrace_read_rec_data(FILE_T *fh, guint8 *data_ptr, int packet_size, int *err)
+iptrace_read_rec_data(FILE_T fh, guint8 *data_ptr, int packet_size, int *err)
{
int bytes_read;
diff --git a/wiretap/nettl.c b/wiretap/nettl.c
index c89bfb433e..401fa53b77 100644
--- a/wiretap/nettl.c
+++ b/wiretap/nettl.c
@@ -1,6 +1,6 @@
/* nettl.c
*
- * $Id: nettl.c,v 1.11 2000/05/18 09:09:38 guy Exp $
+ * $Id: nettl.c,v 1.12 2000/05/19 08:18:15 guy Exp $
*
* Wiretap Library
* Copyright (c) 1998 by Gilbert Ramirez <gram@xiexie.org>
@@ -67,10 +67,10 @@ struct nettlrec_ns_ls_ip_hdr {
static int nettl_read(wtap *wth, int *err);
static int nettl_seek_read(wtap *wth, int seek_off,
union pseudo_header *pseudo_header, u_char *pd, int length);
-static int nettl_read_rec_header(wtap *wth, FILE_T *fh,
+static int nettl_read_rec_header(wtap *wth, FILE_T fh,
struct wtap_pkthdr *phdr, union pseudo_header *pseudo_header,
int *err);
-static int nettl_read_rec_data(FILE_T *fh, char *pd, int length, int *err);
+static int nettl_read_rec_data(FILE_T fh, char *pd, int length, int *err);
static void nettl_close(wtap *wth);
int nettl_open(wtap *wth, int *err)
@@ -174,7 +174,7 @@ nettl_seek_read(wtap *wth, int seek_off,
}
static int
-nettl_read_rec_header(wtap *wth, FILE_T *fh, struct wtap_pkthdr *phdr,
+nettl_read_rec_header(wtap *wth, FILE_T fh, struct wtap_pkthdr *phdr,
union pseudo_header *pseudo_header, int *err)
{
int bytes_read;
@@ -289,7 +289,7 @@ nettl_read_rec_header(wtap *wth, FILE_T *fh, struct wtap_pkthdr *phdr,
}
static int
-nettl_read_rec_data(FILE_T *fh, char *pd, int length, int *err)
+nettl_read_rec_data(FILE_T fh, char *pd, int length, int *err)
{
int bytes_read;
diff --git a/wiretap/ngsniffer.c b/wiretap/ngsniffer.c
index 908e645a65..b7c352a848 100644
--- a/wiretap/ngsniffer.c
+++ b/wiretap/ngsniffer.c
@@ -1,6 +1,6 @@
/* ngsniffer.c
*
- * $Id: ngsniffer.c,v 1.40 2000/05/18 09:09:41 guy Exp $
+ * $Id: ngsniffer.c,v 1.41 2000/05/19 08:18:16 guy Exp $
*
* Wiretap Library
* Copyright (c) 1998 by Gilbert Ramirez <gram@xiexie.org>
@@ -249,17 +249,17 @@ static double Usec[] = { 15.0, 0.838096, 15.0, 0.5, 2.0, 1.0, 0.1 };
static int ngsniffer_read(wtap *wth, int *err);
static int ngsniffer_seek_read(wtap *wth, int seek_off,
union pseudo_header *pseudo_header, u_char *pd, int packet_size);
-static int ngsniffer_read_rec_header(FILE_T *fh, guint16 *typep,
+static int ngsniffer_read_rec_header(FILE_T fh, guint16 *typep,
guint16 *lengthp, int *err);
-static int ngsniffer_read_frame2(FILE_T *fh, struct frame2_rec *frame2,
+static int ngsniffer_read_frame2(FILE_T fh, struct frame2_rec *frame2,
int *err);
static void set_pseudo_header_frame2(union pseudo_header *pseudo_header,
struct frame2_rec *frame2);
-static int ngsniffer_read_frame4(FILE_T *fh, struct frame4_rec *frame4,
+static int ngsniffer_read_frame4(FILE_T fh, struct frame4_rec *frame4,
int *err);
static void set_pseudo_header_frame4(union pseudo_header *pseudo_header,
struct frame4_rec *frame4);
-static int ngsniffer_read_rec_data(FILE_T *fh, char *pd, int length, int *err);
+static int ngsniffer_read_rec_data(FILE_T fh, char *pd, int length, int *err);
static void ngsniffer_close(wtap *wth);
static gboolean ngsniffer_dump(wtap_dumper *wdh, const struct wtap_pkthdr *phdr,
const union pseudo_header *pseudo_header, const u_char *pd, int *err);
@@ -631,7 +631,7 @@ static int ngsniffer_seek_read(wtap *wth, int seek_off,
return ngsniffer_read_rec_data(wth->random_fh, pd, packet_size, &err);
}
-static int ngsniffer_read_rec_header(FILE_T *fh, guint16 *typep,
+static int ngsniffer_read_rec_header(FILE_T fh, guint16 *typep,
guint16 *lengthp, int *err)
{
int bytes_read;
@@ -667,7 +667,7 @@ static int ngsniffer_read_rec_header(FILE_T *fh, guint16 *typep,
return 1; /* success */
}
-static int ngsniffer_read_frame2(FILE_T *fh, struct frame2_rec *frame2,
+static int ngsniffer_read_frame2(FILE_T fh, struct frame2_rec *frame2,
int *err)
{
int bytes_read;
@@ -711,7 +711,7 @@ static void set_pseudo_header_frame2(union pseudo_header *pseudo_header,
pseudo_header->x25.flags = (frame2->fs & 0x80) ? 0x00 : 0x80;
}
-static int ngsniffer_read_frame4(FILE_T *fh, struct frame4_rec *frame4,
+static int ngsniffer_read_frame4(FILE_T fh, struct frame4_rec *frame4,
int *err)
{
int bytes_read;
@@ -742,7 +742,7 @@ static void set_pseudo_header_frame4(union pseudo_header *pseudo_header,
pseudo_header->ngsniffer_atm.aal5t_chksum = pletohl(&frame4->atm_info.Trailer.aal5t_chksum);
}
-static int ngsniffer_read_rec_data(FILE_T *fh, char *pd, int length, int *err)
+static int ngsniffer_read_rec_data(FILE_T fh, char *pd, int length, int *err)
{
int bytes_read;
diff --git a/wiretap/radcom.c b/wiretap/radcom.c
index ed168f417e..1030649844 100644
--- a/wiretap/radcom.c
+++ b/wiretap/radcom.c
@@ -1,6 +1,6 @@
/* radcom.c
*
- * $Id: radcom.c,v 1.21 2000/05/18 09:09:43 guy Exp $
+ * $Id: radcom.c,v 1.22 2000/05/19 08:18:16 guy Exp $
*
* Wiretap Library
* Copyright (c) 1998 by Gilbert Ramirez <gram@xiexie.org>
@@ -70,9 +70,9 @@ struct radcomrec_hdr {
static int radcom_read(wtap *wth, int *err);
static int radcom_seek_read(wtap *wth, int seek_off,
union pseudo_header *pseudo_header, u_char *pd, int length);
-static int radcom_read_rec_header(FILE_T *fh, struct radcomrec_hdr *hdr,
+static int radcom_read_rec_header(FILE_T fh, struct radcomrec_hdr *hdr,
int *err);
-static int radcom_read_rec_data(FILE_T *fh, char *pd, int length, int *err);
+static int radcom_read_rec_data(FILE_T fh, char *pd, int length, int *err);
int radcom_open(wtap *wth, int *err)
{
@@ -316,7 +316,7 @@ radcom_seek_read(wtap *wth, int seek_off,
}
static int
-radcom_read_rec_header(FILE_T *fh, struct radcomrec_hdr *hdr, int *err)
+radcom_read_rec_header(FILE_T fh, struct radcomrec_hdr *hdr, int *err)
{
int bytes_read;
@@ -336,7 +336,7 @@ radcom_read_rec_header(FILE_T *fh, struct radcomrec_hdr *hdr, int *err)
}
static int
-radcom_read_rec_data(FILE_T *fh, char *pd, int length, int *err)
+radcom_read_rec_data(FILE_T fh, char *pd, int length, int *err)
{
int bytes_read;
diff --git a/wiretap/snoop.c b/wiretap/snoop.c
index 26b5b600cd..bc1595a414 100644
--- a/wiretap/snoop.c
+++ b/wiretap/snoop.c
@@ -1,6 +1,6 @@
/* snoop.c
*
- * $Id: snoop.c,v 1.26 2000/05/18 09:09:44 guy Exp $
+ * $Id: snoop.c,v 1.27 2000/05/19 08:18:17 guy Exp $
*
* Wiretap Library
* Copyright (c) 1998 by Gilbert Ramirez <gram@xiexie.org>
@@ -58,9 +58,9 @@ struct snooprec_hdr {
static int snoop_read(wtap *wth, int *err);
static int snoop_seek_read(wtap *wth, int seek_off,
union pseudo_header *pseudo_header, u_char *pd, int length);
-static int snoop_read_atm_pseudoheader(FILE_T *fh,
+static int snoop_read_atm_pseudoheader(FILE_T fh,
union pseudo_header *pseudo_header, int *err);
-static int snoop_read_rec_data(FILE_T *fh, char *pd, int length, int *err);
+static int snoop_read_rec_data(FILE_T fh, char *pd, int length, int *err);
static gboolean snoop_dump(wtap_dumper *wdh, const struct wtap_pkthdr *phdr,
const union pseudo_header *pseudo_header, const u_char *pd, int *err);
@@ -343,7 +343,7 @@ snoop_seek_read(wtap *wth, int seek_off,
}
static int
-snoop_read_atm_pseudoheader(FILE_T *fh, union pseudo_header *pseudo_header,
+snoop_read_atm_pseudoheader(FILE_T fh, union pseudo_header *pseudo_header,
int *err)
{
char atm_phdr[4];
@@ -384,7 +384,7 @@ snoop_read_atm_pseudoheader(FILE_T *fh, union pseudo_header *pseudo_header,
}
static int
-snoop_read_rec_data(FILE_T *fh, char *pd, int length, int *err)
+snoop_read_rec_data(FILE_T fh, char *pd, int length, int *err)
{
int bytes_read;
diff --git a/wiretap/toshiba.c b/wiretap/toshiba.c
index 363ef0bdcc..2072e41190 100644
--- a/wiretap/toshiba.c
+++ b/wiretap/toshiba.c
@@ -1,6 +1,6 @@
/* toshiba.c
*
- * $Id: toshiba.c,v 1.9 2000/05/18 09:09:46 guy Exp $
+ * $Id: toshiba.c,v 1.10 2000/05/19 08:18:17 guy Exp $
*
* Wiretap Library
* Copyright (c) 1998 by Gilbert Ramirez <gram@xiexie.org>
@@ -107,8 +107,8 @@ static const char toshiba_rec_magic[] = { '[', 'N', 'o', '.' };
static int toshiba_read(wtap *wth, int *err);
static int toshiba_seek_read(wtap *wth, int seek_off, union pseudo_header *pseudo_header, guint8 *pd, int len);
static gboolean parse_single_hex_dump_line(char* rec, guint8 *buf, int byte_offset);
-static int parse_toshiba_hex_dump(FILE_T *fh, int pkt_len, guint8* buf, int *err);
-static int parse_toshiba_rec_hdr(wtap *wth, FILE_T *fh,
+static int parse_toshiba_hex_dump(FILE_T fh, int pkt_len, guint8* buf, int *err);
+static int parse_toshiba_rec_hdr(wtap *wth, FILE_T fh,
union pseudo_header *pseudo_header, int *err);
/* Seeks to the beginning of the next packet, and returns the
@@ -250,7 +250,7 @@ toshiba_seek_read (wtap *wth, int seek_off, union pseudo_header *pseudo_header,
/* Parses a packet record header. */
static int
-parse_toshiba_rec_hdr(wtap *wth, FILE_T *fh,
+parse_toshiba_rec_hdr(wtap *wth, FILE_T fh,
union pseudo_header *pseudo_header, int *err)
{
char line[TOSHIBA_LINE_LENGTH];
@@ -339,7 +339,7 @@ parse_toshiba_rec_hdr(wtap *wth, FILE_T *fh,
/* Converts ASCII hex dump to binary data */
static int
-parse_toshiba_hex_dump(FILE_T *fh, int pkt_len, guint8* buf, int *err)
+parse_toshiba_hex_dump(FILE_T fh, int pkt_len, guint8* buf, int *err)
{
char line[TOSHIBA_LINE_LENGTH];
int i, hex_lines;