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
This commit is contained in:
Guy Harris 2000-05-19 08:18:17 +00:00
parent 17ccdafa03
commit 0cc75a3569
10 changed files with 47 additions and 47 deletions

View File

@ -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; */

View File

@ -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__ */

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;