2 * packet-radius_packetcable.c
4 * Routines for Packetcable's RADIUS AVPs dissection
8 * Wireshark - Network traffic analyzer
9 * By Gerald Combs <gerald@wireshark.org>
10 * Copyright 1998 Gerald Combs
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, write to the Free Software
24 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
30 * Some of the development of the RADIUS protocol decoder was sponsored by
31 * Cable Television Laboratories, Inc. ("CableLabs") based upon proprietary
32 * CableLabs' specifications. Your license and use of this protocol decoder
33 * does not mean that you are licensed to use the CableLabs'
34 * specifications. If you have questions about this protocol, contact
35 * jf.mule [AT] cablelabs.com or c.stuart [AT] cablelabs.com for additional
43 #include <epan/packet.h>
44 #include <epan/sminmpec.h>
46 #include "packet-radius.h"
50 static int proto_packetcable = -1;
52 static int hf_packetcable_em_header_version_id = -1;
53 static int hf_packetcable_bcid_timestamp = -1;
54 static int hf_packetcable_bcid_event_counter = -1;
55 static int hf_packetcable_em_header_event_message_type = -1;
56 static int hf_packetcable_em_header_element_type = -1;
57 static int hf_packetcable_em_header_sequence_number = -1;
58 static int hf_packetcable_em_header_status = -1;
59 static int hf_packetcable_em_header_status_error_indicator = -1;
60 static int hf_packetcable_em_header_status_event_origin = -1;
61 static int hf_packetcable_em_header_status_event_message_proxied = -1;
62 static int hf_packetcable_em_header_priority = -1;
63 static int hf_packetcable_em_header_attribute_count = -1;
64 static int hf_packetcable_em_header_event_object = -1;
65 static int hf_packetcable_call_termination_cause_source_document = -1;
66 static int hf_packetcable_call_termination_cause_code = -1;
67 static int hf_packetcable_trunk_group_id_trunk_type = -1;
68 static int hf_packetcable_trunk_group_id_trunk_number = -1;
69 static int hf_packetcable_qos_status = -1;
70 static int hf_packetcable_qos_status_indication = -1;
71 static int hf_packetcable_time_adjustment = -1;
72 static int hf_packetcable_redirected_from_info_number_of_redirections = -1;
73 static int hf_packetcable_electronic_surveillance_indication_df_cdc_address = -1;
74 static int hf_packetcable_electronic_surveillance_indication_df_ccc_address = -1;
75 static int hf_packetcable_electronic_surveillance_indication_cdc_port = -1;
76 static int hf_packetcable_electronic_surveillance_indication_ccc_port = -1;
77 static int hf_packetcable_terminal_display_info_terminal_display_status_bitmask = -1;
78 static int hf_packetcable_terminal_display_info_sbm_general_display = -1;
79 static int hf_packetcable_terminal_display_info_sbm_calling_number = -1;
80 static int hf_packetcable_terminal_display_info_sbm_calling_name = -1;
81 static int hf_packetcable_terminal_display_info_sbm_message_waiting = -1;
82 static int hf_packetcable_terminal_display_info_general_display = -1;
83 static int hf_packetcable_terminal_display_info_calling_number = -1;
84 static int hf_packetcable_terminal_display_info_calling_name = -1;
85 static int hf_packetcable_terminal_display_info_message_waiting = -1;
87 /* This is slightly ugly. */
88 static int hf_packetcable_qos_desc_flags[] =
90 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
92 static int hf_packetcable_qos_desc_fields[] =
94 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
98 static gint ett_radius_vendor_packetcable_bcid = -1;
99 static gint ett_radius_vendor_packetcable_status = -1;
100 static gint ett_radius_vendor_packetcable_qos_status = -1;
101 static gint ett_packetcable_term_dsply = -1;
104 #define PACKETCABLE_QOS_STATE_INDICATION_MASK 0X0003
105 #define PACKETCABLE_SERVICE_FLOW_SCHEDULING_TYPE_MASK (1 << 2)
106 #define PACKETCABLE_NOMINAL_GRANT_INTERVAL_MASK (1 << 3)
107 #define PACKETCABLE_TOLERATED_GRANT_JITTER_MASK (1 << 4)
108 #define PACKETCABLE_GRANTS_PER_INTERVAL_MASK (1 << 5)
109 #define PACKETCABLE_UNSOLICITED_GRANT_SIZE_MASK (1 << 6)
110 #define PACKETCABLE_TRAFFIC_PRIORITY_MASK (1 << 7)
111 #define PACKETCABLE_MAXIMUM_SUSTAINED_RATE_MASK (1 << 8)
112 #define PACKETCABLE_MAXIMUM_TRAFFIC_BURST_MASK (1 << 9)
113 #define PACKETCABLE_MINIMUM_RESERVED_TRAFFIC_RATE_MASK (1 << 10)
114 #define PACKETCABLE_MINIMUM_PACKET_SIZE_MASK (1 << 11)
115 #define PACKETCABLE_MAXIMUM_CONCATENATED_BURST_MASK (1 << 12)
116 #define PACKETCABLE_REQUEST_TRANSMISSION_POLICY_MASK (1 << 13)
117 #define PACKETCABLE_NOMINAL_POLLING_INTERVAL_MASK (1 << 14)
118 #define PACKETCABLE_TOLERATED_POLL_JITTER_MASK (1 << 15)
119 #define PACKETCABLE_IP_TYPE_OF_SERVICE_OVERRIDE_MASK (1 << 16)
120 #define PACKETCABLE_MAXIMUM_DOWNSTREAM_LATENCY_MASK (1 << 17)
122 #define PACKETCABLE_QOS_DESC_BITFIELDS 16
124 #define PACKETCABLE_EMHS_EI_MASK 0X0003
125 #define PACKETCABLE_EMHS_EO_MASK 0X0004
126 #define PACKETCABLE_EMHS_EMP_MASK 0X0008
127 #define PACKETCABLE_EMHS_RESERVED_MASK 0Xfff0
130 static guint32 packetcable_qos_desc_mask[] =
132 PACKETCABLE_SERVICE_FLOW_SCHEDULING_TYPE_MASK,
133 PACKETCABLE_NOMINAL_GRANT_INTERVAL_MASK,
134 PACKETCABLE_TOLERATED_GRANT_JITTER_MASK,
135 PACKETCABLE_GRANTS_PER_INTERVAL_MASK,
136 PACKETCABLE_UNSOLICITED_GRANT_SIZE_MASK,
137 PACKETCABLE_TRAFFIC_PRIORITY_MASK,
138 PACKETCABLE_MAXIMUM_SUSTAINED_RATE_MASK,
139 PACKETCABLE_MAXIMUM_TRAFFIC_BURST_MASK,
140 PACKETCABLE_MINIMUM_RESERVED_TRAFFIC_RATE_MASK,
141 PACKETCABLE_MINIMUM_PACKET_SIZE_MASK,
142 PACKETCABLE_MAXIMUM_CONCATENATED_BURST_MASK,
143 PACKETCABLE_REQUEST_TRANSMISSION_POLICY_MASK,
144 PACKETCABLE_NOMINAL_POLLING_INTERVAL_MASK,
145 PACKETCABLE_TOLERATED_POLL_JITTER_MASK,
146 PACKETCABLE_IP_TYPE_OF_SERVICE_OVERRIDE_MASK,
147 PACKETCABLE_MAXIMUM_DOWNSTREAM_LATENCY_MASK
150 static const value_string radius_vendor_packetcable_event_message_vals[] =
153 {1, "Signaling_Start"},
154 {2, "Signaling_Stop"},
155 {3, "Database_Query"},
156 {4, "Intelligent_Peripheral_Usage_Start"},
157 {5, "Intelligent_Peripheral_Usage_Stop"},
158 {6, "Service_Instance"},
161 {9, "Service_Activation"},
162 {10, "Service_Deactivation"},
163 {11, "Media_Report"},
164 {12, "Signal_Instance"},
165 {13, "Interconnect_(Signaling)_Start"},
166 {14, "Interconnect_(Signaling)_Stop"},
168 {16, "Call_Disconnect"},
172 {31, "Policy_Request"},
173 {32, "Policy_Delete"},
174 {33, "Policy_Update"},
178 static const value_string packetcable_em_header_element_type_vals[] =
183 {3, "Media Gateway Controller"},
184 {4, "Policy Server"},
188 static const value_string packetcable_em_header_status_error_indicator_vals[] =
191 {1, "Possible Error"},
197 static const value_string packetcable_em_header_status_event_origin_vals[] =
199 {0, "Trusted Element"},
200 {1, "Untrusted Element"},
204 static const value_string packetcable_em_header_status_event_message_proxied_vals[] =
211 static const value_string packetcable_call_termination_cause_vals[] =
219 static const value_string packetcable_trunk_type_vals[] =
223 {3, "SS7 direct trunk group member"},
224 {4, "SS7 from IC to AT and SS7 from AT to EO"},
226 {6, "SS7 from IC to AT and non-SS7 from AT to EO (terminating only)"},
227 {9, "Signaling type not specified"},
231 static const value_string packetcable_state_indication_vals[] =
233 {0, "Illegal Value"},
234 {1, "Resource Reserved but not Activated"},
235 {2, "Resource Activated"},
236 {3, "Resource Reserved & Activated"},
241 /* Decode a PacketCable BCID. */
242 /* XXX - This should probably be combinde with the equivalent COPS code */
243 static void decode_packetcable_bcid (tvbuff_t *tvb, proto_tree *tree, int offset)
245 guint8 packetcable_buf[64];
247 proto_tree_add_item(tree, hf_packetcable_bcid_timestamp,
248 tvb, offset, 4, FALSE);
249 tvb_memcpy(tvb, packetcable_buf, offset + 4, 8); packetcable_buf[8] = '\0';
250 proto_tree_add_text(tree, tvb, offset + 4, 8,
251 "Element ID: %s", packetcable_buf);
252 tvb_memcpy(tvb, packetcable_buf, offset + 13, 7); packetcable_buf[7] = '\0';
253 proto_tree_add_text(tree, tvb, offset + 12, 8,
254 "Time Zone: DST: %c, Offset: %s", tvb_get_guint8(tvb, offset + 12),
256 proto_tree_add_item(tree, hf_packetcable_bcid_event_counter,
257 tvb, offset + 20, 4, FALSE);
260 static const gchar* dissect_packetcable_em_hdr(proto_tree* tree, tvbuff_t* tvb) {
261 guint8 packetcable_buf[64];
263 proto_tree *obj_tree;
265 proto_tree_add_item(tree, hf_packetcable_em_header_version_id, tvb, 0, 2, FALSE);
266 ti = proto_tree_add_text(tree, tvb, 2, 24, "BCID");
267 obj_tree = proto_item_add_subtree(ti, ett_radius_vendor_packetcable_bcid);
268 decode_packetcable_bcid(tvb, obj_tree, 2);
270 proto_tree_add_item(tree, hf_packetcable_em_header_event_message_type, tvb, 26, 2, FALSE);
271 proto_tree_add_item(tree, hf_packetcable_em_header_element_type, tvb, 28, 2, FALSE);
272 tvb_memcpy(tvb, packetcable_buf, 30, 8); packetcable_buf[8] = '\0';
273 proto_tree_add_text(tree, tvb, 30, 8, "Element ID: %s", packetcable_buf );
274 tvb_memcpy(tvb, packetcable_buf, 39, 7); packetcable_buf[7] = '\0';
275 proto_tree_add_text(tree, tvb, 38, 8, "Time Zone: DST: %c, Offset: %s", tvb_get_guint8(tvb, 38), packetcable_buf);
276 proto_tree_add_item(tree, hf_packetcable_em_header_sequence_number, tvb, 46, 4, FALSE);
277 tvb_memcpy(tvb, packetcable_buf, 50, 18); packetcable_buf[18] = '\0';
278 proto_tree_add_text(tree, tvb, 50, 18, "Event Time: %s", packetcable_buf);
280 ti = proto_tree_add_item(tree, hf_packetcable_em_header_status, tvb, 68, 4, FALSE);
281 obj_tree = proto_item_add_subtree(ti, ett_radius_vendor_packetcable_status);
282 proto_tree_add_item(obj_tree, hf_packetcable_em_header_status_error_indicator, tvb, 68, 4, FALSE);
283 proto_tree_add_item(obj_tree, hf_packetcable_em_header_status_event_origin, tvb, 68, 4, FALSE);
284 proto_tree_add_item(obj_tree, hf_packetcable_em_header_status_event_message_proxied, tvb, 68, 4, FALSE);
286 proto_tree_add_item(tree, hf_packetcable_em_header_priority, tvb, 72, 1, FALSE);
287 proto_tree_add_item(tree, hf_packetcable_em_header_attribute_count, tvb, 73, 2, FALSE);
288 proto_tree_add_item(tree, hf_packetcable_em_header_event_object, tvb, 75, 1, FALSE);
292 static const gchar* dissect_packetcable_call_term_cause(proto_tree* tree, tvbuff_t* tvb) {
293 proto_tree_add_item(tree, hf_packetcable_call_termination_cause_source_document,
295 proto_tree_add_item(tree, hf_packetcable_call_termination_cause_code,
301 static const gchar* dissect_packetcable_rel_call_billing_correlation(proto_tree* tree, tvbuff_t* tvb) {
302 decode_packetcable_bcid(tvb, tree, 0);
306 static const gchar* dissect_packetcable_trunk_group_id(proto_tree* tree, tvbuff_t* tvb) {
307 proto_tree_add_item(tree, hf_packetcable_trunk_group_id_trunk_type,
309 proto_tree_add_item(tree, hf_packetcable_trunk_group_id_trunk_number,
314 static const gchar* dissect_packetcable_qos_descriptor(proto_tree* tree, tvbuff_t* tvb) {
315 guint8 packetcable_buf[64];
317 guint32 packetcable_qos_flags = tvb_get_ntohl(tvb, 0);
318 proto_item* ti = proto_tree_add_item(tree, hf_packetcable_qos_status, tvb, 0, 4, FALSE);
319 proto_tree* obj_tree = proto_item_add_subtree(ti, ett_radius_vendor_packetcable_qos_status);
321 guint packetcable_qos_off = 20;
323 proto_tree_add_item(obj_tree, hf_packetcable_qos_status_indication, tvb, 0, 4, FALSE);
325 for (intval = 0; intval < PACKETCABLE_QOS_DESC_BITFIELDS; intval++) {
326 proto_tree_add_item(obj_tree, hf_packetcable_qos_desc_flags[intval], tvb, 0, 4, FALSE);
329 tvb_memcpy(tvb, packetcable_buf, 4, 16);
330 packetcable_buf[16] = '\0';
332 proto_tree_add_text(tree, tvb, 4, 16, "Service Class Name: %s", packetcable_buf);
334 for (intval = 0; intval < PACKETCABLE_QOS_DESC_BITFIELDS; intval++) {
335 if (packetcable_qos_flags & packetcable_qos_desc_mask[intval]) {
336 proto_tree_add_item(tree, hf_packetcable_qos_desc_fields[intval],
337 tvb, packetcable_qos_off, 4, FALSE);
338 packetcable_qos_off += 4;
345 static const gchar* dissect_packetcable_time_adjustment(proto_tree* tree, tvbuff_t* tvb) {
346 proto_tree_add_item(tree, hf_packetcable_time_adjustment, tvb, 0, 8, FALSE);
351 static const gchar* dissect_packetcable_redirected_from_info(proto_tree* tree, tvbuff_t* tvb) {
352 guint8 packetcable_buf[64];
354 tvb_memcpy(tvb, packetcable_buf, 0, 20); packetcable_buf[20] = '\0';
355 proto_tree_add_text(tree, tvb, 0, 20,
356 "Last-Redirecting-Party: %s", packetcable_buf);
358 tvb_memcpy(tvb, packetcable_buf, 20, 20); packetcable_buf[20] = '\0';
359 proto_tree_add_text(tree, tvb, 20, 20,
360 "Original-Called-Party: %s", packetcable_buf);
362 proto_tree_add_item(tree, hf_packetcable_redirected_from_info_number_of_redirections,
368 static const gchar* dissect_packetcable_time_electr_surv_ind(proto_tree* tree, tvbuff_t* tvb) {
370 if (tvb_length(tvb) == 0)
373 proto_tree_add_item(tree, hf_packetcable_electronic_surveillance_indication_df_cdc_address,
375 proto_tree_add_item(tree, hf_packetcable_electronic_surveillance_indication_df_ccc_address,
377 proto_tree_add_item(tree, hf_packetcable_electronic_surveillance_indication_cdc_port,
379 proto_tree_add_item(tree, hf_packetcable_electronic_surveillance_indication_ccc_port,
381 proto_tree_add_text(tree, tvb, 12, tvb_length(tvb) - 12, "DF-DF-Key");
386 static const gchar* dissect_packetcable_surv_df_sec(proto_tree* tree _U_, tvbuff_t* tvb _U_) {
390 #define PACKETCABLE_GENERAL_DISPLAY (1 << 0)
391 #define PACKETCABLE_CALLING_NUMBER (1 << 1)
392 #define PACKETCABLE_CALLING_NAME (1 << 2)
393 #define PACKETCABLE_MESSAGE_WAITING (1 << 3)
395 static const gchar* dissect_packetcable_term_dsply_info(proto_tree* tree, tvbuff_t* tvb) {
396 guint8 bitmask = tvb_get_guint8(tvb, 2);
398 proto_item* ti = proto_tree_add_item(tree, hf_packetcable_terminal_display_info_terminal_display_status_bitmask,
400 proto_tree* obj_tree = proto_item_add_subtree(ti, ett_packetcable_term_dsply);
402 proto_tree_add_item(obj_tree, hf_packetcable_terminal_display_info_sbm_general_display,
404 proto_tree_add_item(obj_tree, hf_packetcable_terminal_display_info_sbm_calling_number,
406 proto_tree_add_item(obj_tree, hf_packetcable_terminal_display_info_sbm_calling_name,
408 proto_tree_add_item(obj_tree, hf_packetcable_terminal_display_info_sbm_message_waiting,
411 if (bitmask & PACKETCABLE_GENERAL_DISPLAY) {
412 proto_tree_add_item(obj_tree, hf_packetcable_terminal_display_info_general_display,
413 tvb, intval, 80, FALSE);
417 if (bitmask & PACKETCABLE_CALLING_NUMBER) {
418 proto_tree_add_item(obj_tree, hf_packetcable_terminal_display_info_calling_number,
419 tvb, intval, 40, FALSE);
423 if (bitmask & PACKETCABLE_CALLING_NAME) {
424 proto_tree_add_item(obj_tree, hf_packetcable_terminal_display_info_calling_name,
425 tvb, intval, 40, FALSE);
429 if (bitmask & PACKETCABLE_MESSAGE_WAITING) {
430 proto_tree_add_item(obj_tree, hf_packetcable_terminal_display_info_message_waiting,
431 tvb, intval, 40, FALSE);
439 void proto_register_packetcable(void) {
441 static hf_register_info hf[] = {
442 { &hf_packetcable_em_header_version_id,
443 { "Event Message Version ID","radius.vendor.pkt.emh.vid",
444 FT_UINT16, BASE_DEC, NULL, 0x0,
445 "PacketCable Event Message header version ID", HFILL }
447 { &hf_packetcable_bcid_timestamp,
448 { "Timestamp","radius.vendor.pkt.bcid.ts",
449 FT_UINT32, BASE_DEC, NULL, 0x0,
450 "PacketCable Event Message BCID Timestamp", HFILL }
452 { &hf_packetcable_bcid_event_counter,
453 { "Event Counter","radius.vendor.pkt.bcid.ec",
454 FT_UINT32, BASE_DEC, NULL, 0x0,
455 "PacketCable Event Message BCID Event Counter", HFILL }
457 { &hf_packetcable_em_header_event_message_type,
458 { "Event Message Type","radius.vendor.pkt.emh.emt",
459 FT_UINT16, BASE_DEC, radius_vendor_packetcable_event_message_vals, 0x0,
460 "PacketCable Event Message Type", HFILL }
462 { &hf_packetcable_em_header_element_type,
463 { "Element Type","radius.vendor.pkt.emh.et",
464 FT_UINT16, BASE_DEC, packetcable_em_header_element_type_vals, 0x0,
465 "PacketCable Event Message Element Type", HFILL }
467 { &hf_packetcable_em_header_sequence_number,
468 { "Sequence Number","radius.vendor.pkt.emh.sn",
469 FT_UINT32, BASE_DEC, NULL, 0x0,
470 "PacketCable Event Message Sequence Number", HFILL }
472 { &hf_packetcable_em_header_status,
473 { "Status","radius.vendor.pkt.emh.st",
474 FT_UINT32, BASE_HEX, NULL, 0x0,
475 "PacketCable Event Message Status", HFILL }
477 { &hf_packetcable_em_header_status_error_indicator,
478 { "Status","radius.vendor.pkt.emh.st.ei",
479 FT_UINT32, BASE_HEX, packetcable_em_header_status_error_indicator_vals,
480 PACKETCABLE_EMHS_EI_MASK,
481 "PacketCable Event Message Status Error Indicator", HFILL }
483 { &hf_packetcable_em_header_status_event_origin,
484 { "Event Origin","radius.vendor.pkt.emh.st.eo",
485 FT_UINT32, BASE_HEX, packetcable_em_header_status_event_origin_vals,
486 PACKETCABLE_EMHS_EO_MASK,
487 "PacketCable Event Message Status Event Origin", HFILL }
489 { &hf_packetcable_em_header_status_event_message_proxied,
490 { "Event Message Proxied","radius.vendor.pkt.emh.st.emp",
491 FT_UINT32, BASE_HEX, packetcable_em_header_status_event_message_proxied_vals,
492 PACKETCABLE_EMHS_EMP_MASK,
493 "PacketCable Event Message Status Event Message Proxied", HFILL }
495 { &hf_packetcable_em_header_priority,
496 { "Priority","radius.vendor.pkt.emh.priority",
497 FT_UINT8, BASE_DEC, NULL, 0x0,
498 "PacketCable Event Message Priority", HFILL }
500 { &hf_packetcable_em_header_attribute_count,
501 { "Attribute Count","radius.vendor.pkt.emh.ac",
502 FT_UINT16, BASE_DEC, NULL, 0x0,
503 "PacketCable Event Message Attribute Count", HFILL }
505 { &hf_packetcable_em_header_event_object,
506 { "Event Object","radius.vendor.pkt.emh.eo",
507 FT_UINT8, BASE_DEC, NULL, 0x0,
508 "PacketCable Event Message Event Object", HFILL }
510 { &hf_packetcable_call_termination_cause_source_document,
511 { "Source Document","radius.vendor.pkt.ctc.sd",
512 FT_UINT16, BASE_HEX, packetcable_call_termination_cause_vals, 0x0,
513 "PacketCable Call Termination Cause Source Document", HFILL }
515 { &hf_packetcable_call_termination_cause_code,
516 { "Event Object","radius.vendor.pkt.ctc.cc",
517 FT_UINT32, BASE_DEC, NULL, 0x0,
518 "PacketCable Call Termination Cause Code", HFILL }
520 { &hf_packetcable_trunk_group_id_trunk_type,
521 { "Trunk Type","radius.vendor.pkt.tgid.tt",
522 FT_UINT16, BASE_HEX, packetcable_trunk_type_vals, 0x0,
523 "PacketCable Trunk Group ID Trunk Type", HFILL }
525 { &hf_packetcable_trunk_group_id_trunk_number,
526 { "Event Object","radius.vendor.pkt.tgid.tn",
527 FT_UINT32, BASE_DEC, NULL, 0x0,
528 "PacketCable Trunk Group ID Trunk Number", HFILL }
530 { &hf_packetcable_qos_status,
531 { "QoS Status","radius.vendor.pkt.qs",
532 FT_UINT32, BASE_HEX, NULL, 0x0,
533 "PacketCable QoS Descriptor Attribute QoS Status", HFILL }
535 { &hf_packetcable_qos_status_indication,
536 { "Status Indication","radius.vendor.pkt.qs.si",
537 FT_UINT32, BASE_DEC, packetcable_state_indication_vals, PACKETCABLE_QOS_STATE_INDICATION_MASK,
538 "PacketCable QoS Descriptor Attribute QoS State Indication", HFILL }
540 { &hf_packetcable_qos_desc_flags[0],
541 { "Service Flow Scheduling Type","radius.vendor.pkt.qs.flags.sfst",
542 FT_UINT32, BASE_DEC, NULL, PACKETCABLE_SERVICE_FLOW_SCHEDULING_TYPE_MASK,
543 "PacketCable QoS Descriptor Attribute Bitmask: Service Flow Scheduling Type", HFILL }
545 { &hf_packetcable_qos_desc_flags[1],
546 { "Grant Interval","radius.vendor.pkt.qs.flags.gi",
547 FT_UINT32, BASE_DEC, NULL, PACKETCABLE_NOMINAL_GRANT_INTERVAL_MASK,
548 "PacketCable QoS Descriptor Attribute Bitmask: Grant Interval", HFILL }
550 { &hf_packetcable_qos_desc_flags[2],
551 { "Tolerated Grant Jitter","radius.vendor.pkt.qs.flags.tgj",
552 FT_UINT32, BASE_DEC, NULL, PACKETCABLE_TOLERATED_GRANT_JITTER_MASK,
553 "PacketCable QoS Descriptor Attribute Bitmask: Tolerated Grant Jitter", HFILL }
555 { &hf_packetcable_qos_desc_flags[3],
556 { "Grants Per Interval","radius.vendor.pkt.qs.flags.gpi",
557 FT_UINT32, BASE_DEC, NULL, PACKETCABLE_GRANTS_PER_INTERVAL_MASK,
558 "PacketCable QoS Descriptor Attribute Bitmask: Grants Per Interval", HFILL }
560 { &hf_packetcable_qos_desc_flags[4],
561 { "Unsolicited Grant Size","radius.vendor.pkt.qs.flags.ugs",
562 FT_UINT32, BASE_DEC, NULL, PACKETCABLE_UNSOLICITED_GRANT_SIZE_MASK,
563 "PacketCable QoS Descriptor Attribute Bitmask: Unsolicited Grant Size", HFILL }
565 { &hf_packetcable_qos_desc_flags[5],
566 { "Traffic Priority","radius.vendor.pkt.qs.flags.tp",
567 FT_UINT32, BASE_DEC, NULL, PACKETCABLE_TRAFFIC_PRIORITY_MASK,
568 "PacketCable QoS Descriptor Attribute Bitmask: Traffic Priority", HFILL }
570 { &hf_packetcable_qos_desc_flags[6],
571 { "Maximum Sustained Rate","radius.vendor.pkt.qs.flags.msr",
572 FT_UINT32, BASE_DEC, NULL, PACKETCABLE_MAXIMUM_SUSTAINED_RATE_MASK,
573 "PacketCable QoS Descriptor Attribute Bitmask: Maximum Sustained Rate", HFILL }
575 { &hf_packetcable_qos_desc_flags[7],
576 { "Maximum Traffic Burst","radius.vendor.pkt.qs.flags.mtb",
577 FT_UINT32, BASE_DEC, NULL, PACKETCABLE_MAXIMUM_TRAFFIC_BURST_MASK,
578 "PacketCable QoS Descriptor Attribute Bitmask: Maximum Traffic Burst", HFILL }
580 { &hf_packetcable_qos_desc_flags[8],
581 { "Minimum Reserved Traffic Rate","radius.vendor.pkt.qs.flags.mrtr",
582 FT_UINT32, BASE_DEC, NULL, PACKETCABLE_MINIMUM_RESERVED_TRAFFIC_RATE_MASK,
583 "PacketCable QoS Descriptor Attribute Bitmask: Minimum Reserved Traffic Rate", HFILL }
585 { &hf_packetcable_qos_desc_flags[9],
586 { "Minimum Packet Size","radius.vendor.pkt.qs.flags.mps",
587 FT_UINT32, BASE_DEC, NULL, PACKETCABLE_MINIMUM_PACKET_SIZE_MASK,
588 "PacketCable QoS Descriptor Attribute Bitmask: Minimum Packet Size", HFILL }
590 { &hf_packetcable_qos_desc_flags[10],
591 { "Maximum Concatenated Burst","radius.vendor.pkt.qs.flags.mcb",
592 FT_UINT32, BASE_DEC, NULL, PACKETCABLE_MAXIMUM_CONCATENATED_BURST_MASK,
593 "PacketCable QoS Descriptor Attribute Bitmask: Maximum Concatenated Burst", HFILL }
595 { &hf_packetcable_qos_desc_flags[11],
596 { "Status Request/Transmission Policy","radius.vendor.pkt.qs.flags.srtp",
597 FT_UINT32, BASE_DEC, NULL, PACKETCABLE_REQUEST_TRANSMISSION_POLICY_MASK,
598 "PacketCable QoS Descriptor Attribute Bitmask: Status Request/Transmission Policy", HFILL }
600 { &hf_packetcable_qos_desc_flags[12],
601 { "Nominal Polling Interval","radius.vendor.pkt.qs.flags.npi",
602 FT_UINT32, BASE_DEC, NULL, PACKETCABLE_NOMINAL_POLLING_INTERVAL_MASK,
603 "PacketCable QoS Descriptor Attribute Bitmask: Nominal Polling Interval", HFILL }
605 { &hf_packetcable_qos_desc_flags[13],
606 { "Tolerated Poll Jitter","radius.vendor.pkt.qs.flags.tpj",
607 FT_UINT32, BASE_DEC, NULL, PACKETCABLE_TOLERATED_POLL_JITTER_MASK,
608 "PacketCable QoS Descriptor Attribute Bitmask: Tolerated Poll Jitter", HFILL }
610 { &hf_packetcable_qos_desc_flags[14],
611 { "Type of Service Override","radius.vendor.pkt.qs.flags.toso",
612 FT_UINT32, BASE_DEC, NULL, PACKETCABLE_IP_TYPE_OF_SERVICE_OVERRIDE_MASK,
613 "PacketCable QoS Descriptor Attribute Bitmask: Type of Service Override", HFILL }
615 { &hf_packetcable_qos_desc_flags[15],
616 { "Maximum Downstream Latency","radius.vendor.pkt.qs.flags.mdl",
617 FT_UINT32, BASE_DEC, NULL, PACKETCABLE_MAXIMUM_DOWNSTREAM_LATENCY_MASK,
618 "PacketCable QoS Descriptor Attribute Bitmask: Maximum Downstream Latency", HFILL }
620 { &hf_packetcable_qos_desc_fields[0],
621 { "Service Flow Scheduling Type","radius.vendor.pkt.qs.sfst",
622 FT_UINT32, BASE_DEC, NULL, 0x0,
623 "PacketCable QoS Descriptor Attribute Service Flow Scheduling Type", HFILL }
625 { &hf_packetcable_qos_desc_fields[1],
626 { "Grant Interval","radius.vendor.pkt.qs.gi",
627 FT_UINT32, BASE_DEC, NULL, 0x0,
628 "PacketCable QoS Descriptor Attribute Grant Interval", HFILL }
630 { &hf_packetcable_qos_desc_fields[2],
631 { "Tolerated Grant Jitter","radius.vendor.pkt.qs.tgj",
632 FT_UINT32, BASE_DEC, NULL, 0x0,
633 "PacketCable QoS Descriptor Attribute Tolerated Grant Jitter", HFILL }
635 { &hf_packetcable_qos_desc_fields[3],
636 { "Grants Per Interval","radius.vendor.pkt.qs.gpi",
637 FT_UINT32, BASE_DEC, NULL, 0x0,
638 "PacketCable QoS Descriptor Attribute Grants Per Interval", HFILL }
640 { &hf_packetcable_qos_desc_fields[4],
641 { "Unsolicited Grant Size","radius.vendor.pkt.qs.ugs",
642 FT_UINT32, BASE_DEC, NULL, 0x0,
643 "PacketCable QoS Descriptor Attribute Unsolicited Grant Size", HFILL }
645 { &hf_packetcable_qos_desc_fields[5],
646 { "Traffic Priority","radius.vendor.pkt.qs.tp",
647 FT_UINT32, BASE_DEC, NULL, 0x0,
648 "PacketCable QoS Descriptor Attribute Traffic Priority", HFILL }
650 { &hf_packetcable_qos_desc_fields[6],
651 { "Maximum Sustained Rate","radius.vendor.pkt.qs.msr",
652 FT_UINT32, BASE_DEC, NULL, 0x0,
653 "PacketCable QoS Descriptor Attribute Maximum Sustained Rate", HFILL }
655 { &hf_packetcable_qos_desc_fields[7],
656 { "Maximum Traffic Burst","radius.vendor.pkt.qs.mtb",
657 FT_UINT32, BASE_DEC, NULL, 0x0,
658 "PacketCable QoS Descriptor Attribute Maximum Traffic Burst", HFILL }
660 { &hf_packetcable_qos_desc_fields[8],
661 { "Minimum Reserved Traffic Rate","radius.vendor.pkt.qs.mrtr",
662 FT_UINT32, BASE_DEC, NULL, 0x0,
663 "PacketCable QoS Descriptor Attribute Minimum Reserved Traffic Rate", HFILL }
665 { &hf_packetcable_qos_desc_fields[9],
666 { "Minimum Packet Size","radius.vendor.pkt.qs.mps",
667 FT_UINT32, BASE_DEC, NULL, 0x0,
668 "PacketCable QoS Descriptor Attribute Minimum Packet Size", HFILL }
670 { &hf_packetcable_qos_desc_fields[10],
671 { "Maximum Concatenated Burst","radius.vendor.pkt.qs.mcb",
672 FT_UINT32, BASE_DEC, NULL, 0x0,
673 "PacketCable QoS Descriptor Attribute Maximum Concatenated Burst", HFILL }
675 { &hf_packetcable_qos_desc_fields[11],
676 { "Status Request/Transmission Policy","radius.vendor.pkt.qs.srtp",
677 FT_UINT32, BASE_DEC, NULL, 0x0,
678 "PacketCable QoS Descriptor Attribute Status Request/Transmission Policy", HFILL }
680 { &hf_packetcable_qos_desc_fields[12],
681 { "Nominal Polling Interval","radius.vendor.pkt.qs.npi",
682 FT_UINT32, BASE_DEC, NULL, 0x0,
683 "PacketCable QoS Descriptor Attribute Nominal Polling Interval", HFILL }
685 { &hf_packetcable_qos_desc_fields[13],
686 { "Tolerated Poll Jitter","radius.vendor.pkt.qs.tpj",
687 FT_UINT32, BASE_DEC, NULL, 0x0,
688 "PacketCable QoS Descriptor Attribute Tolerated Poll Jitter", HFILL }
690 { &hf_packetcable_qos_desc_fields[14],
691 { "Type of Service Override","radius.vendor.pkt.qs.toso",
692 FT_UINT32, BASE_DEC, NULL, 0x0,
693 "PacketCable QoS Descriptor Attribute Type of Service Override", HFILL }
695 { &hf_packetcable_qos_desc_fields[15],
696 { "Maximum Downstream Latency","radius.vendor.pkt.qs.mdl",
697 FT_UINT32, BASE_DEC, NULL, 0x0,
698 "PacketCable QoS Descriptor Attribute Maximum Downstream Latency", HFILL }
700 { &hf_packetcable_time_adjustment,
701 { "Time Adjustment","radius.vendor.pkt.ti",
702 FT_UINT64, BASE_DEC, NULL, 0x0,
703 "PacketCable Time Adjustment", HFILL }
705 { &hf_packetcable_redirected_from_info_number_of_redirections,
706 { "Number-of-Redirections","radius.vendor.pkt.rfi.nr",
707 FT_UINT16, BASE_DEC, NULL, 0x0,
708 "PacketCable Redirected-From-Info Number-of-Redirections", HFILL }
710 { &hf_packetcable_electronic_surveillance_indication_df_cdc_address,
711 { "DF_CDC_Address","radius.vendor.pkt.esi.dfcdca",
712 FT_IPv4, BASE_DEC, NULL, 0x0,
713 "PacketCable Electronic-Surveillance-Indication DF_CDC_Address", HFILL }
715 { &hf_packetcable_electronic_surveillance_indication_df_ccc_address,
716 { "DF_CDC_Address","radius.vendor.pkt.esi.dfccca",
717 FT_IPv4, BASE_DEC, NULL, 0x0,
718 "PacketCable Electronic-Surveillance-Indication DF_CCC_Address", HFILL }
720 { &hf_packetcable_electronic_surveillance_indication_cdc_port,
721 { "CDC-Port","radius.vendor.pkt.esi.cdcp",
722 FT_UINT16, BASE_DEC, NULL, 0x0,
723 "PacketCable Electronic-Surveillance-Indication CDC-Port", HFILL }
725 { &hf_packetcable_electronic_surveillance_indication_ccc_port,
726 { "CCC-Port","radius.vendor.pkt.esi.cccp",
727 FT_UINT16, BASE_DEC, NULL, 0x0,
728 "PacketCable Electronic-Surveillance-Indication CCC-Port", HFILL }
731 { &hf_packetcable_terminal_display_info_terminal_display_status_bitmask,
732 { "Terminal_Display_Status_Bitmask","radius.vendor.pkt.tdi.sbm",
733 FT_UINT8, BASE_HEX, NULL, 0xff,
734 "PacketCable Terminal_Display_Info Terminal_Display_Status_Bitmask", HFILL }
736 { &hf_packetcable_terminal_display_info_sbm_general_display,
737 { "General_Display","radius.vendor.pkt.tdi.sbm.gd",
738 FT_BOOLEAN, 8, NULL, 0x01,
739 "PacketCable Terminal_Display_Info Terminal_Display_Status_Bitmask General_Display", HFILL }
741 { &hf_packetcable_terminal_display_info_sbm_calling_number,
742 { "Calling_Number","radius.vendor.pkt.tdi.sbm.cnum",
743 FT_BOOLEAN, 8, NULL, 0x02,
744 "PacketCable Terminal_Display_Info Terminal_Display_Status_Bitmask Calling_Number", HFILL }
746 { &hf_packetcable_terminal_display_info_sbm_calling_name,
747 { "Calling_Name","radius.vendor.pkt.tdi.sbm.cname",
748 FT_BOOLEAN, 8, NULL, 0x04,
749 "PacketCable Terminal_Display_Info Terminal_Display_Status_Bitmask Calling_Name", HFILL }
751 { &hf_packetcable_terminal_display_info_sbm_message_waiting,
752 { "Message_Waiting","radius.vendor.pkt.tdi.sbm.mw",
753 FT_BOOLEAN, 8, NULL, 0x08,
754 "PacketCable Terminal_Display_Info Terminal_Display_Status_Bitmask Message_Waiting", HFILL }
756 { &hf_packetcable_terminal_display_info_general_display,
757 { "General_Display","radius.vendor.pkt.tdi.gd",
758 FT_STRING, BASE_NONE, NULL, 0,
759 "PacketCable Terminal_Display_Info General_Display", HFILL }
761 { &hf_packetcable_terminal_display_info_calling_number,
762 { "Calling_Number","radius.vendor.pkt.tdi.cnum",
763 FT_STRING, BASE_NONE, NULL, 0,
764 "PacketCable Terminal_Display_Info Calling_Number", HFILL }
766 { &hf_packetcable_terminal_display_info_calling_name,
767 { "Calling_Name","radius.vendor.pkt.tdi.cname",
768 FT_STRING, BASE_NONE, NULL, 0,
769 "PacketCable Terminal_Display_Info Calling_Name", HFILL }
771 { &hf_packetcable_terminal_display_info_message_waiting,
772 { "Message_Waiting","radius.vendor.pkt.tdi.mw",
773 FT_STRING, BASE_NONE, NULL, 0,
774 "PacketCable Terminal_Display_Info Message_Waiting", HFILL }
778 static gint *ett[] = {
779 &ett_radius_vendor_packetcable_bcid,
780 &ett_radius_vendor_packetcable_status,
781 &ett_radius_vendor_packetcable_qos_status,
782 &ett_packetcable_term_dsply
785 proto_packetcable = proto_register_protocol("PacketCable AVPs", "PACKETCABLE", "paketcable_avps");
787 proto_register_field_array(proto_packetcable, hf, array_length(hf));
788 proto_register_subtree_array(ett, array_length(ett));
792 proto_reg_handoff_packetcable(void)
795 radius_register_avp_dissector(VENDOR_CABLELABS, 1, dissect_packetcable_em_hdr);
796 radius_register_avp_dissector(VENDOR_CABLELABS, 11, dissect_packetcable_call_term_cause);
797 radius_register_avp_dissector(VENDOR_CABLELABS, 13, dissect_packetcable_rel_call_billing_correlation);
798 radius_register_avp_dissector(VENDOR_CABLELABS, 24, dissect_packetcable_trunk_group_id);
799 radius_register_avp_dissector(VENDOR_CABLELABS, 32, dissect_packetcable_qos_descriptor);
800 radius_register_avp_dissector(VENDOR_CABLELABS, 38, dissect_packetcable_time_adjustment);
801 radius_register_avp_dissector(VENDOR_CABLELABS, 43, dissect_packetcable_redirected_from_info);
802 radius_register_avp_dissector(VENDOR_CABLELABS, 44, dissect_packetcable_time_electr_surv_ind);
803 radius_register_avp_dissector(VENDOR_CABLELABS, 47, dissect_packetcable_surv_df_sec);
804 radius_register_avp_dissector(VENDOR_CABLELABS, 54, dissect_packetcable_term_dsply_info);
805 /* radius_register_avp_dissector(VENDOR_CABLELABS, 90, dissect_packetcable_party_info);
806 radius_register_avp_dissector(VENDOR_CABLELABS, 91, dissect_packetcable_party_info);
807 radius_register_avp_dissector(VENDOR_CABLELABS, 92, dissect_packetcable_party_info); */