2021-11-30 02:59:23 +00:00
|
|
|
/** @file
|
|
|
|
*
|
1999-10-08 07:41:33 +00:00
|
|
|
* Definitions for routines common to multiple modules in the Lucent/Ascend
|
2021-12-20 02:40:23 +00:00
|
|
|
* capture file reading code, but not used outside that code.
|
1999-10-08 07:41:33 +00:00
|
|
|
*
|
2006-05-21 05:12:17 +00:00
|
|
|
* Wireshark - Network traffic analyzer
|
|
|
|
* By Gerald Combs <gerald@wireshark.org>
|
1999-10-08 07:41:33 +00:00
|
|
|
* Copyright 1998 Gerald Combs
|
|
|
|
*
|
2018-02-07 11:26:45 +00:00
|
|
|
* SPDX-License-Identifier: GPL-2.0-or-later
|
1999-10-08 07:41:33 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __ASCEND_INT_H__
|
|
|
|
#define __ASCEND_INT_H__
|
|
|
|
|
2011-06-04 21:20:57 +00:00
|
|
|
#include <glib.h>
|
2020-11-19 01:39:19 +00:00
|
|
|
#include <stdbool.h>
|
2013-02-28 19:35:59 +00:00
|
|
|
#include "ws_symbol_export.h"
|
2011-06-04 21:20:57 +00:00
|
|
|
|
2013-05-16 21:04:41 +00:00
|
|
|
typedef struct {
|
2020-11-19 01:39:19 +00:00
|
|
|
time_t inittime;
|
|
|
|
gboolean adjusted;
|
|
|
|
gint64 next_packet_seek_start;
|
2013-05-16 21:04:41 +00:00
|
|
|
} ascend_t;
|
|
|
|
|
2016-03-31 01:44:01 +00:00
|
|
|
typedef struct {
|
2020-11-19 01:39:19 +00:00
|
|
|
int length;
|
|
|
|
guint32 u32_val;
|
|
|
|
guint16 u16_val;
|
|
|
|
guint8 u8_val;
|
|
|
|
char str_val[ASCEND_MAX_STR_LEN];
|
|
|
|
} ascend_token_t;
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
FILE_T fh;
|
|
|
|
const gchar *ascend_parse_error;
|
|
|
|
int err;
|
|
|
|
gchar *err_info;
|
|
|
|
struct ascend_phdr *pseudo_header;
|
|
|
|
guint8 *pkt_data;
|
|
|
|
|
|
|
|
gboolean saw_timestamp;
|
|
|
|
guint32 timestamp;
|
|
|
|
|
|
|
|
gint64 first_hexbyte;
|
|
|
|
guint32 wirelen;
|
|
|
|
guint32 caplen;
|
|
|
|
time_t secs;
|
|
|
|
guint32 usecs;
|
|
|
|
|
|
|
|
ascend_token_t token;
|
2016-03-31 01:44:01 +00:00
|
|
|
} ascend_state_t;
|
|
|
|
|
2020-11-19 01:39:19 +00:00
|
|
|
extern bool
|
|
|
|
run_ascend_parser(guint8 *pd, ascend_state_t *parser_state, int *err, gchar **err_info);
|
1999-10-08 07:45:31 +00:00
|
|
|
|
1999-10-08 07:41:33 +00:00
|
|
|
#endif /* ! __ASCEND_INT_H__ */
|