~ubuntu-branches/ubuntu/gutsy/wireshark/gutsy-security

« back to all changes in this revision

Viewing changes to wiretap/eyesdn.c

  • Committer: Bazaar Package Importer
  • Author(s): Frederic Peters
  • Date: 2007-04-01 08:58:40 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20070401085840-or3qhrpv8alt1bwg
Tags: 0.99.5-1
* New upstream release.
* debian/patches/09_idl2wrs.dpatch: updated to patch idl2wrs.sh.in.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* eyesdn.c
2
2
 *
3
 
 * $Id: eyesdn.c 19358 2006-09-29 08:47:51Z jake $
 
3
 * $Id: eyesdn.c 19814 2006-11-05 22:46:44Z ulfl $
4
4
 *
5
5
 * Wiretap Library
6
6
 * Copyright (c) 1998 by Gilbert Ramirez <gram@alumni.rice.edu>
95
95
#define EYESDN_MAX_PACKET_LEN   16384
96
96
 
97
97
static gboolean eyesdn_read(wtap *wth, int *err, gchar **err_info,
98
 
        long *data_offset);
99
 
static gboolean eyesdn_seek_read(wtap *wth, long seek_off,
 
98
        gint64 *data_offset);
 
99
static gboolean eyesdn_seek_read(wtap *wth, gint64 seek_off,
100
100
        union wtap_pseudo_header *pseudo_header, guint8 *pd, int len,
101
101
        int *err, gchar **err_info);
102
102
static gboolean parse_eyesdn_packet_data(FILE_T fh, int pkt_len, guint8* buf,
106
106
 
107
107
/* Seeks to the beginning of the next packet, and returns the
108
108
   byte offset.  Returns -1 on failure, and sets "*err" to the error. */
109
 
static long eyesdn_seek_next_packet(wtap *wth, int *err)
 
109
static gint64 eyesdn_seek_next_packet(wtap *wth, int *err)
110
110
{
111
111
  int byte;
112
 
  long cur_off;
 
112
  gint64 cur_off;
113
113
 
114
114
  while ((byte = file_getc(wth->fh)) != EOF) {
115
115
    if (byte == 0xff) {
163
163
 
164
164
/* Find the next packet and parse it; called from wtap_read(). */
165
165
static gboolean eyesdn_read(wtap *wth, int *err, gchar **err_info,
166
 
    long *data_offset)
 
166
    gint64 *data_offset)
167
167
{
168
 
        long    offset;
 
168
        gint64  offset;
169
169
        guint8  *buf;
170
170
        int     pkt_len;
171
171
 
195
195
 
196
196
/* Used to read packets in random-access fashion */
197
197
static gboolean
198
 
eyesdn_seek_read (wtap *wth, long seek_off,
 
198
eyesdn_seek_read (wtap *wth, gint64 seek_off,
199
199
        union wtap_pseudo_header *pseudo_header, guint8 *pd, int len,
200
200
        int *err, gchar **err_info)
201
201
{