From 7db8eea5c68284a468924639eecc2ca8959225d0 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Sun, 19 Mar 2006 20:45:45 +0000 Subject: Make the GUIDs in various data structures e_guid_t's rather than arrays of 16 bytes. Use "sizeof" for the size of e_guid_t's, and use structure assignment to copy GUID values. Make functions such as append_h225ras_call() and new_h225ras_call() take pointers to e_guid_t's as arguments. Define GUID_LEN in epan/guid-utils.h and use it as the length of a GUID in a packet. (Note that "sizeof e_guid_t" is not guaranteed to be 16, although it is guaranteed to be the size of an e_guid_t.) When constructing a display filter that matches a GUID, use guid_to_str() to construct the string for the GUID. svn path=/trunk/; revision=17676 --- epan/h225-persistentdata.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'epan/h225-persistentdata.c') diff --git a/epan/h225-persistentdata.c b/epan/h225-persistentdata.c index f9ae7539a9..4fa043a983 100644 --- a/epan/h225-persistentdata.c +++ b/epan/h225-persistentdata.c @@ -75,7 +75,7 @@ h225ras_call_t * find_h225ras_call(h225ras_call_info_key *h225ras_call_key ,int return h225ras_call; } -h225ras_call_t * new_h225ras_call(h225ras_call_info_key *h225ras_call_key, packet_info *pinfo, guint8 *guid, 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_info_key *new_h225ras_call_key; h225ras_call_t *h225ras_call = NULL; @@ -96,14 +96,14 @@ h225ras_call_t * new_h225ras_call(h225ras_call_info_key *h225ras_call_key, packe h225ras_call->responded = FALSE; h225ras_call->next_call = NULL; h225ras_call->req_time=pinfo->fd->abs_ts; - memcpy(h225ras_call->guid, guid,16); + 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, guint8 *guid, int category _U_) +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; @@ -119,7 +119,7 @@ h225ras_call_t * append_h225ras_call(h225ras_call_t *prev_call, packet_info *pin h225ras_call->responded = FALSE; h225ras_call->next_call = NULL; h225ras_call->req_time=pinfo->fd->abs_ts; - memcpy(h225ras_call->guid, guid,16); + h225ras_call->guid=*guid; prev_call->next_call = h225ras_call; return h225ras_call; -- cgit v1.2.1