diff options
-rw-r--r-- | editcap.c | 4 | ||||
-rw-r--r-- | file.c | 12 | ||||
-rw-r--r-- | mergecap.c | 6 | ||||
-rw-r--r-- | tethereal.c | 16 | ||||
-rw-r--r-- | wiretap/ascend.c | 19 | ||||
-rw-r--r-- | wiretap/csids.c | 10 | ||||
-rw-r--r-- | wiretap/etherpeek.c | 10 | ||||
-rw-r--r-- | wiretap/file.c | 4 | ||||
-rw-r--r-- | wiretap/i4btrace.c | 10 | ||||
-rw-r--r-- | wiretap/iptrace.c | 18 | ||||
-rw-r--r-- | wiretap/lanalyzer.c | 6 | ||||
-rw-r--r-- | wiretap/libpcap.c | 6 | ||||
-rw-r--r-- | wiretap/netmon.c | 6 | ||||
-rw-r--r-- | wiretap/nettl.c | 10 | ||||
-rw-r--r-- | wiretap/netxray.c | 6 | ||||
-rw-r--r-- | wiretap/ngsniffer.c | 10 | ||||
-rw-r--r-- | wiretap/pppdump.c | 10 | ||||
-rw-r--r-- | wiretap/radcom.c | 10 | ||||
-rw-r--r-- | wiretap/snoop.c | 10 | ||||
-rw-r--r-- | wiretap/toshiba.c | 16 | ||||
-rw-r--r-- | wiretap/wtap-int.h | 8 | ||||
-rw-r--r-- | wiretap/wtap.c | 9 | ||||
-rw-r--r-- | wiretap/wtap.h | 10 |
23 files changed, 114 insertions, 112 deletions
@@ -1,7 +1,7 @@ /* Edit capture files. We can delete records, adjust timestamps, or * simply convert from one format to another format. * - * $Id: editcap.c,v 1.17 2001/07/13 07:55:13 guy Exp $ + * $Id: editcap.c,v 1.18 2001/10/04 08:30:33 guy Exp $ * * Originally written by Richard Sharpe. * Improved by Guy Harris. @@ -137,7 +137,7 @@ typedef struct { */ static void -edit_callback(u_char *user, const struct wtap_pkthdr *phdr, int offset, +edit_callback(u_char *user, const struct wtap_pkthdr *phdr, long offset, union wtap_pseudo_header *pseudo_header, const u_char *buf) { callback_arg *argp = (callback_arg *)user; @@ -1,7 +1,7 @@ /* file.c * File I/O routines * - * $Id: file.c,v 1.244 2001/08/21 06:39:14 guy Exp $ + * $Id: file.c,v 1.245 2001/10/04 08:30:33 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -98,7 +98,7 @@ extern GtkWidget *packet_list, *byte_nb_ptr, *tree_view; static guint32 firstsec, firstusec; static guint32 prevsec, prevusec; -static void read_packet(capture_file *cf, int offset); +static void read_packet(capture_file *cf, long offset); static void rescan_packets(capture_file *cf, const char *action, gboolean refilter, gboolean redissect); @@ -314,7 +314,7 @@ read_cap_file(capture_file *cf, int *err) char *errmsg; char errmsg_errno[1024+1]; gchar err_str[2048+1]; - int data_offset; + long data_offset; progdlg_t *progbar; gboolean stop_flag; int file_pos; @@ -477,7 +477,7 @@ start_tail_cap_file(char *fname, gboolean is_tempfile, capture_file *cf) read_status_t continue_tail_cap_file(capture_file *cf, int to_read, int *err) { - int data_offset = 0; + long data_offset = 0; gtk_clist_freeze(GTK_CLIST(packet_list)); @@ -518,7 +518,7 @@ continue_tail_cap_file(capture_file *cf, int to_read, int *err) read_status_t finish_tail_cap_file(capture_file *cf, int *err) { - int data_offset; + long data_offset; gtk_clist_freeze(GTK_CLIST(packet_list)); @@ -758,7 +758,7 @@ add_packet_to_packet_list(frame_data *fdata, capture_file *cf, } static void -read_packet(capture_file *cf, int offset) +read_packet(capture_file *cf, long offset) { const struct wtap_pkthdr *phdr = wtap_phdr(cf->wth); union wtap_pseudo_header *pseudo_header = wtap_pseudoheader(cf->wth); diff --git a/mergecap.c b/mergecap.c index ac84d42c20..79966f5dfb 100644 --- a/mergecap.c +++ b/mergecap.c @@ -1,6 +1,6 @@ /* Combine two dump files, either by appending or by merging by timestamp * - * $Id: mergecap.c,v 1.4 2001/07/20 07:22:40 guy Exp $ + * $Id: mergecap.c,v 1.5 2001/10/04 08:30:33 guy Exp $ * * Written by Scott Renfro <scott@renfro.org> based on * editcap by Richard Sharpe and Guy Harris @@ -47,7 +47,7 @@ typedef struct in_file_t { const char *filename; wtap *wth; int err; - int data_offset; + long data_offset; gboolean ok; } in_file_t; @@ -65,7 +65,7 @@ static out_file_t out_file; * Routine to write frame to output file */ static void -write_frame(u_char *user, const struct wtap_pkthdr *phdr, int offset, +write_frame(u_char *user, const struct wtap_pkthdr *phdr, long offset, union wtap_pseudo_header *pseudo_header, const u_char *buf) { wtap_dumper *pdh = (wtap_dumper*)user; diff --git a/tethereal.c b/tethereal.c index 989ba10118..5d94bc22a5 100644 --- a/tethereal.c +++ b/tethereal.c @@ -1,6 +1,6 @@ /* tethereal.c * - * $Id: tethereal.c,v 1.91 2001/09/05 05:03:47 guy Exp $ + * $Id: tethereal.c,v 1.92 2001/10/04 08:30:33 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -133,10 +133,10 @@ typedef struct { } cb_args_t; static int load_cap_file(capture_file *, int); -static void wtap_dispatch_cb_write(u_char *, const struct wtap_pkthdr *, int, +static void wtap_dispatch_cb_write(u_char *, const struct wtap_pkthdr *, long, union wtap_pseudo_header *, const u_char *); static void show_capture_file_io_error(const char *, int, gboolean); -static void wtap_dispatch_cb_print(u_char *, const struct wtap_pkthdr *, int, +static void wtap_dispatch_cb_print(u_char *, const struct wtap_pkthdr *, long, union wtap_pseudo_header *, const u_char *); packet_info pi; @@ -974,7 +974,7 @@ out: static void fill_in_fdata(frame_data *fdata, capture_file *cf, const struct wtap_pkthdr *phdr, - const union wtap_pseudo_header *pseudo_header, int offset) + const union wtap_pseudo_header *pseudo_header, long offset) { int i; @@ -1050,8 +1050,8 @@ clear_fdata(frame_data *fdata) } static void -wtap_dispatch_cb_write(u_char *user, const struct wtap_pkthdr *phdr, int offset, - union wtap_pseudo_header *pseudo_header, const u_char *buf) +wtap_dispatch_cb_write(u_char *user, const struct wtap_pkthdr *phdr, + long offset, union wtap_pseudo_header *pseudo_header, const u_char *buf) { cb_args_t *args = (cb_args_t *) user; capture_file *cf = args->cf; @@ -1147,8 +1147,8 @@ show_capture_file_io_error(const char *fname, int err, gboolean is_close) } static void -wtap_dispatch_cb_print(u_char *user, const struct wtap_pkthdr *phdr, int offset, - union wtap_pseudo_header *pseudo_header, const u_char *buf) +wtap_dispatch_cb_print(u_char *user, const struct wtap_pkthdr *phdr, + long offset, union wtap_pseudo_header *pseudo_header, const u_char *buf) { cb_args_t *args = (cb_args_t *) user; capture_file *cf = args->cf; diff --git a/wiretap/ascend.c b/wiretap/ascend.c index 04a34783cf..a2c76dca21 100644 --- a/wiretap/ascend.c +++ b/wiretap/ascend.c @@ -1,6 +1,6 @@ /* ascend.c * - * $Id: ascend.c,v 1.24 2001/07/13 00:55:57 guy Exp $ + * $Id: ascend.c,v 1.25 2001/10/04 08:30:35 guy Exp $ * * Wiretap Library * Copyright (c) 1998 by Gilbert Ramirez <gram@xiexie.org> @@ -99,8 +99,8 @@ static const char ascend_w2magic[] = { 'W', 'D', '_', 'D', 'I', 'A', 'L', 'O', ' #define ASCEND_W1_SIZE (sizeof ascend_w1magic / sizeof ascend_w1magic[0]) #define ASCEND_W2_SIZE (sizeof ascend_w2magic / sizeof ascend_w2magic[0]) -static gboolean ascend_read(wtap *wth, int *err, int *data_offset); -static int ascend_seek_read (wtap *wth, int seek_off, +static gboolean ascend_read(wtap *wth, int *err, long *data_offset); +static int ascend_seek_read (wtap *wth, long seek_off, union wtap_pseudo_header *pseudo_header, guint8 *pd, int len); static void ascend_close(wtap *wth); @@ -113,9 +113,10 @@ static void ascend_close(wtap *wth); at which the seek pointer should be set before this routine is called to find the packet *after* the packet it finds. */ /* XXX - Handle I/O errors. */ -static int ascend_seek(wtap *wth, int max_seek) +static long ascend_seek(wtap *wth, int max_seek) { - int byte, bytes_read = 0, date_off = -1, cur_off, packet_off; + int byte, bytes_read = 0; + long date_off = -1, cur_off, packet_off; unsigned int r_level = 0, x_level = 0, w1_level = 0, w2_level = 0; while (((byte = file_getc(wth->fh)) != EOF) && bytes_read < max_seek) { @@ -201,7 +202,7 @@ found: /* XXX - return -1 on I/O error and actually do something with 'err'. */ int ascend_open(wtap *wth, int *err) { - int offset; + long offset; struct stat statbuf; /* We haven't yet allocated a data structure for our private stuff; @@ -243,9 +244,9 @@ int ascend_open(wtap *wth, int *err) } /* Read the next packet; called from wtap_loop(). */ -static gboolean ascend_read(wtap *wth, int *err, int *data_offset) +static gboolean ascend_read(wtap *wth, int *err, long *data_offset) { - int offset; + long offset; guint8 *buf = buffer_start_ptr(wth->frame_buffer); ascend_pkthdr header; @@ -296,7 +297,7 @@ static gboolean ascend_read(wtap *wth, int *err, int *data_offset) return TRUE; } -static int ascend_seek_read (wtap *wth, int seek_off, +static int ascend_seek_read (wtap *wth, long seek_off, union wtap_pseudo_header *pseudo_header, guint8 *pd, int len) { file_seek(wth->random_fh, seek_off, SEEK_SET); diff --git a/wiretap/csids.c b/wiretap/csids.c index 7196b0ea92..35425d4ce9 100644 --- a/wiretap/csids.c +++ b/wiretap/csids.c @@ -1,6 +1,6 @@ /* csids.c * - * $Id: csids.c,v 1.7 2001/07/13 00:55:58 guy Exp $ + * $Id: csids.c,v 1.8 2001/10/04 08:30:35 guy Exp $ * * Copyright (c) 2000 by Mike Hall <mlh@io.com> * Copyright (c) 2000 by Cisco Systems @@ -44,8 +44,8 @@ * */ -static gboolean csids_read(wtap *wth, int *err, int *data_offset); -static int csids_seek_read(wtap *wth, int seek_off, +static gboolean csids_read(wtap *wth, int *err, long *data_offset); +static int csids_seek_read(wtap *wth, long seek_off, union wtap_pseudo_header *pseudo_header, guint8 *pd, int len); struct csids_header { @@ -138,7 +138,7 @@ int csids_open(wtap *wth, int *err) } /* Find the next packet and parse it; called from wtap_loop(). */ -static gboolean csids_read(wtap *wth, int *err, int *data_offset) +static gboolean csids_read(wtap *wth, int *err, long *data_offset) { guint8 *buf; int bytesRead = 0; @@ -194,7 +194,7 @@ static gboolean csids_read(wtap *wth, int *err, int *data_offset) /* Used to read packets in random-access fashion */ static int csids_seek_read (wtap *wth, - int seek_off, + long seek_off, union wtap_pseudo_header *pseudo_header, guint8 *pd, int len) diff --git a/wiretap/etherpeek.c b/wiretap/etherpeek.c index 32102eba20..1f9f18f374 100644 --- a/wiretap/etherpeek.c +++ b/wiretap/etherpeek.c @@ -2,7 +2,7 @@ * Routines for opening etherpeek files * Copyright (c) 2001, Daniel Thompson <d.thompson@gmx.net> * - * $Id: etherpeek.c,v 1.4 2001/07/13 00:55:58 guy Exp $ + * $Id: etherpeek.c,v 1.5 2001/10/04 08:30:35 guy Exp $ * * Wiretap Library * Copyright (c) 1998 by Gilbert Ramirez <gram@xiexie.org> @@ -112,8 +112,8 @@ static const etherpeek_encap_lookup_t etherpeek_encap[] = { #define NUM_ETHERPEEK_ENCAPS \ (sizeof (etherpeek_encap) / sizeof (etherpeek_encap[0])) -static gboolean etherpeek_read_m7(wtap *wth, int *err, int *data_offset); -static gboolean etherpeek_read_m56(wtap *wth, int *err, int *data_offset); +static gboolean etherpeek_read_m7(wtap *wth, int *err, long *data_offset); +static gboolean etherpeek_read_m56(wtap *wth, int *err, long *data_offset); int etherpeek_open(wtap *wth, int *err) { @@ -206,7 +206,7 @@ int etherpeek_open(wtap *wth, int *err) return 1; } -static gboolean etherpeek_read_m7(wtap *wth, int *err, int *data_offset) +static gboolean etherpeek_read_m7(wtap *wth, int *err, long *data_offset) { etherpeek_m7_packet_t ep_pkt; double t; @@ -262,7 +262,7 @@ static gboolean etherpeek_read_m7(wtap *wth, int *err, int *data_offset) return TRUE; } -static gboolean etherpeek_read_m56(wtap *wth, int *err, int *data_offset) +static gboolean etherpeek_read_m56(wtap *wth, int *err, long *data_offset) { etherpeek_m56_packet_t ep_pkt; unsigned int i; diff --git a/wiretap/file.c b/wiretap/file.c index 62b5dcdbea..92748471af 100644 --- a/wiretap/file.c +++ b/wiretap/file.c @@ -1,6 +1,6 @@ /* file.c * - * $Id: file.c,v 1.67 2001/07/13 00:55:58 guy Exp $ + * $Id: file.c,v 1.68 2001/10/04 08:30:35 guy Exp $ * * Wiretap Library * Copyright (c) 1998 by Gilbert Ramirez <gram@xiexie.org> @@ -111,7 +111,7 @@ static int (*open_routines[])(wtap *, int *) = { #define N_FILE_TYPES (sizeof open_routines / sizeof open_routines[0]) -int wtap_def_seek_read(wtap *wth, int seek_off, +int wtap_def_seek_read(wtap *wth, long seek_off, union wtap_pseudo_header *pseudo_header, guint8 *pd, int len) { file_seek(wth->random_fh, seek_off, SEEK_SET); diff --git a/wiretap/i4btrace.c b/wiretap/i4btrace.c index bbf0e43b52..55059f1d28 100644 --- a/wiretap/i4btrace.c +++ b/wiretap/i4btrace.c @@ -1,6 +1,6 @@ /* i4btrace.c * - * $Id: i4btrace.c,v 1.14 2001/03/10 06:33:57 guy Exp $ + * $Id: i4btrace.c,v 1.15 2001/10/04 08:30:35 guy Exp $ * * Wiretap Library * Copyright (c) 1999 by Bert Driehuis <driehuis@playbeing.org> @@ -32,8 +32,8 @@ #include "buffer.h" #include "i4b_trace.h" -static gboolean i4btrace_read(wtap *wth, int *err, int *data_offset); -static int i4btrace_seek_read(wtap *wth, int seek_off, +static gboolean i4btrace_read(wtap *wth, int *err, long *data_offset); +static int i4btrace_seek_read(wtap *wth, long seek_off, union wtap_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 void i4b_byte_swap_header(wtap *wth, i4b_trace_hdr_t *hdr); @@ -112,7 +112,7 @@ int i4btrace_open(wtap *wth, int *err) #define V120SABME "\010\001\177" /* Read the next packet */ -static gboolean i4btrace_read(wtap *wth, int *err, int *data_offset) +static gboolean i4btrace_read(wtap *wth, int *err, long *data_offset) { int ret; i4b_trace_hdr_t hdr; @@ -219,7 +219,7 @@ static gboolean i4btrace_read(wtap *wth, int *err, int *data_offset) } static int -i4btrace_seek_read(wtap *wth, int seek_off, +i4btrace_seek_read(wtap *wth, long seek_off, union wtap_pseudo_header *pseudo_header, u_char *pd, int length) { int ret; diff --git a/wiretap/iptrace.c b/wiretap/iptrace.c index dcecd0e082..42dd00b0a2 100644 --- a/wiretap/iptrace.c +++ b/wiretap/iptrace.c @@ -1,6 +1,6 @@ /* iptrace.c * - * $Id: iptrace.c,v 1.33 2001/03/10 06:33:57 guy Exp $ + * $Id: iptrace.c,v 1.34 2001/10/04 08:30:35 guy Exp $ * * Wiretap Library * Copyright (c) 1998 by Gilbert Ramirez <gram@xiexie.org> @@ -31,12 +31,12 @@ #include "buffer.h" #include "iptrace.h" -static gboolean iptrace_read_1_0(wtap *wth, int *err, int *data_offset); -static int iptrace_seek_read_1_0(wtap *wth, int seek_off, +static gboolean iptrace_read_1_0(wtap *wth, int *err, long *data_offset); +static int iptrace_seek_read_1_0(wtap *wth, long seek_off, union wtap_pseudo_header *pseudo_header, u_char *pd, int packet_size); -static gboolean iptrace_read_2_0(wtap *wth, int *err, int *data_offset); -static int iptrace_seek_read_2_0(wtap *wth, int seek_off, +static gboolean iptrace_read_2_0(wtap *wth, int *err, long *data_offset); +static int iptrace_seek_read_2_0(wtap *wth, long seek_off, union wtap_pseudo_header *pseudo_header, u_char *pd, int packet_size); static int iptrace_read_rec_header(FILE_T fh, guint8 *header, int header_len, @@ -96,7 +96,7 @@ typedef struct { } iptrace_1_0_phdr; /* Read the next packet */ -static gboolean iptrace_read_1_0(wtap *wth, int *err, int *data_offset) +static gboolean iptrace_read_1_0(wtap *wth, int *err, long *data_offset) { int ret; guint32 packet_size; @@ -161,7 +161,7 @@ static gboolean iptrace_read_1_0(wtap *wth, int *err, int *data_offset) return TRUE; } -static int iptrace_seek_read_1_0(wtap *wth, int seek_off, +static int iptrace_seek_read_1_0(wtap *wth, long seek_off, union wtap_pseudo_header *pseudo_header, u_char *pd, int packet_size) { int ret; @@ -204,7 +204,7 @@ typedef struct { } iptrace_2_0_phdr; /* Read the next packet */ -static gboolean iptrace_read_2_0(wtap *wth, int *err, int *data_offset) +static gboolean iptrace_read_2_0(wtap *wth, int *err, long *data_offset) { int ret; guint32 packet_size; @@ -273,7 +273,7 @@ static gboolean iptrace_read_2_0(wtap *wth, int *err, int *data_offset) return TRUE; } -static int iptrace_seek_read_2_0(wtap *wth, int seek_off, +static int iptrace_seek_read_2_0(wtap *wth, long seek_off, union wtap_pseudo_header *pseudo_header, u_char *pd, int packet_size) { int ret; diff --git a/wiretap/lanalyzer.c b/wiretap/lanalyzer.c index 44013670d4..313703ce27 100644 --- a/wiretap/lanalyzer.c +++ b/wiretap/lanalyzer.c @@ -1,6 +1,6 @@ /* lanalyzer.c * - * $Id: lanalyzer.c,v 1.28 2001/04/16 22:06:34 guy Exp $ + * $Id: lanalyzer.c,v 1.29 2001/10/04 08:30:35 guy Exp $ * * Wiretap Library * Copyright (c) 1998 by Gilbert Ramirez <gram@xiexie.org> @@ -47,7 +47,7 @@ #define BOARD_325 226 /* LANalyzer 325 (Ethernet) */ #define BOARD_325TR 227 /* LANalyzer 325TR (Token-ring) */ -static gboolean lanalyzer_read(wtap *wth, int *err, int *data_offset); +static gboolean lanalyzer_read(wtap *wth, int *err, long *data_offset); static void lanalyzer_close(wtap *wth); int lanalyzer_open(wtap *wth, int *err) @@ -193,7 +193,7 @@ int lanalyzer_open(wtap *wth, int *err) #define DESCRIPTOR_LEN 32 /* Read the next packet */ -static gboolean lanalyzer_read(wtap *wth, int *err, int *data_offset) +static gboolean lanalyzer_read(wtap *wth, int *err, long *data_offset) { int packet_size = 0; int bytes_read; diff --git a/wiretap/libpcap.c b/wiretap/libpcap.c index f1164cfa3f..323ff46909 100644 --- a/wiretap/libpcap.c +++ b/wiretap/libpcap.c @@ -1,6 +1,6 @@ /* libpcap.c * - * $Id: libpcap.c,v 1.50 2001/08/25 03:18:48 guy Exp $ + * $Id: libpcap.c,v 1.51 2001/10/04 08:30:36 guy Exp $ * * Wiretap Library * Copyright (c) 1998 by Gilbert Ramirez <gram@xiexie.org> @@ -47,7 +47,7 @@ typedef enum { } libpcap_try_t; static libpcap_try_t libpcap_try(wtap *wth, int *err); -static gboolean libpcap_read(wtap *wth, int *err, int *data_offset); +static gboolean libpcap_read(wtap *wth, int *err, long *data_offset); static int libpcap_read_header(wtap *wth, int *err, struct pcaprec_ss990915_hdr *hdr, gboolean silent); static void adjust_header(wtap *wth, struct pcaprec_hdr *hdr); @@ -705,7 +705,7 @@ static libpcap_try_t libpcap_try(wtap *wth, int *err) } /* Read the next packet */ -static gboolean libpcap_read(wtap *wth, int *err, int *data_offset) +static gboolean libpcap_read(wtap *wth, int *err, long *data_offset) { struct pcaprec_ss990915_hdr hdr; guint packet_size; diff --git a/wiretap/netmon.c b/wiretap/netmon.c index 76cf224640..aa3ebf9872 100644 --- a/wiretap/netmon.c +++ b/wiretap/netmon.c @@ -1,6 +1,6 @@ /* netmon.c * - * $Id: netmon.c,v 1.40 2001/08/25 03:18:48 guy Exp $ + * $Id: netmon.c,v 1.41 2001/10/04 08:30:36 guy Exp $ * * Wiretap Library * Copyright (c) 1998 by Gilbert Ramirez <gram@xiexie.org> @@ -93,7 +93,7 @@ struct netmonrec_2_x_hdr { guint32 incl_len; /* number of octets captured in file */ }; -static gboolean netmon_read(wtap *wth, int *err, int *data_offset); +static gboolean netmon_read(wtap *wth, int *err, long *data_offset); static void netmon_close(wtap *wth); static gboolean netmon_dump(wtap_dumper *wdh, const struct wtap_pkthdr *phdr, const union wtap_pseudo_header *pseudo_header, const u_char *pd, int *err); @@ -276,7 +276,7 @@ int netmon_open(wtap *wth, int *err) } /* Read the next packet */ -static gboolean netmon_read(wtap *wth, int *err, int *data_offset) +static gboolean netmon_read(wtap *wth, int *err, long *data_offset) { netmon_t *netmon = wth->capture.netmon; guint32 packet_size = 0; diff --git a/wiretap/nettl.c b/wiretap/nettl.c index 5c75358bba..c19b219d4f 100644 --- a/wiretap/nettl.c +++ b/wiretap/nettl.c @@ -1,6 +1,6 @@ /* nettl.c * - * $Id: nettl.c,v 1.19 2001/03/10 06:33:57 guy Exp $ + * $Id: nettl.c,v 1.20 2001/10/04 08:30:36 guy Exp $ * * Wiretap Library * Copyright (c) 1998 by Gilbert Ramirez <gram@xiexie.org> @@ -66,8 +66,8 @@ struct nettlrec_ns_ls_ip_hdr { /* header is followed by data and once again the total length (2 bytes) ! */ -static gboolean nettl_read(wtap *wth, int *err, int *data_offset); -static int nettl_seek_read(wtap *wth, int seek_off, +static gboolean nettl_read(wtap *wth, int *err, long *data_offset); +static int nettl_seek_read(wtap *wth, long seek_off, union wtap_pseudo_header *pseudo_header, u_char *pd, int length); static int nettl_read_rec_header(wtap *wth, FILE_T fh, struct wtap_pkthdr *phdr, union wtap_pseudo_header *pseudo_header, @@ -124,7 +124,7 @@ int nettl_open(wtap *wth, int *err) } /* Read the next packet */ -static gboolean nettl_read(wtap *wth, int *err, int *data_offset) +static gboolean nettl_read(wtap *wth, int *err, long *data_offset) { int ret; @@ -150,7 +150,7 @@ static gboolean nettl_read(wtap *wth, int *err, int *data_offset) } static int -nettl_seek_read(wtap *wth, int seek_off, +nettl_seek_read(wtap *wth, long seek_off, union wtap_pseudo_header *pseudo_header, u_char *pd, int length) { int ret; diff --git a/wiretap/netxray.c b/wiretap/netxray.c index f6fa286364..898476bf0e 100644 --- a/wiretap/netxray.c +++ b/wiretap/netxray.c @@ -1,6 +1,6 @@ /* netxray.c * - * $Id: netxray.c,v 1.40 2001/08/25 03:18:48 guy Exp $ + * $Id: netxray.c,v 1.41 2001/10/04 08:30:36 guy Exp $ * * Wiretap Library * Copyright (c) 1998 by Gilbert Ramirez <gram@xiexie.org> @@ -101,7 +101,7 @@ struct netxrayrec_2_x_hdr { guint32 xxx[7]; /* unknown */ }; -static gboolean netxray_read(wtap *wth, int *err, int *data_offset); +static gboolean netxray_read(wtap *wth, int *err, long *data_offset); static void netxray_close(wtap *wth); static gboolean netxray_dump_1_1(wtap_dumper *wdh, const struct wtap_pkthdr *phdr, const union wtap_pseudo_header *pseudo_header, const u_char *pd, int *err); @@ -231,7 +231,7 @@ int netxray_open(wtap *wth, int *err) } /* Read the next packet */ -static gboolean netxray_read(wtap *wth, int *err, int *data_offset) +static gboolean netxray_read(wtap *wth, int *err, long *data_offset) { guint32 packet_size; int bytes_read; diff --git a/wiretap/ngsniffer.c b/wiretap/ngsniffer.c index c010447dec..710751e95d 100644 --- a/wiretap/ngsniffer.c +++ b/wiretap/ngsniffer.c @@ -1,6 +1,6 @@ /* ngsniffer.c * - * $Id: ngsniffer.c,v 1.66 2001/08/25 03:18:48 guy Exp $ + * $Id: ngsniffer.c,v 1.67 2001/10/04 08:30:36 guy Exp $ * * Wiretap Library * Copyright (c) 1998 by Gilbert Ramirez <gram@xiexie.org> @@ -285,8 +285,8 @@ struct frame6_rec { static double Usec[] = { 15.0, 0.838096, 15.0, 0.5, 2.0, 1.0, 0.1 }; static int skip_header_records(wtap *wth, int *err, gint16 version); -static gboolean ngsniffer_read(wtap *wth, int *err, int *data_offset); -static int ngsniffer_seek_read(wtap *wth, int seek_off, +static gboolean ngsniffer_read(wtap *wth, int *err, long *data_offset); +static int ngsniffer_seek_read(wtap *wth, long seek_off, union wtap_pseudo_header *pseudo_header, u_char *pd, int packet_size); static int ngsniffer_read_rec_header(wtap *wth, gboolean is_random, guint16 *typep, guint16 *lengthp, int *err); @@ -645,7 +645,7 @@ skip_header_records(wtap *wth, int *err, gint16 version) } /* Read the next packet */ -static gboolean ngsniffer_read(wtap *wth, int *err, int *data_offset) +static gboolean ngsniffer_read(wtap *wth, int *err, long *data_offset) { int ret; guint16 type, length; @@ -858,7 +858,7 @@ found: return TRUE; } -static int ngsniffer_seek_read(wtap *wth, int seek_off, +static int ngsniffer_seek_read(wtap *wth, long seek_off, union wtap_pseudo_header *pseudo_header, u_char *pd, int packet_size) { int ret; diff --git a/wiretap/pppdump.c b/wiretap/pppdump.c index 1ed11e5ef4..ce3d3c8a65 100644 --- a/wiretap/pppdump.c +++ b/wiretap/pppdump.c @@ -1,6 +1,6 @@ /* pppdump.c * - * $Id: pppdump.c,v 1.8 2001/03/10 06:33:58 guy Exp $ + * $Id: pppdump.c,v 1.9 2001/10/04 08:30:36 guy Exp $ * * Copyright (c) 2000 by Gilbert Ramirez <gram@xiexie.org> * @@ -93,8 +93,8 @@ typedef enum { DIRECTION_RECV } direction_enum; -static gboolean pppdump_read(wtap *wth, int *err, int *data_offset); -static int pppdump_seek_read(wtap *wth, int seek_off, +static gboolean pppdump_read(wtap *wth, int *err, long *data_offset); +static int pppdump_seek_read(wtap *wth, long seek_off, union wtap_pseudo_header *pseudo_header, guint8 *pd, int len); typedef struct { @@ -222,7 +222,7 @@ pppdump_open(wtap *wth, int *err) /* Find the next packet and parse it; called from wtap_loop(). */ static gboolean -pppdump_read(wtap *wth, int *err, int *data_offset) +pppdump_read(wtap *wth, int *err, long *data_offset) { gboolean retval; int num_bytes; @@ -517,7 +517,7 @@ collate(pppdump_t* state, FILE_T fh, int *err, guint8 *pd, int *num_bytes, /* Used to read packets in random-access fashion */ static int pppdump_seek_read (wtap *wth, - int seek_off, + long seek_off, union wtap_pseudo_header *pseudo_header, guint8 *pd, int len) diff --git a/wiretap/radcom.c b/wiretap/radcom.c index 733e48ff40..3a129af69a 100644 --- a/wiretap/radcom.c +++ b/wiretap/radcom.c @@ -1,6 +1,6 @@ /* radcom.c * - * $Id: radcom.c,v 1.29 2001/03/10 06:33:58 guy Exp $ + * $Id: radcom.c,v 1.30 2001/10/04 08:30:36 guy Exp $ * * Wiretap Library * Copyright (c) 1998 by Gilbert Ramirez <gram@xiexie.org> @@ -67,8 +67,8 @@ struct radcomrec_hdr { char xxw[9]; /* unknown */ }; -static gboolean radcom_read(wtap *wth, int *err, int *data_offset); -static int radcom_seek_read(wtap *wth, int seek_off, +static gboolean radcom_read(wtap *wth, int *err, long *data_offset); +static int radcom_seek_read(wtap *wth, long seek_off, union wtap_pseudo_header *pseudo_header, u_char *pd, int length); static int radcom_read_rec_header(FILE_T fh, struct radcomrec_hdr *hdr, int *err); @@ -219,7 +219,7 @@ read_error: } /* Read the next packet */ -static gboolean radcom_read(wtap *wth, int *err, int *data_offset) +static gboolean radcom_read(wtap *wth, int *err, long *data_offset) { int ret; struct radcomrec_hdr hdr; @@ -287,7 +287,7 @@ static gboolean radcom_read(wtap *wth, int *err, int *data_offset) } static int -radcom_seek_read(wtap *wth, int seek_off, +radcom_seek_read(wtap *wth, long seek_off, union wtap_pseudo_header *pseudo_header, u_char *pd, int length) { int ret; diff --git a/wiretap/snoop.c b/wiretap/snoop.c index fd7d2f338d..85c169baa1 100644 --- a/wiretap/snoop.c +++ b/wiretap/snoop.c @@ -1,6 +1,6 @@ /* snoop.c * - * $Id: snoop.c,v 1.36 2001/08/25 03:18:48 guy Exp $ + * $Id: snoop.c,v 1.37 2001/10/04 08:30:36 guy Exp $ * * Wiretap Library * Copyright (c) 1998 by Gilbert Ramirez <gram@xiexie.org> @@ -56,8 +56,8 @@ struct snooprec_hdr { guint32 ts_usec; /* timestamp microseconds */ }; -static gboolean snoop_read(wtap *wth, int *err, int *data_offset); -static int snoop_seek_read(wtap *wth, int seek_off, +static gboolean snoop_read(wtap *wth, int *err, long *data_offset); +static int snoop_seek_read(wtap *wth, long seek_off, union wtap_pseudo_header *pseudo_header, u_char *pd, int length); static int snoop_read_atm_pseudoheader(FILE_T fh, union wtap_pseudo_header *pseudo_header, int *err); @@ -294,7 +294,7 @@ int snoop_open(wtap *wth, int *err) } /* Read the next packet */ -static gboolean snoop_read(wtap *wth, int *err, int *data_offset) +static gboolean snoop_read(wtap *wth, int *err, long *data_offset) { guint32 rec_size; guint32 packet_size; @@ -403,7 +403,7 @@ static gboolean snoop_read(wtap *wth, int *err, int *data_offset) } static int -snoop_seek_read(wtap *wth, int seek_off, +snoop_seek_read(wtap *wth, long seek_off, union wtap_pseudo_header *pseudo_header, u_char *pd, int length) { int ret; diff --git a/wiretap/toshiba.c b/wiretap/toshiba.c index daafe782e5..de52620553 100644 --- a/wiretap/toshiba.c +++ b/wiretap/toshiba.c @@ -1,6 +1,6 @@ /* toshiba.c * - * $Id: toshiba.c,v 1.15 2001/03/10 06:33:58 guy Exp $ + * $Id: toshiba.c,v 1.16 2001/10/04 08:30:36 guy Exp $ * * Wiretap Library * Copyright (c) 1998 by Gilbert Ramirez <gram@xiexie.org> @@ -104,8 +104,8 @@ static const char toshiba_hdr_magic[] = static const char toshiba_rec_magic[] = { '[', 'N', 'o', '.' }; #define TOSHIBA_REC_MAGIC_SIZE (sizeof toshiba_rec_magic / sizeof toshiba_rec_magic[0]) -static gboolean toshiba_read(wtap *wth, int *err, int *data_offset); -static int toshiba_seek_read(wtap *wth, int seek_off, +static gboolean toshiba_read(wtap *wth, int *err, long *data_offset); +static int toshiba_seek_read(wtap *wth, long seek_off, union wtap_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); @@ -115,7 +115,7 @@ static int parse_toshiba_rec_hdr(wtap *wth, FILE_T fh, /* Seeks to the beginning of the next packet, and returns the byte offset. Returns -1 on failure. */ /* XXX - Handle I/O errors. */ -static int toshiba_seek_next_packet(wtap *wth) +static long toshiba_seek_next_packet(wtap *wth) { int byte; int level = 0; @@ -198,9 +198,9 @@ int toshiba_open(wtap *wth, int *err) } /* Find the next packet and parse it; called from wtap_loop(). */ -static gboolean toshiba_read(wtap *wth, int *err, int *data_offset) +static gboolean toshiba_read(wtap *wth, int *err, long *data_offset) { - int offset = 0; + long offset; guint8 *buf; int pkt_len; @@ -229,8 +229,8 @@ static gboolean toshiba_read(wtap *wth, int *err, int *data_offset) /* Used to read packets in random-access fashion */ static int -toshiba_seek_read (wtap *wth, int seek_off, union wtap_pseudo_header *pseudo_header, - guint8 *pd, int len) +toshiba_seek_read (wtap *wth, long seek_off, + union wtap_pseudo_header *pseudo_header, guint8 *pd, int len) { int pkt_len; int err; diff --git a/wiretap/wtap-int.h b/wiretap/wtap-int.h index f6b64d0346..49a13a58ac 100644 --- a/wiretap/wtap-int.h +++ b/wiretap/wtap-int.h @@ -1,6 +1,6 @@ /* wtap-int.h * - * $Id: wtap-int.h,v 1.13 2001/08/25 03:18:48 guy Exp $ + * $Id: wtap-int.h,v 1.14 2001/10/04 08:30:36 guy Exp $ * * Wiretap Library * Copyright (c) 1998 by Gilbert Ramirez <gram@xiexie.org> @@ -109,15 +109,15 @@ typedef struct { typedef struct { time_t inittime; int adjusted; - int next_packet_seek_start; + long next_packet_seek_start; } ascend_t; typedef struct { gboolean byteswapped; } csids_t; -typedef int (*subtype_read_func)(struct wtap*, int*, int*); -typedef int (*subtype_seek_read_func)(struct wtap*, int, union wtap_pseudo_header*, +typedef int (*subtype_read_func)(struct wtap*, int*, long*); +typedef int (*subtype_seek_read_func)(struct wtap*, long, union wtap_pseudo_header*, guint8*, int); struct wtap { FILE_T fh; diff --git a/wiretap/wtap.c b/wiretap/wtap.c index db9bbae293..0937ab8e24 100644 --- a/wiretap/wtap.c +++ b/wiretap/wtap.c @@ -1,6 +1,6 @@ /* wtap.c * - * $Id: wtap.c,v 1.54 2001/07/13 00:55:58 guy Exp $ + * $Id: wtap.c,v 1.55 2001/10/04 08:30:36 guy Exp $ * * Wiretap Library * Copyright (c) 1998 by Gilbert Ramirez <gram@xiexie.org> @@ -247,7 +247,7 @@ wtap_close(wtap *wth) } gboolean -wtap_read(wtap *wth, int *err, int *data_offset) +wtap_read(wtap *wth, int *err, long *data_offset) { return wth->subtype_read(wth, err, data_offset); } @@ -273,7 +273,8 @@ wtap_buf_ptr(wtap *wth) gboolean wtap_loop(wtap *wth, int count, wtap_handler callback, u_char* user, int *err) { - int data_offset, loop = 0; + long data_offset; + int loop = 0; /* Start by clearing error flag */ *err = 0; @@ -292,7 +293,7 @@ wtap_loop(wtap *wth, int count, wtap_handler callback, u_char* user, int *err) } int -wtap_seek_read(wtap *wth, int seek_off, +wtap_seek_read(wtap *wth, long seek_off, union wtap_pseudo_header *pseudo_header, guint8 *pd, int len) { return wth->subtype_seek_read(wth, seek_off, pseudo_header, pd, len); diff --git a/wiretap/wtap.h b/wiretap/wtap.h index b6067e13c3..fdbab173ad 100644 --- a/wiretap/wtap.h +++ b/wiretap/wtap.h @@ -1,6 +1,6 @@ /* wtap.h * - * $Id: wtap.h,v 1.88 2001/09/23 21:55:21 guy Exp $ + * $Id: wtap.h,v 1.89 2001/10/04 08:30:36 guy Exp $ * * Wiretap Library * Copyright (c) 1998 by Gilbert Ramirez <gram@xiexie.org> @@ -270,7 +270,7 @@ struct wtap_pkthdr { }; typedef void (*wtap_handler)(u_char*, const struct wtap_pkthdr*, - int, union wtap_pseudo_header *pseudo_header, const u_char *); + long, union wtap_pseudo_header *pseudo_header, const u_char *); struct wtap; struct Buffer; @@ -296,7 +296,7 @@ gboolean wtap_loop(wtap *wth, int, wtap_handler, u_char*, int *err); /* Returns TRUE if read was successful. FALSE if failure. data_offset is * set the the offset in the file where the data for the read packet is * located. */ -gboolean wtap_read(wtap *wth, int *err, int *data_offset); +gboolean wtap_read(wtap *wth, int *err, long *data_offset); struct wtap_pkthdr *wtap_phdr(wtap *wth); union wtap_pseudo_header *wtap_pseudoheader(wtap *wth); @@ -318,9 +318,9 @@ int wtap_short_string_to_encap(const char *short_name); const char *wtap_strerror(int err); void wtap_sequential_close(wtap *wth); void wtap_close(wtap *wth); -int wtap_seek_read (wtap *wth, int seek_off, +int wtap_seek_read (wtap *wth, long seek_off, union wtap_pseudo_header *pseudo_header, guint8 *pd, int len); -int wtap_def_seek_read (wtap *wth, int seek_off, +int wtap_def_seek_read (wtap *wth, long seek_off, union wtap_pseudo_header *pseudo_header, guint8 *pd, int len); gboolean wtap_dump_can_open(int filetype); |