aboutsummaryrefslogtreecommitdiffstats
path: root/epan/to_str.c
diff options
context:
space:
mode:
Diffstat (limited to 'epan/to_str.c')
-rw-r--r--epan/to_str.c43
1 files changed, 0 insertions, 43 deletions
diff --git a/epan/to_str.c b/epan/to_str.c
index 4555b0d64b..0f05fc62a8 100644
--- a/epan/to_str.c
+++ b/epan/to_str.c
@@ -931,49 +931,6 @@ address_to_str_buf(const address *addr, gchar *buf, int buf_len)
}
}
-gchar* oid_to_str(const guint8 *oid, gint oid_len) {
- gchar *buf;
-
- buf=ep_alloc(MAX_OID_STR_LEN);
- return oid_to_str_buf(oid, oid_len, buf, MAX_OID_STR_LEN);
-}
-
-#define OID_STR_LIMIT (1 + 10 + 4 + 1) /* "." + 10 digits + ".>>>" + '\0' */
-gchar* oid_to_str_buf(const guint8 *oid, gint oid_len, gchar *buf, int buf_len) {
- gint i;
- guint8 byte;
- guint32 subid0, subid;
- gboolean is_first;
- gchar *bufp;
-
- bufp = buf; subid = 0; is_first = TRUE;
- for (i=0; i<oid_len; i++){
- byte = oid[i];
- if ((bufp - buf) > (buf_len - OID_STR_LIMIT)) {
- bufp += g_snprintf(bufp, buf_len-(bufp-buf), ".>>>");
- break;
- }
- subid <<= 7;
- subid |= byte & 0x7F;
- if (byte & 0x80) {
- continue;
- }
- if (is_first) {
- subid0 = 0;
- if (subid >= 40) { subid0++; subid-=40; }
- if (subid >= 40) { subid0++; subid-=40; }
- bufp += g_snprintf(bufp, buf_len-(bufp-buf), "%u.%u", subid0, subid);
- is_first = FALSE;
- } else {
- bufp += g_snprintf(bufp, buf_len-(bufp-buf), ".%u", subid);
- }
- subid = 0;
- }
- *bufp = '\0';
-
- return buf;
-}
-
gchar* guid_to_str(const e_guid_t *guid) {
gchar *buf;