Make the GUIDs in various data structures e_guid_t's rather than arrays
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Sun, 19 Mar 2006 20:45:45 +0000 (20:45 +0000)
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Sun, 19 Mar 2006 20:45:45 +0000 (20:45 +0000)
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.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@17676 f5534014-38df-0310-8fa8-9805f1628bb7

12 files changed:
asn1/h225/h225.cnf
asn1/h225/packet-h225-template.c
asn1/h225/packet-h225-template.h
epan/dissectors/packet-h225.c
epan/dissectors/packet-h225.h
epan/ftypes/ftype-guid.c
epan/guid-utils.h
epan/h225-persistentdata.c
epan/h225-persistentdata.h
gtk/voip_calls.c
gtk/voip_calls.h
gtk/voip_calls_dlg.c

index 8d952da369c1abf3c25b1394a2183d6372dadbb9..784dc92a03e4e28d3d675831f349b7e31470a973 100644 (file)
@@ -449,8 +449,8 @@ ReleaseCompleteReason     VAL_PTR = &value
 #.FN_BODY CallIdentifier/guid
   tvbuff_t *guid_tvb;
 
-  offset = dissect_per_octet_string(tvb,offset,pinfo,tree,hf_index,16,16,&guid_tvb);
-  tvb_memcpy(guid_tvb,h225_pi->guid,0,tvb_length(guid_tvb));
+  offset = dissect_per_octet_string(tvb,offset,pinfo,tree,hf_index,GUID_LEN,GUID_LEN,&guid_tvb);
+  tvb_memcpy(guid_tvb,(guint8 *)&h225_pi->guid,0,GUID_LEN);
 #.END
 #----------------------------------------------------------------------------------------
 #.FN_PARS RequestSeqNum  VAL_PTR = &(h225_pi->requestSeqNum)
index 194320ee760ca1c916641f49e451aa62ded2cef4..f9a342f5542f192e5ba3582bc6d7aa38b4bcb98a 100644 (file)
@@ -378,7 +378,7 @@ static void reset_h225_packet_info(h225_packet_info *pi)
        pi->msg_tag = -1;
        pi->reason = -1;
        pi->requestSeqNum = 0;
-       memset(pi->guid,0,16);
+       memset(&pi->guid,0,sizeof pi->guid);
        pi->is_duplicate = FALSE;
        pi->request_available = FALSE;
        pi->is_faststart = FALSE;
@@ -477,7 +477,7 @@ static void ras_call_matching(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tre
                                                           and last request occured more than 1800 seconds ago,
                                                           we decide that we have a new request */
                                                        /* Append new ras call to list */
-                                                       h225ras_call = append_h225ras_call(h225ras_call, pinfo, pi->guid, msg_category);
+                                                       h225ras_call = append_h225ras_call(h225ras_call, pinfo, &pi->guid, msg_category);
                                                } else {
                                                        /* No, so it's a duplicate request.
                                                           Mark it as such. */
@@ -490,7 +490,7 @@ static void ras_call_matching(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tre
                                } while (h225ras_call != NULL );
                        }
                        else {
-                               h225ras_call = new_h225ras_call(&h225ras_call_key, pinfo, pi->guid, msg_category);
+                               h225ras_call = new_h225ras_call(&h225ras_call_key, pinfo, &pi->guid, msg_category);
                        }
 
                        /* add link to response frame, if available */
@@ -531,8 +531,8 @@ static void ras_call_matching(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tre
 
                                        /* if this is an ACF, ARJ or DCF, DRJ, give guid to tap and make it filterable */
                                        if (msg_category == 3 || msg_category == 5) {
-                                               memcpy(pi->guid, h225ras_call->guid,16);
-                                               proto_tree_add_guid_hidden(tree, hf_h225_guid, tvb, 0, 16, pi->guid);
+                                               pi->guid = h225ras_call->guid;
+                                               proto_tree_add_guid_hidden(tree, hf_h225_guid, tvb, 0, GUID_LEN, &pi->guid);
                                        }
 
                                        if (h225ras_call->rsp_num == 0) {
index a456ce7b69e36cb82be1e12dca379677cea691b0..e2387c5ae5fa34a81b5bd84cb4c47d7a3dc53100 100644 (file)
@@ -55,7 +55,7 @@ typedef struct _h225_packet_info {
        gint msg_tag;                   /* message tag*/
        gint reason;                    /* reason tag, if available */
        guint requestSeqNum;            /* request sequence number of ras-message, if available */
-       guint8 guid[16];                /* globally unique call id */
+       e_guid_t guid;                  /* globally unique call id */
        gboolean is_duplicate;          /* true, if this is a repeated message */
        gboolean request_available;     /* true, if response matches to a request */
        nstime_t delta_time;            /* this is the RAS response time delay */
index 4c3e94033d5f30f4f45c74c61cb1f0c86e68455b..d44488088f97e20a3b7302126fb4e6ea3aabfec9 100644 (file)
@@ -4173,8 +4173,8 @@ dissect_h225_T_guid(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tre
 #line 450 "h225.cnf"
   tvbuff_t *guid_tvb;
 
-  offset = dissect_per_octet_string(tvb,offset,pinfo,tree,hf_index,16,16,&guid_tvb);
-  tvb_memcpy(guid_tvb,h225_pi->guid,0,tvb_length(guid_tvb));
+  offset = dissect_per_octet_string(tvb,offset,pinfo,tree,hf_index,GUID_LEN,GUID_LEN,&guid_tvb);
+  tvb_memcpy(guid_tvb,(guint8 *)&h225_pi->guid,0,GUID_LEN);
 
 
   return offset;
@@ -12815,7 +12815,7 @@ static void reset_h225_packet_info(h225_packet_info *pi)
        pi->msg_tag = -1;
        pi->reason = -1;
        pi->requestSeqNum = 0;
-       memset(pi->guid,0,16);
+       memset(&pi->guid,0,sizeof pi->guid);
        pi->is_duplicate = FALSE;
        pi->request_available = FALSE;
        pi->is_faststart = FALSE;
@@ -12914,7 +12914,7 @@ static void ras_call_matching(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tre
                                                           and last request occured more than 1800 seconds ago,
                                                           we decide that we have a new request */
                                                        /* Append new ras call to list */
-                                                       h225ras_call = append_h225ras_call(h225ras_call, pinfo, pi->guid, msg_category);
+                                                       h225ras_call = append_h225ras_call(h225ras_call, pinfo, &pi->guid, msg_category);
                                                } else {
                                                        /* No, so it's a duplicate request.
                                                           Mark it as such. */
@@ -12927,7 +12927,7 @@ static void ras_call_matching(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tre
                                } while (h225ras_call != NULL );
                        }
                        else {
-                               h225ras_call = new_h225ras_call(&h225ras_call_key, pinfo, pi->guid, msg_category);
+                               h225ras_call = new_h225ras_call(&h225ras_call_key, pinfo, &pi->guid, msg_category);
                        }
 
                        /* add link to response frame, if available */
@@ -12968,8 +12968,8 @@ static void ras_call_matching(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tre
 
                                        /* if this is an ACF, ARJ or DCF, DRJ, give guid to tap and make it filterable */
                                        if (msg_category == 3 || msg_category == 5) {
-                                               memcpy(pi->guid, h225ras_call->guid,16);
-                                               proto_tree_add_guid_hidden(tree, hf_h225_guid, tvb, 0, 16, pi->guid);
+                                               pi->guid = h225ras_call->guid;
+                                               proto_tree_add_guid_hidden(tree, hf_h225_guid, tvb, 0, GUID_LEN, &pi->guid);
                                        }
 
                                        if (h225ras_call->rsp_num == 0) {
index d7b73f64b70fe20a3d34ece96401e1866c8e3f25..903f4a543d535a6d149f8e31292bc933f576c87d 100644 (file)
@@ -63,7 +63,7 @@ typedef struct _h225_packet_info {
        gint msg_tag;                   /* message tag*/
        gint reason;                    /* reason tag, if available */
        guint requestSeqNum;            /* request sequence number of ras-message, if available */
-       guint8 guid[16];                /* globally unique call id */
+       e_guid_t guid;                  /* globally unique call id */
        gboolean is_duplicate;          /* true, if this is a repeated message */
        gboolean request_available;     /* true, if response matches to a request */
        nstime_t delta_time;            /* this is the RAS response time delay */
index 6c78fe9cea3783ff42cb62aed00769e195096989..08104453c8113398b0415d6a9355b82609a5479c 100644 (file)
 #include <ftypes-int.h>
 #include <epan/guid-utils.h>
 
-#define GUID_LEN       16
-
 static void
 guid_fvalue_set(fvalue_t *fv, gpointer value, gboolean already_copied)
 {
-       fv->value.guid = *(e_guid_t*)value;
+    g_assert(!already_copied);
+    fv->value.guid = *(e_guid_t*)value;
 }
 
 static gpointer
 value_get(fvalue_t *fv)
 {
-       return &(fv->value.guid);
+    return &(fv->value.guid);
 }
 
 static gboolean
 get_guid(char *s, e_guid_t *guid)
 {
-       size_t i, n;
-       char *p, digits[9];
-       static const char fmt[] = "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX";
-
-       n = strlen(s);
-       if (n != strlen(fmt))
-               return FALSE;
-       for (i=0; i<n; i++) {
-               if (fmt[i] == 'X') {
-                       if (!isxdigit((guchar)s[i]))
-                               return FALSE;
-               } else {
-                       if (s[i] != fmt[i])
-                               return FALSE;
-               }
-       }
-       
-       p = s;
-       strncpy(digits, p, 8); 
+    size_t i, n;
+    char *p, digits[9];
+    static const char fmt[] = "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX";
+
+    n = strlen(s);
+    if (n != strlen(fmt))
+        return FALSE;
+    for (i=0; i<n; i++) {
+        if (fmt[i] == 'X') {
+            if (!isxdigit((guchar)s[i]))
+                return FALSE;
+        } else {
+            if (s[i] != fmt[i])
+                return FALSE;
+        }
+    }
+    
+    p = s;
+    strncpy(digits, p, 8); 
     digits[8] = '\0';
-       guid->data1 = strtoul(digits, NULL, 16);
+    guid->data1 = strtoul(digits, NULL, 16);
     p += 9;
-       strncpy(digits, p, 4); 
+    strncpy(digits, p, 4); 
     digits[4] = '\0';
-       guid->data2 = (guint16)strtoul(digits, NULL, 16);
+    guid->data2 = (guint16)strtoul(digits, NULL, 16);
     p += 5;
-       strncpy(digits, p, 4); 
+    strncpy(digits, p, 4); 
     digits[4] = '\0';
-       guid->data3 = (guint16)strtoul(digits, NULL, 16);
+    guid->data3 = (guint16)strtoul(digits, NULL, 16);
     p += 5;
-       for (i=0; i < sizeof(guid->data4); i++) {
-               if (*p == '-') p++;
-               digits[0] = *(p++);
-               digits[1] = *(p++);
-               digits[2] = '\0';
-               guid->data4[i] = (guint8)strtoul(digits, NULL, 16);
-       }
-       return TRUE;
+    for (i=0; i < sizeof(guid->data4); i++) {
+        if (*p == '-') p++;
+        digits[0] = *(p++);
+        digits[1] = *(p++);
+        digits[2] = '\0';
+        guid->data4[i] = (guint8)strtoul(digits, NULL, 16);
+    }
+    return TRUE;
 }
 
 static gboolean
 guid_from_unparsed(fvalue_t *fv, char *s, gboolean allow_partial_value _U_, LogFunc logfunc)
 {
-        e_guid_t guid;
+     e_guid_t guid;
 
-       if (!get_guid(s, &guid)) {
-               logfunc("\"%s\" is not a valid GUID.", s);
-               return FALSE;
-       }
+    if (!get_guid(s, &guid)) {
+        logfunc("\"%s\" is not a valid GUID.", s);
+        return FALSE;
+    }
 
-       fv->value.guid = guid;
-       return TRUE;
+    fv->value.guid = guid;
+    return TRUE;
 }
 
 static int
 guid_repr_len(fvalue_t *fv _U_, ftrepr_t rtype _U_)
 {
-       return GUID_STR_LEN;
+    return GUID_STR_LEN;
 }
 
 static void
 guid_to_repr(fvalue_t *fv, ftrepr_t rtype _U_, char *buf)
 {
-       guid_to_str_buf(&fv->value.guid, buf, GUID_STR_LEN);
+    guid_to_str_buf(&fv->value.guid, buf, GUID_STR_LEN);
 }
 
 static gboolean
 cmp_eq(fvalue_t *a, fvalue_t *b)
 {
-       return memcmp(&a->value.guid, &b->value.guid, sizeof(e_guid_t)) == 0;
+    return memcmp(&a->value.guid, &b->value.guid, sizeof(e_guid_t)) == 0;
 }
 
 static gboolean
 cmp_ne(fvalue_t *a, fvalue_t *b)
 {
-       return memcmp(&a->value.guid, &b->value.guid, sizeof(e_guid_t)) != 0;
+    return memcmp(&a->value.guid, &b->value.guid, sizeof(e_guid_t)) != 0;
 }
 
 void
 ftype_register_guid(void)
 {
 
-       static ftype_t guid_type = {
-               "GUID",                 /* name */
-               "Globally Unique Identifier",                   /* pretty_name */
-               GUID_LEN,                       /* wire_size */
-               NULL,                           /* new_value */
-               NULL,                           /* free_value */
-               guid_from_unparsed,     /* val_from_unparsed */
-               NULL,                           /* val_from_string */
-               guid_to_repr,           /* val_to_string_repr */
-               guid_repr_len,          /* len_string_repr */
-
-               guid_fvalue_set,        /* set_value */
-               NULL,                           /* set_value_integer */
-               NULL,                           /* set_value_integer64 */
-               NULL,                           /* set_value_floating */
-
-               value_get,                      /* get_value */
-               NULL,                           /* get_value_integer */
-               NULL,                           /* get_value_integer64 */
-               NULL,                           /* get_value_floating */
-
-               cmp_eq,
-               cmp_ne,
-               NULL,
-               NULL,
-               NULL,
-               NULL,
-               NULL,
-               NULL,
-               NULL,                           /* cmp_matches */
-
-               NULL,
-               NULL,
-       };
-
-       ftype_register(FT_GUID, &guid_type);
+    static ftype_t guid_type = {
+        "GUID",              /* name */
+        "Globally Unique Identifier",            /* pretty_name */
+        GUID_LEN,            /* wire_size */
+        NULL,                /* new_value */
+        NULL,                /* free_value */
+        guid_from_unparsed,  /* val_from_unparsed */
+        NULL,                /* val_from_string */
+        guid_to_repr,        /* val_to_string_repr */
+        guid_repr_len,       /* len_string_repr */
+
+        guid_fvalue_set,     /* set_value */
+        NULL,                /* set_value_integer */
+        NULL,                /* set_value_integer64 */
+        NULL,                /* set_value_floating */
+
+        value_get,           /* get_value */
+        NULL,                /* get_value_integer */
+        NULL,                /* get_value_integer64 */
+        NULL,                /* get_value_floating */
+
+        cmp_eq,
+        cmp_ne,
+        NULL,
+        NULL,
+        NULL,
+        NULL,
+        NULL,
+        NULL,
+        NULL,                /* cmp_matches */
+
+        NULL,
+        NULL,
+    };
+
+    ftype_register(FT_GUID, &guid_type);
 }
index d80e2a6458076517022f04f4eee120e3d0669e05..1448ec4ddbef11c0153cb391071af8892d675386 100644 (file)
 #ifndef __GUID_UTILS_H__
 #define __GUID_UTILS_H__
 
+#define GUID_LEN       16
+
+/* Note: this might be larger than GUID_LEN, so don't overlay data in packets
+   with this. */
 typedef struct _e_guid_t {
     guint32 data1;
     guint16 data2;
index f9ae7539a9f51b61ff739a3d1a3182c5e724584f..4fa043a983ba02670bb58a3d346c49b32a937b85 100644 (file)
@@ -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;
index aed7972c5f1c48b1b8774ada936de5a09288b176..5defb14874436721ad1ddfdfe017ab6c2aa53c5a 100644 (file)
@@ -37,7 +37,7 @@
 /* Item of ras request list*/
 typedef struct _h225ras_call_t {
        guint32 requestSeqNum;
-       guint8 guid[16];
+       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 */
@@ -54,8 +54,8 @@ typedef struct _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, guint8 *guid, int category);
-h225ras_call_t * append_h225ras_call(h225ras_call_t *prev_call, 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_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 ethereal */
 
index 73aa105fc0cf03f04d9d641f575fb8e5a78c1ac5..12c7eee41d0d3cc02251c9ae89739f1959af1e19 100644 (file)
@@ -1319,8 +1319,7 @@ remove_tap_listener_mtp3_calls(void)
 /* ***************************TAP for Q931 **********************************/
 /****************************************************************************/
 void h245_add_to_graph(guint32 new_frame_num);
-#define GUID_LEN       16
-static const guint8 guid_allzero[GUID_LEN] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+static const e_guid_t guid_allzero = {0, 0, 0, { 0, 0, 0, 0, 0, 0, 0, 0 } };
 /* defines specific H323 data */
 
 static gchar *q931_calling_number;
@@ -1421,7 +1420,7 @@ q931_calls_packet(void *ptr _U_, packet_info *pinfo, epan_dissect_t *edt _U_, co
                                                
                                                /* check if the called number match a LRQ/LCF */
                                                if ( (strcmp(strinfo->to_identity, tmp_listinfo->to_identity)==0)  
-                                                        && (memcmp(tmp2_h323info->guid, guid_allzero, GUID_LEN) == 0) ){ 
+                                                        && (memcmp(&tmp2_h323info->guid, &guid_allzero, GUID_LEN) == 0) ){ 
                                                        /* change the call graph to the LRQ/LCF to belong to this call */
                                                        strinfo->npackets += change_call_num_graph(tapinfo, tmp_listinfo->call_num, strinfo->call_num);
                                                        
@@ -1668,7 +1667,7 @@ H225calls_packet(void *ptr _U_, packet_info *pinfo, epan_dissect_t *edt _U_, con
        
        /* if not guid and RAS and not LRQ, LCF or LRJ return because did not belong to a call */
        /* OR, if not guid and is H225 return because doesn't belong to a call */
-       if ((memcmp(pi->guid, guid_allzero, GUID_LEN) == 0))
+       if ((memcmp(&pi->guid, &guid_allzero, GUID_LEN) == 0))
                if ( ((pi->msg_type == H225_RAS) && ((pi->msg_tag < 18) || (pi->msg_tag > 20))) || (pi->msg_type != H225_RAS) )
                        return 0;
        
@@ -1699,7 +1698,7 @@ H225calls_packet(void *ptr _U_, packet_info *pinfo, epan_dissect_t *edt _U_, con
                        tmp_listinfo=list->data;
                        if (tmp_listinfo->protocol == VOIP_H323){
                                tmp_h323info = tmp_listinfo->prot_info;
-                               if ( (memcmp(tmp_h323info->guid, guid_allzero, GUID_LEN) != 0) && (memcmp(tmp_h323info->guid, pi->guid,GUID_LEN)==0) ){ 
+                               if ( (memcmp(&tmp_h323info->guid, &guid_allzero, GUID_LEN) != 0) && (memcmp(&tmp_h323info->guid, &pi->guid,GUID_LEN)==0) ){ 
                                        strinfo = (voip_calls_info_t*)(list->data);
                                        break;
                                }
@@ -1726,7 +1725,7 @@ H225calls_packet(void *ptr _U_, packet_info *pinfo, epan_dissect_t *edt _U_, con
                strinfo->protocol=VOIP_H323;
                strinfo->prot_info=g_malloc(sizeof(h323_calls_info_t));
                tmp_h323info = strinfo->prot_info;
-               tmp_h323info->guid = (guint8 *) g_memdup(pi->guid,GUID_LEN);
+               tmp_h323info->guid = g_memdup(&pi->guid, sizeof pi->guid);
                tmp_h323info->h225SetupAddr.type = AT_NONE;
                tmp_h323info->h225SetupAddr.len = 0;
                tmp_h323info->h245_list = NULL;
index 7f260ce42fb14d78420370a06796b9e4a0ff61b8..e24221cbea8dbdd4ff8b5d15c332c808d8e4d12f 100644 (file)
@@ -39,6 +39,7 @@
 #include <glib.h>
 #include <stdio.h>
 #include <epan/address.h>
+#include <epan/guid-utils.h>
 
 /****************************************************************************/
 /* defines voip call state */
@@ -100,7 +101,7 @@ typedef struct _h245_address {
 
 /* defines specific H323 data */
 typedef struct _h323_calls_info {
-       guint8 *guid;   /* Call ID to identify a H225 */
+       e_guid_t *guid; /* Call ID to identify a H225 */
        GList*  h245_list;   /* list of H245 Address and ports for tunneling off calls*/
        address h225SetupAddr; /* we use the SETUP H225 IP to determine if packets are forward or reverse */                                    
        gboolean is_h245;
index 7b4e154d126a7000cd29d7e24337d6f4996085d6..f626c6977a33089520ff2559ef2e0c9ab5b2f818 100644 (file)
@@ -317,13 +317,12 @@ voip_calls_on_filter                    (GtkButton       *button _U_,
                        case VOIP_H323:
                                tmp_h323info = selected_call_fwd->prot_info;
                                g_string_sprintfa(filter_string_fwd,
-                                  "((h225.guid == %x:%x:%x:%x:%x:%x:%x:%x:%x:%x:%x:%x:%x:%x:%x:%x || q931.call_ref == %x:%x || q931.call_ref == %x:%x) ",
-                                  (guint8)tmp_h323info->guid[0], (guint8)tmp_h323info->guid[1], (guint8)tmp_h323info->guid[2],
-                                  (guint8)tmp_h323info->guid[3], (guint8)tmp_h323info->guid[4], (guint8)tmp_h323info->guid[5], (guint8)tmp_h323info->guid[6],
-                          (guint8)tmp_h323info->guid[7], (guint8)tmp_h323info->guid[8], (guint8)tmp_h323info->guid[9], (guint8)tmp_h323info->guid[10],
-                                  (guint8)tmp_h323info->guid[11], (guint8)tmp_h323info->guid[12], (guint8)tmp_h323info->guid[13], (guint8)tmp_h323info->guid[14],
-                                  (guint8)tmp_h323info->guid[15], (guint8)(tmp_h323info->q931_crv & 0xff), (guint8)((tmp_h323info->q931_crv & 0xff00)>>8)
-                                  , (guint8)(tmp_h323info->q931_crv2 & 0xff), (guint8)((tmp_h323info->q931_crv2 & 0xff00)>>8));
+                                  "((h225.guid == %s || q931.call_ref == %x:%x || q931.call_ref == %x:%x) ",
+                                  guid_to_str(&tmp_h323info->guid[0]),
+                                  (guint8)(tmp_h323info->q931_crv & 0xff),
+                                  (guint8)((tmp_h323info->q931_crv & 0xff00)>>8),
+                                  (guint8)(tmp_h323info->q931_crv2 & 0xff),
+                                  (guint8)((tmp_h323info->q931_crv2 & 0xff00)>>8));
                                list = g_list_first(tmp_h323info->h245_list);
                                while (list)
                                {