diff options
author | Michael Mann <mmann78@netscape.net> | 2015-01-25 17:32:40 -0500 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2015-01-26 01:02:33 +0000 |
commit | d46568212dcd90fe6b7a3f3b430f48a2aaf8f175 (patch) | |
tree | 985447984e55b3124a84411c4403f68ff1c3e869 | |
parent | 155fc8f16a037834fff33bd179cc903a84876824 (diff) |
Roll functionality of h225-persistentdata module into packet-h225.c
Change-Id: I19b2a1b19e1e77a6456e2310daf64ddff572b0d2
Reviewed-on: https://code.wireshark.org/review/6788
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
-rw-r--r-- | asn1/h225/packet-h225-template.c | 142 | ||||
-rw-r--r-- | epan/CMakeLists.txt | 1 | ||||
-rw-r--r-- | epan/Makefile.common | 2 | ||||
-rw-r--r-- | epan/dissectors/packet-h225.c | 152 | ||||
-rw-r--r-- | epan/h225-persistentdata.c | 160 | ||||
-rw-r--r-- | epan/h225-persistentdata.h | 60 |
6 files changed, 281 insertions, 236 deletions
diff --git a/asn1/h225/packet-h225-template.c b/asn1/h225/packet-h225-template.c index 51e509dc49..df5a63cecc 100644 --- a/asn1/h225/packet-h225-template.c +++ b/asn1/h225/packet-h225-template.c @@ -44,7 +44,6 @@ #include "packet-tpkt.h" #include "packet-per.h" #include "packet-h225.h" -#include <epan/h225-persistentdata.h> #include "packet-h235.h" #include "packet-h245.h" #include "packet-h323.h" @@ -63,11 +62,39 @@ void proto_register_h225(void); static void reset_h225_packet_info(h225_packet_info *pi); +static void h225_init_routine(void); static void ras_call_matching(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, h225_packet_info *pi); +/* Item of ras request list*/ +typedef struct _h225ras_call_t { + guint32 requestSeqNum; + e_guid_t guid; + guint32 req_num; /* frame number request seen */ + guint32 rsp_num; /* frame number response seen */ + nstime_t req_time; /* arrival time of request */ + gboolean responded; /* true, if request has been responded */ + struct _h225ras_call_t *next_call; /* pointer to next ras request with same SequenceNumber and conversation handle */ +} h225ras_call_t; + + +/* Item of ras-request key list*/ +typedef struct _h225ras_call_info_key { + guint reqSeqNum; + conversation_t *conversation; +} h225ras_call_info_key; + static h225_packet_info pi_arr[5]; /* We assuming a maximum of 5 H225 messaages per packet */ static int pi_current=0; -h225_packet_info *h225_pi=&pi_arr[0]; +static h225_packet_info *h225_pi=&pi_arr[0]; + +/* Global Memory Chunks for lists and Global hash tables*/ + +static GHashTable *ras_calls[7] = {NULL, NULL, NULL, NULL, NULL, NULL, NULL}; + +/* functions, needed using ras-request and halfcall matching*/ +static h225ras_call_t * find_h225ras_call(h225ras_call_info_key *h225ras_call_key ,int category); +static h225ras_call_t * new_h225ras_call(h225ras_call_info_key *h225ras_call_key, packet_info *pinfo, e_guid_t *guid, int category); +static h225ras_call_t * append_h225ras_call(h225ras_call_t *prev_call, packet_info *pinfo, e_guid_t *guid, int category); static dissector_handle_t data_handle; /* Subdissector tables */ @@ -133,6 +160,113 @@ static const char *tpOID; /* Forward declaration we need below */ void proto_reg_handoff_h225(void); +/* + * Functions needed for Ras-Hash-Table + */ + +/* compare 2 keys */ +static gint h225ras_call_equal(gconstpointer k1, gconstpointer k2) +{ + const h225ras_call_info_key* key1 = (const h225ras_call_info_key*) k1; + const h225ras_call_info_key* key2 = (const h225ras_call_info_key*) k2; + + return (key1->reqSeqNum == key2->reqSeqNum && + key1->conversation == key2->conversation); +} + +/* calculate a hash key */ +static guint h225ras_call_hash(gconstpointer k) +{ + const h225ras_call_info_key* key = (const h225ras_call_info_key*) k; + + return key->reqSeqNum + GPOINTER_TO_UINT(key->conversation); +} + + +h225ras_call_t * find_h225ras_call(h225ras_call_info_key *h225ras_call_key ,int category) +{ + h225ras_call_t *h225ras_call = NULL; + h225ras_call = (h225ras_call_t *)g_hash_table_lookup(ras_calls[category], h225ras_call_key); + + return h225ras_call; +} + +h225ras_call_t * new_h225ras_call(h225ras_call_info_key *h225ras_call_key, packet_info *pinfo, e_guid_t *guid, int category) +{ + h225ras_call_info_key *new_h225ras_call_key; + h225ras_call_t *h225ras_call = NULL; + + + /* Prepare the value data. + "req_num" and "rsp_num" are frame numbers; + frame numbers are 1-origin, so we use 0 + to mean "we don't yet know in which frame + the reply for this call appears". */ + new_h225ras_call_key = wmem_new(wmem_file_scope(), h225ras_call_info_key); + new_h225ras_call_key->reqSeqNum = h225ras_call_key->reqSeqNum; + new_h225ras_call_key->conversation = h225ras_call_key->conversation; + h225ras_call = wmem_new(wmem_file_scope(), h225ras_call_t); + h225ras_call->req_num = pinfo->fd->num; + h225ras_call->rsp_num = 0; + h225ras_call->requestSeqNum = h225ras_call_key->reqSeqNum; + h225ras_call->responded = FALSE; + h225ras_call->next_call = NULL; + h225ras_call->req_time=pinfo->fd->abs_ts; + h225ras_call->guid=*guid; + /* store it */ + g_hash_table_insert(ras_calls[category], new_h225ras_call_key, h225ras_call); + + return h225ras_call; +} + +h225ras_call_t * append_h225ras_call(h225ras_call_t *prev_call, packet_info *pinfo, e_guid_t *guid, int category _U_) +{ + h225ras_call_t *h225ras_call = NULL; + + /* Prepare the value data. + "req_num" and "rsp_num" are frame numbers; + frame numbers are 1-origin, so we use 0 + to mean "we don't yet know in which frame + the reply for this call appears". */ + h225ras_call = wmem_new(wmem_file_scope(), h225ras_call_t); + h225ras_call->req_num = pinfo->fd->num; + h225ras_call->rsp_num = 0; + h225ras_call->requestSeqNum = prev_call->requestSeqNum; + h225ras_call->responded = FALSE; + h225ras_call->next_call = NULL; + h225ras_call->req_time=pinfo->fd->abs_ts; + h225ras_call->guid=*guid; + + prev_call->next_call = h225ras_call; + return h225ras_call; +} + +/* Init routine for hash tables and delay calculation + This routine will be called by Wireshark, before it + is (re-)dissecting a trace file from beginning. + We need to discard and init any state we've saved */ + +void +h225_init_routine(void) +{ + int i; + + /* free hash-tables for RAS SRT */ + for(i=0;i<7;i++) { + if (ras_calls[i] != NULL) { + g_hash_table_destroy(ras_calls[i]); + ras_calls[i] = NULL; + } + } + + /* create new hash-tables for RAS SRT */ + + for(i=0;i<7;i++) { + ras_calls[i] = g_hash_table_new(h225ras_call_hash, h225ras_call_equal); + } + +} + static int dissect_h225_H323UserInformation(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) { @@ -209,8 +343,8 @@ void proto_register_h225(void) { /* List of fields */ static hf_register_info hf[] = { { &hf_h221Manufacturer, - { "H.221 Manufacturer", "h221.Manufacturer", FT_UINT32, BASE_HEX, - VALS(H221ManufacturerCode_vals), 0, NULL, HFILL }}, + { "H.225 Manufacturer", "h225.Manufacturer", FT_UINT32, BASE_HEX, + VALS(H221ManufacturerCode_vals), 0, "h225.H.221 Manufacturer", HFILL }}, { &hf_h225_ras_req_frame, { "RAS Request Frame", "h225.ras.reqframe", FT_FRAMENUM, BASE_NONE, NULL, 0, NULL, HFILL }}, diff --git a/epan/CMakeLists.txt b/epan/CMakeLists.txt index 856ece2261..709689ccc0 100644 --- a/epan/CMakeLists.txt +++ b/epan/CMakeLists.txt @@ -1592,7 +1592,6 @@ set(LIBWIRESHARK_FILES geoip_db.c golay.c guid-utils.c - h225-persistentdata.c in_cksum.c ipproto.c ipv4.c diff --git a/epan/Makefile.common b/epan/Makefile.common index 0279edcdd5..452be860a1 100644 --- a/epan/Makefile.common +++ b/epan/Makefile.common @@ -62,7 +62,6 @@ LIBWIRESHARK_SRC = \ geoip_db.c \ golay.c \ guid-utils.c \ - h225-persistentdata.c \ in_cksum.c \ ipproto.c \ ipv4.c \ @@ -203,7 +202,6 @@ LIBWIRESHARK_INCLUDES = \ geoip_db.h \ golay.h \ guid-utils.h \ - h225-persistentdata.h \ iana_snap_pid.h \ iax2_codec_type.h \ in_cksum.h \ diff --git a/epan/dissectors/packet-h225.c b/epan/dissectors/packet-h225.c index 13a6bfaacb..43d7a27ff4 100644 --- a/epan/dissectors/packet-h225.c +++ b/epan/dissectors/packet-h225.c @@ -52,7 +52,6 @@ #include "packet-tpkt.h" #include "packet-per.h" #include "packet-h225.h" -#include <epan/h225-persistentdata.h> #include "packet-h235.h" #include "packet-h245.h" #include "packet-h323.h" @@ -71,11 +70,39 @@ void proto_register_h225(void); static void reset_h225_packet_info(h225_packet_info *pi); +static void h225_init_routine(void); static void ras_call_matching(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, h225_packet_info *pi); +/* Item of ras request list*/ +typedef struct _h225ras_call_t { + guint32 requestSeqNum; + e_guid_t guid; + guint32 req_num; /* frame number request seen */ + guint32 rsp_num; /* frame number response seen */ + nstime_t req_time; /* arrival time of request */ + gboolean responded; /* true, if request has been responded */ + struct _h225ras_call_t *next_call; /* pointer to next ras request with same SequenceNumber and conversation handle */ +} h225ras_call_t; + + +/* Item of ras-request key list*/ +typedef struct _h225ras_call_info_key { + guint reqSeqNum; + conversation_t *conversation; +} h225ras_call_info_key; + static h225_packet_info pi_arr[5]; /* We assuming a maximum of 5 H225 messaages per packet */ static int pi_current=0; -h225_packet_info *h225_pi=&pi_arr[0]; +static h225_packet_info *h225_pi=&pi_arr[0]; + +/* Global Memory Chunks for lists and Global hash tables*/ + +static GHashTable *ras_calls[7] = {NULL, NULL, NULL, NULL, NULL, NULL, NULL}; + +/* functions, needed using ras-request and halfcall matching*/ +static h225ras_call_t * find_h225ras_call(h225ras_call_info_key *h225ras_call_key ,int category); +static h225ras_call_t * new_h225ras_call(h225ras_call_info_key *h225ras_call_key, packet_info *pinfo, e_guid_t *guid, int category); +static h225ras_call_t * append_h225ras_call(h225ras_call_t *prev_call, packet_info *pinfo, e_guid_t *guid, int category); static dissector_handle_t data_handle; /* Subdissector tables */ @@ -882,7 +909,7 @@ static int hf_h225_stopped = -1; /* NULL */ static int hf_h225_notAvailable = -1; /* NULL */ /*--- End of included file: packet-h225-hf.c ---*/ -#line 103 "../../asn1/h225/packet-h225-template.c" +#line 130 "../../asn1/h225/packet-h225-template.c" /* Initialize the subtree pointers */ static gint ett_h225 = -1; @@ -1130,7 +1157,7 @@ static gint ett_h225_ServiceControlResponse = -1; static gint ett_h225_T_result = -1; /*--- End of included file: packet-h225-ett.c ---*/ -#line 107 "../../asn1/h225/packet-h225-template.c" +#line 134 "../../asn1/h225/packet-h225-template.c" /* Preferences */ static guint h225_tls_port = TLS_PORT_CS; @@ -7510,12 +7537,119 @@ static int dissect_RasMessage_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, pro /*--- End of included file: packet-h225-fn.c ---*/ -#line 131 "../../asn1/h225/packet-h225-template.c" +#line 158 "../../asn1/h225/packet-h225-template.c" /* Forward declaration we need below */ void proto_reg_handoff_h225(void); +/* + * Functions needed for Ras-Hash-Table + */ + +/* compare 2 keys */ +static gint h225ras_call_equal(gconstpointer k1, gconstpointer k2) +{ + const h225ras_call_info_key* key1 = (const h225ras_call_info_key*) k1; + const h225ras_call_info_key* key2 = (const h225ras_call_info_key*) k2; + + return (key1->reqSeqNum == key2->reqSeqNum && + key1->conversation == key2->conversation); +} + +/* calculate a hash key */ +static guint h225ras_call_hash(gconstpointer k) +{ + const h225ras_call_info_key* key = (const h225ras_call_info_key*) k; + + return key->reqSeqNum + GPOINTER_TO_UINT(key->conversation); +} + + +h225ras_call_t * find_h225ras_call(h225ras_call_info_key *h225ras_call_key ,int category) +{ + h225ras_call_t *h225ras_call = NULL; + h225ras_call = (h225ras_call_t *)g_hash_table_lookup(ras_calls[category], h225ras_call_key); + + return h225ras_call; +} + +h225ras_call_t * new_h225ras_call(h225ras_call_info_key *h225ras_call_key, packet_info *pinfo, e_guid_t *guid, int category) +{ + h225ras_call_info_key *new_h225ras_call_key; + h225ras_call_t *h225ras_call = NULL; + + + /* Prepare the value data. + "req_num" and "rsp_num" are frame numbers; + frame numbers are 1-origin, so we use 0 + to mean "we don't yet know in which frame + the reply for this call appears". */ + new_h225ras_call_key = wmem_new(wmem_file_scope(), h225ras_call_info_key); + new_h225ras_call_key->reqSeqNum = h225ras_call_key->reqSeqNum; + new_h225ras_call_key->conversation = h225ras_call_key->conversation; + h225ras_call = wmem_new(wmem_file_scope(), h225ras_call_t); + h225ras_call->req_num = pinfo->fd->num; + h225ras_call->rsp_num = 0; + h225ras_call->requestSeqNum = h225ras_call_key->reqSeqNum; + h225ras_call->responded = FALSE; + h225ras_call->next_call = NULL; + h225ras_call->req_time=pinfo->fd->abs_ts; + h225ras_call->guid=*guid; + /* store it */ + g_hash_table_insert(ras_calls[category], new_h225ras_call_key, h225ras_call); + + return h225ras_call; +} + +h225ras_call_t * append_h225ras_call(h225ras_call_t *prev_call, packet_info *pinfo, e_guid_t *guid, int category _U_) +{ + h225ras_call_t *h225ras_call = NULL; + + /* Prepare the value data. + "req_num" and "rsp_num" are frame numbers; + frame numbers are 1-origin, so we use 0 + to mean "we don't yet know in which frame + the reply for this call appears". */ + h225ras_call = wmem_new(wmem_file_scope(), h225ras_call_t); + h225ras_call->req_num = pinfo->fd->num; + h225ras_call->rsp_num = 0; + h225ras_call->requestSeqNum = prev_call->requestSeqNum; + h225ras_call->responded = FALSE; + h225ras_call->next_call = NULL; + h225ras_call->req_time=pinfo->fd->abs_ts; + h225ras_call->guid=*guid; + + prev_call->next_call = h225ras_call; + return h225ras_call; +} + +/* Init routine for hash tables and delay calculation + This routine will be called by Wireshark, before it + is (re-)dissecting a trace file from beginning. + We need to discard and init any state we've saved */ + +void +h225_init_routine(void) +{ + int i; + + /* free hash-tables for RAS SRT */ + for(i=0;i<7;i++) { + if (ras_calls[i] != NULL) { + g_hash_table_destroy(ras_calls[i]); + ras_calls[i] = NULL; + } + } + + /* create new hash-tables for RAS SRT */ + + for(i=0;i<7;i++) { + ras_calls[i] = g_hash_table_new(h225ras_call_hash, h225ras_call_equal); + } + +} + static int dissect_h225_H323UserInformation(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) { @@ -7592,8 +7726,8 @@ void proto_register_h225(void) { /* List of fields */ static hf_register_info hf[] = { { &hf_h221Manufacturer, - { "H.221 Manufacturer", "h221.Manufacturer", FT_UINT32, BASE_HEX, - VALS(H221ManufacturerCode_vals), 0, NULL, HFILL }}, + { "H.225 Manufacturer", "h225.Manufacturer", FT_UINT32, BASE_HEX, + VALS(H221ManufacturerCode_vals), 0, "h225.H.221 Manufacturer", HFILL }}, { &hf_h225_ras_req_frame, { "RAS Request Frame", "h225.ras.reqframe", FT_FRAMENUM, BASE_NONE, NULL, 0, NULL, HFILL }}, @@ -10695,7 +10829,7 @@ void proto_register_h225(void) { NULL, HFILL }}, /*--- End of included file: packet-h225-hfarr.c ---*/ -#line 231 "../../asn1/h225/packet-h225-template.c" +#line 365 "../../asn1/h225/packet-h225-template.c" }; /* List of subtrees */ @@ -10945,7 +11079,7 @@ void proto_register_h225(void) { &ett_h225_T_result, /*--- End of included file: packet-h225-ettarr.c ---*/ -#line 237 "../../asn1/h225/packet-h225-template.c" +#line 371 "../../asn1/h225/packet-h225-template.c" }; module_t *h225_module; diff --git a/epan/h225-persistentdata.c b/epan/h225-persistentdata.c deleted file mode 100644 index 6d5634cd65..0000000000 --- a/epan/h225-persistentdata.c +++ /dev/null @@ -1,160 +0,0 @@ -/* - * h225-persistentdata.c - * Source for lists and hash tables used in wireshark's h225 dissector - * for calculation of delays in h225-calls - * - * Copyright 2003 Lars Roland - * - * Wireshark - Network traffic analyzer - * By Gerald Combs <gerald@wireshark.org> - * Copyright 1998 Gerald Combs - * - * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ - -#include "config.h" - -#include <glib.h> -#include <epan/packet.h> - -#include <stdio.h> -#include <string.h> - -#include "h225-persistentdata.h" - -/* Global Memory Chunks for lists and Global hash tables*/ - -static GHashTable *ras_calls[7] = {NULL, NULL, NULL, NULL, NULL, NULL, NULL}; - -/* - * Functions needed for Ras-Hash-Table - */ - -/* compare 2 keys */ -static gint h225ras_call_equal(gconstpointer k1, gconstpointer k2) -{ - const h225ras_call_info_key* key1 = (const h225ras_call_info_key*) k1; - const h225ras_call_info_key* key2 = (const h225ras_call_info_key*) k2; - - return (key1->reqSeqNum == key2->reqSeqNum && - key1->conversation == key2->conversation); -} - -/* calculate a hash key */ -static guint h225ras_call_hash(gconstpointer k) -{ - const h225ras_call_info_key* key = (const h225ras_call_info_key*) k; - - return key->reqSeqNum + GPOINTER_TO_UINT(key->conversation); -} - - -h225ras_call_t * find_h225ras_call(h225ras_call_info_key *h225ras_call_key ,int category) -{ - h225ras_call_t *h225ras_call = NULL; - h225ras_call = (h225ras_call_t *)g_hash_table_lookup(ras_calls[category], h225ras_call_key); - - return h225ras_call; -} - -h225ras_call_t * new_h225ras_call(h225ras_call_info_key *h225ras_call_key, packet_info *pinfo, e_guid_t *guid, int category) -{ - h225ras_call_info_key *new_h225ras_call_key; - h225ras_call_t *h225ras_call = NULL; - - - /* Prepare the value data. - "req_num" and "rsp_num" are frame numbers; - frame numbers are 1-origin, so we use 0 - to mean "we don't yet know in which frame - the reply for this call appears". */ - new_h225ras_call_key = wmem_new(wmem_file_scope(), h225ras_call_info_key); - new_h225ras_call_key->reqSeqNum = h225ras_call_key->reqSeqNum; - new_h225ras_call_key->conversation = h225ras_call_key->conversation; - h225ras_call = wmem_new(wmem_file_scope(), h225ras_call_t); - h225ras_call->req_num = pinfo->fd->num; - h225ras_call->rsp_num = 0; - h225ras_call->requestSeqNum = h225ras_call_key->reqSeqNum; - h225ras_call->responded = FALSE; - h225ras_call->next_call = NULL; - h225ras_call->req_time=pinfo->fd->abs_ts; - h225ras_call->guid=*guid; - /* store it */ - g_hash_table_insert(ras_calls[category], new_h225ras_call_key, h225ras_call); - - return h225ras_call; -} - -h225ras_call_t * append_h225ras_call(h225ras_call_t *prev_call, packet_info *pinfo, e_guid_t *guid, int category _U_) -{ - h225ras_call_t *h225ras_call = NULL; - - /* Prepare the value data. - "req_num" and "rsp_num" are frame numbers; - frame numbers are 1-origin, so we use 0 - to mean "we don't yet know in which frame - the reply for this call appears". */ - h225ras_call = wmem_new(wmem_file_scope(), h225ras_call_t); - h225ras_call->req_num = pinfo->fd->num; - h225ras_call->rsp_num = 0; - h225ras_call->requestSeqNum = prev_call->requestSeqNum; - h225ras_call->responded = FALSE; - h225ras_call->next_call = NULL; - h225ras_call->req_time=pinfo->fd->abs_ts; - h225ras_call->guid=*guid; - - prev_call->next_call = h225ras_call; - return h225ras_call; -} - - -/* Init routine for hash tables and delay calculation - This routine will be called by Wireshark, before it - is (re-)dissecting a trace file from beginning. - We need to discard and init any state we've saved */ - -void -h225_init_routine(void) -{ - int i; - - /* free hash-tables for RAS SRT */ - for(i=0;i<7;i++) { - if (ras_calls[i] != NULL) { - g_hash_table_destroy(ras_calls[i]); - ras_calls[i] = NULL; - } - } - - /* create new hash-tables for RAS SRT */ - - for(i=0;i<7;i++) { - ras_calls[i] = g_hash_table_new(h225ras_call_hash, h225ras_call_equal); - } - -} - -/* - * Editor modelines - http://www.wireshark.org/tools/modelines.html - * - * Local variables: - * c-basic-offset: 8 - * tab-width: 8 - * indent-tabs-mode: t - * End: - * - * vi: set shiftwidth=8 tabstop=8 noexpandtab: - * :indentSize=8:tabSize=8:noTabs=false: - */ diff --git a/epan/h225-persistentdata.h b/epan/h225-persistentdata.h deleted file mode 100644 index c1b733cd16..0000000000 --- a/epan/h225-persistentdata.h +++ /dev/null @@ -1,60 +0,0 @@ -/* - * h225-persistentdata.h - * Definitions for lists and hash tables used in wireshark's h225 dissector - * for calculation of delays in h225-calls - * - * Copyright 2003 Lars Roland - * - * Wireshark - Network traffic analyzer - * By Gerald Combs <gerald@wireshark.org> - * Copyright 1998 Gerald Combs - * - * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ - -#ifndef __h225_HASH__ -#define __h225_HASH__ - -#include <glib.h> -#include <epan/packet.h> -#include <epan/conversation.h> - - -/* Item of ras request list*/ -typedef struct _h225ras_call_t { - guint32 requestSeqNum; - e_guid_t guid; - guint32 req_num; /* frame number request seen */ - guint32 rsp_num; /* frame number response seen */ - nstime_t req_time; /* arrival time of request */ - gboolean responded; /* true, if request has been responded */ - struct _h225ras_call_t *next_call; /* pointer to next ras request with same SequenceNumber and conversation handle */ -} h225ras_call_t; - - -/* Item of ras-request key list*/ -typedef struct _h225ras_call_info_key { - guint reqSeqNum; - conversation_t *conversation; -} h225ras_call_info_key; - -/* functions, needed using ras-request and halfcall matching*/ -h225ras_call_t * find_h225ras_call(h225ras_call_info_key *h225ras_call_key ,int category); -h225ras_call_t * new_h225ras_call(h225ras_call_info_key *h225ras_call_key, packet_info *pinfo, e_guid_t *guid, int category); -h225ras_call_t * append_h225ras_call(h225ras_call_t *prev_call, packet_info *pinfo, e_guid_t *guid, int category); - -void h225_init_routine(void); /* init routine, used by wireshark */ - -#endif /* __h225_HASH__*/ |