aboutsummaryrefslogtreecommitdiffstats
path: root/asn1
diff options
context:
space:
mode:
authorTomas Kukosa <tomas.kukosa@siemens.com>2005-08-31 15:03:12 +0000
committerTomas Kukosa <tomas.kukosa@siemens.com>2005-08-31 15:03:12 +0000
commitfd99f4837119e2b9446596cf602f5378e1ab7b11 (patch)
treeed572b63e01653dd36a5ff45d9cca1d20a8fa30f /asn1
parentbcdfd08b84f09e753df7b00472b7bd2649b2d202 (diff)
- more standard way for FastStart item dissection
- protocol names fixed svn path=/trunk/; revision=15636
Diffstat (limited to 'asn1')
-rw-r--r--asn1/h225/h225.cnf18
-rw-r--r--asn1/h225/packet-h225-template.c12
-rw-r--r--asn1/h235/packet-h235-template.c2
-rw-r--r--asn1/h245/h245.cnf8
-rw-r--r--asn1/h245/packet-h245-template.c17
-rw-r--r--asn1/h245/packet-h245-template.h2
6 files changed, 31 insertions, 28 deletions
diff --git a/asn1/h225/h225.cnf b/asn1/h225/h225.cnf
index 091cb55417..86b373b53a 100644
--- a/asn1/h225/h225.cnf
+++ b/asn1/h225/h225.cnf
@@ -166,25 +166,22 @@ CallIdentifier/guid guid
#.END
#----------------------------------------------------------------------------------------
+#.FN_PARS FastStart/_item
+ VAL_PTR = &value_tvb
#.FN_BODY FastStart/_item
- 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);
+%(DEFAULT_BODY)s
+ 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);
contains_faststart = TRUE;
h225_pi->is_faststart = TRUE;
-
- return newoffset;
-
#.END
#----------------------------------------------------------------------------------------
#.FN_PARS RasMessage
@@ -575,6 +572,7 @@ VendorIdentifier/versionId TYPE = FT_STRING DISPLAY = BASE_HEX STRINGS = NULL
H323-UserInformation/user-data/protocol-discriminator TYPE = FT_UINT32 DISPLAY = BASE_DEC STRINGS = VALS(q931_protocol_discriminator_vals)
H323-UU-PDU/tunnelledSignallingMessage/messageContent/_item TYPE = FT_UINT32 DISPLAY = BASE_DEC
NonStandardParameter/data TYPE = FT_UINT32 DISPLAY = BASE_DEC
+FastStart/_item TYPE = FT_UINT32 DISPLAY = BASE_DEC
ParallelH245Control/_item TYPE = FT_UINT32 DISPLAY = BASE_DEC
H245Control/_item TYPE = FT_UINT32 DISPLAY = BASE_DEC
GloballyUniqueID TYPE = FT_GUID DISPLAY = BASE_NONE
diff --git a/asn1/h225/packet-h225-template.c b/asn1/h225/packet-h225-template.c
index 4cf4e49457..b1b087686b 100644
--- a/asn1/h225/packet-h225-template.c
+++ b/asn1/h225/packet-h225-template.c
@@ -55,8 +55,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
@@ -145,13 +145,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);
@@ -177,10 +177,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 );
diff --git a/asn1/h235/packet-h235-template.c b/asn1/h235/packet-h235-template.c
index b3ab237b12..e57458401b 100644
--- a/asn1/h235/packet-h235-template.c
+++ b/asn1/h235/packet-h235-template.c
@@ -38,7 +38,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/asn1/h245/h245.cnf b/asn1/h245/h245.cnf
index 6d8d5c8b8c..162c8b4a21 100644
--- a/asn1/h245/h245.cnf
+++ b/asn1/h245/h245.cnf
@@ -8,6 +8,9 @@ T38FaxProfile
DataProtocolCapability NO_PROT_PREFIX
OpenLogicalChannel
+#.PDU
+OpenLogicalChannel
+
#----------------------------------------------------------------------------------------
#.FN_PARS RequestMessage
VAL_PTR = &value
@@ -797,6 +800,7 @@ MulticastAddress/iPAddress/tsapIdentifier multicast_tsapIdentifier
MulticastAddress/iP6Address/tsapIdentifier multicast_IPv6_tsapIdentifier
CommunicationModeTableEntry/mediaChannel cm_mediaChannel
CommunicationModeTableEntry/mediaControlChannel cm_mediaControlChannel
+
#----------------------------------------------------------------------------------------
#.TYPE_ATTR
UnicastAddress/iPAddress/network TYPE = FT_IPv4 DISPLAY = BASE_NONE STRINGS = NULL
@@ -807,4 +811,8 @@ RTPPayloadType/payloadDescriptor/rfc-number TYPE = FT_UINT32 DISPLAY = BASE_DEC
NonStandardIdentifier/h221NonStandard/t35CountryCode TYPE = FT_UINT32 DISPLAY = BASE_DEC STRINGS = VALS(T35CountryCode_vals)
VendorIdentification/productNumber TYPE = FT_STRING DISPLAY = BASE_HEX STRINGS = NULL
VendorIdentification/versionNumber TYPE = FT_STRING DISPLAY = BASE_HEX STRINGS = NULL
+
+#----------------------------------------------------------------------------------------
+#.FIELD_ATTR
+AlternativeCapabilitySet/_item NAME = "alternativeCapability"
#---------------------------------------------------------------------------------------- \ No newline at end of file
diff --git a/asn1/h245/packet-h245-template.c b/asn1/h245/packet-h245-template.c
index 996e8e12df..e1f6267c4a 100644
--- a/asn1/h245/packet-h245-template.c
+++ b/asn1/h245/packet-h245-template.c
@@ -54,8 +54,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;
@@ -248,10 +248,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 */
@@ -264,11 +264,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;
@@ -276,7 +274,6 @@ dissect_h245_OpenLogicalChannelCodec(tvbuff_t *tvb, int offset, packet_info *pin
strncpy(codec_str, codec_type, 50);
}
- return offset;
}
/*--- proto_register_h245 -------------------------------------------*/
diff --git a/asn1/h245/packet-h245-template.h b/asn1/h245/packet-h245-template.h
index 598378ff91..883700ba17 100644
--- a/asn1/h245/packet-h245-template.h
+++ b/asn1/h245/packet-h245-template.h
@@ -51,7 +51,7 @@ typedef struct _h245_packet_info {
#include "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 */