diff options
author | Anders Broman <anders.broman@ericsson.com> | 2006-01-07 11:10:50 +0000 |
---|---|---|
committer | Anders Broman <anders.broman@ericsson.com> | 2006-01-07 11:10:50 +0000 |
commit | 44784a9fe4b7dff0a503dab7c51d7c1875cdc14a (patch) | |
tree | 36a908d443420d40eba6dab8de174aaefaa0eb33 | |
parent | 4e973150eadefff0962d854e000e485c200158a4 (diff) |
From Olivier Jacques,
Here is a patch that:
- Replaces the arrow labels by the beginning of the COLINFO column if available (usually containing message names/types).
- Change the comment area to be "protocol: colinfo_content"
From Anders
Added ID tag
Camel
Use col_set_str to remove TCAP info in col_info
svn path=/trunk/; revision=16975
-rw-r--r-- | asn1/camel/packet-camel-template.c | 2 | ||||
-rw-r--r-- | epan/dissectors/packet-camel.c | 4 | ||||
-rw-r--r-- | epan/dissectors/packet-camel.h | 2 | ||||
-rw-r--r-- | gtk/flow_graph.c | 66 |
4 files changed, 54 insertions, 20 deletions
diff --git a/asn1/camel/packet-camel-template.c b/asn1/camel/packet-camel-template.c index bee146aef3..c23f6aebeb 100644 --- a/asn1/camel/packet-camel-template.c +++ b/asn1/camel/packet-camel-template.c @@ -567,7 +567,7 @@ dissect_camel_camelPDU(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, pac if (check_col(pinfo->cinfo, COL_INFO)){ /* Populate the info column with PDU type*/ - col_append_fstr(pinfo->cinfo, COL_INFO, val_to_str(camel_pdu_type, camelPDU_vals, "Unknown Camel (%u)")); + col_set_str(pinfo->cinfo, COL_INFO, val_to_str(camel_pdu_type, camelPDU_vals, "Unknown Camel (%u)")); } offset = dissect_ber_choice(pinfo, tree, tvb, offset, diff --git a/epan/dissectors/packet-camel.c b/epan/dissectors/packet-camel.c index 32c6a5a69c..446784dc46 100644 --- a/epan/dissectors/packet-camel.c +++ b/epan/dissectors/packet-camel.c @@ -1,6 +1,6 @@ /* Do not modify this file. */ /* It is created automatically by the ASN.1 to Ethereal dissector compiler */ -/* ./packet-camel.c */ +/* .\packet-camel.c */ /* ../../tools/asn2eth.py -X -b -e -p camel -c camel.cnf -s packet-camel-template camel.asn */ /* Input file: packet-camel-template.c */ @@ -8197,7 +8197,7 @@ dissect_camel_camelPDU(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, pac if (check_col(pinfo->cinfo, COL_INFO)){ /* Populate the info column with PDU type*/ - col_append_fstr(pinfo->cinfo, COL_INFO, val_to_str(camel_pdu_type, camelPDU_vals, "Unknown Camel (%u)")); + col_set_str(pinfo->cinfo, COL_INFO, val_to_str(camel_pdu_type, camelPDU_vals, "Unknown Camel (%u)")); } offset = dissect_ber_choice(pinfo, tree, tvb, offset, diff --git a/epan/dissectors/packet-camel.h b/epan/dissectors/packet-camel.h index 8494b09e21..be8dddd309 100644 --- a/epan/dissectors/packet-camel.h +++ b/epan/dissectors/packet-camel.h @@ -1,6 +1,6 @@ /* Do not modify this file. */ /* It is created automatically by the ASN.1 to Ethereal dissector compiler */ -/* ./packet-camel.h */ +/* .\packet-camel.h */ /* ../../tools/asn2eth.py -X -b -e -p camel -c camel.cnf -s packet-camel-template camel.asn */ /* Input file: packet-camel-template.h */ diff --git a/gtk/flow_graph.c b/gtk/flow_graph.c index 494e6b4f6b..b43683a17d 100644 --- a/gtk/flow_graph.c +++ b/gtk/flow_graph.c @@ -1,4 +1,5 @@ /* flow_graph.c + * $Id:$ * Allows to display a flow graph of the currently displayed packets * * Copyright 2004, Ericsson , Spain @@ -215,30 +216,40 @@ static int flow_graph_frame_add_to_graph(packet_info *pinfo) { graph_analysis_item_t *gai; int i; + gchar *protocol; + gchar *colinfo; + + protocol=NULL; + colinfo=NULL; gai = g_malloc(sizeof(graph_analysis_item_t)); gai->frame_num = pinfo->fd->num; gai->time= nstime_to_sec(&pinfo->fd->rel_ts); - if (node_addr_type == NET_SRCDST) { - COPY_ADDRESS(&(gai->src_addr),&(pinfo->net_src)); - COPY_ADDRESS(&(gai->dst_addr),&(pinfo->net_dst)); - } else { - COPY_ADDRESS(&(gai->src_addr),&(pinfo->src)); - COPY_ADDRESS(&(gai->dst_addr),&(pinfo->dst)); - } + if (node_addr_type == NET_SRCDST) { + COPY_ADDRESS(&(gai->src_addr),&(pinfo->net_src)); + COPY_ADDRESS(&(gai->dst_addr),&(pinfo->net_dst)); + } else { + COPY_ADDRESS(&(gai->src_addr),&(pinfo->src)); + COPY_ADDRESS(&(gai->dst_addr),&(pinfo->dst)); + } gai->port_src=pinfo->srcport; gai->port_dst=pinfo->destport; gai->comment=NULL; gai->frame_label=NULL; + if (gai->comment!=NULL){ + g_free(gai->comment); + } + if (gai->frame_label!=NULL){ + g_free(gai->frame_label); + } + + if (pinfo->cinfo->col_first[COL_INFO]>=0){ for (i = pinfo->cinfo->col_first[COL_INFO]; i <= pinfo->cinfo->col_last[COL_INFO]; i++) { if (pinfo->cinfo->fmt_matx[i][COL_INFO]) { - if (gai->comment!=NULL){ - g_free(gai->comment); - } - gai->comment = g_strdup(pinfo->cinfo->col_data[i]); + colinfo = g_strdup(pinfo->cinfo->col_data[i]); } } } @@ -247,14 +258,37 @@ static int flow_graph_frame_add_to_graph(packet_info *pinfo) for (i = pinfo->cinfo->col_first[COL_PROTOCOL]; i <= pinfo->cinfo->col_last[COL_PROTOCOL]; i++) { if (pinfo->cinfo->fmt_matx[i][COL_PROTOCOL]) { - if (gai->frame_label!=NULL){ - g_free(gai->frame_label); - } - gai->frame_label = g_strdup(pinfo->cinfo->col_data[i]); + protocol = g_strdup(pinfo->cinfo->col_data[i]); + } } } - + + if (colinfo != NULL) { + if (protocol != NULL) { + gai->frame_label = g_strdup_printf("%.19s", colinfo); + gai->comment = g_strdup_printf("%s: %s", protocol, colinfo); + } else { + gai->frame_label = g_strdup_printf("%.19s", colinfo); + gai->comment = g_strdup_printf("%s", colinfo); + } + } else { + /* This will probably never happen...*/ + if (protocol != NULL) { + gai->frame_label = g_strdup_printf("%.19s", protocol); + gai->comment = g_strdup_printf("%s", protocol); + } else { + gai->frame_label = NULL; + gai->comment = NULL; + } + } + + if (protocol!=NULL){ + g_free(protocol); + } + if (colinfo!=NULL){ + g_free(colinfo); + } gai->line_style=1; gai->conv_num=0; |