diff options
author | sahlberg <sahlberg@f5534014-38df-0310-8fa8-9805f1628bb7> | 2006-03-05 05:36:46 +0000 |
---|---|---|
committer | sahlberg <sahlberg@f5534014-38df-0310-8fa8-9805f1628bb7> | 2006-03-05 05:36:46 +0000 |
commit | c42725d2ae01e61c3d71c14b9088e55fb84b4d9e (patch) | |
tree | 4b8617ee2dece615c5b0cd702ee65d7ce89a90ae /epan/dissectors | |
parent | de54efa104a6c46874cb5abdbc55dd519c9f6e08 (diff) |
convert another hashtable for tcp into se_tree
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@17470 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/dissectors')
-rw-r--r-- | epan/dissectors/packet-tcp.c | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/epan/dissectors/packet-tcp.c b/epan/dissectors/packet-tcp.c index b3fbf0cb7c..d7b344baea 100644 --- a/epan/dissectors/packet-tcp.c +++ b/epan/dissectors/packet-tcp.c @@ -207,10 +207,12 @@ static SLAB_FREE_LIST_DEFINE(tcp_unacked_t) #define TCP_A_FAST_RETRANSMISSION 0x0400 #define TCP_A_WINDOW_UPDATE 0x0800 #define TCP_A_WINDOW_FULL 0x1000 -static GHashTable *tcp_analyze_acked_table = NULL; + static GHashTable *tcp_pdu_tracking_table = NULL; static GHashTable *tcp_pdu_skipping_table = NULL; + +static se_tree_t *tcp_analyze_acked_table = NULL; static se_tree_t *tcp_pdu_time_table = NULL; static void @@ -493,7 +495,7 @@ tcp_get_relative_seq_ack(guint32 *seq, guint32 *ack, guint32 *win, struct tcp_an static void tcp_analyze_get_acked_struct(guint32 frame, gboolean createflag, struct tcp_analysis *tcpd) { - tcpd->ta=g_hash_table_lookup(tcp_analyze_acked_table, GUINT_TO_POINTER(frame)); + tcpd->ta=se_tree_lookup32(tcp_analyze_acked_table, frame); if((!tcpd->ta) && createflag){ tcpd->ta=se_alloc(sizeof(struct tcp_acked)); tcpd->ta->frame_acked=0; @@ -502,7 +504,7 @@ tcp_analyze_get_acked_struct(guint32 frame, gboolean createflag, struct tcp_anal tcpd->ta->flags=0; tcpd->ta->dupack_num=0; tcpd->ta->dupack_frame=0; - g_hash_table_insert(tcp_analyze_acked_table, GUINT_TO_POINTER(frame), tcpd->ta); + se_tree_insert32(tcp_analyze_acked_table, frame, (void *)tcpd->ta); } } @@ -1085,12 +1087,6 @@ static void tcp_analyze_seq_init(void) { /* first destroy the tables */ - if( tcp_analyze_acked_table ){ - g_hash_table_foreach_remove(tcp_analyze_acked_table, - free_all_acked, NULL); - g_hash_table_destroy(tcp_analyze_acked_table); - tcp_analyze_acked_table = NULL; - } if( tcp_pdu_tracking_table ){ g_hash_table_foreach_remove(tcp_pdu_tracking_table, free_all_acked, NULL); @@ -1105,8 +1101,6 @@ tcp_analyze_seq_init(void) } if(tcp_analyze_seq){ - tcp_analyze_acked_table = g_hash_table_new(tcp_acked_hash, - tcp_acked_equal); tcp_pdu_tracking_table = g_hash_table_new(tcp_acked_hash, tcp_acked_equal); tcp_pdu_skipping_table = g_hash_table_new(tcp_acked_hash, @@ -3084,6 +3078,7 @@ proto_register_tcp(void) &try_heuristic_first); tcp_pdu_time_table=se_tree_create(SE_TREE_TYPE_RED_BLACK); + tcp_analyze_acked_table=se_tree_create(SE_TREE_TYPE_RED_BLACK); register_init_routine(tcp_analyze_seq_init); register_init_routine(tcp_desegment_init); register_init_routine(tcp_fragment_init); |