739
746
{ 0x00010000, "g H.248.1 Annex E" },
740
747
{ 0x00010001, "g/Cause" },
741
748
{ 0x00010002, "g/Signal Completion" },
749
{ 0x00040000, "tonedet H.248.1 Annex E" },
742
750
{ 0x00040001, "tonedet/std(Start tone detected)" },
743
751
{ 0x00040002, "tonedet/etd(End tone detected)" },
744
752
{ 0x00040003, "tonedet/ltd(Long tone detected)" },
753
{ 0x00060000, "dd H.248.1 Annex E" },
754
{ 0x00060001, "dd/std" },
755
{ 0x00060002, "dd/etd" },
756
{ 0x00060003, "dd/ltd" },
745
757
{ 0x00060004, "dd, DigitMap Completion Event" },
746
{ 0x00060010, "dd, DTMF character 0" },
747
{ 0x00060011, "dd, DTMF character 1" },
748
{ 0x00060012, "dd, DTMF character 2" },
749
{ 0x00060013, "dd, DTMF character 3" },
750
{ 0x00060014, "dd, DTMF character 4" },
751
{ 0x00060015, "dd, DTMF character 5" },
752
{ 0x00060016, "dd, DTMF character 6" },
753
{ 0x00060017, "dd, DTMF character 7" },
754
{ 0x00060018, "dd, DTMF character 8" },
755
{ 0x00060019, "dd, DTMF character 9" },
756
{ 0x0006001a, "dd, DTMF character A" },
757
{ 0x0006001b, "dd, DTMF character B" },
758
{ 0x0006001c, "dd, DTMF character C" },
759
{ 0x0006001d, "dd, DTMF character D" },
760
{ 0x00060020, "dd, DTMF character *" },
761
{ 0x00060021, "dd, DTMF character #" },
758
{ 0x00060010, "dd/d0, DTMF character 0" },
759
{ 0x00060011, "dd/d1, DTMF character 1" },
760
{ 0x00060012, "dd/d2, DTMF character 2" },
761
{ 0x00060013, "dd/d3, DTMF character 3" },
762
{ 0x00060014, "dd/d4, DTMF character 4" },
763
{ 0x00060015, "dd/d5, DTMF character 5" },
764
{ 0x00060016, "dd/d6, DTMF character 6" },
765
{ 0x00060017, "dd/d7, DTMF character 7" },
766
{ 0x00060018, "dd/d8, DTMF character 8" },
767
{ 0x00060019, "dd/d9, DTMF character 9" },
768
{ 0x0006001a, "dd/a, DTMF character A" },
769
{ 0x0006001b, "dd/b, DTMF character B" },
770
{ 0x0006001c, "dd/c, DTMF character C" },
771
{ 0x0006001d, "dd/d, DTMF character D" },
772
{ 0x00060020, "dd/*, DTMF character *" },
773
{ 0x00060021, "dd/#, DTMF character #" },
762
774
{ 0x00080030, "cd, Dial Tone" },
763
775
{ 0x00080031, "cd, Ringing Tone" },
764
776
{ 0x00080032, "cd, Busy Tone" },
772
784
{ 0x00090005, "al, offhook" },
773
785
{ 0x00090006, "al, flashhook" },
774
786
{ 0x0009ffff, "al, *" },
775
{ 0x000a0005, "ct, Completion" },
787
{ 0x000a0005, "ct, Completion of Continuity test" },
776
788
{ 0x000b0005, "nt, network failure" },
777
789
{ 0x000b0006, "nt, quality alert" },
778
790
{ 0x000c0001, "rtp, Payload Transition" },
779
791
{ 0x00210000, "Generic Bearer Connection Q.1950 Annex A" },
780
792
{ 0x00210001, "GB/BNCChange" },
793
{ 0x00220001, "BT/TIND (Tunnel Indication)" },
781
794
{ 0x002a0001, "H.245/h245msg (Incoming H.245 Message)" },
782
795
{ 0x002a0004, "H.245/h245ChC (H.245 Channel Closed)" },
796
{ 0x00450000, "Inactivity Timer H.248.14" },
797
{ 0x00450001, "it/ito" },
798
{ 0x00450002, "it/ito" },
799
{ 0x00460001, "threegmlc/mod_link_supp (Bearer Modification Support Event)" },
783
800
{ 0x800a0000, "Nokia Bearer Characteristics Package" },
981
998
{ H248_CMD_ADD_REQ, "addReq"},
982
999
{ H248_CMD_MOVE_REQ, "moveReq"},
983
1000
{ H248_CMD_MOD_REQ, "modReq"},
984
{ H248_CMD_SUB_REQ, "subReq"},
985
{ H248_CMD_AUDITCAP_REQ, "auditCapReq"},
986
{ H248_CMD_AUDITVAL_REQ, "auditValReq"},
1001
{ H248_CMD_SUB_REQ, "subtractReq"},
1002
{ H248_CMD_AUDITCAP_REQ, "auditCapRequest"},
1003
{ H248_CMD_AUDITVAL_REQ, "auditValueRequest"},
987
1004
{ H248_CMD_NOTIFY_REQ, "notifyReq"},
988
{ H248_CMD_SVCCHG_REQ, "svcChgReq"},
1005
{ H248_CMD_SVCCHG_REQ, "serviceChangeReq"},
989
1006
{ H248_CMD_TOPOLOGY_REQ, "topologyReq"},
990
1007
{ H248_CMD_CTX_ATTR_AUDIT_REQ, "ctxAttrAuditReq"},
991
1008
{ H248_CMD_ADD_REPLY, "addReply"},
992
1009
{ H248_CMD_MOVE_REPLY, "moveReply"},
993
1010
{ H248_CMD_MOD_REPLY, "modReply"},
994
{ H248_CMD_SUB_REPLY, "subReply"},
1011
{ H248_CMD_SUB_REPLY, "subtractReply"},
995
1012
{ H248_CMD_AUDITCAP_REPLY, "auditCapReply"},
996
1013
{ H248_CMD_AUDITVAL_REPLY, "auditValReply"},
997
1014
{ H248_CMD_NOTIFY_REPLY, "notifyReply"},
998
{ H248_CMD_SVCCHG_REPLY, "svcChgReply"},
1015
{ H248_CMD_SVCCHG_REPLY, "serviceChangeReply"},
999
1016
{ H248_CMD_TOPOLOGY_REPLY, "topologyReply"},
1140
1157
static GPtrArray* packages = NULL;
1142
void h248_register_package(h248_package_t* pkg) {
1159
void h248_register_package(h248_package_t* pkg) {
1143
1160
if (! packages) packages = g_ptr_array_new();
1145
1162
g_assert(pkg != NULL);
1147
1164
g_ptr_array_add(packages,pkg);
1152
dissect_h248_pkg_data(gboolean implicit_tag, tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,guint16 name_major, guint16 name_minor){
1156
switch ( name_major ){
1157
case 0x001e: /* Bearer Characteristics Q.1950 Annex A */
1159
guint bearer_type = 0;
1160
offset = dissect_ber_integer(FALSE, pinfo, tree, tvb, offset, hf_h248_pkg_bcp_BNCChar_PDU, &bearer_type);
1161
if ( bearer_type && curr_info.term )
1162
curr_info.term->type = bearer_type;
1171
1167
static guint32 packageandid;
1173
1169
static int dissect_h248_PkgdName(gboolean implicit_tag, tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, int hf_index) {
1195
1191
package_tree = proto_item_add_subtree(ber_last_created_item, ett_packagename);
1196
1192
proto_tree_add_uint(package_tree, hf_h248_pkg_name, tvb, offset-4, 2, name_major);
1199
1195
for(i=0; i < packages->len; i++) {
1200
1196
pkg = g_ptr_array_index(packages,i);
1202
1198
if (name_major == pkg->id) {
1209
1205
if (! pkg ) pkg = &no_package;
1211
1207
hf_param = *(pkg->hfid_params);
1213
1209
if (hf_param > 0)
1214
1210
/* TODO: Will this ever happen now??*/
1215
proto_tree_add_uint(package_tree, hf_param, tvb, offset-2, 2, name_minor);
1211
proto_tree_add_uint(package_tree, hf_param, tvb, offset-2, 2, name_minor);
1218
1214
pkg = &no_package;
1221
1217
curr_info.pkg = pkg;
1437
1435
gboolean pc, ind;
1441
1439
old_offset=offset;
1442
1440
offset=dissect_ber_identifier(pinfo, tree, tvb, offset, &class, &pc, &tag);
1443
1441
offset=dissect_ber_length(pinfo, tree, tvb, offset, &len, &ind);
1444
1442
end_offset=offset+len;
1446
1444
if( (class!=BER_CLASS_UNI)
1447
1445
||(tag!=BER_UNI_TAG_OCTETSTRING) ){
1448
1446
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);
1449
1447
return end_offset;
1453
1451
next_tvb = tvb_new_subset(tvb,offset,len,len);
1455
1453
if ( curr_info.par && curr_info.par->dissector) {
1456
1454
curr_info.par->dissector(tree, next_tvb, pinfo, *(curr_info.par->hfid), &curr_info, curr_info.par->data);
1501
1499
gboolean pc, ind;
1505
1503
old_offset=offset;
1506
1504
offset=dissect_ber_identifier(pinfo, tree, tvb, offset, &class, &pc, &tag);
1507
1505
offset=dissect_ber_length(pinfo, tree, tvb, offset, &len, &ind);
1508
1506
end_offset=offset+len;
1510
1508
if( (class!=BER_CLASS_UNI)
1511
1509
||(tag!=BER_UNI_TAG_OCTETSTRING) ){
1512
1510
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);
1513
1511
return end_offset;
1517
1515
next_tvb = tvb_new_subset(tvb,offset,len,len);
1519
1517
if ( curr_info.par && curr_info.par->dissector) {
1520
1518
curr_info.par->dissector(tree, next_tvb, pinfo, *(curr_info.par->hfid), &curr_info, curr_info.par->data);
1523
1521
return end_offset;
3038
static const ber_sequence_t SEQUENCE_OF_ContextID_sequence_of[1] = {
3035
dissect_h248_ContextIDinList(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
3036
offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index,
3041
static int dissect_contextList_item(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
3042
return dissect_h248_ContextIDinList(FALSE, tvb, offset, pinfo, tree, hf_h248_contextList_item);
3046
static const ber_sequence_t SEQUENCE_OF_ContextIDinList_sequence_of[1] = {
3039
3047
{ BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_contextList_item },
3043
dissect_h248_SEQUENCE_OF_ContextID(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
3051
dissect_h248_SEQUENCE_OF_ContextIDinList(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
3044
3052
offset = dissect_ber_sequence_of(implicit_tag, pinfo, tree, tvb, offset,
3045
SEQUENCE_OF_ContextID_sequence_of, hf_index, ett_h248_SEQUENCE_OF_ContextID);
3053
SEQUENCE_OF_ContextIDinList_sequence_of, hf_index, ett_h248_SEQUENCE_OF_ContextIDinList);
3049
3057
static int dissect_contextList_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
3050
return dissect_h248_SEQUENCE_OF_ContextID(TRUE, tvb, offset, pinfo, tree, hf_h248_contextList);
3058
return dissect_h248_SEQUENCE_OF_ContextIDinList(TRUE, tvb, offset, pinfo, tree, hf_h248_contextList);
5371
static int dissect_profileName(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
5372
return dissect_h248_IA5String_SIZE_1_67(FALSE, tvb, offset, pinfo, tree, hf_h248_profileName);
5376
static int dissect_profileName_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
5377
return dissect_h248_IA5String_SIZE_1_67(TRUE, tvb, offset, pinfo, tree, hf_h248_profileName);
5376
5381
static const ber_sequence_t ServiceChangeProfile_sequence[] = {
5377
{ BER_CLASS_UNI, BER_UNI_TAG_IA5String, BER_FLAGS_NOOWNTAG, dissect_profileName },
5382
{ BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_profileName_impl },
5378
5383
{ 0, 0, 0, NULL }
5400
dissect_h248_SCreasonValueOctetStr(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
5401
#line 271 "h248.cnf"
5403
tvbuff_t *parameter_tvb;
5404
offset = dissect_ber_octet_string(implicit_tag, pinfo, tree, tvb, offset, hf_index,
5411
dissect_h248_ServiceChangeReasonStr(FALSE, parameter_tvb, 0, pinfo, tree, hf_h248_serviceChangeReasonStr);
5417
static int dissect_SCreasonValue_item(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
5418
return dissect_h248_SCreasonValueOctetStr(FALSE, tvb, offset, pinfo, tree, hf_h248_SCreasonValue_item);
5422
static const ber_sequence_t SCreasonValue_sequence_of[1] = {
5423
{ BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_NOOWNTAG, dissect_SCreasonValue_item },
5427
dissect_h248_SCreasonValue(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
5428
offset = dissect_ber_sequence_of(implicit_tag, pinfo, tree, tvb, offset,
5429
SCreasonValue_sequence_of, hf_index, ett_h248_SCreasonValue);
5433
static int dissect_serviceChangeReason_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
5434
return dissect_h248_SCreasonValue(TRUE, tvb, offset, pinfo, tree, hf_h248_serviceChangeReason);
5395
5440
dissect_h248_INTEGER_0_4294967295(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
5396
5441
offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index,
6655
6716
{ &hf_h248_contextList,
6656
6717
{ "contextList", "h248.contextList",
6657
6718
FT_UINT32, BASE_DEC, NULL, 0,
6658
"h248.SEQUENCE_OF_ContextID", HFILL }},
6719
"h248.SEQUENCE_OF_ContextIDinList", HFILL }},
6659
6720
{ &hf_h248_contextList_item,
6660
6721
{ "Item", "h248.contextList_item",
6661
6722
FT_UINT32, BASE_DEC, NULL, 0,
6662
"h248.ContextID", HFILL }},
6723
"h248.ContextIDinList", HFILL }},
6663
6724
{ &hf_h248_topology,
6664
6725
{ "topology", "h248.topology",
6665
6726
FT_NONE, BASE_NONE, NULL, 0,