summaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-radius_packetcable.c
blob: 76c5885578e181952b19f31975ccb2fb7b23ac17 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
/*
 * packet-radius_packetcable.c
 *
 * Routines for Packetcable's RADIUS AVPs dissection
 *
 * Wireshark - Network traffic analyzer
 * By Gerald Combs <gerald@wireshark.org>
 * Copyright 1998 Gerald Combs
 *
 * SPDX-License-Identifier: GPL-2.0-or-later
 *
 */


/*
 * Some of the development of the RADIUS protocol decoder was sponsored by
 * Cable Television Laboratories, Inc. ("CableLabs") based upon proprietary
 * CableLabs' specifications. Your license and use of this protocol decoder
 * does not mean that you are licensed to use the CableLabs'
 * specifications.  If you have questions about this protocol, contact
 * jf.mule [AT] cablelabs.com or c.stuart [AT] cablelabs.com for additional
 * information.
 */

/*
  See:
       PacketCable(TM) 1.5 Specification: Event Messages [PKT-SP-EM1.5-I03-070412]
       PacketCable(TM) Specification: Multimedia Specification [PKT-SP-MM-I04-080522]
*/

#include "config.h"

#include <epan/packet.h>
#include <epan/sminmpec.h>

#include "packet-radius.h"

void proto_register_packetcable(void);
void proto_reg_handoff_packetcable(void);

static int proto_packetcable;

static int hf_packetcable_em_header_version_id;
static int hf_packetcable_bcid_timestamp;
static int hf_packetcable_bcid_event_counter;
static int hf_packetcable_em_header_event_message_type;
static int hf_packetcable_em_header_element_type;
static int hf_packetcable_em_header_sequence_number;
static int hf_packetcable_em_header_status;
static int hf_packetcable_em_header_status_error_indicator;
static int hf_packetcable_em_header_status_event_origin;
static int hf_packetcable_em_header_status_event_message_proxied;
static int hf_packetcable_em_header_priority;
static int hf_packetcable_em_header_attribute_count;
static int hf_packetcable_em_header_event_object;
static int hf_packetcable_call_termination_cause_source_document;
static int hf_packetcable_call_termination_cause_code;
static int hf_packetcable_trunk_group_id_trunk_type;
static int hf_packetcable_trunk_group_id_trunk_number;
static int hf_packetcable_qos_status;
static int hf_packetcable_qos_status_indication;
static int hf_packetcable_time_adjustment;
static int hf_packetcable_redirected_from_info_number_of_redirections;
static int hf_packetcable_electronic_surveillance_indication_df_cdc_address;
static int hf_packetcable_electronic_surveillance_indication_df_ccc_address;
static int hf_packetcable_electronic_surveillance_indication_cdc_port;
static int hf_packetcable_electronic_surveillance_indication_ccc_port;
static int hf_packetcable_terminal_display_info_terminal_display_status_bitmask;
static int hf_packetcable_terminal_display_info_sbm_general_display;
static int hf_packetcable_terminal_display_info_sbm_calling_number;
static int hf_packetcable_terminal_display_info_sbm_calling_name;
static int hf_packetcable_terminal_display_info_sbm_message_waiting;
static int hf_packetcable_terminal_display_info_general_display;
static int hf_packetcable_terminal_display_info_calling_number;
static int hf_packetcable_terminal_display_info_calling_name;
static int hf_packetcable_terminal_display_info_message_waiting;
static int hf_packetcable_qos_desc_flags_sfst;
static int hf_packetcable_qos_desc_flags_gi;
static int hf_packetcable_qos_desc_flags_tgj;
static int hf_packetcable_qos_desc_flags_gpi;
static int hf_packetcable_qos_desc_flags_ugs;
static int hf_packetcable_qos_desc_flags_tp;
static int hf_packetcable_qos_desc_flags_msr;
static int hf_packetcable_qos_desc_flags_mtb;
static int hf_packetcable_qos_desc_flags_mrtr;
static int hf_packetcable_qos_desc_flags_mps;
static int hf_packetcable_qos_desc_flags_mcb;
static int hf_packetcable_qos_desc_flags_srtp;
static int hf_packetcable_qos_desc_flags_npi;
static int hf_packetcable_qos_desc_flags_tpj;
static int hf_packetcable_qos_desc_flags_toso;
static int hf_packetcable_qos_desc_flags_mdl;

/* Generated from convert_proto_tree_add_text.pl */
static int hf_packetcable_bcid_time_zone_offset;
static int hf_packetcable_bcid_element_id;
static int hf_packetcable_electronic_surveillance_indication_df_df_key;
static int hf_packetcable_redirected_from_original_called_party;
static int hf_packetcable_em_header_element_id;
static int hf_packetcable_redirected_from_last_redirecting_party;
static int hf_packetcable_bcid_time_zone_dst;
static int hf_packetcable_em_header_time_zone_offset;
static int hf_packetcable_qos_service_class_name;
static int hf_packetcable_em_header_event_time;
static int hf_packetcable_em_header_time_zone_dst;

/* This is slightly ugly.  */
static int hf_packetcable_qos_desc_fields[16];

static int ett_radius_vendor_packetcable_bcid;
static int ett_radius_vendor_packetcable_status;
static int ett_radius_vendor_packetcable_qos_status;
static int ett_packetcable_term_dsply;


#define PACKETCABLE_QOS_STATE_INDICATION_MASK 0X0003
#define PACKETCABLE_SERVICE_FLOW_SCHEDULING_TYPE_MASK  (1 << 2)
#define PACKETCABLE_NOMINAL_GRANT_INTERVAL_MASK        (1 << 3)
#define PACKETCABLE_TOLERATED_GRANT_JITTER_MASK        (1 << 4)
#define PACKETCABLE_GRANTS_PER_INTERVAL_MASK   (1 << 5)
#define PACKETCABLE_UNSOLICITED_GRANT_SIZE_MASK        (1 << 6)
#define PACKETCABLE_TRAFFIC_PRIORITY_MASK      (1 << 7)
#define PACKETCABLE_MAXIMUM_SUSTAINED_RATE_MASK        (1 << 8)
#define PACKETCABLE_MAXIMUM_TRAFFIC_BURST_MASK (1 << 9)
#define PACKETCABLE_MINIMUM_RESERVED_TRAFFIC_RATE_MASK (1 << 10)
#define PACKETCABLE_MINIMUM_PACKET_SIZE_MASK   (1 << 11)
#define PACKETCABLE_MAXIMUM_CONCATENATED_BURST_MASK    (1 << 12)
#define PACKETCABLE_REQUEST_TRANSMISSION_POLICY_MASK   (1 << 13)
#define PACKETCABLE_NOMINAL_POLLING_INTERVAL_MASK      (1 << 14)
#define PACKETCABLE_TOLERATED_POLL_JITTER_MASK (1 << 15)
#define PACKETCABLE_IP_TYPE_OF_SERVICE_OVERRIDE_MASK   (1 << 16)
#define PACKETCABLE_MAXIMUM_DOWNSTREAM_LATENCY_MASK    (1 << 17)

#define PACKETCABLE_QOS_DESC_BITFIELDS 16

#define PACKETCABLE_EMHS_EI_MASK 0X0003
#define PACKETCABLE_EMHS_EO_MASK 0X0004
#define PACKETCABLE_EMHS_EMP_MASK 0X0008
#define PACKETCABLE_EMHS_RESERVED_MASK 0Xfff0


static uint32_t packetcable_qos_desc_mask[] =
{
	PACKETCABLE_SERVICE_FLOW_SCHEDULING_TYPE_MASK,
	PACKETCABLE_NOMINAL_GRANT_INTERVAL_MASK,
	PACKETCABLE_TOLERATED_GRANT_JITTER_MASK,
	PACKETCABLE_GRANTS_PER_INTERVAL_MASK,
	PACKETCABLE_UNSOLICITED_GRANT_SIZE_MASK,
	PACKETCABLE_TRAFFIC_PRIORITY_MASK,
	PACKETCABLE_MAXIMUM_SUSTAINED_RATE_MASK,
	PACKETCABLE_MAXIMUM_TRAFFIC_BURST_MASK,
	PACKETCABLE_MINIMUM_RESERVED_TRAFFIC_RATE_MASK,
	PACKETCABLE_MINIMUM_PACKET_SIZE_MASK,
	PACKETCABLE_MAXIMUM_CONCATENATED_BURST_MASK,
	PACKETCABLE_REQUEST_TRANSMISSION_POLICY_MASK,
	PACKETCABLE_NOMINAL_POLLING_INTERVAL_MASK,
	PACKETCABLE_TOLERATED_POLL_JITTER_MASK,
	PACKETCABLE_IP_TYPE_OF_SERVICE_OVERRIDE_MASK,
	PACKETCABLE_MAXIMUM_DOWNSTREAM_LATENCY_MASK
};

static const value_string radius_vendor_packetcable_event_message_vals[] =
{
	{0,  "Reserved"},
	{1,  "Signaling_Start"},
	{2,  "Signaling_Stop"},
	{3,  "Database_Query"},
	{4,  "Intelligent_Peripheral_Usage_Start"},
	{5,  "Intelligent_Peripheral_Usage_Stop"},
	{6,  "Service_Instance"},
	{7,  "QoS_Reserve"},
	{8,  "QoS_Release"},
	{9,  "Service_Activation"},
	{10, "Service_Deactivation"},
	{11,  "Media_Report"},
	{12,  "Signal_Instance"},
	{13, "Interconnect_(Signaling)_Start"},
	{14, "Interconnect_(Signaling)_Stop"},
	{15, "Call_Answer"},
	{16, "Call_Disconnect"},
	{17, "Time_Change"},
	{19, "QoS_Commit"},
	{20, "Media_Alive"},
	{31,  "Policy_Request"},
	{32,  "Policy_Delete"},
	{33,  "Policy_Update"},
	{0, NULL}
};

static const value_string packetcable_em_header_element_type_vals[] =
{
	{0,  "Reserved"},
	{1,  "CMS"},
	{2,  "CMTS"},
	{3,  "Media Gateway Controller"},
	{4,  "Policy Server"},
	{0, NULL}
};

static const value_string packetcable_em_header_status_error_indicator_vals[] =
{
	{0,  "No Error"},
	{1,  "Possible Error"},
	{2,  "Known Error"},
	{3,  "Reserved"},
	{0, NULL}
};

static const value_string packetcable_em_header_status_event_origin_vals[] =
{
	{0,  "Trusted Element"},
	{1,  "Untrusted Element"},
	{0, NULL}
};

static const value_string packetcable_em_header_status_event_message_proxied_vals[] =
{
	{0,  "Not proxied"},
	{1,  "Proxied"},
	{0, NULL}
};

static const value_string packetcable_call_termination_cause_vals[] =
{
	{0,  "Reserved"},
	{1,  "BAF"},
	{2,  "Reserved"},
	{0, NULL}
};

static const value_string packetcable_trunk_type_vals[] =
{
	{1,  "Not Used"},
	{2,  "Not Used"},
	{3,  "SS7 direct trunk group member"},
	{4,  "SS7 from IC to AT and SS7 from AT to EO"},
	{5,  "Not Used"},
	{6,  "SS7 from IC to AT and non-SS7 from AT to EO (terminating only)"},
	{9,  "Signaling type not specified"},
	{0, NULL}
};

static const value_string packetcable_state_indication_vals[] =
{
	{0,  "Illegal Value"},
	{1,  "Resource Reserved but not Activated"},
	{2,  "Resource Activated"},
	{3,  "Resource Reserved & Activated"},
	{ 0, NULL }
};


/* Decode a PacketCable BCID. */
/* XXX - This should probably be combined with the equivalent COPS code */
static void decode_packetcable_bcid (tvbuff_t *tvb, proto_tree *tree, int offset)
{

	proto_tree_add_item(tree, hf_packetcable_bcid_timestamp, tvb, offset, 4, ENC_BIG_ENDIAN);
	proto_tree_add_item(tree, hf_packetcable_bcid_element_id, tvb, offset + 4, 8, ENC_ASCII);
	proto_tree_add_item(tree, hf_packetcable_bcid_time_zone_dst, tvb, offset + 12, 1, ENC_BIG_ENDIAN);
	proto_tree_add_item(tree, hf_packetcable_bcid_time_zone_offset, tvb, offset + 13, 7, ENC_ASCII);
	proto_tree_add_item(tree, hf_packetcable_bcid_event_counter, tvb, offset + 20, 4, ENC_BIG_ENDIAN);
}

static const char* dissect_packetcable_em_hdr(proto_tree* tree, tvbuff_t* tvb, packet_info *pinfo _U_) {
	proto_item *ti;
	proto_tree *obj_tree;

	proto_tree_add_item(tree, hf_packetcable_em_header_version_id, tvb,  0, 2, ENC_BIG_ENDIAN);
	obj_tree = proto_tree_add_subtree(tree, tvb, 2, 24, ett_radius_vendor_packetcable_bcid, NULL, "BCID");
	decode_packetcable_bcid(tvb, obj_tree,  2);

	proto_tree_add_item(tree, hf_packetcable_em_header_event_message_type, tvb,  26, 2, ENC_BIG_ENDIAN);
	proto_tree_add_item(tree, hf_packetcable_em_header_element_type, tvb,  28, 2, ENC_BIG_ENDIAN);
	proto_tree_add_item(tree, hf_packetcable_em_header_element_id, tvb, 30, 8, ENC_ASCII);
	proto_tree_add_item(tree, hf_packetcable_em_header_time_zone_dst, tvb, 38, 1, ENC_BIG_ENDIAN);
	proto_tree_add_item(tree, hf_packetcable_em_header_time_zone_offset, tvb, 39, 7, ENC_ASCII);
	proto_tree_add_item(tree, hf_packetcable_em_header_sequence_number, tvb,  46, 4, ENC_BIG_ENDIAN);
	proto_tree_add_item(tree, hf_packetcable_em_header_event_time, tvb, 50, 18, ENC_ASCII);

	ti = proto_tree_add_item(tree, hf_packetcable_em_header_status, tvb,  68, 4, ENC_BIG_ENDIAN);
	obj_tree = proto_item_add_subtree(ti, ett_radius_vendor_packetcable_status);
	proto_tree_add_item(obj_tree, hf_packetcable_em_header_status_error_indicator, tvb,  68, 4, ENC_BIG_ENDIAN);
	proto_tree_add_item(obj_tree, hf_packetcable_em_header_status_event_origin, tvb,  68, 4, ENC_BIG_ENDIAN);
	proto_tree_add_item(obj_tree, hf_packetcable_em_header_status_event_message_proxied, tvb,  68, 4, ENC_BIG_ENDIAN);

	proto_tree_add_item(tree, hf_packetcable_em_header_priority, tvb,  72, 1, ENC_BIG_ENDIAN);
	proto_tree_add_item(tree, hf_packetcable_em_header_attribute_count, tvb,  73, 2, ENC_BIG_ENDIAN);
	proto_tree_add_item(tree, hf_packetcable_em_header_event_object, tvb,  75, 1, ENC_BIG_ENDIAN);
	return "";
}

static const char* dissect_packetcable_call_term_cause(proto_tree* tree, tvbuff_t* tvb, packet_info *pinfo _U_) {
	proto_tree_add_item(tree, hf_packetcable_call_termination_cause_source_document,
						tvb, 0, 2, ENC_BIG_ENDIAN);
	proto_tree_add_item(tree, hf_packetcable_call_termination_cause_code,
						tvb, 2, 4, ENC_BIG_ENDIAN);

	return "";
}

static const char* dissect_packetcable_rel_call_billing_correlation(proto_tree* tree, tvbuff_t* tvb, packet_info *pinfo _U_) {
	decode_packetcable_bcid(tvb, tree, 0);
	return "";
}

static const char* dissect_packetcable_trunk_group_id(proto_tree* tree, tvbuff_t* tvb, packet_info *pinfo _U_) {
	proto_tree_add_item(tree, hf_packetcable_trunk_group_id_trunk_type,
						tvb, 0, 2, ENC_BIG_ENDIAN);
	proto_tree_add_item(tree, hf_packetcable_trunk_group_id_trunk_number,
						tvb, 2, 4, ENC_BIG_ENDIAN);
	return "";
}

static const char* dissect_packetcable_qos_descriptor(proto_tree* tree, tvbuff_t* tvb, packet_info *pinfo _U_) {
	uint32_t intval;
	uint32_t packetcable_qos_flags = tvb_get_ntohl(tvb, 0);
	unsigned packetcable_qos_off = 20;
	static int * const qos_flags[] = {
		&hf_packetcable_qos_status_indication,
		&hf_packetcable_qos_desc_flags_sfst,
		&hf_packetcable_qos_desc_flags_gi,
		&hf_packetcable_qos_desc_flags_tgj,
		&hf_packetcable_qos_desc_flags_gpi,
		&hf_packetcable_qos_desc_flags_ugs,
		&hf_packetcable_qos_desc_flags_tp,
		&hf_packetcable_qos_desc_flags_msr,
		&hf_packetcable_qos_desc_flags_mtb,
		&hf_packetcable_qos_desc_flags_mrtr,
		&hf_packetcable_qos_desc_flags_mps,
		&hf_packetcable_qos_desc_flags_mcb,
		&hf_packetcable_qos_desc_flags_srtp,
		&hf_packetcable_qos_desc_flags_npi,
		&hf_packetcable_qos_desc_flags_tpj,
		&hf_packetcable_qos_desc_flags_toso,
		&hf_packetcable_qos_desc_flags_mdl,
		NULL
	};

	proto_tree_add_bitmask(tree, tvb, 0, hf_packetcable_qos_status,
			       ett_radius_vendor_packetcable_qos_status, qos_flags, ENC_BIG_ENDIAN);

	proto_tree_add_item(tree, hf_packetcable_qos_service_class_name, tvb, 4, 16, ENC_ASCII);

	for (intval = 0; intval < PACKETCABLE_QOS_DESC_BITFIELDS; intval++) {
		if (packetcable_qos_flags & packetcable_qos_desc_mask[intval]) {
			proto_tree_add_item(tree, hf_packetcable_qos_desc_fields[intval],
								tvb, packetcable_qos_off, 4, ENC_BIG_ENDIAN);
			packetcable_qos_off += 4;
		}
	}

	return "";
}

static const char* dissect_packetcable_time_adjustment(proto_tree* tree, tvbuff_t* tvb, packet_info *pinfo _U_) {
	proto_tree_add_item(tree, hf_packetcable_time_adjustment, tvb, 0, 8, ENC_BIG_ENDIAN);

	return "";
}

static const char* dissect_packetcable_redirected_from_info(proto_tree* tree, tvbuff_t* tvb, packet_info *pinfo _U_) {

	proto_tree_add_item(tree, hf_packetcable_redirected_from_last_redirecting_party, tvb, 0, 20, ENC_ASCII);

	proto_tree_add_item(tree, hf_packetcable_redirected_from_original_called_party, tvb, 20, 20, ENC_ASCII);

	proto_tree_add_item(tree, hf_packetcable_redirected_from_info_number_of_redirections,
						tvb, 40, 2, ENC_BIG_ENDIAN);

	return "";
}

static const char* dissect_packetcable_time_electr_surv_ind(proto_tree* tree, tvbuff_t* tvb, packet_info *pinfo _U_) {

	if (tvb_reported_length(tvb) == 0)
		return "None";

	proto_tree_add_item(tree, hf_packetcable_electronic_surveillance_indication_df_cdc_address,
						tvb, 0, 4, ENC_BIG_ENDIAN);
	proto_tree_add_item(tree, hf_packetcable_electronic_surveillance_indication_df_ccc_address,
						tvb, 4, 4, ENC_BIG_ENDIAN);
	proto_tree_add_item(tree, hf_packetcable_electronic_surveillance_indication_cdc_port,
						tvb, 8, 2, ENC_BIG_ENDIAN);
	proto_tree_add_item(tree, hf_packetcable_electronic_surveillance_indication_ccc_port,
						tvb, 10, 2, ENC_BIG_ENDIAN);
	proto_tree_add_item(tree, hf_packetcable_electronic_surveillance_indication_df_df_key, tvb, 12, -1, ENC_NA);

	return "";
}

static const char* dissect_packetcable_surv_df_sec(proto_tree* tree _U_, tvbuff_t* tvb _U_, packet_info *pinfo _U_) {
		return "";
}

#define PACKETCABLE_GENERAL_DISPLAY (1 << 0)
#define PACKETCABLE_CALLING_NUMBER  (1 << 1)
#define PACKETCABLE_CALLING_NAME    (1 << 2)
#define PACKETCABLE_MESSAGE_WAITING (1 << 3)

static const char* dissect_packetcable_term_dsply_info(proto_tree* tree, tvbuff_t* tvb, packet_info *pinfo _U_) {
	/* XXX - this logic seems buggy because the offsets don't line up */
	uint8_t bitmask = tvb_get_uint8(tvb, 2);
	unsigned intval = 1;
	static int * const flags[] = {
		&hf_packetcable_terminal_display_info_sbm_general_display,
		&hf_packetcable_terminal_display_info_sbm_calling_number,
		&hf_packetcable_terminal_display_info_sbm_calling_name,
		&hf_packetcable_terminal_display_info_sbm_message_waiting,
		NULL
	};

	proto_item* ti = proto_tree_add_bitmask_with_flags(tree, tvb, 0, hf_packetcable_terminal_display_info_terminal_display_status_bitmask,
										ett_packetcable_term_dsply, flags, ENC_NA, BMT_NO_APPEND|BMT_NO_FALSE);

	proto_tree* obj_tree = proto_item_add_subtree(ti, ett_packetcable_term_dsply);

	if (bitmask & PACKETCABLE_GENERAL_DISPLAY) {
		proto_tree_add_item(obj_tree, hf_packetcable_terminal_display_info_general_display,
							tvb, intval, 80, ENC_ASCII);
		intval += 80;
	}

	if (bitmask & PACKETCABLE_CALLING_NUMBER) {
		proto_tree_add_item(obj_tree, hf_packetcable_terminal_display_info_calling_number,
							tvb, intval, 40, ENC_ASCII);
		intval += 40;
	}

	if (bitmask & PACKETCABLE_CALLING_NAME) {
		proto_tree_add_item(obj_tree, hf_packetcable_terminal_display_info_calling_name,
							tvb, intval, 40, ENC_ASCII);
		intval += 40;
	}

	if (bitmask & PACKETCABLE_MESSAGE_WAITING) {
		proto_tree_add_item(obj_tree, hf_packetcable_terminal_display_info_message_waiting,
							tvb, intval, 40, ENC_ASCII);
	}

	return "";
}


void proto_register_packetcable(void) {

	static hf_register_info hf[] = {
		{ &hf_packetcable_em_header_version_id,
		{ "Event Message Version ID","packetcable_avps.emh.vid",
			FT_UINT16, BASE_DEC, NULL, 0x0,
			"PacketCable Event Message header version ID", HFILL }
		},
		{ &hf_packetcable_bcid_timestamp,
		{ "Timestamp","packetcable_avps.bcid.ts",
			FT_UINT32, BASE_DEC, NULL, 0x0,
			"PacketCable Event Message BCID Timestamp", HFILL }
		},
		{ &hf_packetcable_bcid_event_counter,
		{ "Event Counter","packetcable_avps.bcid.ec",
			FT_UINT32, BASE_DEC, NULL, 0x0,
			"PacketCable Event Message BCID Event Counter", HFILL }
		},
		{ &hf_packetcable_em_header_event_message_type,
		{ "Event Message Type","packetcable_avps.emh.emt",
			FT_UINT16, BASE_DEC, VALS(radius_vendor_packetcable_event_message_vals), 0x0,
			"PacketCable Event Message Type", HFILL }
		},
		{ &hf_packetcable_em_header_element_type,
		{ "Element Type","packetcable_avps.emh.et",
			FT_UINT16, BASE_DEC, VALS(packetcable_em_header_element_type_vals), 0x0,
			"PacketCable Event Message Element Type", HFILL }
		},
		{ &hf_packetcable_em_header_sequence_number,
		{ "Sequence Number","packetcable_avps.emh.sn",
			FT_UINT32, BASE_DEC, NULL, 0x0,
			"PacketCable Event Message Sequence Number", HFILL }
		},
		{ &hf_packetcable_em_header_status,
		{ "Status","packetcable_avps.emh.st",
			FT_UINT32, BASE_HEX, NULL, 0x0,
			"PacketCable Event Message Status", HFILL }
		},
		{ &hf_packetcable_em_header_status_error_indicator,
		{ "Status","packetcable_avps.emh.st.ei",
			FT_UINT32, BASE_HEX, VALS(packetcable_em_header_status_error_indicator_vals),
			PACKETCABLE_EMHS_EI_MASK,
			"PacketCable Event Message Status Error Indicator", HFILL }
		},
		{ &hf_packetcable_em_header_status_event_origin,
		{ "Event Origin","packetcable_avps.emh.st.eo",
			FT_UINT32, BASE_HEX, VALS(packetcable_em_header_status_event_origin_vals),
			PACKETCABLE_EMHS_EO_MASK,
			"PacketCable Event Message Status Event Origin", HFILL }
		},
		{ &hf_packetcable_em_header_status_event_message_proxied,
		{ "Event Message Proxied","packetcable_avps.emh.st.emp",
			FT_UINT32, BASE_HEX, VALS(packetcable_em_header_status_event_message_proxied_vals),
			PACKETCABLE_EMHS_EMP_MASK,
			"PacketCable Event Message Status Event Message Proxied", HFILL }
		},
		{ &hf_packetcable_em_header_priority,
		{ "Priority","packetcable_avps.emh.priority",
			FT_UINT8, BASE_DEC, NULL, 0x0,
			"PacketCable Event Message Priority", HFILL }
		},
		{ &hf_packetcable_em_header_attribute_count,
		{ "Attribute Count","packetcable_avps.emh.ac",
			FT_UINT16, BASE_DEC, NULL, 0x0,
			"PacketCable Event Message Attribute Count", HFILL }
		},
		{ &hf_packetcable_em_header_event_object,
		{ "Event Object","packetcable_avps.emh.eo",
			FT_UINT8, BASE_DEC, NULL, 0x0,
			"PacketCable Event Message Event Object", HFILL }
		},
		{ &hf_packetcable_call_termination_cause_source_document,
		{ "Source Document","packetcable_avps.ctc.sd",
			FT_UINT16, BASE_HEX, VALS(packetcable_call_termination_cause_vals), 0x0,
			"PacketCable Call Termination Cause Source Document", HFILL }
		},
		{ &hf_packetcable_call_termination_cause_code,
		{ "Event Object","packetcable_avps.ctc.cc",
			FT_UINT32, BASE_DEC, NULL, 0x0,
			"PacketCable Call Termination Cause Code", HFILL }
		},
		{ &hf_packetcable_trunk_group_id_trunk_type,
		{ "Trunk Type","packetcable_avps.tgid.tt",
			FT_UINT16, BASE_HEX, VALS(packetcable_trunk_type_vals), 0x0,
			"PacketCable Trunk Group ID Trunk Type", HFILL }
		},
		{ &hf_packetcable_trunk_group_id_trunk_number,
		{ "Event Object","packetcable_avps.tgid.tn",
			FT_UINT32, BASE_DEC, NULL, 0x0,
			"PacketCable Trunk Group ID Trunk Number", HFILL }
		},
		{ &hf_packetcable_qos_status,
		{ "QoS Status","packetcable_avps.qs",
			FT_UINT32, BASE_HEX, NULL, 0x0,
			"PacketCable QoS Descriptor Attribute QoS Status", HFILL }
		},
		{ &hf_packetcable_qos_status_indication,
		{ "Status Indication","packetcable_avps.qs.si",
			FT_UINT32, BASE_DEC, VALS(packetcable_state_indication_vals), PACKETCABLE_QOS_STATE_INDICATION_MASK,
			"PacketCable QoS Descriptor Attribute QoS State Indication", HFILL }
		},
		{ &hf_packetcable_qos_desc_flags_sfst,
		{ "Service Flow Scheduling Type","packetcable_avps.qs.flags.sfst",
			FT_UINT32, BASE_DEC, NULL, PACKETCABLE_SERVICE_FLOW_SCHEDULING_TYPE_MASK,
			"PacketCable QoS Descriptor Attribute Bitmask: Service Flow Scheduling Type", HFILL }
		},
		{ &hf_packetcable_qos_desc_flags_gi,
		{ "Grant Interval","packetcable_avps.qs.flags.gi",
			FT_UINT32, BASE_DEC, NULL, PACKETCABLE_NOMINAL_GRANT_INTERVAL_MASK,
			"PacketCable QoS Descriptor Attribute Bitmask: Grant Interval", HFILL }
		},
		{ &hf_packetcable_qos_desc_flags_tgj,
		{ "Tolerated Grant Jitter","packetcable_avps.qs.flags.tgj",
			FT_UINT32, BASE_DEC, NULL, PACKETCABLE_TOLERATED_GRANT_JITTER_MASK,
			"PacketCable QoS Descriptor Attribute Bitmask: Tolerated Grant Jitter", HFILL }
		},
		{ &hf_packetcable_qos_desc_flags_gpi,
		{ "Grants Per Interval","packetcable_avps.qs.flags.gpi",
			FT_UINT32, BASE_DEC, NULL, PACKETCABLE_GRANTS_PER_INTERVAL_MASK,
			"PacketCable QoS Descriptor Attribute Bitmask: Grants Per Interval", HFILL }
		},
		{ &hf_packetcable_qos_desc_flags_ugs,
		{ "Unsolicited Grant Size","packetcable_avps.qs.flags.ugs",
			FT_UINT32, BASE_DEC, NULL, PACKETCABLE_UNSOLICITED_GRANT_SIZE_MASK,
			"PacketCable QoS Descriptor Attribute Bitmask: Unsolicited Grant Size", HFILL }
		},
		{ &hf_packetcable_qos_desc_flags_tp,
		{ "Traffic Priority","packetcable_avps.qs.flags.tp",
			FT_UINT32, BASE_DEC, NULL, PACKETCABLE_TRAFFIC_PRIORITY_MASK,
			"PacketCable QoS Descriptor Attribute Bitmask: Traffic Priority", HFILL }
		},
		{ &hf_packetcable_qos_desc_flags_msr,
		{ "Maximum Sustained Rate","packetcable_avps.qs.flags.msr",
			FT_UINT32, BASE_DEC, NULL, PACKETCABLE_MAXIMUM_SUSTAINED_RATE_MASK,
			"PacketCable QoS Descriptor Attribute Bitmask: Maximum Sustained Rate", HFILL }
		},
		{ &hf_packetcable_qos_desc_flags_mtb,
		{ "Maximum Traffic Burst","packetcable_avps.qs.flags.mtb",
			FT_UINT32, BASE_DEC, NULL, PACKETCABLE_MAXIMUM_TRAFFIC_BURST_MASK,
			"PacketCable QoS Descriptor Attribute Bitmask: Maximum Traffic Burst", HFILL }
		},
		{ &hf_packetcable_qos_desc_flags_mrtr,
		{ "Minimum Reserved Traffic Rate","packetcable_avps.qs.flags.mrtr",
			FT_UINT32, BASE_DEC, NULL, PACKETCABLE_MINIMUM_RESERVED_TRAFFIC_RATE_MASK,
			"PacketCable QoS Descriptor Attribute Bitmask: Minimum Reserved Traffic Rate", HFILL }
		},
		{ &hf_packetcable_qos_desc_flags_mps,
		{ "Minimum Packet Size","packetcable_avps.qs.flags.mps",
			FT_UINT32, BASE_DEC, NULL, PACKETCABLE_MINIMUM_PACKET_SIZE_MASK,
			"PacketCable QoS Descriptor Attribute Bitmask: Minimum Packet Size", HFILL }
		},
		{ &hf_packetcable_qos_desc_flags_mcb,
		{ "Maximum Concatenated Burst","packetcable_avps.qs.flags.mcb",
			FT_UINT32, BASE_DEC, NULL, PACKETCABLE_MAXIMUM_CONCATENATED_BURST_MASK,
			"PacketCable QoS Descriptor Attribute Bitmask: Maximum Concatenated Burst", HFILL }
		},
		{ &hf_packetcable_qos_desc_flags_srtp,
		{ "Status Request/Transmission Policy","packetcable_avps.qs.flags.srtp",
			FT_UINT32, BASE_DEC, NULL, PACKETCABLE_REQUEST_TRANSMISSION_POLICY_MASK,
			"PacketCable QoS Descriptor Attribute Bitmask: Status Request/Transmission Policy", HFILL }
		},
		{ &hf_packetcable_qos_desc_flags_npi,
		{ "Nominal Polling Interval","packetcable_avps.qs.flags.npi",
			FT_UINT32, BASE_DEC, NULL, PACKETCABLE_NOMINAL_POLLING_INTERVAL_MASK,
			"PacketCable QoS Descriptor Attribute Bitmask: Nominal Polling Interval", HFILL }
		},
		{ &hf_packetcable_qos_desc_flags_tpj,
		{ "Tolerated Poll Jitter","packetcable_avps.qs.flags.tpj",
			FT_UINT32, BASE_DEC, NULL, PACKETCABLE_TOLERATED_POLL_JITTER_MASK,
			"PacketCable QoS Descriptor Attribute Bitmask: Tolerated Poll Jitter", HFILL }
		},
		{ &hf_packetcable_qos_desc_flags_toso,
		{ "Type of Service Override","packetcable_avps.qs.flags.toso",
			FT_UINT32, BASE_DEC, NULL, PACKETCABLE_IP_TYPE_OF_SERVICE_OVERRIDE_MASK,
			"PacketCable QoS Descriptor Attribute Bitmask: Type of Service Override", HFILL }
		},
		{ &hf_packetcable_qos_desc_flags_mdl,
		{ "Maximum Downstream Latency","packetcable_avps.qs.flags.mdl",
			FT_UINT32, BASE_DEC, NULL, PACKETCABLE_MAXIMUM_DOWNSTREAM_LATENCY_MASK,
			"PacketCable QoS Descriptor Attribute Bitmask: Maximum Downstream Latency", HFILL }
		},
		{ &hf_packetcable_qos_desc_fields[0],
		{ "Service Flow Scheduling Type","packetcable_avps.qs.sfst",
			FT_UINT32, BASE_DEC, NULL, 0x0,
			"PacketCable QoS Descriptor Attribute Service Flow Scheduling Type", HFILL }
		},
		{ &hf_packetcable_qos_desc_fields[1],
		{ "Grant Interval","packetcable_avps.qs.gi",
			FT_UINT32, BASE_DEC, NULL, 0x0,
			"PacketCable QoS Descriptor Attribute Grant Interval", HFILL }
		},
		{ &hf_packetcable_qos_desc_fields[2],
		{ "Tolerated Grant Jitter","packetcable_avps.qs.tgj",
			FT_UINT32, BASE_DEC, NULL, 0x0,
			"PacketCable QoS Descriptor Attribute Tolerated Grant Jitter", HFILL }
		},
		{ &hf_packetcable_qos_desc_fields[3],
		{ "Grants Per Interval","packetcable_avps.qs.gpi",
			FT_UINT32, BASE_DEC, NULL, 0x0,
			"PacketCable QoS Descriptor Attribute Grants Per Interval", HFILL }
		},
		{ &hf_packetcable_qos_desc_fields[4],
		{ "Unsolicited Grant Size","packetcable_avps.qs.ugs",
			FT_UINT32, BASE_DEC, NULL, 0x0,
			"PacketCable QoS Descriptor Attribute Unsolicited Grant Size", HFILL }
		},
		{ &hf_packetcable_qos_desc_fields[5],
		{ "Traffic Priority","packetcable_avps.qs.tp",
			FT_UINT32, BASE_DEC, NULL, 0x0,
			"PacketCable QoS Descriptor Attribute Traffic Priority", HFILL }
		},
		{ &hf_packetcable_qos_desc_fields[6],
		{ "Maximum Sustained Rate","packetcable_avps.qs.msr",
			FT_UINT32, BASE_DEC, NULL, 0x0,
			"PacketCable QoS Descriptor Attribute Maximum Sustained Rate", HFILL }
		},
		{ &hf_packetcable_qos_desc_fields[7],
		{ "Maximum Traffic Burst","packetcable_avps.qs.mtb",
			FT_UINT32, BASE_DEC, NULL, 0x0,
			"PacketCable QoS Descriptor Attribute Maximum Traffic Burst", HFILL }
		},
		{ &hf_packetcable_qos_desc_fields[8],
		{ "Minimum Reserved Traffic Rate","packetcable_avps.qs.mrtr",
			FT_UINT32, BASE_DEC, NULL, 0x0,
			"PacketCable QoS Descriptor Attribute Minimum Reserved Traffic Rate", HFILL }
		},
		{ &hf_packetcable_qos_desc_fields[9],
		{ "Minimum Packet Size","packetcable_avps.qs.mps",
			FT_UINT32, BASE_DEC, NULL, 0x0,
			"PacketCable QoS Descriptor Attribute Minimum Packet Size", HFILL }
		},
		{ &hf_packetcable_qos_desc_fields[10],
		{ "Maximum Concatenated Burst","packetcable_avps.qs.mcb",
			FT_UINT32, BASE_DEC, NULL, 0x0,
			"PacketCable QoS Descriptor Attribute Maximum Concatenated Burst", HFILL }
		},
		{ &hf_packetcable_qos_desc_fields[11],
		{ "Status Request/Transmission Policy","packetcable_avps.qs.srtp",
			FT_UINT32, BASE_DEC, NULL, 0x0,
			"PacketCable QoS Descriptor Attribute Status Request/Transmission Policy", HFILL }
		},
		{ &hf_packetcable_qos_desc_fields[12],
		{ "Nominal Polling Interval","packetcable_avps.qs.npi",
			FT_UINT32, BASE_DEC, NULL, 0x0,
			"PacketCable QoS Descriptor Attribute Nominal Polling Interval", HFILL }
		},
		{ &hf_packetcable_qos_desc_fields[13],
		{ "Tolerated Poll Jitter","packetcable_avps.qs.tpj",
			FT_UINT32, BASE_DEC, NULL, 0x0,
			"PacketCable QoS Descriptor Attribute Tolerated Poll Jitter", HFILL }
		},
		{ &hf_packetcable_qos_desc_fields[14],
		{ "Type of Service Override","packetcable_avps.qs.toso",
			FT_UINT32, BASE_DEC, NULL, 0x0,
			"PacketCable QoS Descriptor Attribute Type of Service Override", HFILL }
		},
		{ &hf_packetcable_qos_desc_fields[15],
		{ "Maximum Downstream Latency","packetcable_avps.qs.mdl",
			FT_UINT32, BASE_DEC, NULL, 0x0,
			"PacketCable QoS Descriptor Attribute Maximum Downstream Latency", HFILL }
		},
		{ &hf_packetcable_time_adjustment,
		{ "Time Adjustment","packetcable_avps.ti",
			FT_UINT64, BASE_DEC, NULL, 0x0,
			"PacketCable Time Adjustment", HFILL }
		},
		{ &hf_packetcable_redirected_from_info_number_of_redirections,
		{ "Number-of-Redirections","packetcable_avps.rfi.nr",
			FT_UINT16, BASE_DEC, NULL, 0x0,
			"PacketCable Redirected-From-Info Number-of-Redirections", HFILL }
		},
		{ &hf_packetcable_electronic_surveillance_indication_df_cdc_address,
		{ "DF_CDC_Address","packetcable_avps.esi.dfcdca",
			FT_IPv4, BASE_NONE, NULL, 0x0,
			"PacketCable Electronic-Surveillance-Indication DF_CDC_Address", HFILL }
		},
		{ &hf_packetcable_electronic_surveillance_indication_df_ccc_address,
		{ "DF_CDC_Address","packetcable_avps.esi.dfccca",
			FT_IPv4, BASE_NONE, NULL, 0x0,
			"PacketCable Electronic-Surveillance-Indication DF_CCC_Address", HFILL }
		},
		{ &hf_packetcable_electronic_surveillance_indication_cdc_port,
		{ "CDC-Port","packetcable_avps.esi.cdcp",
			FT_UINT16, BASE_DEC, NULL, 0x0,
			"PacketCable Electronic-Surveillance-Indication CDC-Port", HFILL }
		},
		{ &hf_packetcable_electronic_surveillance_indication_ccc_port,
		{ "CCC-Port","packetcable_avps.esi.cccp",
			FT_UINT16, BASE_DEC, NULL, 0x0,
			"PacketCable Electronic-Surveillance-Indication CCC-Port", HFILL }
		},

		{ &hf_packetcable_terminal_display_info_terminal_display_status_bitmask,
		{ "Terminal_Display_Status_Bitmask","packetcable_avps.tdi.sbm",
			FT_UINT8, BASE_HEX, NULL, 0xff,
			"PacketCable Terminal_Display_Info Terminal_Display_Status_Bitmask", HFILL }
		},
		{ &hf_packetcable_terminal_display_info_sbm_general_display,
		{ "General_Display","packetcable_avps.tdi.sbm.gd",
			FT_BOOLEAN, 8, NULL, 0x01,
			"PacketCable Terminal_Display_Info Terminal_Display_Status_Bitmask General_Display", HFILL }
		},
		{ &hf_packetcable_terminal_display_info_sbm_calling_number,
		{ "Calling_Number","packetcable_avps.tdi.sbm.cnum",
			FT_BOOLEAN, 8, NULL, 0x02,
			"PacketCable Terminal_Display_Info Terminal_Display_Status_Bitmask Calling_Number", HFILL }
		},
		{ &hf_packetcable_terminal_display_info_sbm_calling_name,
		{ "Calling_Name","packetcable_avps.tdi.sbm.cname",
			FT_BOOLEAN, 8, NULL, 0x04,
			"PacketCable Terminal_Display_Info Terminal_Display_Status_Bitmask Calling_Name", HFILL }
		},
		{ &hf_packetcable_terminal_display_info_sbm_message_waiting,
		{ "Message_Waiting","packetcable_avps.tdi.sbm.mw",
			FT_BOOLEAN, 8, NULL, 0x08,
			"PacketCable Terminal_Display_Info Terminal_Display_Status_Bitmask Message_Waiting", HFILL }
		},
		{ &hf_packetcable_terminal_display_info_general_display,
		{ "General_Display","packetcable_avps.tdi.gd",
			FT_STRING, BASE_NONE, NULL, 0,
			"PacketCable Terminal_Display_Info General_Display", HFILL }
		},
		{ &hf_packetcable_terminal_display_info_calling_number,
		{ "Calling_Number","packetcable_avps.tdi.cnum",
			FT_STRING, BASE_NONE, NULL, 0,
			"PacketCable Terminal_Display_Info Calling_Number", HFILL }
		},
		{ &hf_packetcable_terminal_display_info_calling_name,
		{ "Calling_Name","packetcable_avps.tdi.cname",
			FT_STRING, BASE_NONE, NULL, 0,
			"PacketCable Terminal_Display_Info Calling_Name", HFILL }
		},
		{ &hf_packetcable_terminal_display_info_message_waiting,
		{ "Message_Waiting","packetcable_avps.tdi.mw",
			FT_STRING, BASE_NONE, NULL, 0,
			"PacketCable Terminal_Display_Info Message_Waiting", HFILL }
		},
		/* Generated from convert_proto_tree_add_text.pl */
		{ &hf_packetcable_bcid_element_id, { "Element ID", "packetcable_avps.bcid.element_id", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }},
		{ &hf_packetcable_bcid_time_zone_dst, { "Time Zone: DST", "packetcable_avps.bcid.time_zone.dst", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
		{ &hf_packetcable_bcid_time_zone_offset, { "Time Zone: Offset", "packetcable_avps.bcid.time_zone.offset", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }},
		{ &hf_packetcable_em_header_element_id, { "Element ID", "packetcable_avps.emh.element_id", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }},
		{ &hf_packetcable_em_header_time_zone_dst, { "Time Zone: DST", "packetcable_avps.emh.time_zone.dst", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
		{ &hf_packetcable_em_header_time_zone_offset, { "Time Zone: Offset", "packetcable_avps.emh.time_zone.offset", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }},
		{ &hf_packetcable_em_header_event_time, { "Event Time", "packetcable_avps.emh.event_time", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }},
		{ &hf_packetcable_qos_service_class_name, { "Service Class Name", "packetcable_avps.qs.sc_name", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }},
		{ &hf_packetcable_redirected_from_last_redirecting_party, { "Last-Redirecting-Party", "packetcable_avps.rfi.last_redirecting_party", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }},
		{ &hf_packetcable_redirected_from_original_called_party, { "Original-Called-Party", "packetcable_avps.rfi.original_called_party", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }},
		{ &hf_packetcable_electronic_surveillance_indication_df_df_key, { "DF-DF-Key", "packetcable_avps.esi.df_df_key", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
	};

	static int *ett[] = {
		&ett_radius_vendor_packetcable_bcid,
		&ett_radius_vendor_packetcable_status,
		&ett_radius_vendor_packetcable_qos_status,
		&ett_packetcable_term_dsply
	};

	proto_packetcable = proto_register_protocol("PacketCable AVPs", "PACKETCABLE", "packetcable_avps");

	proto_register_field_array(proto_packetcable, hf, array_length(hf));
	proto_register_subtree_array(ett, array_length(ett));
}

void
proto_reg_handoff_packetcable(void)
{

	radius_register_avp_dissector(VENDOR_CABLELABS, 1, dissect_packetcable_em_hdr);
	radius_register_avp_dissector(VENDOR_CABLELABS, 11, dissect_packetcable_call_term_cause);
	radius_register_avp_dissector(VENDOR_CABLELABS, 13, dissect_packetcable_rel_call_billing_correlation);
	radius_register_avp_dissector(VENDOR_CABLELABS, 24, dissect_packetcable_trunk_group_id);
	radius_register_avp_dissector(VENDOR_CABLELABS, 32, dissect_packetcable_qos_descriptor);
	radius_register_avp_dissector(VENDOR_CABLELABS, 38, dissect_packetcable_time_adjustment);
	radius_register_avp_dissector(VENDOR_CABLELABS, 43, dissect_packetcable_redirected_from_info);
	radius_register_avp_dissector(VENDOR_CABLELABS, 44, dissect_packetcable_time_electr_surv_ind);
	radius_register_avp_dissector(VENDOR_CABLELABS, 47, dissect_packetcable_surv_df_sec);
	radius_register_avp_dissector(VENDOR_CABLELABS, 54, dissect_packetcable_term_dsply_info);
/*	radius_register_avp_dissector(VENDOR_CABLELABS, 90, dissect_packetcable_party_info);
	radius_register_avp_dissector(VENDOR_CABLELABS, 91, dissect_packetcable_party_info);
	radius_register_avp_dissector(VENDOR_CABLELABS, 92, dissect_packetcable_party_info); */
}


/*
 * Editor modelines  -  https://www.wireshark.org/tools/modelines.html
 *
 * Local variables:
 * c-basic-offset: 8
 * tab-width: 8
 * indent-tabs-mode: t
 * End:
 *
 * vi: set shiftwidth=8 tabstop=8 noexpandtab:
 * :indentSize=8:tabSize=8:noTabs=false:
 */