diff options
author | Michael Mann <mmann78@netscape.net> | 2014-11-16 10:22:34 -0500 |
---|---|---|
committer | Alexis La Goutte <alexis.lagoutte@gmail.com> | 2014-11-22 13:52:08 +0000 |
commit | 534b5967c0cbedf1cf3fb50278d43f981d8b64ab (patch) | |
tree | dd1ddefc8d92bdfa6def543bf3dd04e73fd1ec49 /epan/dissectors/packet-sccp.h | |
parent | e2b597a898df890db995ba3f8120df99cb65a42f (diff) |
Cleanup packet-sccp.c in preparation of trying to remove sccp_info member of packet_info.
Convert a handful of global variables into function parameters that get passed through the dissector, so we shouldn't be dependent on pinfo->sccp_info anymore. Removal of pinfo->sccp_info will be done in a separate patch (when the dissectors that use it can be updated).
packet-sua.c may need similar treatment.
Change-Id: If0001638d666afc07e04b02aa32ef31d6223a5de
Reviewed-on: https://code.wireshark.org/review/5343
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-sccp.h')
-rw-r--r-- | epan/dissectors/packet-sccp.h | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/epan/dissectors/packet-sccp.h b/epan/dissectors/packet-sccp.h index a5a2bbeaf7..f9d7795bb6 100644 --- a/epan/dissectors/packet-sccp.h +++ b/epan/dissectors/packet-sccp.h @@ -103,10 +103,20 @@ typedef struct _sccp_assoc_info_t { } sccp_assoc_info_t; -extern void reset_sccp_assoc(void); -extern sccp_assoc_info_t* get_sccp_assoc(packet_info* pinfo, guint offset, guint32 src_lr, guint32 dst_lr, guint msg_type); +typedef struct _sccp_decode_context_t { + guint8 message_type; + guint dlr; + guint slr; + sccp_assoc_info_t* assoc; + sccp_msg_info_t* sccp_msg; + +} sccp_decode_context_t; + +extern sccp_assoc_info_t* get_sccp_assoc(packet_info* pinfo, guint offset, sccp_decode_context_t* value); extern gboolean looks_like_valid_sccp(guint32 frame_num, tvbuff_t *tvb, guint8 my_mtp3_standard); +#define INVALID_LR 0xffffff /* a reserved value */ + #define GT_SIGNAL_LENGTH 1 #define GT_ODD_SIGNAL_MASK 0x0f #define GT_EVEN_SIGNAL_MASK 0xf0 |