aboutsummaryrefslogtreecommitdiffstats
path: root/epan/to_str.c
diff options
context:
space:
mode:
authorTomas Kukosa <tomas.kukosa@siemens.com>2005-07-04 13:04:53 +0000
committerTomas Kukosa <tomas.kukosa@siemens.com>2005-07-04 13:04:53 +0000
commitbab34b522b46bd46d47dc4cb448aed9ce4423d9f (patch)
treeaf5815fc3606f36fa87c2bcaed9c471aef9e5c57 /epan/to_str.c
parent5f2fd433abc60c0e5f97613fbb18a00090dddc26 (diff)
new field type FT_GUID
svn path=/trunk/; revision=14845
Diffstat (limited to 'epan/to_str.c')
-rw-r--r--epan/to_str.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/epan/to_str.c b/epan/to_str.c
index b820ab2e74..55832da4db 100644
--- a/epan/to_str.c
+++ b/epan/to_str.c
@@ -934,3 +934,22 @@ gchar* oid_to_str_buf(const guint8 *oid, gint oid_len, gchar *buf) {
return buf;
}
+
+gchar* guid_to_str(const guint8 *guid) {
+ /* static buffer */
+ static int cnt = 0;
+ static gchar strbuf[8][GUID_STR_LEN];
+
+ cnt = (cnt + 1) % 8;
+ return guid_to_str_buf(guid, strbuf[cnt]);
+}
+
+gchar* guid_to_str_buf(const guint8 *guid, gchar *buf) {
+ sprintf(buf, "%02X%02X%02X%02X-%02X%02X-%02X%02X-%02X%02X-%02X%02X%02X%02X%02X%02X",
+ guid[0], guid[1], guid[2], guid[3],
+ guid[4], guid[5],
+ guid[6], guid[7],
+ guid[8], guid[9],
+ guid[10], guid[11], guid[12], guid[13], guid[14], guid[15]);
+ return buf;
+}