aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-h248.c
diff options
context:
space:
mode:
authorgerald <gerald@f5534014-38df-0310-8fa8-9805f1628bb7>2008-06-27 16:07:21 +0000
committergerald <gerald@f5534014-38df-0310-8fa8-9805f1628bb7>2008-06-27 16:07:21 +0000
commitfa010b26528445f8aac4c58dc77f0e125d63d024 (patch)
treeba4f349d1c58f3775115187fbe0d41a4377d4c42 /epan/dissectors/packet-h248.c
parentd8e453f81f4901670d68b2d06ebd1d09f0a7e7c8 (diff)
Fix some checkAPIs warnings.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@25617 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/dissectors/packet-h248.c')
-rw-r--r--epan/dissectors/packet-h248.c96
1 files changed, 47 insertions, 49 deletions
diff --git a/epan/dissectors/packet-h248.c b/epan/dissectors/packet-h248.c
index 9fdf99cdad..93bc372fd3 100644
--- a/epan/dissectors/packet-h248.c
+++ b/epan/dissectors/packet-h248.c
@@ -1,7 +1,7 @@
/* Do not modify this file. */
/* It is created automatically by the ASN.1 to Wireshark dissector compiler */
/* packet-h248.c */
-/* ../../tools/asn2wrs.py -b -p h248 -c h248.cnf -s packet-h248-template h248v3.asn */
+/* ../../tools/asn2wrs.py -b -p h248 -c ./h248.cnf -s ./packet-h248-template -D . h248v3.asn */
/* Input file: packet-h248-template.c */
@@ -718,7 +718,7 @@ static const value_string package_name_vals[] = {
{ 0x0092, "Detailed Congestion Reporting Package" }, /* H.248.32 */
{ 0x0093, "Stimulus Analogue Lines Package" }, /* H.248.34 */
{ 0x0094, "icascgen" }, /* H.248.29 Annex B */
- { 0x0095, "Coin Operated Phone Control Package" }, /* H.248.35 */
+ { 0x0095, "Coin Operated Phone Control Package" }, /* H.248.35 */
{ 0x0096, "Metering Pulse Detection Package" }, /* H.248.26 Amendment 1 */
{ 0x0097, "Trace Package" }, /* 3GPP TS 29.232 v6.3.0 */
{ 0x0098, "Hanging Termination Package" }, /* H.248.36 */
@@ -732,19 +732,19 @@ static const value_string package_name_vals[] = {
{ 0x00a0, "MGC Information Package" }, /* H.248.45 */
{ 0x00a1, "Text Overlay Package" }, /* H.248.19 Amendment 1 */
{ 0x00a2, "Border and Background Package" }, /* H.248.19 Amendment 1 */
- { 0x00a3, "Segmentation Package" }, /* H.248.1v3 */
+ { 0x00a3, "Segmentation Package" }, /* H.248.1v3 */
{ 0x00a4, "ETSI notification behaviour package" }, /* ETSI ES 283 039-3 */
{ 0x00a5, "ETSI notification rate package" }, /* ETSI ES 283 039-4 */
- { 0x00a6, "Automatic Speech Recognition Package" }, /* H.248.9 Amendment 1 */
+ { 0x00a6, "Automatic Speech Recognition Package" }, /* H.248.9 Amendment 1 */
{ 0x00a7, "Set extension to basic syntax for TTS enhancement Package" },/* H.248.9 Amendment 1 */
- { 0x00a8, "Advanced audio server base package for TTS enhancement" }, /* H.248.9 Amendment 1 */
- { 0x00a9, "Multimedia Play Package" }, /* H.248.9 Amendment 1 */
+ { 0x00a8, "Advanced audio server base package for TTS enhancement" }, /* H.248.9 Amendment 1 */
+ { 0x00a9, "Multimedia Play Package" }, /* H.248.9 Amendment 1 */
{ 0x00aa, "Floor Status Detection Package" }, /* H.248.19 Amendment 2 */
- { 0x00ab, "Floor Control Policy Package" }, /* H.248.19 Amendment 2 */
- { 0x00ac, "Address Reporting Package" }, /* H.248.37 Amendment 1 */
- { 0x00ad, "Connection Capability Control Package" }, /* H.248.46 */
+ { 0x00ab, "Floor Control Policy Package" }, /* H.248.19 Amendment 2 */
+ { 0x00ac, "Address Reporting Package" }, /* H.248.37 Amendment 1 */
+ { 0x00ad, "Connection Capability Control Package" }, /* H.248.46 */
{ 0x00ae, "Statistic Conditional Reporting Package" }, /* H.248.47 Amendment 1 */
- { 0x00af, "RTCP HR QoS Statistics Package" }, /* H.248.48 */
+ { 0x00af, "RTCP HR QoS Statistics Package" }, /* H.248.48 */
{ 0x00b0, "Received RTCP XR Package" }, /* H.248.30 (01/2007) */
{ 0x00b1, "Received RTCP XR Burst Metrics Package" }, /* H.248.30 (01/2007) */
{ 0x00b2, "ASCI Group call package" }, /* 3GPP TS 29.232 v7.4.0 */
@@ -1095,10 +1095,10 @@ extern void h248_param_PkgdName(proto_tree* tree, tvbuff_t* tvb, packet_info* pi
int offset = 0;
asn1_ctx_t asn1_ctx;
asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
-
+
old_offset=offset;
offset = dissect_ber_octet_string(FALSE, &asn1_ctx, tree, tvb, offset, hfid , &new_tvb);
-
+
if (new_tvb) {
/* this field is always 4 bytes so just read it into two integers */
name_major=tvb_get_ntohs(new_tvb, 0);
@@ -1110,7 +1110,7 @@ extern void h248_param_PkgdName(proto_tree* tree, tvbuff_t* tvb, packet_info* pi
if(tree){
proto_item* pi;
const gchar* strval;
-
+
package_tree = proto_item_add_subtree(asn1_ctx.created_item, ett_packagename);
proto_tree_add_uint(package_tree, hf_h248_pkg_name, tvb, offset-4, 2, name_major);
@@ -1128,7 +1128,7 @@ extern void h248_param_PkgdName(proto_tree* tree, tvbuff_t* tvb, packet_info* pi
pi = proto_tree_add_uint(package_tree, hf_248_pkg_param, tvb, offset-2, 2, name_minor);
-
+
if (pkg->signal_names && ( strval = match_strval(name_minor, pkg->signal_names) )) {
strval = ep_strdup_printf("%s (%d)",strval,name_minor);
} else {
@@ -1137,7 +1137,7 @@ extern void h248_param_PkgdName(proto_tree* tree, tvbuff_t* tvb, packet_info* pi
proto_item_set_text(pi,"Signal ID: %s", strval);
}
-
+
}
}
@@ -1232,8 +1232,6 @@ static int dissect_h248_ctx_id(gboolean implicit_tag, packet_info *pinfo, proto_
void h248_register_package(const h248_package_t* pkg) {
if (! packages) packages = g_ptr_array_new();
- g_assert(pkg != NULL);
-
g_ptr_array_add(packages,(void*)pkg);
}
@@ -1275,17 +1273,17 @@ static int dissect_h248_PkgdName(gboolean implicit_tag, tvbuff_t *tvb, int offse
}
if (! pkg ) pkg = &no_package;
-
+
{
proto_item* pi = proto_tree_add_uint(package_tree, hf_248_pkg_param, tvb, offset-2, 2, name_minor);
const gchar* strval;
-
+
if (pkg->param_names && ( strval = match_strval(name_minor, pkg->param_names) )) {
strval = ep_strdup_printf("%s (%d)",strval,name_minor);
} else {
strval = ep_strdup_printf("Unknown (%d)",name_minor);
}
-
+
proto_item_set_text(pi,"Parameter: %s", strval);
}
} else {
@@ -1354,13 +1352,13 @@ static int dissect_h248_EventName(gboolean implicit_tag, tvbuff_t *tvb, int offs
{
proto_item* pi = proto_tree_add_uint(package_tree, hf_h248_event_code, tvb, offset-2, 2, name_minor);
const gchar* strval;
-
+
if (pkg->event_names && ( strval = match_strval(name_minor, pkg->event_names) )) {
strval = ep_strdup_printf("%s (%d)",strval,name_minor);
} else {
strval = ep_strdup_printf("Unknown (%d)",name_minor);
}
-
+
proto_item_set_text(pi,"Event ID: %s", strval);
}
@@ -1430,13 +1428,13 @@ static int dissect_h248_SignalName(gboolean implicit_tag , tvbuff_t *tvb, int of
{
proto_item* pi = proto_tree_add_uint(package_tree, hf_h248_signal_code, tvb, offset-2, 2, name_minor);
const gchar* strval;
-
+
if (pkg->signal_names && ( strval = match_strval(name_minor, pkg->signal_names) )) {
strval = ep_strdup_printf("%s (%d)",strval,name_minor);
} else {
strval = ep_strdup_printf("Unknown (%d)",name_minor);
}
-
+
proto_item_set_text(pi,"Signal ID: %s", strval);
}
@@ -1504,10 +1502,10 @@ static int dissect_h248_SigParameterName(gboolean implicit_tag _U_, tvbuff_t *tv
const h248_pkg_param_t* sigpar;
const gchar* strval;
proto_item* pi;
-
+
offset = dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index, &next_tvb);
pi = actx->created_item;
-
+
switch(tvb_length(next_tvb)) {
case 4: param_id = tvb_get_ntohl(next_tvb,0); break;
case 3: param_id = tvb_get_ntoh24(next_tvb,0); break;
@@ -1532,7 +1530,7 @@ static int dissect_h248_SigParameterName(gboolean implicit_tag _U_, tvbuff_t *tv
} else {
strval = ep_strdup_printf("Unknown (%d)",param_id);
}
-
+
proto_item_set_text(pi,"Parameter: %s", strval);
return offset;
@@ -1600,16 +1598,16 @@ static int dissect_h248_EventParameterName(gboolean implicit_tag _U_, tvbuff_t *
} else {
curr_info.par = &no_param;
}
-
+
if (curr_info.evt && curr_info.evt->param_names && ( strval = match_strval(param_id, curr_info.evt->param_names) )) {
strval = ep_strdup_printf("%s (%d)",strval,param_id);
} else {
strval = ep_strdup_printf("Unknown (%d)",param_id);
}
-
+
proto_item_set_text(pi,"Parameter: %s", strval);
-
+
return offset;
}
@@ -1733,7 +1731,7 @@ dissect_h248_AuthenticationHeader(gboolean implicit_tag _U_, tvbuff_t *tvb _U_,
static int
dissect_h248_INTEGER_0_99(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
- NULL);
+ NULL);
return offset;
}
@@ -1753,7 +1751,7 @@ dissect_h248_OCTET_STRING_SIZE_4(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, i
static int
dissect_h248_INTEGER_0_65535(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
- NULL);
+ NULL);
return offset;
}
@@ -1916,7 +1914,7 @@ dissect_h248_ErrorDescriptor(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int o
static int
dissect_h248_TransactionId(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
- NULL);
+ NULL);
return offset;
}
@@ -1956,7 +1954,7 @@ dissect_h248_ContextId(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset
static int
dissect_h248_INTEGER_0_15(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
- NULL);
+ NULL);
return offset;
}
@@ -2075,7 +2073,7 @@ dissect_h248_T_topologyDirection(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, i
static int
dissect_h248_StreamID(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
- NULL);
+ NULL);
return offset;
}
@@ -2242,7 +2240,7 @@ dissect_h248_SEQUENCE_OF_PropertyParm(gboolean implicit_tag _U_, tvbuff_t *tvb _
static int
dissect_h248_ContextIDinList(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
- NULL);
+ NULL);
return offset;
}
@@ -2715,7 +2713,7 @@ dissect_h248_OBJECT_IDENTIFIER(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int
static int
dissect_h248_INTEGER_0_255(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
- NULL);
+ NULL);
return offset;
}
@@ -2856,7 +2854,7 @@ dissect_h248_MuxDescriptor(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int off
static int
dissect_h248_RequestID(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
- NULL);
+ NULL);
return offset;
}
@@ -4161,7 +4159,7 @@ dissect_h248_SCreasonValue(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int off
static int
dissect_h248_INTEGER_0_4294967295(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
- NULL);
+ NULL);
return offset;
}
@@ -4793,7 +4791,7 @@ dissect_h248_T_transactionResult(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, i
static int
dissect_h248_SegmentNumber(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
- NULL);
+ NULL);
return offset;
}
@@ -4992,7 +4990,7 @@ dissect_h248_ServiceChangeReasonStr(gboolean implicit_tag _U_, tvbuff_t *tvb _U_
/*--- End of included file: packet-h248-fn.c ---*/
-#line 1215 "packet-h248-template.c"
+#line 1213 "packet-h248-template.c"
static void dissect_h248_tpkt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
dissect_tpkt_encap(tvb, pinfo, tree, h248_desegment, h248_handle);
@@ -5057,14 +5055,14 @@ static void h248_init(void) {
} else {
if ( udp_port )
dissector_delete("udp.port", udp_port, h248_handle);
-
+
if ( tcp_port)
dissector_delete("tcp.port", tcp_port, h248_tpkt_handle);
}
udp_port = temp_udp_port;
tcp_port = temp_tcp_port;
-
+
if ( udp_port ) {
dissector_add("udp.port", udp_port, h248_handle);
}
@@ -5072,7 +5070,7 @@ static void h248_init(void) {
if ( tcp_port) {
dissector_add("tcp.port", tcp_port, h248_tpkt_handle);
}
-
+
if (!h248_term_handle){
h248_term_handle = find_dissector("h248term");
}
@@ -6376,7 +6374,7 @@ void proto_register_h248(void) {
"", HFILL }},
/*--- End of included file: packet-h248-hfarr.c ---*/
-#line 1378 "packet-h248-template.c"
+#line 1376 "packet-h248-template.c"
GCP_HF_ARR_ELEMS("h248",h248_arrel)
@@ -6393,7 +6391,7 @@ void proto_register_h248(void) {
&ett_h248_no_sig,
&ett_h248_no_evt,
GCP_ETT_ARR_ELEMS(h248_arrel),
-
+
/*--- Included file: packet-h248-ettarr.c ---*/
#line 1 "packet-h248-ettarr.c"
@@ -6538,7 +6536,7 @@ void proto_register_h248(void) {
&ett_h248_Value,
/*--- End of included file: packet-h248-ettarr.c ---*/
-#line 1396 "packet-h248-template.c"
+#line 1394 "packet-h248-template.c"
};
module_t *h248_module;
@@ -6572,8 +6570,8 @@ void proto_register_h248(void) {
"Desegment H.248 over TCP",
"Desegment H.248 messages that span more TCP segments",
&h248_desegment);
-
-
+
+
register_init_routine( &h248_init );
msgs = se_tree_create(EMEM_TREE_TYPE_RED_BLACK, "h248_msgs");