diff options
Diffstat (limited to 'wiretap')
-rw-r--r-- | wiretap/ascend-grammar.y | 13 | ||||
-rw-r--r-- | wiretap/ascend-int.h | 4 | ||||
-rw-r--r-- | wiretap/ascend-scanner.l | 7 |
3 files changed, 7 insertions, 17 deletions
diff --git a/wiretap/ascend-grammar.y b/wiretap/ascend-grammar.y index 0c07d9e069..c9dcfca6ed 100644 --- a/wiretap/ascend-grammar.y +++ b/wiretap/ascend-grammar.y @@ -1,7 +1,7 @@ %{ /* ascend-grammar.y * - * $Id: ascend-grammar.y,v 1.22 2001/12/04 10:07:30 guy Exp $ + * $Id: ascend-grammar.y,v 1.23 2001/12/06 08:25:51 guy Exp $ * * Wiretap Library * Copyright (c) 1998 by Gilbert Ramirez <gram@alumni.rice.edu> @@ -115,7 +115,6 @@ XMIT-Max7:20: (task "_brouterControlTask" at 0xb094ac20, time: 1481.51) 20 octet #include "ascend.h" #include "ascend-int.h" -#define NFH_PATH "/dev/null" #define NO_USER "<none>" extern int at_eof; @@ -128,7 +127,6 @@ guint32 start_time, secs, usecs, caplen, wirelen; ascend_pkthdr *header; struct ascend_phdr *pseudo_header; char *pkt_data; -FILE *nfh = NULL; %} @@ -375,13 +373,6 @@ init_parse_ascend() bcur = 0; at_eof = 0; start_time = 0; /* we haven't see a date/time yet */ - - /* In order to keep flex from printing a lot of newlines while reading - the capture data, we open up /dev/null and point yyout at the null - file handle. */ - if (! nfh) { - nfh = fopen(NFH_PATH, "r"); - } } /* Parse the capture file. Return the offset of the next packet, or zero @@ -392,7 +383,7 @@ parse_ascend(FILE_T fh, void *pd, struct ascend_phdr *phdr, { /* yydebug = 1; */ - ascend_init_lexer(fh, nfh); + ascend_init_lexer(fh); pkt_data = pd; pseudo_header = phdr; header = hdr; diff --git a/wiretap/ascend-int.h b/wiretap/ascend-int.h index 0f051d5e25..4e26e9980c 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.7 2000/11/11 03:15:07 guy Exp $ + * $Id: ascend-int.h,v 1.8 2001/12/06 08:25:52 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@zing.org> @@ -44,7 +44,7 @@ extern struct ascend_phdr *pseudo_header; int ascendlex(void); void init_parse_ascend(void); -void ascend_init_lexer(FILE_T fh, FILE *nfh); +void ascend_init_lexer(FILE_T fh); int parse_ascend(FILE_T fh, void *pd, struct ascend_phdr *phdr, ascend_pkthdr *hdr, int len); diff --git a/wiretap/ascend-scanner.l b/wiretap/ascend-scanner.l index e551bb3924..8f7e153463 100644 --- a/wiretap/ascend-scanner.l +++ b/wiretap/ascend-scanner.l @@ -1,7 +1,7 @@ %{ /* ascend-scanner.l * - * $Id: ascend-scanner.l,v 1.22 2001/12/04 10:07:30 guy Exp $ + * $Id: ascend-scanner.l,v 1.23 2001/12/06 08:25:52 guy Exp $ * * Wiretap Library * Copyright (c) 1998 by Gilbert Ramirez <gram@alumni.rice.edu> @@ -277,16 +277,15 @@ task:|task|at|time:|octets { return KEYWORD; } <<EOF>> { at_eof++; yyterminate(); } -. ; +(.|\n) ; %% int ascendwrap() { return 1; } -void ascend_init_lexer(FILE_T fh, FILE *nfh) +void ascend_init_lexer(FILE_T fh) { yyrestart(0); - yyout = nfh; yy_fh = fh; BEGIN(INITIAL); } |