diff options
author | Guy Harris <guy@alum.mit.edu> | 2016-03-02 17:37:02 -0800 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2016-03-03 01:38:10 +0000 |
commit | dc92e98db42c6ef55616940bc26cc989180fefdc (patch) | |
tree | b55f2160abd713a57bd26cb7028141cf9f662e88 /epan | |
parent | ed6554c20282a6f78640d8b94ee54a954147aa18 (diff) |
Define in one and only one C file, declare in a header file.
Presumably the intent is to have the two dissectors share the tables in
question; if so, it's best done by defining the tables in one and only
one C file and declaring it in a header file included by both C files -
that 1) ensures the declaration and definition stay in sync and 2) keeps
the OS X build from failing.
Change-Id: Id2e7e5b7270c7109ffb091b2e16a631b83dde212
Reviewed-on: https://code.wireshark.org/review/14309
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'epan')
-rw-r--r-- | epan/dissectors/packet-gtp.h | 6 | ||||
-rw-r--r-- | epan/dissectors/packet-gtpv2.c | 5 |
2 files changed, 6 insertions, 5 deletions
diff --git a/epan/dissectors/packet-gtp.h b/epan/dissectors/packet-gtp.h index 8b0af67831..073afc9b0c 100644 --- a/epan/dissectors/packet-gtp.h +++ b/epan/dissectors/packet-gtp.h @@ -158,6 +158,12 @@ typedef struct session_args { guint8 last_cause; } session_args_t; +/* Relation between frame -> session */ +extern GHashTable* session_table; + +/* Relation between <teid,ip> -> frame */ +extern wmem_tree_t* frame_tree; + guint32 get_frame(address ip, guint32 teid, guint32 *frame); void remove_frame_info(guint32 *f); diff --git a/epan/dissectors/packet-gtpv2.c b/epan/dissectors/packet-gtpv2.c index 9fb5efe098..fecb9c5c35 100644 --- a/epan/dissectors/packet-gtpv2.c +++ b/epan/dissectors/packet-gtpv2.c @@ -1031,11 +1031,6 @@ static const value_string gtpv2_element_type_vals[] = { }; static value_string_ext gtpv2_element_type_vals_ext = VALUE_STRING_EXT_INIT(gtpv2_element_type_vals); -/* Relation between frame -> session */ -GHashTable* session_table; -/* Relation between <teid,ip> -> frame */ -wmem_tree_t* frame_tree; - typedef struct _gtpv2_hdr { guint8 flags; /* GTP header flags */ guint8 message; /* Message type */ |