Wireshark 4.7.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
packet-asterix.h
1/* packet-asterix.h
2 *
3 * Common definitions for ASTERIX dissector
4 *
5 * Wireshark - Network traffic analyzer
6 * By Gerald Combs <[email protected]>
7 * Copyright 1998 Gerald Combs
8 *
9 * SPDX-License-Identifier: GPL-2.0-or-later
10 */
11
12#ifndef __PACKET_ASTERIX_H__
13#define __PACKET_ASTERIX_H__
14
15#include <epan/packet.h>
16#include <epan/expert.h>
17
18#define MAX_UAP_NAME_LENGTH 255
19
20module_t *asterix_module;
21expert_module_t* expert_asterix;
22typedef struct {
23 unsigned cat;
24 unsigned *cat_enum;
25 unsigned *cat_default_value;
26 const enum_val_t *cat_enums;
27 const char *cat_name;
28 bool cat_basic;
30
31typedef int (*ttt)(tvbuff_t *, unsigned, proto_tree *, int);
32typedef struct {
33 const ttt *table_pointer;
34 int** table_pointer_expand;
35 unsigned int table_size;
36 char uap_name[MAX_UAP_NAME_LENGTH];
38
39typedef struct {
40 unsigned int start_index;
41 unsigned int end_index;
43
44static bool asterix_extended_end (tvbuff_t *tvb, unsigned offset);
45static unsigned asterix_get_unsigned_value(tvbuff_t *tvb, unsigned offset, unsigned bytes);
46static int asterix_get_signed_value(tvbuff_t *tvb, unsigned offset, unsigned bytes);
47static int get_signed_int(unsigned value, unsigned bits);
48static unsigned asterix_dissect_fspec (tvbuff_t *tvb, unsigned offset, proto_tree *tree);
49static bool asterix_field_exists (tvbuff_t *tvb, unsigned offset, unsigned bitIndex);
50static unsigned asterix_fspec_len (tvbuff_t *tvb, unsigned offset);
51static bool asterix_fspec_check (unsigned fspec_len, unsigned list_length, proto_item *ti);
52static void get_expansion_table(unsigned int cat, int ed, table_params *table);
53static unsigned asterix_parse_re_field (tvbuff_t *tvb, unsigned offset, proto_tree *tree, unsigned fspec_len, unsigned cat);
54static void print_octal_string (tvbuff_t *tvb, unsigned offset, unsigned bit_offset, unsigned bit_size, unsigned byte_size, proto_tree *tree, int expand_var);
55static void print_icao_string (tvbuff_t *tvb, unsigned offset, unsigned bit_offset, unsigned bit_size, unsigned byte_size, proto_tree *tree, int expand_var);
56static void check_spare_bits (tvbuff_t *tvb, unsigned bit_offset, unsigned bit_size, proto_item *item);
57
58static expert_field ei_asterix_overflow;
59static expert_field hf_asterix_spare_error;
60static expert_field hf_asterix_fspec_error;
61
62#endif /* __PACKET_ASTERIX_H__ */
Definition proto.h:907
Definition packet-asterix.h:22
Definition params.h:23
Definition expert.h:39
Definition expert.c:48
Definition prefs-int.h:27
Definition packet-asterix.h:32
Definition tvbuff-int.h:35
Definition packet-asterix.h:39