diff options
author | Guy Harris <guy@alum.mit.edu> | 2010-02-25 20:45:59 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2010-02-25 20:45:59 +0000 |
commit | 207a75388a534a38e23d4f5c1068037cd5f26b91 (patch) | |
tree | 1d07967fc0421f7a790f46063312ff62dcb42b59 /wiretap/ascend-int.h | |
parent | def01f5c66c04817289e006fc8fee9046e09a954 (diff) |
Have parse_ascend() return:
PARSED_RECORD if we got a packet;
PARSED_NONRECORD if the parser succeeded but didn't see a packet;
PARSE_FAILED if the parser failed.
Treat anything other than PARSED_RECORD as a failure, for now; I'm not
sure why we were treating "parser succeeded but didn't see a packet" as
success, as that was causing us to recognize some non-Ascend-output text
files as Ascend files and to return "records" with bogus caplen and len
values.
svn path=/trunk/; revision=32009
Diffstat (limited to 'wiretap/ascend-int.h')
-rw-r--r-- | wiretap/ascend-int.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/wiretap/ascend-int.h b/wiretap/ascend-int.h index 812b84d774..f4a3509c8a 100644 --- a/wiretap/ascend-int.h +++ b/wiretap/ascend-int.h @@ -48,7 +48,12 @@ int ascendlex(void); void init_parse_ascend(void); void ascend_init_lexer(FILE_T fh); -int parse_ascend(FILE_T fh, guint8 *pd, struct ascend_phdr *phdr, +typedef enum { + PARSED_RECORD, + PARSED_NONRECORD, + PARSE_FAILED +} parse_t; +parse_t parse_ascend(FILE_T fh, guint8 *pd, struct ascend_phdr *phdr, ascend_pkthdr *hdr, gint64 *start_of_data); #endif /* ! __ASCEND_INT_H__ */ |