aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--epan/dissectors/packet-atm.c14
-rw-r--r--epan/dissectors/packet-catapult-dct2000.c48
-rw-r--r--wiretap/catapult_dct2000.c6
-rw-r--r--wiretap/wtap.h1
4 files changed, 62 insertions, 7 deletions
diff --git a/epan/dissectors/packet-atm.c b/epan/dissectors/packet-atm.c
index c0197084c2..cce6bb4c37 100644
--- a/epan/dissectors/packet-atm.c
+++ b/epan/dissectors/packet-atm.c
@@ -42,6 +42,7 @@ static int proto_atm = -1;
static int hf_atm_aal = -1;
static int hf_atm_vpi = -1;
static int hf_atm_vci = -1;
+static int hf_atm_cid = -1;
static int proto_atm_lane = -1;
static int proto_ilmi = -1;
static int proto_aal1 = -1;
@@ -1112,12 +1113,12 @@ dissect_reassembled_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
switch (pinfo->pseudo_header->atm.type) {
case TRAF_UMTS_FP:
/* Skip first 4 bytes of message
- - CID
+ - side
- length
- UUI (always 26 to indicate last data received)
- TODO: should they be:
- - stripped earlier?
- - dissected as SSSAR sublayer? */
+ Ignoring for now... */
+ proto_tree_add_uint(atm_tree, hf_atm_cid, tvb, 0, 0,
+ pinfo->pseudo_header->atm.aal2_cid);
next_tvb = tvb_new_subset(tvb, 4,
tvb_length_remaining(tvb, 4),
tvb_length_remaining(tvb, 4));
@@ -1652,6 +1653,11 @@ proto_register_atm(void)
{ &hf_atm_vci,
{ "VCI", "atm.vci", FT_UINT16, BASE_DEC, NULL, 0x0,
"", HFILL }},
+
+ { &hf_atm_cid,
+ { "CID", "atm.cid", FT_UINT8, BASE_DEC, NULL, 0x0,
+ "", HFILL }},
+
};
static gint *ett[] = {
&ett_atm,
diff --git a/epan/dissectors/packet-catapult-dct2000.c b/epan/dissectors/packet-catapult-dct2000.c
index 3f50532647..bcfde72953 100644
--- a/epan/dissectors/packet-catapult-dct2000.c
+++ b/epan/dissectors/packet-catapult-dct2000.c
@@ -33,6 +33,7 @@
#include <epan/proto.h>
#include <epan/prefs.h>
#include <epan/strutil.h>
+#include <epan/addr_resolv.h>
#include <wiretap/catapult_dct2000.h>
#include "packet-umts_fp.h"
@@ -50,6 +51,7 @@ static int hf_catapult_dct2000_direction = -1;
static int hf_catapult_dct2000_encap = -1;
static int hf_catapult_dct2000_unparsed_data = -1;
+
/* Variables used for preferences */
gboolean catapult_dct2000_try_ipprim_heuristic = TRUE;
gboolean catapult_dct2000_try_sctpprim_heuristic = TRUE;
@@ -93,7 +95,9 @@ static dissector_handle_t look_for_dissector(char *protocol_name);
/* Look for the protocol data within an ipprim packet.
Only set *data_offset if data field found. */
-static gboolean find_ipprim_data_offset(tvbuff_t *tvb, int *data_offset)
+static gboolean find_ipprim_data_offset(tvbuff_t *tvb, int *data_offset,
+ guint32 *source_addr, guint32 *dest_addr,
+ guint16 *source_port, guint16 *dest_port)
{
guint8 length;
int offset = *data_offset;
@@ -133,6 +137,29 @@ static gboolean find_ipprim_data_offset(tvbuff_t *tvb, int *data_offset)
{
/* Read length in next byte */
length = tvb_get_guint8(tvb, offset++);
+
+ if (tag == 0x31 && length >=4 && length <= 6)
+ {
+ /* Source IP address */
+ *source_addr = tvb_get_ipv4(tvb, offset);
+
+ /* Source port follows (if present) */
+ if (length > 4)
+ {
+ *source_port = tvb_get_ntohs(tvb, offset+4);
+ }
+ }
+ if (tag == 0x32 && length == 4)
+ {
+ /* Dest IP address */
+ *dest_addr = tvb_get_ipv4(tvb, offset);
+ }
+ if (tag == 0x33 && length == 2)
+ {
+ /* Get dest port */
+ *dest_port = tvb_get_ntohs(tvb, offset);
+ }
+
/* Skip the following value */
offset += length;
}
@@ -628,12 +655,27 @@ dissect_catapult_dct2000(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
/* Try IP Prim heuristic if configured to */
if (catapult_dct2000_try_ipprim_heuristic)
{
+ guint32 source_addr = 0, dest_addr = 0;
+ guint16 source_port = 0, dest_port = 0;
+
heur_protocol_handle =
look_for_dissector(protocol_name);
if ((heur_protocol_handle != 0) &&
- find_ipprim_data_offset(tvb, &offset))
+ find_ipprim_data_offset(tvb, &offset, &source_addr, &dest_addr,
+ &source_port, &dest_port))
{
protocol_handle = heur_protocol_handle;
+
+ if (source_addr && check_col(pinfo->cinfo, COL_DEF_SRC))
+ {
+ col_append_fstr(pinfo->cinfo, COL_DEF_SRC,
+ "(%s:%u)", (char*)get_hostname(source_addr), source_port);
+ }
+ if (dest_addr && check_col(pinfo->cinfo, COL_DEF_DST))
+ {
+ col_append_fstr(pinfo->cinfo, COL_DEF_DST,
+ "(%s:%u)", (char*)get_hostname(dest_addr), dest_port);
+ }
}
}
@@ -681,7 +723,7 @@ dissect_catapult_dct2000(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
if (check_col(pinfo->cinfo, COL_INFO))
{
col_add_fstr(pinfo->cinfo, COL_INFO,
- "Unparsed protocol data (context=%s.%u t=%s %c prot=%s (v=%s))",
+ "Not dissected (context=%s.%u t=%s %c prot=%s (v=%s))",
tvb_get_ephemeral_string(tvb, 0, context_length),
port_number,
tvb_get_ephemeral_string(tvb, timestamp_start, timestamp_length),
diff --git a/wiretap/catapult_dct2000.c b/wiretap/catapult_dct2000.c
index 3753b9acec..da5b126958 100644
--- a/wiretap/catapult_dct2000.c
+++ b/wiretap/catapult_dct2000.c
@@ -1226,6 +1226,12 @@ void set_aal_info(union wtap_pseudo_header *pseudo_header, packet_direction_t di
/* 0 means we don't know how many cells the frame comprises. */
pseudo_header->dct2000.inner_pseudo_header.atm.cells = 0;
+
+ /* cid is last byte */
+ pseudo_header->dct2000.inner_pseudo_header.atm.aal2_cid =
+ ((hex_from_char(aal_header_chars[10]) << 4) |
+ hex_from_char(aal_header_chars[11]));
+
}
diff --git a/wiretap/wtap.h b/wiretap/wtap.h
index 6f63a76d18..750d0d647d 100644
--- a/wiretap/wtap.h
+++ b/wiretap/wtap.h
@@ -364,6 +364,7 @@ struct atm_phdr {
guint8 subtype; /* traffic subtype */
guint16 vpi; /* virtual path identifier */
guint16 vci; /* virtual circuit identifier */
+ guint8 aal2_cid; /* channel id */
guint16 channel; /* link: 0 for DTE->DCE, 1 for DCE->DTE */
guint16 cells; /* number of cells */
guint16 aal5t_u2u; /* user-to-user indicator */