aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnders Broman <anders.broman@ericsson.com>2005-06-20 20:14:57 +0000
committerAnders Broman <anders.broman@ericsson.com>2005-06-20 20:14:57 +0000
commit7ec6ab1d7854b56418b13647a2674c4fc1c0d940 (patch)
tree1c973a697ce7fd2df0eb6ef9a5230a20609384a9
parent2ab0496a7204c1bb149bd95bdb0644a565ec5270 (diff)
From Mike Duigou:
In order to get filtering of conversations and > endpoints to work from the endpoints and conversations windows I found > it necessary to add a new AT_URI address type and a SAT_JXTA. This also > necessitated a change to to_str.c to avoid a buffer overflow problem. > Please review these changes carefully. > > Also includes some changes to the jxta dissector to fix filtering on > generated fields and some changes to the types used for ints/unsigned ints. > > Fixes a bug with the processing of messages containing namespaces. svn path=/trunk/; revision=14715
-rw-r--r--epan/address.h3
-rw-r--r--epan/to_str.c9
2 files changed, 7 insertions, 5 deletions
diff --git a/epan/address.h b/epan/address.h
index 424f0578a8..c75a3c8000 100644
--- a/epan/address.h
+++ b/epan/address.h
@@ -44,7 +44,8 @@ typedef enum {
AT_FC, /* Fibre Channel */
AT_SS7PC, /* SS7 Point Code */
AT_STRINGZ, /* null-terminated string */
- AT_EUI64 /* IEEE EUI-64 */
+ AT_EUI64, /* IEEE EUI-64 */
+ AT_URI /* URI/URL/URN */
} address_type;
typedef struct _address {
diff --git a/epan/to_str.c b/epan/to_str.c
index 21121db112..6641ea61cf 100644
--- a/epan/to_str.c
+++ b/epan/to_str.c
@@ -827,11 +827,8 @@ decode_numeric_bitfield(guint32 val, guint32 mask, int width,
gchar*
address_to_str(const address *addr)
{
-#ifndef INET6_ADDRSTRLEN
-#define INET6_ADDRSTRLEN 46
-#endif
static int i=0;
- static gchar *strp, str[16][INET6_ADDRSTRLEN];/* IPv6 is the largest one */
+ static gchar *strp, str[16][256];
i++;
if(i>=16){
@@ -891,6 +888,10 @@ address_to_str_buf(const address *addr, gchar *buf)
addr->data[0], addr->data[1], addr->data[2], addr->data[3],
addr->data[4], addr->data[5], addr->data[6], addr->data[7]);
break;
+ case AT_URI:
+ memmove(buf, addr->data, addr->len);
+ buf[addr->len] = '\0';
+ break;
default:
g_assert_not_reached();
}