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

« back to all changes in this revision

Viewing changes to wiretap/cosine.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
/* cosine.c
2
2
 *
3
 
 * $Id: cosine.c 15534 2005-08-25 21:29:54Z ulfl $
 
3
 * $Id: cosine.c 19814 2006-11-05 22:46:44Z ulfl $
4
4
 *
5
5
 * CoSine IPNOS L2 debug output parsing
6
6
 * Copyright (c) 2002 by Motonori Shindo <mshindo@mshindo.net>
167
167
#define COSINE_MAX_PACKET_LEN   65536
168
168
 
169
169
static gboolean empty_line(const gchar *line);
170
 
static long cosine_seek_next_packet(wtap *wth, int *err, char *hdr);
 
170
static gint64 cosine_seek_next_packet(wtap *wth, int *err, char *hdr);
171
171
static gboolean cosine_check_file_type(wtap *wth, int *err);
172
172
static gboolean cosine_read(wtap *wth, int *err, gchar **err_info,
173
 
        long *data_offset);
174
 
static gboolean cosine_seek_read(wtap *wth, long seek_off,
 
173
        gint64 *data_offset);
 
174
static gboolean cosine_seek_read(wtap *wth, gint64 seek_off,
175
175
        union wtap_pseudo_header *pseudo_header, guint8 *pd,
176
176
        int len, int *err, gchar **err_info);
177
177
static int parse_cosine_rec_hdr(wtap *wth, const char *line,
202
202
/* Seeks to the beginning of the next packet, and returns the
203
203
   byte offset. Copy the header line to hdr. Returns -1 on failure,
204
204
   and sets "*err" to the error and set hdr as NULL. */
205
 
static long cosine_seek_next_packet(wtap *wth, int *err, char *hdr)
 
205
static gint64 cosine_seek_next_packet(wtap *wth, int *err, char *hdr)
206
206
{
207
 
        long cur_off;
 
207
        gint64 cur_off;
208
208
        char buf[COSINE_LINE_LENGTH];
209
209
 
210
210
        while (1) {
306
306
 
307
307
/* Find the next packet and parse it; called from wtap_read(). */
308
308
static gboolean cosine_read(wtap *wth, int *err, gchar **err_info,
309
 
    long *data_offset)
 
309
    gint64 *data_offset)
310
310
{
311
 
        long    offset;
 
311
        gint64  offset;
312
312
        guint8  *buf;
313
313
        int     pkt_len, caplen;
314
314
        char    line[COSINE_LINE_LENGTH];
341
341
 
342
342
/* Used to read packets in random-access fashion */
343
343
static gboolean
344
 
cosine_seek_read (wtap *wth, long seek_off,
 
344
cosine_seek_read (wtap *wth, gint64 seek_off,
345
345
        union wtap_pseudo_header *pseudo_header, guint8 *pd, int len,
346
346
        int *err, gchar **err_info)
347
347
{