aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors
diff options
context:
space:
mode:
authorkukosa <kukosa@f5534014-38df-0310-8fa8-9805f1628bb7>2005-08-31 15:03:12 +0000
committerkukosa <kukosa@f5534014-38df-0310-8fa8-9805f1628bb7>2005-08-31 15:03:12 +0000
commiteeda00256ce0cda5190df17302b0c1344644bb91 (patch)
treeed572b63e01653dd36a5ff45d9cca1d20a8fa30f /epan/dissectors
parentbe5d855271fc7fcd41f488abc81ffd169d5f84c8 (diff)
- more standard way for FastStart item dissection
- protocol names fixed git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@15636 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/dissectors')
-rw-r--r--epan/dissectors/packet-h225.c33
-rw-r--r--epan/dissectors/packet-h235.c2
-rw-r--r--epan/dissectors/packet-h245.c32
-rw-r--r--epan/dissectors/packet-h245.h4
4 files changed, 38 insertions, 33 deletions
diff --git a/epan/dissectors/packet-h225.c b/epan/dissectors/packet-h225.c
index ca59b72fcb..d3966d321b 100644
--- a/epan/dissectors/packet-h225.c
+++ b/epan/dissectors/packet-h225.c
@@ -1,6 +1,6 @@
/* Do not modify this file. */
/* It is created automatically by the ASN.1 to Ethereal dissector compiler */
-/* ./packet-h225.c */
+/* .\packet-h225.c */
/* ../../tools/asn2eth.py -X -e -p h225 -c h225.cnf -s packet-h225-template h225.asn */
/* Input file: packet-h225-template.c */
@@ -62,8 +62,8 @@
#include "packet-h245.h"
#include "packet-q931.h"
-#define PNAME "h225"
-#define PSNAME "H225"
+#define PNAME "H323-MESSAGES"
+#define PSNAME "H.225.0"
#define PFNAME "h225"
#define UDP_PORT_RAS1 1718
@@ -4335,15 +4335,15 @@ static int dissect_cryptoTokens(tvbuff_t *tvb, int offset, packet_info *pinfo, p
static int
dissect_h225_FastStart_item(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index) {
- guint32 newoffset;
- guint32 length;
+ tvbuff_t *value_tvb = NULL;
char codec_str[50];
- offset=dissect_per_length_determinant(tvb, offset, pinfo, tree, hf_h225_fastStart_item_length, &length);
- newoffset=offset + (length<<3); /* please note that offset is in bits in
- PER dissectors, but the item length
- is in octets */
- offset=dissect_h245_OpenLogicalChannelCodec(tvb,offset, pinfo, tree, hf_index, codec_str);
+ offset = dissect_per_octet_string(tvb, offset, pinfo, tree, hf_index,
+ -1, -1, &value_tvb);
+
+ if (value_tvb && tvb_length(value_tvb)) {
+ dissect_h245_OpenLogicalChannelCodec(value_tvb, pinfo, tree, codec_str);
+ }
/* Add to packet info */
g_snprintf(h225_pi->frame_label, 50, "%s %s", h225_pi->frame_label, codec_str);
@@ -4351,9 +4351,6 @@ dissect_h225_FastStart_item(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, p
contains_faststart = TRUE;
h225_pi->is_faststart = TRUE;
- return newoffset;
-
-
return offset;
}
static int dissect_FastStart_item(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree) {
@@ -9276,13 +9273,13 @@ dissect_h225_H323UserInformation(tvbuff_t *tvb, packet_info *pinfo, proto_tree *
h225_pi->msg_type = H225_CS;
if (check_col(pinfo->cinfo, COL_PROTOCOL)){
- col_set_str(pinfo->cinfo, COL_PROTOCOL, "H.225.0");
+ col_set_str(pinfo->cinfo, COL_PROTOCOL, PSNAME);
}
if (check_col(pinfo->cinfo, COL_INFO)){
col_clear(pinfo->cinfo, COL_INFO);
}
- it=proto_tree_add_protocol_format(tree, proto_h225, tvb, 0, tvb_length(tvb), "H.225.0 CS");
+ it=proto_tree_add_protocol_format(tree, proto_h225, tvb, 0, tvb_length(tvb), PSNAME" CS");
tr=proto_item_add_subtree(it, ett_h225);
offset = dissect_h225_H323_UserInformation(tvb, offset,pinfo, tr, hf_h225_H323_UserInformation);
@@ -9308,10 +9305,10 @@ dissect_h225_h225_RasMessage(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree
h225_pi->msg_type = H225_RAS;
if (check_col(pinfo->cinfo, COL_PROTOCOL)){
- col_set_str(pinfo->cinfo, COL_PROTOCOL, "H.225.0");
+ col_set_str(pinfo->cinfo, COL_PROTOCOL, PSNAME);
}
- it=proto_tree_add_protocol_format(tree, proto_h225, tvb, offset, tvb_length(tvb), "H.225.0 RAS");
+ it=proto_tree_add_protocol_format(tree, proto_h225, tvb, offset, tvb_length(tvb), PSNAME" RAS");
tr=proto_item_add_subtree(it, ett_h225);
offset = dissect_h225_RasMessage(tvb, 0, pinfo,tr, hf_h225_RasMessage );
@@ -10042,7 +10039,7 @@ void proto_register_h225(void) {
"FacilityReason/transportedInformation", HFILL }},
{ &hf_h225_FastStart_item,
{ "Item", "h225.FastStart_item",
- FT_BYTES, BASE_HEX, NULL, 0,
+ FT_UINT32, BASE_DEC, NULL, 0,
"FastStart/_item", HFILL }},
{ &hf_h225_ipAddress,
{ "ipAddress", "h225.ipAddress",
diff --git a/epan/dissectors/packet-h235.c b/epan/dissectors/packet-h235.c
index e55e0e1e3d..22fc8c32ab 100644
--- a/epan/dissectors/packet-h235.c
+++ b/epan/dissectors/packet-h235.c
@@ -45,7 +45,7 @@
#include "packet-h235.h"
#define PNAME "H235-SECURITY-MESSAGES"
-#define PSNAME "H235"
+#define PSNAME "H.235"
#define PFNAME "h235"
/* Initialize the protocol and registered fields */
diff --git a/epan/dissectors/packet-h245.c b/epan/dissectors/packet-h245.c
index d904b3f4e8..6a717f6671 100644
--- a/epan/dissectors/packet-h245.c
+++ b/epan/dissectors/packet-h245.c
@@ -1,6 +1,6 @@
/* Do not modify this file. */
/* It is created automatically by the ASN.1 to Ethereal dissector compiler */
-/* ./packet-h245.c */
+/* .\packet-h245.c */
/* ../../tools/asn2eth.py -X -e -p h245 -c h245.cnf -s packet-h245-template h245.asn */
/* Input file: packet-h245-template.c */
@@ -61,8 +61,8 @@
#include "packet-rtcp.h"
#include "packet-ber.h"
-#define PNAME "h245"
-#define PSNAME "h245"
+#define PNAME "MULTIMEDIA-SYSTEM-CONTROL"
+#define PSNAME "H.245"
#define PFNAME "h245"
static dissector_handle_t rtp_handle=NULL;
@@ -233,6 +233,7 @@ int proto_h245 = -1;
/*--- Included file: packet-h245-hf.c ---*/
+static int hf_h245_OpenLogicalChannel_PDU = -1; /* OpenLogicalChannel */
static int hf_h245_request = -1; /* RequestMessage */
static int hf_h245_response = -1; /* ResponseMessage */
static int hf_h245_command = -1; /* CommandMessage */
@@ -16864,6 +16865,12 @@ dissect_h245_Moderfc2733(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, prot
return offset;
}
+/*--- PDUs ---*/
+
+static void dissect_OpenLogicalChannel_PDU(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
+ dissect_h245_OpenLogicalChannel(tvb, 0, pinfo, tree, hf_h245_OpenLogicalChannel_PDU);
+}
+
/*--- End of included file: packet-h245-fn.c ---*/
@@ -16886,10 +16893,10 @@ dissect_h245_h245(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
guint32 offset=0;
if (check_col(pinfo->cinfo, COL_PROTOCOL)){
- col_set_str(pinfo->cinfo, COL_PROTOCOL, "H.245");
+ col_set_str(pinfo->cinfo, COL_PROTOCOL, PSNAME);
}
- it=proto_tree_add_protocol_format(parent_tree, proto_h245, tvb, 0, tvb_length(tvb), "H.245");
+ it=proto_tree_add_protocol_format(parent_tree, proto_h245, tvb, 0, tvb_length(tvb), PSNAME);
tr=proto_item_add_subtree(it, ett_h245);
/* assume that whilst there is more tvb data, there are more h245 commands */
@@ -16902,11 +16909,9 @@ dissect_h245_h245(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
}
}
-int
-dissect_h245_OpenLogicalChannelCodec(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index, char *codec_str) {
- offset = dissect_per_sequence(tvb, offset, pinfo, tree, hf_index,
- ett_h245_OpenLogicalChannel, OpenLogicalChannel_sequence);
-
+void
+dissect_h245_OpenLogicalChannelCodec(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, char *codec_str) {
+ dissect_OpenLogicalChannel_PDU(tvb, pinfo, tree);
if (h245_pi != NULL) h245_pi->msg_type = H245_OpenLogChn;
@@ -16914,7 +16919,6 @@ dissect_h245_OpenLogicalChannelCodec(tvbuff_t *tvb, int offset, packet_info *pin
strncpy(codec_str, codec_type, 50);
}
- return offset;
}
/*--- proto_register_h245 -------------------------------------------*/
@@ -16931,6 +16935,10 @@ void proto_register_h245(void) {
/*--- Included file: packet-h245-hfarr.c ---*/
+ { &hf_h245_OpenLogicalChannel_PDU,
+ { "OpenLogicalChannel", "h245.OpenLogicalChannel",
+ FT_NONE, BASE_NONE, NULL, 0,
+ "OpenLogicalChannel", HFILL }},
{ &hf_h245_request,
{ "request", "h245.request",
FT_UINT32, BASE_DEC, VALS(h245_RequestMessage_vals), 0,
@@ -17372,7 +17380,7 @@ void proto_register_h245(void) {
FT_UINT32, BASE_DEC, NULL, 0,
"CapabilityDescriptor/simultaneousCapabilities/_item", HFILL }},
{ &hf_h245_AlternativeCapabilitySet_item,
- { "Item", "h245.AlternativeCapabilitySet_item",
+ { "alternativeCapability", "h245.AlternativeCapabilitySet_item",
FT_UINT32, BASE_DEC, NULL, 0,
"AlternativeCapabilitySet/_item", HFILL }},
{ &hf_h245_tcs_rej_cause,
diff --git a/epan/dissectors/packet-h245.h b/epan/dissectors/packet-h245.h
index 2c0d3633a2..96951d500c 100644
--- a/epan/dissectors/packet-h245.h
+++ b/epan/dissectors/packet-h245.h
@@ -1,6 +1,6 @@
/* Do not modify this file. */
/* It is created automatically by the ASN.1 to Ethereal dissector compiler */
-/* ./packet-h245.h */
+/* .\packet-h245.h */
/* ../../tools/asn2eth.py -X -e -p h245 -c h245.cnf -s packet-h245-template h245.asn */
/* Input file: packet-h245-template.h */
@@ -67,7 +67,7 @@ int dissect_h245_OpenLogicalChannel(tvbuff_t *tvb, int offset, packet_info *pinf
/*--- End of included file: packet-h245-exp.h ---*/
-int dissect_h245_OpenLogicalChannelCodec(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index, char *codec_str);
+void dissect_h245_OpenLogicalChannelCodec(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, char *codec_str);
#endif /* PACKET_H245_H */