Wireshark 5.1.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
ascend-int.h
Go to the documentation of this file.
1
12
13#ifndef __ASCEND_INT_H__
14#define __ASCEND_INT_H__
15
16#include <stdbool.h>
17#include "ws_symbol_export.h"
18
19/*
20 * Maximum length of a line. Real lines are around 80 characters; this
21 * just keeps the scanner from reading arbitrarily far into a non-Ascend
22 * file.
23 */
24#define ASCEND_MAX_LINE_LEN 1024
25
29typedef struct {
30 time_t inittime;
31 bool adjusted;
33} ascend_t;
34
35
39typedef struct {
40 int length;
41 uint32_t u32_val;
42 uint16_t u16_val;
43 uint8_t u8_val;
44 char str_val[ASCEND_MAX_STR_LEN];
46
50typedef struct {
51 FILE_T fh;
52 const char *ascend_parse_error;
53 int err;
54 char *err_info;
56 uint8_t *pkt_data;
58 time_t timestamp;
59 unsigned line_len;
60 int64_t first_hexbyte;
61 uint32_t wirelen;
62 uint32_t caplen;
63 time_t secs;
64 uint32_t usecs;
67
76extern bool
77run_ascend_parser(uint8_t *pd, ascend_state_t *parser_state, int *err, char **err_info);
78
79#endif /* ! __ASCEND_INT_H__ */
bool run_ascend_parser(uint8_t *pd, ascend_state_t *parser_state, int *err, char **err_info)
Runs the Ascend parser on the given packet data.
Pseudo-header for Ascend WAN capture files carrying session, call, and task metadata.
Definition wtap.h:533
Tracks the full parser state while reading and decoding a single Ascend capture record.
Definition ascend-int.h:50
char * err_info
Definition ascend-int.h:54
struct ascend_phdr * pseudo_header
Definition ascend-int.h:55
uint32_t usecs
Definition ascend-int.h:64
int64_t first_hexbyte
Definition ascend-int.h:60
uint32_t wirelen
Definition ascend-int.h:61
bool saw_timestamp
Definition ascend-int.h:57
int err
Definition ascend-int.h:53
uint32_t caplen
Definition ascend-int.h:62
unsigned line_len
Definition ascend-int.h:59
FILE_T fh
Definition ascend-int.h:51
uint8_t * pkt_data
Definition ascend-int.h:56
ascend_token_t token
Definition ascend-int.h:65
time_t secs
Definition ascend-int.h:63
const char * ascend_parse_error
Definition ascend-int.h:52
time_t timestamp
Definition ascend-int.h:58
Holds per-file state for reading an Ascend capture file.
Definition ascend-int.h:29
bool adjusted
Definition ascend-int.h:31
int64_t next_packet_seek_start
Definition ascend-int.h:32
time_t inittime
Definition ascend-int.h:30
Holds the parsed value of a single token produced by the Ascend file lexer.
Definition ascend-int.h:39
char str_val[ASCEND_MAX_STR_LEN]
Definition ascend-int.h:44
int length
Definition ascend-int.h:40
uint16_t u16_val
Definition ascend-int.h:42
uint32_t u32_val
Definition ascend-int.h:41
uint8_t u8_val
Definition ascend-int.h:43