aboutsummaryrefslogtreecommitdiffstats
path: root/epan
diff options
context:
space:
mode:
authorUlf Lamping <ulf.lamping@web.de>2005-06-30 22:46:19 +0000
committerUlf Lamping <ulf.lamping@web.de>2005-06-30 22:46:19 +0000
commit3d831f4bfb85846f36aaf8af6618fc9a1deab516 (patch)
tree6d47c7bc765065a30f6c3c129b25459734b612a4 /epan
parent91c2b5b3c84bd4bcdf98f3a5399d99426967cdae (diff)
add a new DCE/RPC related column, which contains the call_id for connection oriented packets or the sequence number for connectionless (datagram) packets.
This is extremely useful, to keep track of the corresponding request/response packets of a DCE/RPC call (which can be quite a lot packets if fragmentation is used). svn path=/trunk/; revision=14826
Diffstat (limited to 'epan')
-rw-r--r--epan/column-utils.c3
-rw-r--r--epan/column.c26
-rw-r--r--epan/column_info.h1
-rw-r--r--epan/dissectors/packet-dcerpc.c7
4 files changed, 29 insertions, 8 deletions
diff --git a/epan/column-utils.c b/epan/column-utils.c
index ad5f083aee..70f70055b5 100644
--- a/epan/column-utils.c
+++ b/epan/column-utils.c
@@ -1005,6 +1005,9 @@ fill_in_columns(packet_info *pinfo)
case COL_HPUX_DEVID: /* done by nettl disector */
break;
+ case COL_DCE_CALL: /* done by dcerpc */
+ break;
+
case NUM_COL_FMTS: /* keep compiler happy - shouldn't get here */
g_assert_not_reached();
break;
diff --git a/epan/column.c b/epan/column.c
index adc543cc46..c11e96da5d 100644
--- a/epan/column.c
+++ b/epan/column.c
@@ -53,7 +53,7 @@ col_format_to_string(gint fmt) {
"%rd", "%ud", "%hd", "%rhd", "%uhd", "%nd", "%rnd",
"%und", "%S", "%rS", "%uS", "%D", "%rD", "%uD", "%p",
"%i", "%L", "%B", "%XO", "%XR", "%I", "%c", "%Xs",
- "%Xd", "%V", "%x", "%e", "%H", "%P" };
+ "%Xd", "%V", "%x", "%e", "%H", "%P", "%y" };
if (fmt < 0 || fmt >= NUM_COL_FMTS)
return NULL;
@@ -65,7 +65,7 @@ col_format_to_string(gint fmt) {
description */
static gchar *dlist[NUM_COL_FMTS] = {
"Number",
- "Time (command line specified)",
+ "Time (format as specified)",
"Relative time",
"Absolute time",
"Absolute date and time",
@@ -98,17 +98,18 @@ static gchar *dlist[NUM_COL_FMTS] = {
"Information",
"Packet length (bytes)" ,
"Cumulative Bytes" ,
- "OXID",
- "RXID",
+ "Fibre Channel OXID",
+ "Fibre Channel RXID",
"FW-1 monitor if/direction",
"Circuit ID",
- "Src PortIdx",
- "Dst PortIdx",
- "VSAN",
+ "Cisco Src PortIdx",
+ "Cisco Dst PortIdx",
+ "Cisco VSAN",
"IEEE 802.11 TX rate",
"IEEE 802.11 RSSI",
"HP-UX Subsystem",
"HP-UX Device ID",
+ "DCE/RPC call (cn_call_id / dg_seqnum)",
};
gchar *
@@ -203,6 +204,9 @@ get_column_format_matches(gboolean *fmt_list, gint format) {
case COL_HPUX_DEVID:
fmt_list[COL_HPUX_DEVID] = TRUE;
break;
+ case COL_DCE_CALL:
+ fmt_list[COL_DCE_CALL] = TRUE;
+ break;
default:
break;
}
@@ -277,7 +281,7 @@ get_column_longest_string(gint format)
return "Protocol"; /* not the longest, but the longest is too long */
break;
case COL_PACKET_LENGTH:
- return "000000";
+ return "00000";
break;
case COL_CUMULATIVE_BYTES:
return "00000000";
@@ -311,6 +315,9 @@ get_column_longest_string(gint format)
case COL_HPUX_DEVID:
return "0000";
break;
+ case COL_DCE_CALL:
+ return "0000";
+ break;
default: /* COL_INFO */
return "Source port: kerberos-master Destination port: kerberos-master";
break;
@@ -454,6 +461,9 @@ get_column_format_from_str(gchar *str) {
case 'P':
return COL_HPUX_DEVID;
break;
+ case 'y':
+ return COL_DCE_CALL;
+ break;
}
cptr++;
}
diff --git a/epan/column_info.h b/epan/column_info.h
index 0d71c945f5..cafc1eb59b 100644
--- a/epan/column_info.h
+++ b/epan/column_info.h
@@ -97,6 +97,7 @@ enum {
COL_RSSI, /* IEEE 802.11 - received signal strength */
COL_HPUX_SUBSYS, /* HP-UX Nettl Subsystem */
COL_HPUX_DEVID, /* HP-UX Nettl Device ID */
+ COL_DCE_CALL, /* DCE/RPC call id OR datagram sequence number */
NUM_COL_FMTS /* Should always be last */
};
diff --git a/epan/dissectors/packet-dcerpc.c b/epan/dissectors/packet-dcerpc.c
index 085302fb0a..5a9f8e177c 100644
--- a/epan/dissectors/packet-dcerpc.c
+++ b/epan/dissectors/packet-dcerpc.c
@@ -3850,6 +3850,10 @@ dissect_dcerpc_cn (tvbuff_t *tvb, int offset, packet_info *pinfo,
hdr.call_id = dcerpc_tvb_get_ntohl (tvb, offset, hdr.drep);
offset += 4;
+ if (check_col (pinfo->cinfo, COL_DCE_CALL)) {
+ col_append_fstr (pinfo->cinfo, COL_DCE_CALL, "%u", hdr.call_id);
+ }
+
if (can_desegment && pinfo->can_desegment
&& !tvb_bytes_exist(tvb, start_offset, hdr.frag_len)) {
pinfo->desegment_offset = start_offset;
@@ -4821,6 +4825,9 @@ dissect_dcerpc_dg (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
if (check_col (pinfo->cinfo, COL_INFO)) {
col_append_fstr (pinfo->cinfo, COL_INFO, ": seq: %u", hdr.seqnum);
}
+ if (check_col (pinfo->cinfo, COL_DCE_CALL)) {
+ col_append_fstr (pinfo->cinfo, COL_DCE_CALL, "%u", hdr.seqnum);
+ }
offset += 4;
if (tree)