This repository has been archived by the owner on May 15, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 33
/
Copy pathparam_structs.h
105 lines (86 loc) · 2.64 KB
/
param_structs.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
/* param_structs.c
*
* Pyreshark Plugin for Wireshark. (https://github.com/ashdnazg/pyreshark)
*
* Copyright (c) 2013 by Eshed Shaham
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef __PARAM_STRUCTS_H__
#define __PARAM_STRUCTS_H__
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#include <glib.h>
#include <epan/packet.h>
#include <epan/proto.h>
#include "pyreshark.h"
typedef struct add_tree_item_params_s {
int *p_hf_index;
gint length;
guint encoding;
proto_item *out_item;
} add_tree_item_params_t;
typedef struct add_text_item_params_s {
int *p_hf_index;
gint length;
char *text;
proto_item *out_item;
} add_text_item_params_t;
typedef struct push_tree_params_s {
proto_item **parent;
gint *p_index;
int *p_start_offset;
proto_tree **p_old_tree;
} push_tree_params_t;
typedef struct pop_tree_params_s {
int *p_start_offset;
proto_tree **p_old_tree;
} pop_tree_params_t;
typedef enum offset_flags_e {
OFFSET_FLAGS_NONE, //Don't read the length from the packet
OFFSET_FLAGS_READ_LENGTH, //The value of the length field doesn't include its own bytes.
OFFSET_FLAGS_READ_LENGTH_INCLUDING, //The value of the length field includes both its own bytes and the data bytes.
} offset_flags_t;
typedef struct advance_offset_params_s {
int length;
guint encoding;
offset_flags_t flags;
} advance_offset_params_t;
typedef struct set_column_text_params_s {
int col_id;
char *text;
} set_column_text_params_t;
typedef struct call_next_dissector_params_s {
char **name;
gint *length;
char *default_name;
gint default_length;
} call_next_dissector_params_t;
typedef struct push_tvb_params_s {
char *name;
guint8 *data;
guint length;
int *p_old_offset;
tvbuff_t **p_old_tvb;
} push_tvb_params_t;
typedef struct pop_tvb_params_s {
int *p_old_offset;
tvbuff_t **p_old_tvb;
} pop_tvb_params_t;
#ifdef __cplusplus
}
#endif
#endif