280
285
{ 0x00010000, "g H.248.1 Annex E" },
281
286
{ 0x00010001, "g/Cause" },
282
287
{ 0x00010002, "g/Signal Completion" },
288
{ 0x00040000, "tonedet H.248.1 Annex E" },
283
289
{ 0x00040001, "tonedet/std(Start tone detected)" },
284
290
{ 0x00040002, "tonedet/etd(End tone detected)" },
285
291
{ 0x00040003, "tonedet/ltd(Long tone detected)" },
292
{ 0x00060000, "dd H.248.1 Annex E" },
293
{ 0x00060001, "dd/std" },
294
{ 0x00060002, "dd/etd" },
295
{ 0x00060003, "dd/ltd" },
286
296
{ 0x00060004, "dd, DigitMap Completion Event" },
287
{ 0x00060010, "dd, DTMF character 0" },
288
{ 0x00060011, "dd, DTMF character 1" },
289
{ 0x00060012, "dd, DTMF character 2" },
290
{ 0x00060013, "dd, DTMF character 3" },
291
{ 0x00060014, "dd, DTMF character 4" },
292
{ 0x00060015, "dd, DTMF character 5" },
293
{ 0x00060016, "dd, DTMF character 6" },
294
{ 0x00060017, "dd, DTMF character 7" },
295
{ 0x00060018, "dd, DTMF character 8" },
296
{ 0x00060019, "dd, DTMF character 9" },
297
{ 0x0006001a, "dd, DTMF character A" },
298
{ 0x0006001b, "dd, DTMF character B" },
299
{ 0x0006001c, "dd, DTMF character C" },
300
{ 0x0006001d, "dd, DTMF character D" },
301
{ 0x00060020, "dd, DTMF character *" },
302
{ 0x00060021, "dd, DTMF character #" },
297
{ 0x00060010, "dd/d0, DTMF character 0" },
298
{ 0x00060011, "dd/d1, DTMF character 1" },
299
{ 0x00060012, "dd/d2, DTMF character 2" },
300
{ 0x00060013, "dd/d3, DTMF character 3" },
301
{ 0x00060014, "dd/d4, DTMF character 4" },
302
{ 0x00060015, "dd/d5, DTMF character 5" },
303
{ 0x00060016, "dd/d6, DTMF character 6" },
304
{ 0x00060017, "dd/d7, DTMF character 7" },
305
{ 0x00060018, "dd/d8, DTMF character 8" },
306
{ 0x00060019, "dd/d9, DTMF character 9" },
307
{ 0x0006001a, "dd/a, DTMF character A" },
308
{ 0x0006001b, "dd/b, DTMF character B" },
309
{ 0x0006001c, "dd/c, DTMF character C" },
310
{ 0x0006001d, "dd/d, DTMF character D" },
311
{ 0x00060020, "dd/*, DTMF character *" },
312
{ 0x00060021, "dd/#, DTMF character #" },
303
313
{ 0x00080030, "cd, Dial Tone" },
304
314
{ 0x00080031, "cd, Ringing Tone" },
305
315
{ 0x00080032, "cd, Busy Tone" },
313
323
{ 0x00090005, "al, offhook" },
314
324
{ 0x00090006, "al, flashhook" },
315
325
{ 0x0009ffff, "al, *" },
316
{ 0x000a0005, "ct, Completion" },
326
{ 0x000a0005, "ct, Completion of Continuity test" },
317
327
{ 0x000b0005, "nt, network failure" },
318
328
{ 0x000b0006, "nt, quality alert" },
319
329
{ 0x000c0001, "rtp, Payload Transition" },
320
330
{ 0x00210000, "Generic Bearer Connection Q.1950 Annex A" },
321
331
{ 0x00210001, "GB/BNCChange" },
332
{ 0x00220001, "BT/TIND (Tunnel Indication)" },
322
333
{ 0x002a0001, "H.245/h245msg (Incoming H.245 Message)" },
323
334
{ 0x002a0004, "H.245/h245ChC (H.245 Channel Closed)" },
335
{ 0x00450000, "Inactivity Timer H.248.14" },
336
{ 0x00450001, "it/ito" },
337
{ 0x00450002, "it/ito" },
338
{ 0x00460001, "threegmlc/mod_link_supp (Bearer Modification Support Event)" },
324
339
{ 0x800a0000, "Nokia Bearer Characteristics Package" },
522
537
{ H248_CMD_ADD_REQ, "addReq"},
523
538
{ H248_CMD_MOVE_REQ, "moveReq"},
524
539
{ H248_CMD_MOD_REQ, "modReq"},
525
{ H248_CMD_SUB_REQ, "subReq"},
526
{ H248_CMD_AUDITCAP_REQ, "auditCapReq"},
527
{ H248_CMD_AUDITVAL_REQ, "auditValReq"},
540
{ H248_CMD_SUB_REQ, "subtractReq"},
541
{ H248_CMD_AUDITCAP_REQ, "auditCapRequest"},
542
{ H248_CMD_AUDITVAL_REQ, "auditValueRequest"},
528
543
{ H248_CMD_NOTIFY_REQ, "notifyReq"},
529
{ H248_CMD_SVCCHG_REQ, "svcChgReq"},
544
{ H248_CMD_SVCCHG_REQ, "serviceChangeReq"},
530
545
{ H248_CMD_TOPOLOGY_REQ, "topologyReq"},
531
546
{ H248_CMD_CTX_ATTR_AUDIT_REQ, "ctxAttrAuditReq"},
532
547
{ H248_CMD_ADD_REPLY, "addReply"},
533
548
{ H248_CMD_MOVE_REPLY, "moveReply"},
534
549
{ H248_CMD_MOD_REPLY, "modReply"},
535
{ H248_CMD_SUB_REPLY, "subReply"},
550
{ H248_CMD_SUB_REPLY, "subtractReply"},
536
551
{ H248_CMD_AUDITCAP_REPLY, "auditCapReply"},
537
552
{ H248_CMD_AUDITVAL_REPLY, "auditValReply"},
538
553
{ H248_CMD_NOTIFY_REPLY, "notifyReply"},
539
{ H248_CMD_SVCCHG_REPLY, "svcChgReply"},
554
{ H248_CMD_SVCCHG_REPLY, "serviceChangeReply"},
540
555
{ H248_CMD_TOPOLOGY_REPLY, "topologyReply"},
681
696
static GPtrArray* packages = NULL;
683
void h248_register_package(h248_package_t* pkg) {
698
void h248_register_package(h248_package_t* pkg) {
684
699
if (! packages) packages = g_ptr_array_new();
686
701
g_assert(pkg != NULL);
688
703
g_ptr_array_add(packages,pkg);
693
dissect_h248_pkg_data(gboolean implicit_tag, tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,guint16 name_major, guint16 name_minor){
697
switch ( name_major ){
698
case 0x001e: /* Bearer Characteristics Q.1950 Annex A */
700
guint bearer_type = 0;
701
offset = dissect_ber_integer(FALSE, pinfo, tree, tvb, offset, hf_h248_pkg_bcp_BNCChar_PDU, &bearer_type);
702
if ( bearer_type && curr_info.term )
703
curr_info.term->type = bearer_type;
712
706
static guint32 packageandid;
714
708
static int dissect_h248_PkgdName(gboolean implicit_tag, tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, int hf_index) {
736
730
package_tree = proto_item_add_subtree(ber_last_created_item, ett_packagename);
737
731
proto_tree_add_uint(package_tree, hf_h248_pkg_name, tvb, offset-4, 2, name_major);
740
734
for(i=0; i < packages->len; i++) {
741
735
pkg = g_ptr_array_index(packages,i);
743
737
if (name_major == pkg->id) {
750
744
if (! pkg ) pkg = &no_package;
752
746
hf_param = *(pkg->hfid_params);
754
748
if (hf_param > 0)
755
749
/* TODO: Will this ever happen now??*/
756
proto_tree_add_uint(package_tree, hf_param, tvb, offset-2, 2, name_minor);
750
proto_tree_add_uint(package_tree, hf_param, tvb, offset-2, 2, name_minor);
759
753
pkg = &no_package;
762
756
curr_info.pkg = pkg;
978
974
gboolean pc, ind;
982
978
old_offset=offset;
983
979
offset=dissect_ber_identifier(pinfo, tree, tvb, offset, &class, &pc, &tag);
984
980
offset=dissect_ber_length(pinfo, tree, tvb, offset, &len, &ind);
985
981
end_offset=offset+len;
987
983
if( (class!=BER_CLASS_UNI)
988
984
||(tag!=BER_UNI_TAG_OCTETSTRING) ){
989
985
proto_tree_add_text(tree, tvb, offset-2, 2, "H.248 BER Error: OctetString expected but Class:%d PC:%d Tag:%d was unexpected", class, pc, tag);
990
986
return end_offset;
994
990
next_tvb = tvb_new_subset(tvb,offset,len,len);
996
992
if ( curr_info.par && curr_info.par->dissector) {
997
993
curr_info.par->dissector(tree, next_tvb, pinfo, *(curr_info.par->hfid), &curr_info, curr_info.par->data);
1042
1038
gboolean pc, ind;
1046
1042
old_offset=offset;
1047
1043
offset=dissect_ber_identifier(pinfo, tree, tvb, offset, &class, &pc, &tag);
1048
1044
offset=dissect_ber_length(pinfo, tree, tvb, offset, &len, &ind);
1049
1045
end_offset=offset+len;
1051
1047
if( (class!=BER_CLASS_UNI)
1052
1048
||(tag!=BER_UNI_TAG_OCTETSTRING) ){
1053
1049
proto_tree_add_text(tree, tvb, offset-2, 2, "H.248 BER Error: OctetString expected but Class:%d PC:%d Tag:%d was unexpected", class, pc, tag);
1054
1050
return end_offset;
1058
1054
next_tvb = tvb_new_subset(tvb,offset,len,len);
1060
1056
if ( curr_info.par && curr_info.par->dissector) {
1061
1057
curr_info.par->dissector(tree, next_tvb, pinfo, *(curr_info.par->hfid), &curr_info, curr_info.par->data);
1064
1060
return end_offset;
1889
1886
{ "Unknown Parameter", "h248.pkg.unknown.param",
1890
1887
FT_BYTES, BASE_HEX, NULL, 0,
1889
{ &hf_h248_serviceChangeReasonStr,
1890
{ "ServiceChangeReasonStr", "h248.serviceChangeReasonstr",
1891
FT_STRING, BASE_NONE, NULL, 0,
1892
"h248.IA5String", HFILL }},
1893
1894
#include "packet-h248-hfarr.c"
1895
1896
{ &hf_h248_ctx, { "Context", "h248.ctx", FT_UINT32, BASE_HEX, NULL, 0, "", HFILL }},