2 * Routines for the COPS (Common Open Policy Service) protocol dissection
4 * RFC 2748 The COPS (Common Open Policy Service) Protocol
5 * RFC 3084 COPS Usage for Policy Provisioning (COPS-PR)
6 * RFC 3159 Structure of Policy Provisioning Information (SPPI)
8 * Copyright 2000, Heikki Vatiainen <hessu@cs.tut.fi>
10 * Added request/response tracking in July 2013 by Simon Zhong <szhong@juniper.net>
12 * Added PacketCable D-QoS specifications by Dick Gooris <gooris@lucent.com>
14 * Taken from PacketCable specifications :
15 * PacketCable Dynamic Quality-of-Service Specification
16 * Based on PKT-SP-DQOS-I09-040402 (April 2, 2004)
18 * PacketCable Multimedia Specification
19 * Based on PKT-SP-MM-I04-080522 and PKT-SP-MM-I05-091029
23 * Implemented in wireshark at April 7-8, 2004
25 * Wireshark - Network traffic analyzer
26 * By Gerald Combs <gerald@wireshark.org>
27 * Copyright 1998 Gerald Combs
29 * SPDX-License-Identifier: GPL-2.0-or-later
33 * Some of the development of the COPS protocol decoder was sponsored by
34 * Cable Television Laboratories, Inc. ("CableLabs") based upon proprietary
35 * CableLabs' specifications. Your license and use of this protocol decoder
36 * does not mean that you are licensed to use the CableLabs'
37 * specifications. If you have questions about this protocol, contact
38 * jf.mule [AT] cablelabs.com or c.stuart [AT] cablelabs.com for additional
45 #include <epan/packet.h>
46 #include "packet-tcp.h"
48 #include <epan/oids.h>
49 #include <epan/expert.h>
52 #include <wsutil/str_util.h>
54 #include "packet-ber.h"
56 /* XXX - The "plain" COPS port (3288) can be overridden in the prefs.
57 The PacketCable port cannot - should this be the case? */
58 #define TCP_PORT_COPS 3288
59 #define TCP_PORT_PKTCABLE_COPS 2126
60 #define TCP_PORT_PKTCABLE_MM_COPS 3918
62 void proto_register_cops(void);
64 /* Preference: desegmentation of COPS */
65 static bool cops_desegment
= true;
67 #define COPS_OBJECT_HDR_SIZE 4
69 static const value_string cops_flags_vals
[] = {
71 { 0x01, "Solicited Message Flag Bit" },
75 /* The different COPS message types */
77 COPS_NO_MSG
, /* Not a COPS Message type */
79 COPS_MSG_REQ
, /* Request (REQ) */
80 COPS_MSG_DEC
, /* Decision (DEC) */
81 COPS_MSG_RPT
, /* Report State (RPT) */
82 COPS_MSG_DRQ
, /* Delete Request State (DRQ) */
83 COPS_MSG_SSQ
, /* Synchronize State Req (SSQ) */
84 COPS_MSG_OPN
, /* Client-Open (OPN) */
85 COPS_MSG_CAT
, /* Client-Accept (CAT) */
86 COPS_MSG_CC
, /* Client-Close (CC) */
87 COPS_MSG_KA
, /* Keep-Alive (KA) */
88 COPS_MSG_SSC
, /* Synchronize Complete (SSC) */
90 COPS_LAST_OP_CODE
/* For error checking */
93 static const value_string cops_op_code_vals
[] = {
94 { COPS_MSG_REQ
, "Request (REQ)" },
95 { COPS_MSG_DEC
, "Decision (DEC)" },
96 { COPS_MSG_RPT
, "Report State (RPT)" },
97 { COPS_MSG_DRQ
, "Delete Request State (DRQ)" },
98 { COPS_MSG_SSQ
, "Synchronize State Req (SSQ)" },
99 { COPS_MSG_OPN
, "Client-Open (OPN)" },
100 { COPS_MSG_CAT
, "Client-Accept (CAT)" },
101 { COPS_MSG_CC
, "Client-Close (CC)" },
102 { COPS_MSG_KA
, "Keep-Alive (KA)" },
103 { COPS_MSG_SSC
, "Synchronize Complete (SSC)" },
108 /* The different objects in COPS messages */
110 COPS_NO_OBJECT
, /* Not a COPS Object type */
112 COPS_OBJ_HANDLE
, /* Handle Object (Handle) */
113 COPS_OBJ_CONTEXT
, /* Context Object (Context) */
114 COPS_OBJ_IN_INT
, /* In-Interface Object (IN-Int) */
115 COPS_OBJ_OUT_INT
, /* Out-Interface Object (OUT-Int) */
116 COPS_OBJ_REASON
, /* Reason Object (Reason) */
117 COPS_OBJ_DECISION
, /* Decision Object (Decision) */
118 COPS_OBJ_LPDPDECISION
, /* LPDP Decision Object (LPDPDecision) */
119 COPS_OBJ_ERROR
, /* Error Object (Error) */
120 COPS_OBJ_CLIENTSI
, /* Client Specific Information Object (ClientSI) */
121 COPS_OBJ_KATIMER
, /* Keep-Alive Timer Object (KATimer) */
122 COPS_OBJ_PEPID
, /* PEP Identification Object (PEPID) */
123 COPS_OBJ_REPORT_TYPE
, /* Report-Type Object (Report-Type) */
124 COPS_OBJ_PDPREDIRADDR
, /* PDP Redirect Address Object (PDPRedirAddr) */
125 COPS_OBJ_LASTPDPADDR
, /* Last PDP Address (LastPDPaddr) */
126 COPS_OBJ_ACCTTIMER
, /* Accounting Timer Object (AcctTimer) */
127 COPS_OBJ_INTEGRITY
, /* Message Integrity Object (Integrity) */
128 COPS_LAST_C_NUM
/* For error checking */
131 static const value_string cops_c_num_vals
[] = {
132 { COPS_OBJ_HANDLE
, "Handle Object (Handle)" },
133 { COPS_OBJ_CONTEXT
, "Context Object (Context)" },
134 { COPS_OBJ_IN_INT
, "In-Interface Object (IN-Int)" },
135 { COPS_OBJ_OUT_INT
, "Out-Interface Object (OUT-Int)" },
136 { COPS_OBJ_REASON
, "Reason Object (Reason)" },
137 { COPS_OBJ_DECISION
, "Decision Object (Decision)" },
138 { COPS_OBJ_LPDPDECISION
, "LPDP Decision Object (LPDPDecision)" },
139 { COPS_OBJ_ERROR
, "Error Object (Error)" },
140 { COPS_OBJ_CLIENTSI
, "Client Specific Information Object (ClientSI)" },
141 { COPS_OBJ_KATIMER
, "Keep-Alive Timer Object (KATimer)" },
142 { COPS_OBJ_PEPID
, "PEP Identification Object (PEPID)" },
143 { COPS_OBJ_REPORT_TYPE
, "Report-Type Object (Report-Type)" },
144 { COPS_OBJ_PDPREDIRADDR
, "PDP Redirect Address Object (PDPRedirAddr)" },
145 { COPS_OBJ_LASTPDPADDR
, "Last PDP Address (LastPDPaddr)" },
146 { COPS_OBJ_ACCTTIMER
, "Accounting Timer Object (AcctTimer)" },
147 { COPS_OBJ_INTEGRITY
, "Message Integrity Object (Integrity)" },
152 /* The different objects in COPS-PR messages */
154 COPS_NO_PR_OBJECT
, /* Not a COPS-PR Object type */
155 COPS_OBJ_PRID
, /* Provisioning Instance Identifier (PRID) */
156 COPS_OBJ_PPRID
, /* Prefix Provisioning Instance Identifier (PPRID) */
157 COPS_OBJ_EPD
, /* Encoded Provisioning Instance Data (EPD) */
158 COPS_OBJ_GPERR
, /* Global Provisioning Error Object (GPERR) */
159 COPS_OBJ_CPERR
, /* PRC Class Provisioning Error Object (CPERR) */
160 COPS_OBJ_ERRPRID
, /* Error Provisioning Instance Identifier (ErrorPRID)*/
162 COPS_LAST_S_NUM
/* For error checking */
166 static const value_string cops_s_num_vals
[] = {
167 { COPS_OBJ_PRID
, "Provisioning Instance Identifier (PRID)" },
168 { COPS_OBJ_PPRID
, "Prefix Provisioning Instance Identifier (PPRID)" },
169 { COPS_OBJ_EPD
, "Encoded Provisioning Instance Data (EPD)" },
170 { COPS_OBJ_GPERR
, "Global Provisioning Error Object (GPERR)" },
171 { COPS_OBJ_CPERR
, "PRC Class Provisioning Error Object (CPERR)" },
172 { COPS_OBJ_ERRPRID
, "Error Provisioning Instance Identifier (ErrorPRID)" },
177 /* R-Type is carried within the Context Object */
178 static const value_string cops_r_type_vals
[] = {
179 { 0x01, "Incoming-Message/Admission Control request" },
180 { 0x02, "Resource-Allocation request" },
181 { 0x04, "Outgoing-Message request" },
182 { 0x08, "Configuration request" },
185 /* S-Type is carried within the ClientSI Object for COPS-PR*/
186 static const value_string cops_s_type_vals
[] = {
191 /* Reason-Code is carried within the Reason object */
192 static const value_string cops_reason_vals
[] = {
193 { 1, "Unspecified" },
195 { 3, "Preempted (Another request state takes precedence)" },
196 { 4, "Tear (Used to communicate a signaled state removal)" },
197 { 5, "Timeout (Local state has timed-out)" },
198 { 6, "Route Change (Change invalidates request state)" },
199 { 7, "Insufficient Resources (No local resource available)" },
200 { 8, "PDP's Directive (PDP decision caused the delete)" },
201 { 9, "Unsupported decision (PDP decision not supported)" },
202 { 10, "Synchronize Handle Unknown" },
203 { 11, "Transient Handle (stateless event)" },
204 { 12, "Malformed Decision (could not recover)" },
205 { 13, "Unknown COPS Object from PDP" },
209 /* Command-Code is carried within the Decision object if C-Type is 1 */
210 static const value_string cops_dec_cmd_code_vals
[] = {
211 { 0, "NULL Decision (No configuration data available)" },
212 { 1, "Install (Admit request/Install configuration)" },
213 { 2, "Remove (Remove request/Remove configuration)" },
217 /* Decision flags are also carried with the Decision object if C-Type is 1 */
218 static const value_string cops_dec_cmd_flag_vals
[] = {
219 { 0x00, "<None set>" },
220 { 0x01, "Trigger Error (Trigger error message if set)" },
224 /* Error-Code from Error object */
225 static const value_string cops_error_vals
[] = {
227 {2, "Invalid handle reference" },
228 {3, "Bad message format (Malformed Message)" },
229 {4, "Unable to process (server gives up on query)" },
230 {5, "Mandatory client-specific info missing" },
231 {6, "Unsupported client" },
232 {7, "Mandatory COPS object missing" },
233 {8, "Client Failure" },
234 {9, "Communication Failure" },
235 {10, "Unspecified" },
236 {11, "Shutting down" },
237 {12, "Redirect to Preferred Server" },
238 {13, "Unknown COPS Object" },
239 {14, "Authentication Failure" },
240 {15, "Authentication Required" },
243 /* Error-Code from GPERR object */
244 static const value_string cops_gperror_vals
[] = {
246 {2, "AvailMemExhausted" },
247 {3, "unknownASN.1Tag" },
248 {4, "maxMsgSizeExceeded" },
249 {5, "unknownError" },
250 {6, "maxRequestStatesOpen" },
251 {7, "invalidASN.1Length" },
252 {8, "invalidObjectPad" },
253 {9, "unknownPIBData" },
254 {10, "unknownCOPSPRObject" },
255 {11, "malformedDecision" },
259 /* Error-Code from CPERR object */
260 static const value_string cops_cperror_vals
[] = {
261 {1, "priSpaceExhausted" },
262 {2, "priInstanceInvalid" },
263 {3, "attrValueInvalid" },
264 {4, "attrValueSupLimited" },
265 {5, "attrEnumSupLimited" },
266 {6, "attrMaxLengthExceeded" },
267 {7, "attrReferenceUnknown" },
268 {8, "priNotifyOnly" },
270 {10, "tooFewAttrs" },
271 {11, "invalidAttrType" },
272 {12, "deletedInRef" },
273 {13, "priSpecificError" },
278 /* Report-Type from Report-Type object */
279 static const value_string cops_report_type_vals
[] = {
280 {1, " Success : Decision was successful at the PEP" },
281 {2, " Failure : Decision could not be completed by PEP" },
282 {3, " Accounting: Accounting update for an installed state" },
287 /* Client-type descriptions */
288 /* http://www.iana.org/assignments/cops-parameters */
290 /* PacketCable Types */
292 /* static dissector_handle_t sdp_handle; */
294 #define COPS_CLIENT_PC_DQOS 0x8008
295 #define COPS_CLIENT_PC_MM 0x800a
297 static const value_string cops_client_type_vals
[] = {
301 {0x8001, "IP Highway"},
302 {0x8002, "IP Highway"},
303 {0x8003, "IP Highway"},
304 {0x8004, "IP Highway"},
306 {0x8006, "HP OpenView PolicyXpert"},
307 {0x8007, "HP OpenView PolicyXpert COPS-PR PXPIB"},
308 {COPS_CLIENT_PC_DQOS
, "PacketCable Dynamic Quality-of-Service"},
310 {COPS_CLIENT_PC_MM
, "PacketCable Multimedia"},
312 {0x800c, "Q.3303.1 (Rw interface) COPS alternative"},
313 {0x800d, "Q.3304.1 (Rc interface) COPS alternative"},
317 /* The next tables are for PacketCable */
319 /* Transaction ID table */
320 static const value_string table_cops_dqos_transaction_id
[] =
322 { 0x1, "Gate Alloc" },
323 { 0x2, "Gate Alloc Ack" },
324 { 0x3, "Gate Alloc Err" },
326 { 0x5, "Gate Set Ack" },
327 { 0x6, "Gate Set Err" },
328 { 0x7, "Gate Info" },
329 { 0x8, "Gate Info Ack" },
330 { 0x9, "Gate Info Err" },
331 { 0xa, "Gate Delete" },
332 { 0xb, "Gate Delete Ack" },
333 { 0xc, "Gate Delete Err" },
334 { 0xd, "Gate Open" },
335 { 0xe, "Gate Close" },
340 static const value_string table_cops_direction
[] =
342 { 0x0, "Downstream gate" },
343 { 0x1, "Upstream gate" },
348 static const value_string table_cops_session_class
[] =
350 { 0x0, "Unspecified" },
351 { 0x1, "Normal priority VoIP session" },
352 { 0x2, "High priority VoIP session" },
358 static const value_string table_cops_reason_code
[] =
360 { 0x0, "Gate Delete Operation" },
361 { 0x1, "Gate Close Operation" },
365 /* Reason Sub Code - Delete */
366 static const value_string table_cops_reason_subcode_delete
[] =
368 { 0x0, "Normal Operation" },
369 { 0x1, "Local Gate-coordination not completed" },
370 { 0x2, "Remote Gate-coordination not completed" },
371 { 0x3, "Authorization revoked" },
372 { 0x4, "Unexpected Gate-Open" },
373 { 0x5, "Local Gate-Close failure" },
374 { 0x7f,"Unspecified error" },
378 /* Reason Sub Code - Close */
379 static const value_string table_cops_reason_subcode_close
[] =
381 { 0x0, "Client initiated release (normal operation)" },
382 { 0x1, "Reservation reassignment (e.g., for priority session)" },
383 { 0x2, "Lack of reservation maintenance (e.g., RSVP refreshes)" },
384 { 0x3, "Lack of Docsis Mac-layer responses (e.g., station maintenance)" },
385 { 0x4, "Timer T0 expiration; no Gate-Set received from CMS" },
386 { 0x5, "Timer T1 expiration; no Commit received from MTA" },
387 { 0x6, "Timer T7 expiration; Service Flow reservation timeout" },
388 { 0x7, "Timer T8 expiration; Service Flow inactivity in the upstream direction" },
389 { 0x7f,"Unspecified error" },
393 /* PacketCable Error */
394 static const value_string table_cops_packetcable_error
[] =
396 { 0x1, "No gates currently available" },
397 { 0x2, "Unknown Gate ID" },
398 { 0x3, "Illegal Session Class value" },
399 { 0x4, "Subscriber exceeded gate limit" },
400 { 0x5, "Gate already set" },
401 { 0x6, "Missing Required Object" },
402 { 0x7, "Invalid Object" },
403 { 0x7f,"Unspecified error" },
408 /* PacketCable Multimedia */
410 static const value_string table_cops_mm_transaction_id
[] = {
418 {8, "Gate Info Ack"},
419 {9, "Gate Info Err"},
421 {11, "Gate Delete Ack"},
422 {12, "Gate Delete Err"},
425 {15, "Gate Report State"},
426 {16, "Invalid Gate Cmd Err"},
428 {18, "PDP Config Ack"},
429 {19, "PDP Config Error"},
430 {20, "Synch Request"},
431 {21, "Synch Report"},
432 {22, "Synch Complete"},
433 {23, "Message Receipt"},
437 static const value_string pcmm_activation_state_vals
[] = {
443 static const value_string pcmm_action_vals
[] = {
444 {0, "Add classifier"},
445 {1, "Replace classifier"},
446 {2, "Delete classifier"},
451 static const value_string pcmm_flow_spec_service_vals
[] = {
452 {2, "Guaranteed Rate"},
453 {5, "Controlled Load"},
457 static const value_string pcmm_report_type_vals
[] = {
458 {0, "Standard Report Data"},
459 {1, "Complete Gate Data"},
463 static const value_string pcmm_synch_type_vals
[] = {
464 {0, "Full Synchronization"},
465 {1, "Incremental Synchronization"},
469 static const value_string pcmm_packetcable_error_code
[] = {
470 {1, "Insufficient Resources"},
471 {2, "Unknown GateID"},
472 {6, "Missing Required Object"},
473 {7, "Invalid Object"},
474 {8, "Volume-Based Usage Limit Exceeded"},
475 {9, "Time-Based Usage Limit Exceeded"},
476 {10, "Session Class Limit Exceeded"},
477 {11, "Undefined Service Class Name"},
478 {12, "Incompatible Envelope"},
479 {13, "Invalid SubscriberID"},
480 {14, "Unauthorized AMID"},
481 {15, "Number of Classifiers Not Supported"},
482 {16, "Policy Exception"},
483 {17, "Invalid Field Value in Object"},
484 {18, "Transport Error"},
485 {19, "Unknown Gate Command"},
486 {20, "Unauthorized PSID"},
487 {21, "No State for PDP"},
488 {22, "Unsupported Synch Type"},
489 {23, "Incremental Data Incomplete"},
490 {127, "Other, Unspecified Error"},
494 static const value_string pcmm_gate_state
[] = {
499 {5, "Committed-Recovery"},
503 static const value_string pcmm_gate_state_reason
[] = {
504 {1, "Close initiated by CMTS due to reservation reassignment"},
505 {2, "Close initiated by CMTS due to lack of DOCSIS MAC-layer responses"},
506 {3, "Close initiated by CMTS due to timer T1 expiration"},
507 {4, "Close initiated by CMTS due to timer T2 expiration"},
508 {5, "Inactivity timer expired due to Service Flow inactivity (timer T3 expiration)"},
509 {6, "Close initiated by CMTS due to lack of Reservation Maintenance"},
510 {7, "Gate state unchanged, but volume limit reached"},
511 {8, "Close initiated by CMTS due to timer T4 expiration"},
512 {9, "Gate state unchanged, but timer T2 expiration caused reservation reduction"},
513 {10, "Gate state unchanged, but time limit reached"},
514 {11, "Close initiated by Policy Server or CMTS, volume limit reached"},
515 {12, "Close initiated by Policy Server or CMTS, time limit reached"},
516 {13, "Close initiated by CMTS, other"},
522 /* End of PacketCable Tables */
525 /* Initialize the protocol and registered fields */
526 static int proto_cops
;
527 static int hf_cops_ver_flags
;
528 static int hf_cops_version
;
529 static int hf_cops_flags
;
531 static int hf_cops_response_in
;
532 static int hf_cops_response_to
;
533 static int hf_cops_response_time
;
535 static int hf_cops_op_code
;
536 static int hf_cops_client_type
;
537 static int hf_cops_msg_len
;
539 static int hf_cops_obj_len
;
540 static int hf_cops_obj_c_num
;
541 static int hf_cops_obj_c_type
;
543 static int hf_cops_obj_s_num
;
544 static int hf_cops_obj_s_type
;
546 static int hf_cops_handle
;
548 static int hf_cops_r_type_flags
;
549 static int hf_cops_m_type_flags
;
551 static int hf_cops_in_int_ipv4
;
552 static int hf_cops_in_int_ipv6
;
553 static int hf_cops_out_int_ipv4
;
554 static int hf_cops_out_int_ipv6
;
555 static int hf_cops_int_ifindex
;
557 static int hf_cops_reason
;
558 static int hf_cops_reason_sub
;
560 static int hf_cops_dec_cmd_code
;
561 static int hf_cops_dec_flags
;
563 static int hf_cops_error
;
564 static int hf_cops_error_sub
;
566 static int hf_cops_gperror
;
567 static int hf_cops_gperror_sub
;
569 static int hf_cops_cperror
;
570 static int hf_cops_cperror_sub
;
572 static int hf_cops_katimer
;
574 static int hf_cops_pepid
;
576 static int hf_cops_report_type
;
578 static int hf_cops_pdprediraddr_ipv4
;
579 static int hf_cops_pdprediraddr_ipv6
;
580 static int hf_cops_lastpdpaddr_ipv4
;
581 static int hf_cops_lastpdpaddr_ipv6
;
582 static int hf_cops_pdp_tcp_port
;
584 static int hf_cops_accttimer
;
586 static int hf_cops_key_id
;
587 static int hf_cops_seq_num
;
589 static int hf_cops_prid_oid
;
590 static int hf_cops_pprid_oid
;
591 static int hf_cops_errprid_oid
;
592 static int hf_cops_epd_null
;
593 static int hf_cops_epd_int
;
594 static int hf_cops_epd_octets
;
595 static int hf_cops_epd_oid
;
596 static int hf_cops_epd_ipv4
;
597 static int hf_cops_epd_u32
;
598 static int hf_cops_epd_ticks
;
599 static int hf_cops_epd_opaque
;
600 static int hf_cops_epd_i64
;
601 static int hf_cops_epd_u64
;
602 static int hf_cops_epd_unknown
;
603 static int hf_cops_reserved8
;
604 static int hf_cops_reserved16
;
605 static int hf_cops_reserved24
;
606 static int hf_cops_keyed_message_digest
;
607 static int hf_cops_integrity_contents
;
608 static int hf_cops_opaque_data
;
610 /* For PacketCable D-QoS */
611 static int hf_cops_subtree
;
612 static int hf_cops_pc_activity_count
;
613 static int hf_cops_pc_algorithm
;
614 static int hf_cops_pc_close_subcode
;
615 static int hf_cops_pc_cmts_ip
;
616 static int hf_cops_pc_cmts_ip_port
;
617 static int hf_cops_pc_prks_ip
;
618 static int hf_cops_pc_prks_ip_port
;
619 static int hf_cops_pc_srks_ip
;
620 static int hf_cops_pc_srks_ip_port
;
621 static int hf_cops_pc_delete_subcode
;
622 static int hf_cops_pc_dest_ip
;
623 static int hf_cops_pc_dest_port
;
624 static int hf_cops_pc_direction
;
625 static int hf_cops_pc_ds_field
;
626 static int hf_cops_pc_gate_id
;
627 static int hf_cops_pc_gate_spec_flags
;
628 static int hf_cops_pc_gate_command_type
;
629 static int hf_cops_pc_key
;
630 static int hf_cops_pc_max_packet_size
;
631 static int hf_cops_pc_min_policed_unit
;
632 static int hf_cops_pc_packetcable_err_code
;
633 static int hf_cops_pc_packetcable_sub_code
;
634 static int hf_cops_pc_peak_data_rate
;
635 static int hf_cops_pc_protocol_id
;
636 static int hf_cops_pc_reason_code
;
637 static int hf_cops_pc_remote_flags
;
638 static int hf_cops_pc_remote_gate_id
;
639 static int hf_cops_pc_reserved
;
640 static int hf_cops_pc_session_class
;
641 static int hf_cops_pc_slack_term
;
642 static int hf_cops_pc_spec_rate
;
643 static int hf_cops_pc_src_ip
;
644 static int hf_cops_pc_src_port
;
645 static int hf_cops_pc_subscriber_id_ipv4
;
646 static int hf_cops_pc_subscriber_id_ipv6
;
647 static int hf_cops_pc_t1_value
;
648 static int hf_cops_pc_t7_value
;
649 static int hf_cops_pc_t8_value
;
650 static int hf_cops_pc_token_bucket_rate
;
651 static int hf_cops_pc_token_bucket_size
;
652 static int hf_cops_pc_transaction_id
;
653 static int hf_cops_pc_bcid_ts
;
654 static int hf_cops_pc_bcid_id
;
655 static int hf_cops_pc_bcid_tz
;
656 static int hf_cops_pc_bcid_ev
;
657 static int hf_cops_pc_dfcdc_ip
;
658 static int hf_cops_pc_dfccc_ip
;
659 static int hf_cops_pc_dfcdc_ip_port
;
660 static int hf_cops_pc_dfccc_ip_port
;
661 static int hf_cops_pc_dfccc_id
;
663 /* PacketCable Multimedia */
664 static int hf_cops_pcmm_amid_app_type
;
665 static int hf_cops_pcmm_amid_am_tag
;
666 static int hf_cops_pcmm_gate_spec_flags
;
667 static int hf_cops_pcmm_gate_spec_flags_gate
;
668 static int hf_cops_pcmm_gate_spec_flags_dscp_overwrite
;
669 static int hf_cops_pcmm_gate_spec_dscp_tos_field
;
670 static int hf_cops_pcmm_gate_spec_dscp_tos_mask
;
671 static int hf_cops_pcmm_gate_spec_session_class_id
;
672 static int hf_cops_pcmm_gate_spec_session_class_id_priority
;
673 static int hf_cops_pcmm_gate_spec_session_class_id_preemption
;
674 static int hf_cops_pcmm_gate_spec_session_class_id_configurable
;
675 static int hf_cops_pcmm_gate_spec_timer_t1
;
676 static int hf_cops_pcmm_gate_spec_timer_t2
;
677 static int hf_cops_pcmm_gate_spec_timer_t3
;
678 static int hf_cops_pcmm_gate_spec_timer_t4
;
679 static int hf_cops_pcmm_classifier_protocol_id
;
680 static int hf_cops_pcmm_classifier_dscp_tos_field
;
681 static int hf_cops_pcmm_classifier_dscp_tos_mask
;
682 static int hf_cops_pcmm_classifier_src_addr
;
683 static int hf_cops_pcmm_classifier_src_mask
;
684 static int hf_cops_pcmm_classifier_dst_addr
;
685 static int hf_cops_pcmm_classifier_dst_mask
;
686 static int hf_cops_pcmm_classifier_src_port
;
687 static int hf_cops_pcmm_classifier_src_port_end
;
688 static int hf_cops_pcmm_classifier_dst_port
;
689 static int hf_cops_pcmm_classifier_dst_port_end
;
690 static int hf_cops_pcmm_classifier_priority
;
691 static int hf_cops_pcmm_classifier_classifier_id
;
692 static int hf_cops_pcmm_classifier_activation_state
;
693 static int hf_cops_pcmm_classifier_action
;
694 static int hf_cops_pcmm_classifier_flags
;
695 static int hf_cops_pcmm_classifier_tc_low
;
696 static int hf_cops_pcmm_classifier_tc_high
;
697 static int hf_cops_pcmm_classifier_tc_mask
;
698 static int hf_cops_pcmm_classifier_flow_label
;
699 static int hf_cops_pcmm_classifier_next_header_type
;
700 static int hf_cops_pcmm_classifier_source_prefix_length
;
701 static int hf_cops_pcmm_classifier_destination_prefix_length
;
702 static int hf_cops_pcmm_classifier_src_addr_v6
;
703 static int hf_cops_pcmm_classifier_dst_addr_v6
;
704 static int hf_cops_pcmm_flow_spec_envelope
;
705 static int hf_cops_pcmm_flow_spec_service_number
;
706 static int hf_cops_pcmm_docsis_scn
;
707 static int hf_cops_pcmm_envelope
;
708 static int hf_cops_pcmm_traffic_priority
;
709 static int hf_cops_pcmm_request_transmission_policy
;
710 static int hf_cops_pcmm_request_transmission_policy_sf_all_cm
;
711 static int hf_cops_pcmm_request_transmission_policy_sf_priority
;
712 static int hf_cops_pcmm_request_transmission_policy_sf_request_for_request
;
713 static int hf_cops_pcmm_request_transmission_policy_sf_data_for_data
;
714 static int hf_cops_pcmm_request_transmission_policy_sf_piggyback
;
715 static int hf_cops_pcmm_request_transmission_policy_sf_concatenate
;
716 static int hf_cops_pcmm_request_transmission_policy_sf_fragment
;
717 static int hf_cops_pcmm_request_transmission_policy_sf_suppress
;
718 static int hf_cops_pcmm_request_transmission_policy_sf_drop_packets
;
719 static int hf_cops_pcmm_max_sustained_traffic_rate
;
720 static int hf_cops_pcmm_max_traffic_burst
;
721 static int hf_cops_pcmm_min_reserved_traffic_rate
;
722 static int hf_cops_pcmm_ass_min_rtr_packet_size
;
723 static int hf_cops_pcmm_max_concat_burst
;
724 static int hf_cops_pcmm_req_att_mask
;
725 static int hf_cops_pcmm_forbid_att_mask
;
726 static int hf_cops_pcmm_att_aggr_rule_mask
;
727 static int hf_cops_pcmm_nominal_polling_interval
;
728 static int hf_cops_pcmm_tolerated_poll_jitter
;
729 static int hf_cops_pcmm_unsolicited_grant_size
;
730 static int hf_cops_pcmm_grants_per_interval
;
731 static int hf_cops_pcmm_nominal_grant_interval
;
732 static int hf_cops_pcmm_tolerated_grant_jitter
;
733 static int hf_cops_pcmm_down_resequencing
;
734 static int hf_cops_pcmm_down_peak_traffic_rate
;
735 static int hf_cops_pcmm_max_downstream_latency
;
736 static int hf_cops_pcmm_volume_based_usage_limit
;
737 static int hf_cops_pcmm_time_based_usage_limit
;
738 static int hf_cops_pcmm_gate_time_info
;
739 static int hf_cops_pcmm_gate_usage_info
;
740 static int hf_cops_pcmm_packetcable_error_code
;
741 static int hf_cops_pcmm_packetcable_error_subcode
;
742 static int hf_cops_pcmm_packetcable_gate_state
;
743 static int hf_cops_pcmm_packetcable_gate_state_reason
;
744 static int hf_cops_pcmm_packetcable_version_info_major
;
745 static int hf_cops_pcmm_packetcable_version_info_minor
;
746 static int hf_cops_pcmm_psid
;
747 static int hf_cops_pcmm_synch_options_report_type
;
748 static int hf_cops_pcmm_synch_options_synch_type
;
749 static int hf_cops_pcmm_msg_receipt_key
;
750 static int hf_cops_pcmm_userid
;
751 static int hf_cops_pcmm_sharedresourceid
;
754 /* Initialize the subtree pointers */
756 static int ett_cops_ver_flags
;
757 static int ett_cops_obj
;
758 static int ett_cops_pr_obj
;
759 static int ett_cops_obj_data
;
760 static int ett_cops_r_type_flags
;
761 static int ett_cops_itf
;
762 static int ett_cops_reason
;
763 static int ett_cops_decision
;
764 static int ett_cops_error
;
765 static int ett_cops_clientsi
;
766 static int ett_cops_asn1
;
767 static int ett_cops_gperror
;
768 static int ett_cops_cperror
;
769 static int ett_cops_pdp
;
771 static expert_field ei_cops_pepid_not_null
;
772 static expert_field ei_cops_trailing_garbage
;
773 static expert_field ei_cops_bad_cops_object_length
;
774 static expert_field ei_cops_bad_cops_pr_object_length
;
775 static expert_field ei_cops_unknown_c_num
;
776 /* static expert_field ei_cops_unknown_s_num; */
778 /* For PacketCable */
779 static int ett_cops_subtree
;
781 static int ett_docsis_request_transmission_policy
;
783 static dissector_handle_t cops_handle
;
785 /* For request/response matching */
786 typedef struct _cops_conv_info_t
{
787 wmem_map_t
*pdus_tree
;
790 typedef struct _cops_call_t
799 void proto_reg_handoff_cops(void);
800 static int dissect_cops_object(tvbuff_t
*tvb
, packet_info
*pinfo
, uint8_t op_code
, uint32_t offset
, proto_tree
*tree
, uint16_t client_type
, uint32_t* handle_value
);
801 static void dissect_cops_object_data(tvbuff_t
*tvb
, packet_info
*pinfo
, uint32_t offset
, proto_tree
*tree
,
802 uint8_t op_code
, uint16_t client_type
, uint8_t c_num
, uint8_t c_type
, int len
, uint32_t* handle_value
);
804 static void dissect_cops_pr_objects(tvbuff_t
*tvb
, packet_info
*pinfo
, uint32_t offset
, proto_tree
*tree
, int pr_len
,
805 oid_info_t
** oid_info_p
, uint32_t** pprid_subids_p
, unsigned* pprid_subids_len_p
);
806 static int dissect_cops_pr_object_data(tvbuff_t
*tvb
, packet_info
*pinfo
, uint32_t offset
, proto_tree
*tree
,
807 uint8_t s_num
, uint8_t s_type
, int len
,
808 oid_info_t
** oid_info_p
, uint32_t** pprid_subids
, unsigned* pprid_subids_len
);
810 /* Added for PacketCable */
811 static proto_tree
*info_to_cops_subtree(tvbuff_t
*, proto_tree
*, int, int, const char *);
812 static proto_item
*info_to_display(tvbuff_t
*, proto_item
*, int, int, const char *, const value_string
*, int, int *);
814 static void cops_transaction_id(tvbuff_t
*, packet_info
*, proto_tree
*, uint8_t, unsigned, uint32_t);
815 static void cops_subscriber_id_v4(tvbuff_t
*, proto_tree
*, unsigned, uint32_t);
816 static void cops_subscriber_id_v6(tvbuff_t
*, proto_tree
*, unsigned, uint32_t);
817 static void cops_gate_id(tvbuff_t
*, proto_tree
*, unsigned, uint32_t);
818 static void cops_activity_count(tvbuff_t
*, proto_tree
*, unsigned, uint32_t);
819 static void cops_gate_specs(tvbuff_t
*, proto_tree
*, unsigned, uint32_t);
820 static void cops_remote_gate_info(tvbuff_t
*, proto_tree
*, unsigned, uint32_t);
821 static void cops_packetcable_reason(tvbuff_t
*, proto_tree
*, unsigned, uint32_t);
822 static void cops_packetcable_error(tvbuff_t
*, proto_tree
*, unsigned, uint32_t);
823 static void cops_event_generation_info(tvbuff_t
*, proto_tree
*, unsigned, uint32_t);
824 static void cops_surveillance_parameters(tvbuff_t
*, proto_tree
*, unsigned, uint32_t);
826 static void cops_amid(tvbuff_t
*, proto_tree
*, unsigned, uint32_t);
828 static void decode_docsis_request_transmission_policy(tvbuff_t
*tvb
, uint32_t offset
, proto_tree
*tree
);
830 static void cops_analyze_packetcable_dqos_obj(tvbuff_t
*, packet_info
*, proto_tree
*, uint8_t, uint32_t);
831 static void cops_analyze_packetcable_mm_obj(tvbuff_t
*, packet_info
*, proto_tree
*, uint8_t, uint32_t);
833 static bool cops_packetcable
= true;
835 /* End of addition for PacketCable */
839 #define COPS_IPA 0 /* IP Address */
840 #define COPS_U32 2 /* Unsigned 32*/
841 #define COPS_TIT 3 /* TimeTicks */
842 #define COPS_OPQ 4 /* Opaque */
843 #define COPS_I64 10 /* Integer64 */
844 #define COPS_U64 11 /* Uinteger64 */
849 #define COPS_INTEGER 1 /* l */
850 #define COPS_OCTETSTR 2 /* c */
851 #define COPS_OBJECTID 3 /* ul */
852 #define COPS_IPADDR 4 /* uc */
853 #define COPS_UNSIGNED32 5 /* ul */
854 #define COPS_TIMETICKS 7 /* ul */
855 #define COPS_OPAQUE 8 /* c */
856 #define COPS_INTEGER64 10 /* ll */
857 #define COPS_UNSIGNED64 11 /* ull */
859 typedef struct _COPS_CNV COPS_CNV
;
870 static const true_false_string tfs_upstream_downstream
= { "Upstream", "Downstream" };
872 static COPS_CNV CopsCnv
[] =
874 {BER_CLASS_UNI
, BER_UNI_TAG_NULL
, COPS_NULL
, "NULL" , &hf_cops_epd_null
},
875 {BER_CLASS_UNI
, BER_UNI_TAG_INTEGER
, COPS_INTEGER
, "INTEGER", &hf_cops_epd_int
},
876 {BER_CLASS_UNI
, BER_UNI_TAG_OCTETSTRING
, COPS_OCTETSTR
, "OCTET STRING", &hf_cops_epd_octets
},
877 {BER_CLASS_UNI
, BER_UNI_TAG_OID
, COPS_OBJECTID
, "OBJECTID", &hf_cops_epd_oid
},
878 {BER_CLASS_APP
, COPS_IPA
, COPS_IPADDR
, "IPADDR", &hf_cops_epd_ipv4
},
879 {BER_CLASS_APP
, COPS_U32
, COPS_UNSIGNED32
,"UNSIGNED32", &hf_cops_epd_u32
},
880 {BER_CLASS_APP
, COPS_TIT
, COPS_TIMETICKS
, "TIMETICKS", &hf_cops_epd_ticks
},
881 {BER_CLASS_APP
, COPS_OPQ
, COPS_OPAQUE
, "OPAQUE", &hf_cops_epd_opaque
},
882 {BER_CLASS_APP
, COPS_I64
, COPS_INTEGER64
, "INTEGER64", &hf_cops_epd_i64
},
883 {BER_CLASS_APP
, COPS_U64
, COPS_UNSIGNED64
, "UNSIGNED64", &hf_cops_epd_u64
},
884 {BER_CLASS_ANY
, 0, -1, NULL
, NULL
}
887 static int cops_tag_cls2syntax ( unsigned tag
, unsigned cls
) {
892 while (cnv
->syntax
!= -1)
894 if (cnv
->tag
== tag
&& cnv
->ber_class
== cls
)
896 return *(cnv
->hfidp
);
900 return hf_cops_epd_unknown
;
904 get_cops_pdu_len(packet_info
*pinfo _U_
, tvbuff_t
*tvb
, int offset
, void *data _U_
)
907 * Get the length of the COPS message.
909 return tvb_get_ntohl(tvb
, offset
+ 4);
913 dissect_cops_pdu(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, void* data _U_
)
916 uint16_t client_type
;
919 proto_tree
*cops_tree
, *ver_flags_tree
;
924 uint32_t handle_value
= 0;
926 /* variables for Request/Response tracking */
928 bool is_solicited
, is_request
, is_response
;
929 conversation_t
*conversation
;
930 cops_conv_info_t
*cops_conv_info
;
931 cops_call_t
*cops_call
;
932 wmem_array_t
* pdus_array
;
935 col_set_str(pinfo
->cinfo
, COL_PROTOCOL
, "COPS");
936 col_clear(pinfo
->cinfo
, COL_INFO
);
938 op_code
= tvb_get_uint8(tvb
, 1);
939 col_add_fstr(pinfo
->cinfo
, COL_INFO
, "COPS %s",
940 val_to_str_const(op_code
, cops_op_code_vals
, "Unknown Op Code"));
942 /* Currently used by PacketCable */
943 client_type
= tvb_get_ntohs(tvb
, 2);
945 ti
= proto_tree_add_item(tree
, proto_cops
, tvb
, offset
, -1, ENC_NA
);
946 cops_tree
= proto_item_add_subtree(ti
, ett_cops
);
948 /* Version and flags share the same byte, put them in a subtree */
949 ver_flags
= tvb_get_uint8(tvb
, offset
);
950 is_solicited
= (lo_nibble(ver_flags
) == 0x01);
951 tv
= proto_tree_add_uint_format(cops_tree
, hf_cops_ver_flags
, tvb
, offset
, 1,
952 ver_flags
, "Version: %u, Flags: %s",
953 hi_nibble(ver_flags
),
954 val_to_str_const(lo_nibble(ver_flags
), cops_flags_vals
, "Unknown"));
955 ver_flags_tree
= proto_item_add_subtree(tv
, ett_cops_ver_flags
);
956 proto_tree_add_uint(ver_flags_tree
, hf_cops_version
, tvb
, offset
, 1, ver_flags
);
957 proto_tree_add_uint(ver_flags_tree
, hf_cops_flags
, tvb
, offset
, 1, ver_flags
);
960 proto_tree_add_item(cops_tree
, hf_cops_op_code
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
962 proto_tree_add_item(cops_tree
, hf_cops_client_type
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
965 msg_len
= tvb_get_ntohl(tvb
, offset
);
966 proto_tree_add_uint(cops_tree
, hf_cops_msg_len
, tvb
, offset
, 4, msg_len
);
969 while (tvb_reported_length_remaining(tvb
, offset
) >= COPS_OBJECT_HDR_SIZE
) {
970 object_len
= dissect_cops_object(tvb
, pinfo
, op_code
, offset
, cops_tree
, client_type
, &handle_value
);
973 offset
+= object_len
;
976 garbage
= tvb_reported_length_remaining(tvb
, offset
);
978 proto_tree_add_expert_format(tree
, pinfo
, &ei_cops_trailing_garbage
, tvb
, offset
, garbage
, "Trailing garbage: %d byte%s", garbage
, plurality(garbage
, "", "s"));
981 /* Start request/response matching */
983 /* handle is 0(or not present), and op_code doesn't allow null handle, return */
984 /* TODO, add expert info for this abnormal */
985 if (handle_value
== 0 &&
986 ( op_code
!= COPS_MSG_SSQ
&&
987 op_code
!= COPS_MSG_OPN
&&
988 op_code
!= COPS_MSG_CAT
&&
989 op_code
!= COPS_MSG_CC
&&
990 op_code
!= COPS_MSG_KA
&&
991 op_code
!= COPS_MSG_SSC
) ) {
997 op_code
== COPS_MSG_REQ
|| /* expects DEC */
998 (op_code
== COPS_MSG_DEC
&& !is_solicited
) || /* expects RPT|DRQ */
999 /* COPS_MSG_RPT doesn't expect response */
1000 /* COPS_MSG_DRQ doesn't expect response */
1001 op_code
== COPS_MSG_SSQ
|| /* expects RPT|DRQ|SSC */
1002 op_code
== COPS_MSG_OPN
|| /* expects CAT|CC */
1003 /* COPS_MSG_CAT doesn't expect response */
1004 /* COPS_MSG_CC doesn't expect response */
1005 (op_code
== COPS_MSG_KA
&& !is_solicited
); /* expects KA from PDP, always initialized by PEP */
1006 /* COPS_MSG_SSC doesn't expect response */
1009 /* COPS_MSG_REQ request only */
1010 (op_code
== COPS_MSG_DEC
&& is_solicited
) || /* response only if reply REQ */
1011 (op_code
== COPS_MSG_RPT
&& is_solicited
) || /* response only if reply DEC/SSQ */
1012 (op_code
== COPS_MSG_DRQ
&& is_solicited
) || /* response only if reply DEC/SSQ */
1013 /* COPS_MSG_SSQ request only */
1014 /* COPS_MSG_OPN request only */
1015 op_code
== COPS_MSG_CAT
|| /* response for OPN */
1016 (op_code
== COPS_MSG_CC
&& is_solicited
) || /* response for OPN */
1017 (op_code
== COPS_MSG_KA
&& is_solicited
) || /* response for KA from PEP */
1018 op_code
== COPS_MSG_SSC
; /* response for SSQ */
1020 conversation
= find_or_create_conversation(pinfo
);
1021 cops_conv_info
= (cops_conv_info_t
*)conversation_get_proto_data(conversation
, proto_cops
);
1022 if (!cops_conv_info
) {
1023 cops_conv_info
= wmem_new(wmem_file_scope(), cops_conv_info_t
);
1025 cops_conv_info
->pdus_tree
= wmem_map_new(wmem_file_scope(), g_direct_hash
, g_direct_equal
);
1026 conversation_add_proto_data(conversation
, proto_cops
, cops_conv_info
);
1030 (op_code
== COPS_MSG_DEC
&& is_solicited
) ) { /* DEC as response for REQ is considered as request, because it expects RPT|DRQ */
1032 pdus_array
= (wmem_array_t
*)wmem_map_lookup(cops_conv_info
->pdus_tree
, GUINT_TO_POINTER(handle_value
));
1033 if (pdus_array
== NULL
) { /* This is the first request we've seen with this handle_value */
1034 pdus_array
= wmem_array_new(wmem_file_scope(), sizeof(cops_call_t
*));
1035 wmem_map_insert(cops_conv_info
->pdus_tree
, GUINT_TO_POINTER(handle_value
), pdus_array
);
1038 if (!pinfo
->fd
->visited
) {
1040 * XXX - yes, we're setting all the fields in this
1041 * structure, but there's padding between op_code
1042 * and solicited, and that can't be set.
1044 * For some reason, on some platforms, valgrind is
1045 * complaining about a test of the solicited field
1046 * accessing uninitialized data, perhaps because
1047 * the 8 bytes containing op_code and solicited is
1048 * being loaded as a unit. If the compiler is, for
1049 * example, turning a test of
1051 * cops_call->op_code == COPS_MSG_KA && !(cops_call->solicited)
1053 * into a load of those 8 bytes and a comparison against a value
1054 * with op_code being COPS_MSG_KA, solicited being false (0),
1055 * *and* the padding being zero, it's buggy, but overly-"clever"
1056 * buggy compilers do exist, so....)
1058 * So we use wmem_new0() to forcibly zero out the entire
1059 * structure before filling it in.
1061 cops_call
= wmem_new0(wmem_file_scope(), cops_call_t
);
1062 cops_call
->op_code
= op_code
;
1063 cops_call
->solicited
= is_solicited
;
1064 cops_call
->req_num
= pinfo
->num
;
1065 cops_call
->rsp_num
= 0;
1066 cops_call
->req_time
= pinfo
->abs_ts
;
1067 wmem_array_append_one(pdus_array
, cops_call
);
1070 for (i
=0; i
< wmem_array_get_count(pdus_array
); i
++) {
1071 cops_call
= *(cops_call_t
**)(wmem_array_index(pdus_array
, i
));
1072 if ( cops_call
->req_num
== pinfo
->num
1073 && cops_call
->rsp_num
!= 0) {
1074 ti
= proto_tree_add_uint_format(cops_tree
, hf_cops_response_in
, tvb
, 0, 0, cops_call
->rsp_num
,
1075 "Response to this request is in frame %u", cops_call
->rsp_num
);
1076 proto_item_set_generated(ti
);
1083 pdus_array
= (wmem_array_t
*)wmem_map_lookup(cops_conv_info
->pdus_tree
, GUINT_TO_POINTER(handle_value
));
1085 if (pdus_array
== NULL
) /* There's no request with this handle value */
1088 if (!pinfo
->fd
->visited
) {
1089 for (i
=0; i
< wmem_array_get_count(pdus_array
); i
++) {
1090 cops_call
= *(cops_call_t
**)(wmem_array_index(pdus_array
, i
));
1092 if (nstime_cmp(&pinfo
->abs_ts
, &cops_call
->req_time
) <= 0 || cops_call
->rsp_num
!= 0)
1096 ( (cops_call
->op_code
== COPS_MSG_REQ
) &&
1097 (op_code
== COPS_MSG_DEC
&& is_solicited
) ) ||
1098 ( (cops_call
->op_code
== COPS_MSG_DEC
) &&
1099 ( (op_code
== COPS_MSG_RPT
&& is_solicited
) ||
1100 (op_code
== COPS_MSG_DRQ
&& is_solicited
) ) ) ||
1101 ( (cops_call
->op_code
== COPS_MSG_SSQ
) &&
1102 ( (op_code
== COPS_MSG_RPT
&& is_solicited
) ||
1103 (op_code
== COPS_MSG_DRQ
&& is_solicited
) ||
1104 (op_code
== COPS_MSG_SSC
) ) ) ||
1105 ( (cops_call
->op_code
== COPS_MSG_OPN
) &&
1106 (op_code
== COPS_MSG_CAT
||
1107 op_code
== COPS_MSG_CC
) ) ||
1108 ( (cops_call
->op_code
== COPS_MSG_KA
&& !(cops_call
->solicited
)) &&
1109 (op_code
== COPS_MSG_KA
&& is_solicited
) ) ) {
1110 cops_call
->rsp_num
= pinfo
->num
;
1116 for (i
=0; i
< wmem_array_get_count(pdus_array
); i
++) {
1117 cops_call
= *(cops_call_t
**)(wmem_array_index(pdus_array
, i
));
1118 if ( cops_call
->rsp_num
== pinfo
->num
) {
1119 ti
= proto_tree_add_uint_format(cops_tree
, hf_cops_response_to
, tvb
, 0, 0, cops_call
->req_num
,
1120 "Response to a request in frame %u", cops_call
->req_num
);
1121 proto_item_set_generated(ti
);
1123 nstime_delta(&delta
, &pinfo
->abs_ts
, &cops_call
->req_time
);
1124 ti
= proto_tree_add_time(cops_tree
, hf_cops_response_time
, tvb
, 0, 0, &delta
);
1125 proto_item_set_generated(ti
);
1133 return tvb_reported_length(tvb
);
1136 /* Code to actually dissect the packets */
1138 dissect_cops(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, void* data
)
1140 tcp_dissect_pdus(tvb
, pinfo
, tree
, cops_desegment
, 8,
1141 get_cops_pdu_len
, dissect_cops_pdu
, data
);
1142 return tvb_reported_length(tvb
);
1145 static const char *cops_c_type_to_str(uint8_t c_num
, uint8_t c_type
)
1148 case COPS_OBJ_HANDLE
:
1150 return "Client Handle";
1152 case COPS_OBJ_IN_INT
:
1153 case COPS_OBJ_OUT_INT
:
1155 return "IPv4 Address + Interface";
1156 else if (c_type
== 2)
1157 return "IPv6 Address + Interface";
1159 case COPS_OBJ_DECISION
:
1160 case COPS_OBJ_LPDPDECISION
:
1162 return "Decision Flags (Mandatory)";
1163 else if (c_type
== 2)
1164 return "Stateless Data";
1165 else if (c_type
== 3)
1166 return "Replacement Data";
1167 else if (c_type
== 4)
1168 return "Client Specific Decision Data";
1169 else if (c_type
== 5)
1170 return "Named Decision Data";
1172 case COPS_OBJ_CLIENTSI
:
1174 return "Signaled ClientSI";
1175 else if (c_type
== 2)
1176 return "Named ClientSI";
1178 case COPS_OBJ_KATIMER
:
1180 return "Keep-alive timer value";
1182 case COPS_OBJ_PDPREDIRADDR
:
1183 case COPS_OBJ_LASTPDPADDR
:
1185 return "IPv4 Address + TCP Port";
1186 else if (c_type
== 2)
1187 return "IPv6 Address + TCP Port";
1189 case COPS_OBJ_ACCTTIMER
:
1191 return "Accounting timer value";
1193 case COPS_OBJ_INTEGRITY
:
1195 return "HMAC digest";
1202 static int dissect_cops_object(tvbuff_t
*tvb
, packet_info
*pinfo
, uint8_t op_code
, uint32_t offset
, proto_tree
*tree
, uint16_t client_type
, uint32_t* handle_value
)
1204 int object_len
, contents_len
;
1205 uint8_t c_num
, c_type
;
1207 proto_tree
*obj_tree
;
1208 const char *type_str
;
1210 object_len
= tvb_get_ntohs(tvb
, offset
);
1211 if (object_len
< COPS_OBJECT_HDR_SIZE
) {
1213 ti
= proto_tree_add_uint(tree
, hf_cops_obj_len
, tvb
, offset
, 2, object_len
);
1214 expert_add_info_format(pinfo
, ti
, &ei_cops_bad_cops_object_length
,
1215 "Bad COPS object length: %u, should be at least %u",
1216 object_len
, COPS_OBJECT_HDR_SIZE
);
1219 c_num
= tvb_get_uint8(tvb
, offset
+ 2);
1220 c_type
= tvb_get_uint8(tvb
, offset
+ 3);
1222 ti
= proto_tree_add_uint_format(tree
, hf_cops_obj_c_num
, tvb
, offset
, object_len
, c_num
,
1223 "%s: %s", val_to_str_const(c_num
, cops_c_num_vals
, "Unknown"),
1224 cops_c_type_to_str(c_num
, c_type
));
1225 obj_tree
= proto_item_add_subtree(ti
, ett_cops_obj
);
1227 proto_tree_add_uint(obj_tree
, hf_cops_obj_len
, tvb
, offset
, 2, object_len
);
1230 proto_tree_add_uint(obj_tree
, hf_cops_obj_c_num
, tvb
, offset
, 1, c_num
);
1233 type_str
= cops_c_type_to_str(c_num
, c_type
);
1234 proto_tree_add_uint_format_value(obj_tree
, hf_cops_obj_c_type
, tvb
, offset
, 1, c_type
,
1237 strlen(type_str
) ? " (" : "",
1239 strlen(type_str
) ? ")" : "");
1242 contents_len
= object_len
- COPS_OBJECT_HDR_SIZE
;
1243 dissect_cops_object_data(tvb
, pinfo
, offset
, obj_tree
, op_code
, client_type
, c_num
, c_type
, contents_len
, handle_value
);
1245 /* Pad to 32bit boundary */
1246 if (object_len
% sizeof (uint32_t))
1247 object_len
+= ((int)sizeof (uint32_t) - object_len
% (int)sizeof (uint32_t));
1252 static void dissect_cops_pr_objects(tvbuff_t
*tvb
, packet_info
*pinfo
, uint32_t offset
, proto_tree
*tree
, int pr_len
,
1253 oid_info_t
** oid_info_p
, uint32_t** pprid_subids_p
, unsigned* pprid_subids_len_p
)
1255 int object_len
, contents_len
;
1256 uint8_t s_num
, s_type
;
1257 const char *type_str
;
1259 proto_tree
*cops_pr_tree
, *obj_tree
;
1262 cops_pr_tree
= proto_item_add_subtree(tree
, ett_cops_pr_obj
);
1264 while (pr_len
>= COPS_OBJECT_HDR_SIZE
) {
1265 object_len
= tvb_get_ntohs(tvb
, offset
);
1266 if (object_len
< COPS_OBJECT_HDR_SIZE
) {
1268 ti
= proto_tree_add_uint(cops_pr_tree
, hf_cops_obj_len
, tvb
, offset
, 2, object_len
);
1269 expert_add_info_format(pinfo
, ti
, &ei_cops_bad_cops_pr_object_length
,
1270 "Bad COPS-PR object length: %u, should be at least %u",
1271 object_len
, COPS_OBJECT_HDR_SIZE
);
1274 s_num
= tvb_get_uint8(tvb
, offset
+ 2);
1276 ti
= proto_tree_add_uint_format(cops_pr_tree
, hf_cops_obj_s_num
, tvb
, offset
, object_len
, s_num
,
1277 "%s", val_to_str_const(s_num
, cops_s_num_vals
, "Unknown"));
1278 obj_tree
= proto_item_add_subtree(ti
, ett_cops_pr_obj
);
1280 proto_tree_add_uint(obj_tree
, hf_cops_obj_len
, tvb
, offset
, 2, object_len
);
1284 proto_tree_add_uint(obj_tree
, hf_cops_obj_s_num
, tvb
, offset
, 1, s_num
);
1288 s_type
= tvb_get_uint8(tvb
, offset
);
1289 type_str
= val_to_str_const(s_type
, cops_s_type_vals
, "Unknown");
1290 proto_tree_add_uint_format_value(obj_tree
, hf_cops_obj_s_type
, tvb
, offset
, 1, s_type
,
1293 strlen(type_str
) ? " (" : "",
1295 strlen(type_str
) ? ")" : "");
1299 contents_len
= object_len
- COPS_OBJECT_HDR_SIZE
;
1300 ret
= dissect_cops_pr_object_data(tvb
, pinfo
, offset
, obj_tree
, s_num
, s_type
, contents_len
,
1301 oid_info_p
, pprid_subids_p
, pprid_subids_len_p
);
1305 /* Pad to 32bit boundary */
1306 if (object_len
% sizeof (uint32_t))
1307 object_len
+= ((int)sizeof (uint32_t) - object_len
% (int)sizeof (uint32_t));
1309 pr_len
-= object_len
- COPS_OBJECT_HDR_SIZE
;
1310 offset
+= object_len
- COPS_OBJECT_HDR_SIZE
;
1314 static void dissect_cops_object_data(tvbuff_t
*tvb
, packet_info
*pinfo
, uint32_t offset
, proto_tree
*tree
,
1315 uint8_t op_code
, uint16_t client_type
, uint8_t c_num
, uint8_t c_type
, int len
, uint32_t* handle_value
)
1318 proto_tree
*r_type_tree
, *itf_tree
, *reason_tree
, *dec_tree
, *error_tree
, *clientsi_tree
, *pdp_tree
;
1319 uint16_t r_type
, m_type
, reason
, reason_sub
, cmd_code
, cmd_flags
, error
, error_sub
,
1320 tcp_port
, katimer
, accttimer
;
1322 ws_in6_addr ipv6addr
;
1323 oid_info_t
* oid_info
= NULL
;
1324 uint32_t* pprid_subids
= NULL
;
1325 unsigned pprid_subids_len
= 0;
1328 case COPS_OBJ_HANDLE
: /* handle is a variable-length field, however 32bit seems enough for most of the applications */
1330 offset
+= (len
-4); /* for handle longer than 32bit, only take lowest 32 bits as handle */
1331 *handle_value
= tvb_get_ntohl(tvb
, offset
);
1332 proto_tree_add_item(tree
, hf_cops_handle
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
1335 case COPS_OBJ_CONTEXT
:
1336 r_type
= tvb_get_ntohs(tvb
, offset
);
1337 m_type
= tvb_get_ntohs(tvb
, offset
+ 2);
1338 r_type_tree
= proto_tree_add_subtree_format(tree
, tvb
, offset
, 4, ett_cops_r_type_flags
, NULL
,
1339 "Contents: R-Type: %s, M-Type: %u",
1340 val_to_str_const(r_type
, cops_r_type_vals
, "Unknown"), m_type
);
1342 proto_tree_add_uint(r_type_tree
, hf_cops_r_type_flags
, tvb
, offset
, 2, r_type
);
1344 proto_tree_add_uint(r_type_tree
, hf_cops_m_type_flags
, tvb
, offset
, 2, m_type
);
1347 case COPS_OBJ_IN_INT
:
1348 case COPS_OBJ_OUT_INT
:
1349 if (c_type
== 1) { /* IPv4 */
1350 ifindex
= tvb_get_ntohl(tvb
, offset
+ 4);
1351 itf_tree
= proto_tree_add_subtree_format(tree
, tvb
, offset
, 8, ett_cops_itf
, NULL
,
1352 "Contents: IPv4 address %s, ifIndex: %u",
1353 tvb_ip_to_str(pinfo
->pool
, tvb
, offset
), ifindex
);
1354 proto_tree_add_item(itf_tree
,
1355 (c_num
== COPS_OBJ_IN_INT
) ? hf_cops_in_int_ipv4
: hf_cops_out_int_ipv4
,
1356 tvb
, offset
, 4, ENC_BIG_ENDIAN
);
1358 } else if (c_type
== 2) { /* IPv6 */
1359 ifindex
= tvb_get_ntohl(tvb
, offset
+ (int)sizeof ipv6addr
);
1360 itf_tree
= proto_tree_add_subtree_format(tree
, tvb
, offset
, 20, ett_cops_itf
, NULL
,
1361 "Contents: IPv6 address %s, ifIndex: %u",
1362 tvb_ip6_to_str(pinfo
->pool
, tvb
, offset
), ifindex
);
1363 proto_tree_add_item(itf_tree
,
1364 (c_num
== COPS_OBJ_IN_INT
) ? hf_cops_in_int_ipv6
: hf_cops_out_int_ipv6
,
1365 tvb
, offset
, 16, ENC_NA
);
1370 proto_tree_add_uint(itf_tree
, hf_cops_int_ifindex
, tvb
, offset
, 4, ifindex
);
1373 case COPS_OBJ_REASON
:
1374 reason
= tvb_get_ntohs(tvb
, offset
);
1375 reason_sub
= tvb_get_ntohs(tvb
, offset
+ 2);
1376 reason_tree
= proto_tree_add_subtree_format(tree
, tvb
, offset
, 4, ett_cops_reason
, NULL
,
1377 "Contents: Reason-Code: %s, Reason Sub-code: 0x%04x",
1378 val_to_str_const(reason
, cops_reason_vals
, "<Unknown value>"), reason_sub
);
1379 proto_tree_add_uint(reason_tree
, hf_cops_reason
, tvb
, offset
, 2, reason
);
1381 if (reason
== 13) { /* RFC 2748 2.2.5 */
1382 proto_tree_add_uint_format_value(reason_tree
, hf_cops_reason_sub
, tvb
, offset
, 2,
1383 reason_sub
, "Unknown object's C-Num %u, C-Type %u",
1384 tvb_get_uint8(tvb
, offset
), tvb_get_uint8(tvb
, offset
+ 1));
1386 proto_tree_add_uint(reason_tree
, hf_cops_reason_sub
, tvb
, offset
, 2, reason_sub
);
1389 case COPS_OBJ_DECISION
:
1390 case COPS_OBJ_LPDPDECISION
:
1392 cmd_code
= tvb_get_ntohs(tvb
, offset
);
1393 cmd_flags
= tvb_get_ntohs(tvb
, offset
+ 2);
1394 dec_tree
= proto_tree_add_subtree_format(tree
, tvb
, offset
, 4, ett_cops_decision
, NULL
, "Contents: Command-Code: %s, Flags: %s",
1395 val_to_str_const(cmd_code
, cops_dec_cmd_code_vals
, "<Unknown value>"),
1396 val_to_str_const(cmd_flags
, cops_dec_cmd_flag_vals
, "<Unknown flag>"));
1397 proto_tree_add_uint(dec_tree
, hf_cops_dec_cmd_code
, tvb
, offset
, 2, cmd_code
);
1399 proto_tree_add_uint(dec_tree
, hf_cops_dec_flags
, tvb
, offset
, 2, cmd_flags
);
1400 } else if (c_type
== 5) { /*COPS-PR Data*/
1401 dec_tree
= proto_tree_add_subtree_format(tree
, tvb
, offset
, len
, ett_cops_decision
, NULL
, "Contents: %d bytes", len
);
1402 dissect_cops_pr_objects(tvb
, pinfo
, offset
, dec_tree
, len
, &oid_info
, &pprid_subids
, &pprid_subids_len
);
1405 /* PacketCable : Analyze the remaining data if available */
1406 if (client_type
== COPS_CLIENT_PC_DQOS
&& c_type
== 4) {
1407 cops_analyze_packetcable_dqos_obj(tvb
, pinfo
, tree
, op_code
, offset
);
1408 } else if (client_type
== COPS_CLIENT_PC_MM
&& c_type
== 4) {
1409 cops_analyze_packetcable_mm_obj(tvb
, pinfo
, tree
, op_code
, offset
);
1413 case COPS_OBJ_ERROR
:
1417 error
= tvb_get_ntohs(tvb
, offset
);
1418 error_sub
= tvb_get_ntohs(tvb
, offset
+ 2);
1419 error_tree
= proto_tree_add_subtree_format(tree
, tvb
, offset
, 4, ett_cops_error
, NULL
,
1420 "Contents: Error-Code: %s, Error Sub-code: 0x%04x",
1421 val_to_str_const(error
, cops_error_vals
, "<Unknown value>"), error_sub
);
1422 proto_tree_add_uint(error_tree
, hf_cops_error
, tvb
, offset
, 2, error
);
1424 if (error
== 13) { /* RFC 2748 2.2.8 */
1425 proto_tree_add_uint_format_value(error_tree
, hf_cops_error_sub
, tvb
, offset
, 2,
1426 error_sub
, "Unknown object's C-Num %u, C-Type %u",
1427 tvb_get_uint8(tvb
, offset
), tvb_get_uint8(tvb
, offset
+ 1));
1429 proto_tree_add_uint(error_tree
, hf_cops_error_sub
, tvb
, offset
, 2, error_sub
);
1432 case COPS_OBJ_CLIENTSI
:
1434 /* For PacketCable */
1435 if (client_type
== COPS_CLIENT_PC_DQOS
&& c_type
== 1) {
1436 cops_analyze_packetcable_dqos_obj(tvb
, pinfo
, tree
, op_code
, offset
);
1438 } else if (client_type
== COPS_CLIENT_PC_MM
&& c_type
== 1) {
1439 cops_analyze_packetcable_mm_obj(tvb
, pinfo
, tree
, op_code
, offset
);
1443 if (c_type
!= 2) /*Not COPS-PR data*/
1446 clientsi_tree
= proto_tree_add_subtree_format(tree
, tvb
, offset
, 4, ett_cops_clientsi
, NULL
, "Contents: %d bytes", len
);
1448 dissect_cops_pr_objects(tvb
, pinfo
, offset
, clientsi_tree
, len
, &oid_info
, &pprid_subids
, &pprid_subids_len
);
1451 case COPS_OBJ_KATIMER
:
1455 katimer
= tvb_get_ntohs(tvb
, offset
+ 2);
1457 proto_tree_add_uint_format_value(tree
, hf_cops_katimer
, tvb
, offset
+ 2, 2, katimer
, "0 (infinity)");
1459 proto_tree_add_item(tree
, hf_cops_katimer
, tvb
, offset
+ 2, 2, ENC_BIG_ENDIAN
);
1462 case COPS_OBJ_PEPID
:
1466 if (tvb_strnlen(tvb
, offset
, len
) == -1) {
1467 ti
= proto_tree_add_item(tree
, hf_cops_pepid
, tvb
, offset
, len
, ENC_ASCII
);
1468 expert_add_info(pinfo
, ti
, &ei_cops_pepid_not_null
);
1471 proto_tree_add_item(tree
, hf_cops_pepid
, tvb
, offset
,
1472 tvb_strnlen(tvb
, offset
, len
) + 1, ENC_ASCII
);
1475 case COPS_OBJ_REPORT_TYPE
:
1479 proto_tree_add_item(tree
, hf_cops_report_type
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
1482 case COPS_OBJ_PDPREDIRADDR
:
1483 case COPS_OBJ_LASTPDPADDR
:
1484 if (c_type
== 1) { /* IPv4 */
1485 tcp_port
= tvb_get_ntohs(tvb
, offset
+ 4 + 2);
1486 pdp_tree
= proto_tree_add_subtree_format(tree
, tvb
, offset
, 8, ett_cops_pdp
, NULL
,
1487 "Contents: IPv4 address %s, TCP Port Number: %u",
1488 tvb_ip_to_str(pinfo
->pool
, tvb
, offset
), tcp_port
);
1489 proto_tree_add_item(pdp_tree
,
1490 (c_num
== COPS_OBJ_PDPREDIRADDR
) ? hf_cops_pdprediraddr_ipv4
: hf_cops_lastpdpaddr_ipv4
,
1491 tvb
, offset
, 4, ENC_BIG_ENDIAN
);
1493 } else if (c_type
== 2) { /* IPv6 */
1494 tcp_port
= tvb_get_ntohs(tvb
, offset
+ (int)sizeof ipv6addr
+ 2);
1495 pdp_tree
= proto_tree_add_subtree_format(tree
, tvb
, offset
, 20, ett_cops_pdp
, NULL
,
1496 "Contents: IPv6 address %s, TCP Port Number: %u",
1497 tvb_ip6_to_str(pinfo
->pool
, tvb
, offset
), tcp_port
);
1498 proto_tree_add_item(pdp_tree
,
1499 (c_num
== COPS_OBJ_PDPREDIRADDR
) ? hf_cops_pdprediraddr_ipv6
: hf_cops_lastpdpaddr_ipv6
,
1500 tvb
, offset
, 16, ENC_NA
);
1506 proto_tree_add_uint(pdp_tree
, hf_cops_pdp_tcp_port
, tvb
, offset
, 2, tcp_port
);
1509 case COPS_OBJ_ACCTTIMER
:
1513 accttimer
= tvb_get_ntohs(tvb
, offset
+ 2);
1514 if (accttimer
== 0) {
1515 proto_tree_add_uint_format_value(tree
, hf_cops_accttimer
, tvb
, offset
+ 2, 2, accttimer
,
1516 "0 (there SHOULD be no unsolicited accounting updates)");
1518 proto_tree_add_item(tree
, hf_cops_accttimer
, tvb
, offset
+ 2, 2, ENC_BIG_ENDIAN
);
1521 case COPS_OBJ_INTEGRITY
:
1523 break; /* Not HMAC digest */
1525 proto_tree_add_item(tree
, hf_cops_key_id
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
1526 proto_tree_add_item(tree
, hf_cops_seq_num
, tvb
, offset
+ 4, 4, ENC_BIG_ENDIAN
);
1527 proto_tree_add_item(tree
, hf_cops_keyed_message_digest
, tvb
, offset
+ 8 , len
- 8, ENC_NA
);
1531 proto_tree_add_expert_format(tree
, pinfo
, &ei_cops_unknown_c_num
, tvb
, offset
, len
, "Unknown C-Num %d, Contents: %d bytes", c_num
, len
);
1536 static unsigned redecode_oid(uint32_t* pprid_subids
, unsigned pprid_subids_len
, uint8_t* encoded_subids
, unsigned encoded_len
, uint32_t** subids_p
) {
1541 uint32_t* subid_overflow
;
1543 for (i
=0; i
<encoded_len
; i
++) { if (! (encoded_subids
[i
] & 0x80 )) n
++; }
1545 *subids_p
= subids
= (uint32_t *)wmem_alloc(wmem_packet_scope(), sizeof(uint32_t)*(n
+pprid_subids_len
));
1546 subid_overflow
= subids
+n
+pprid_subids_len
;
1547 for (i
=0;i
<pprid_subids_len
;i
++) subids
[i
] = pprid_subids
[i
];
1549 subids
+= pprid_subids_len
;
1552 for (i
=0; i
<encoded_len
; i
++){
1553 uint8_t byte
= encoded_subids
[i
];
1556 subid
|= byte
& 0x7F;
1562 DISSECTOR_ASSERT(subids
< subid_overflow
);
1567 return pprid_subids_len
+n
;
1571 static int dissect_cops_pr_object_data(tvbuff_t
*tvb
, packet_info
*pinfo
, uint32_t offset
, proto_tree
*tree
,
1572 uint8_t s_num
, uint8_t s_type
, int len
,
1573 oid_info_t
** oid_info_p
, uint32_t** pprid_subids
, unsigned* pprid_subids_len
) {
1574 proto_tree
*asn_tree
, *gperror_tree
, *cperror_tree
;
1575 uint16_t gperror
=0, gperror_sub
=0, cperror
=0, cperror_sub
=0;
1578 memset(&actx
,0,sizeof(actx
));
1582 case COPS_OBJ_PPRID
: {
1583 tvbuff_t
* oid_tvb
= NULL
;
1585 if (s_type
!= 1) /* Not Prefix Provisioning Instance Identifier (PPRID) */
1587 /* Never tested this branch */
1588 asn_tree
= proto_tree_add_subtree(tree
, tvb
, offset
, len
, ett_cops_asn1
, NULL
, "Contents:");
1590 dissect_ber_object_identifier(false, &actx
, asn_tree
, tvb
, offset
, hf_cops_pprid_oid
, &oid_tvb
);
1596 encoid_len
= tvb_reported_length_remaining(oid_tvb
,0);
1597 if (encoid_len
> 0) {
1598 encoid
= (uint8_t*)tvb_memdup(pinfo
->pool
,oid_tvb
,0,encoid_len
);
1599 (*pprid_subids_len
) = oid_encoded2subid(pinfo
->pool
, encoid
, encoid_len
, pprid_subids
);
1604 case COPS_OBJ_PRID
: {
1606 unsigned subids_len
;
1612 unsigned encoid_len
;
1614 oid_info_t
* oid_info
;
1616 if (s_type
!= 1) break; /* Not Provisioning Instance Identifier (PRID) */
1618 asn_tree
= proto_tree_add_subtree(tree
, tvb
, offset
, len
, ett_cops_asn1
, NULL
, "Contents:");
1620 offset
= get_ber_identifier(tvb
, offset
, &ber_class
, &ber_pc
, &ber_tag
);
1621 offset
= get_ber_length(tvb
, offset
, &encoid_len
, NULL
);
1623 /* TODO: check pc, class and tag */
1625 encoid
= (uint8_t*)tvb_memdup(pinfo
->pool
,tvb
,offset
,encoid_len
);
1627 if (*pprid_subids
) {
1628 /* Never tested this branch */
1629 subids_len
= redecode_oid(*pprid_subids
, *pprid_subids_len
, encoid
, encoid_len
, &subids
);
1630 encoid_len
= oid_subid2encoded(pinfo
->pool
, subids_len
, subids
, &encoid
);
1632 subids_len
= oid_encoded2subid(pinfo
->pool
, encoid
, encoid_len
, &subids
);
1635 proto_tree_add_oid(asn_tree
,hf_cops_prid_oid
,tvb
,offset
,encoid_len
,encoid
);
1637 oid_info
= oid_get(subids_len
, subids
, &matched
, &left
);
1640 TODO: from RFC 3159 find-out how the values are mapped;
1641 when instead of an oid for an xxEntry
1642 we have one describing a scalar or something else;
1643 what's below works in most cases but is not complete.
1645 if (left
<= 1 && oid_info
->kind
== OID_KIND_ROW
) {
1646 *oid_info_p
= oid_info
;
1653 case COPS_OBJ_EPD
: {
1654 oid_info_t
* oid_info
;
1655 unsigned end_offset
= offset
+ len
;
1657 if (s_type
!= 1) break;/* Not Encoded Provisioning Instance Data (EPD) */
1659 asn_tree
= proto_tree_add_subtree(tree
, tvb
, offset
, len
, ett_cops_asn1
, NULL
, "Contents:");
1662 * XXX: LAZINESS WARNING:
1663 * We are assuming that for the first element in the sequence
1664 * that describes an entry subid==1, and, that the subsequent elements
1665 * use ++subid; This is true for all IETF's PIBs (and good sense
1666 * indicates it should be this way) but AFAIK there's nothing in
1667 * SMIv2 that imposes this restriction. -- a lazy lego
1671 if ((*oid_info_p
)->kind
== OID_KIND_ROW
) {
1672 oid_info
= (oid_info_t
*)wmem_tree_lookup32((*oid_info_p
)->children
,1);
1681 while(offset
< end_offset
) {
1685 uint32_t ber_length
;
1689 offset
= get_ber_identifier(tvb
, offset
, &ber_class
, &ber_pc
, &ber_tag
);
1690 offset
= get_ber_length(tvb
, offset
, &ber_length
, &ber_ind
);
1694 * XXX: LAZINESS WARNING:
1695 * We are assuming that the value of the sequenced item is of
1696 * the right class, the right type and the right length.
1697 * We should check that to avoid throwing a Malformed packet and
1699 * We should verify the class and the tag match what we expect as well,
1700 * but COPS and SNMP use different tags (&#@$!) so the typedata in oid_info_t
1701 * does not work here.
1704 hfid
= oid_info
->value_hfid
;
1705 oid_info
= (oid_info_t
*)wmem_tree_lookup32((*oid_info_p
)->children
,oid_info
->subid
+1);
1707 hfid
= cops_tag_cls2syntax( ber_tag
, ber_class
);
1708 switch (proto_registrar_get_ftype(hfid
)) {
1724 proto_tree_add_item(asn_tree
,hfid
,tvb
,offset
,ber_length
,ENC_BIG_ENDIAN
);
1728 proto_tree_add_item(asn_tree
,hfid
,tvb
,offset
,ber_length
,ENC_ASCII
|ENC_NA
);
1732 proto_tree_add_item(asn_tree
,hfid
,tvb
,offset
,ber_length
,ENC_NA
);
1736 offset
+= ber_length
;
1739 (*oid_info_p
) = NULL
;
1742 case COPS_OBJ_ERRPRID
: {
1743 if (s_type
!= 1) break; /*Not Error Provisioning Instance Identifier (ErrorPRID)*/
1745 asn_tree
= proto_tree_add_subtree(tree
, tvb
, offset
, len
, ett_cops_asn1
, NULL
, "Contents:");
1747 dissect_ber_object_identifier(false, &actx
, asn_tree
, tvb
, offset
, hf_cops_errprid_oid
, NULL
);
1751 case COPS_OBJ_GPERR
:
1752 if (s_type
!= 1) /* Not Global Provisioning Error Object (GPERR) */
1755 gperror
= tvb_get_ntohs(tvb
, offset
);
1756 gperror_sub
= tvb_get_ntohs(tvb
, offset
+ 2);
1757 gperror_tree
= proto_tree_add_subtree_format(tree
, tvb
, offset
, 4, ett_cops_gperror
, NULL
,
1758 "Contents: Error-Code: %s, Error Sub-code: 0x%04x",
1759 val_to_str_const(gperror
, cops_gperror_vals
, "<Unknown value>"), gperror_sub
);
1760 proto_tree_add_uint(gperror_tree
, hf_cops_gperror
, tvb
, offset
, 2, gperror
);
1762 if (gperror
== 13) { /* RFC 3084 4.4 */
1763 proto_tree_add_uint_format_value(gperror_tree
, hf_cops_gperror_sub
, tvb
, offset
, 2,
1764 gperror_sub
, "Unknown object's C-Num %u, C-Type %u",
1765 tvb_get_uint8(tvb
, offset
), tvb_get_uint8(tvb
, offset
+ 1));
1767 proto_tree_add_uint(gperror_tree
, hf_cops_gperror_sub
, tvb
, offset
, 2, gperror_sub
);
1770 case COPS_OBJ_CPERR
:
1771 if (s_type
!= 1) /*Not PRC Class Provisioning Error Object (CPERR) */
1774 cperror
= tvb_get_ntohs(tvb
, offset
);
1775 cperror_sub
= tvb_get_ntohs(tvb
, offset
+ 2);
1776 cperror_tree
= proto_tree_add_subtree_format(tree
, tvb
, offset
, 4, ett_cops_gperror
, NULL
,
1777 "Contents: Error-Code: %s, Error Sub-code: 0x%04x",
1778 val_to_str_const(gperror
, cops_gperror_vals
, "<Unknown value>"), gperror_sub
);
1779 proto_tree_add_uint(cperror_tree
, hf_cops_cperror
, tvb
, offset
, 2, cperror
);
1781 if (cperror
== 13) { /* RFC 3084 4.5 */
1782 proto_tree_add_uint_format_value(cperror_tree
, hf_cops_cperror_sub
, tvb
, offset
, 2, cperror_sub
,
1783 "Unknown object's S-Num %u, C-Type %u",
1784 tvb_get_uint8(tvb
, offset
), tvb_get_uint8(tvb
, offset
+ 1));
1786 proto_tree_add_uint(cperror_tree
, hf_cops_cperror_sub
, tvb
, offset
, 2, cperror_sub
);
1790 proto_tree_add_bytes_format_value(tree
, hf_cops_integrity_contents
, tvb
, offset
, len
, NULL
, "%d bytes", len
);
1798 /* Register the protocol with Wireshark */
1799 void proto_register_cops(void)
1801 /* Setup list of header fields */
1802 static hf_register_info hf
[] = {
1803 { &hf_cops_ver_flags
,
1804 { "Version and Flags", "cops.ver_flags",
1805 FT_UINT8
, BASE_HEX
, NULL
, 0x0,
1806 "Version and Flags in COPS Common Header", HFILL
}
1809 { "Version", "cops.version",
1810 FT_UINT8
, BASE_DEC
, NULL
, 0xF0,
1811 "Version in COPS Common Header", HFILL
}
1814 { "Flags", "cops.flags",
1815 FT_UINT8
, BASE_HEX
, VALS(cops_flags_vals
), 0x0F,
1816 "Flags in COPS Common Header", HFILL
}
1818 { &hf_cops_response_in
,
1819 { "Response In", "cops.response_in",
1820 FT_FRAMENUM
, BASE_NONE
, FRAMENUM_TYPE(FT_FRAMENUM_RESPONSE
), 0x0,
1821 "The response to this COPS request is in this frame", HFILL
}
1823 { &hf_cops_response_to
,
1824 { "Request In", "cops.response_to",
1825 FT_FRAMENUM
, BASE_NONE
, FRAMENUM_TYPE(FT_FRAMENUM_REQUEST
), 0x0,
1826 "This is a response to the COPS request in this frame", HFILL
}
1828 { &hf_cops_response_time
,
1829 { "Response Time", "cops.response_time",
1830 FT_RELATIVE_TIME
, BASE_NONE
, NULL
, 0x0,
1831 "The time between the Call and the Reply", HFILL
}
1834 { "Op Code", "cops.op_code",
1835 FT_UINT8
, BASE_DEC
, VALS(cops_op_code_vals
), 0x0,
1836 "Op Code in COPS Common Header", HFILL
}
1838 { &hf_cops_client_type
,
1839 { "Client Type", "cops.client_type",
1840 FT_UINT16
, BASE_DEC
, VALS(cops_client_type_vals
), 0x0,
1841 "Client Type in COPS Common Header", HFILL
}
1844 { "Message Length", "cops.msg_len",
1845 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1846 "Message Length in COPS Common Header", HFILL
}
1849 { "Object Length", "cops.obj.len",
1850 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1851 "Object Length in COPS Object Header", HFILL
}
1853 { &hf_cops_obj_c_num
,
1854 { "C-Num", "cops.c_num",
1855 FT_UINT8
, BASE_DEC
, VALS(cops_c_num_vals
), 0x0,
1856 "C-Num in COPS Object Header", HFILL
}
1858 { &hf_cops_obj_c_type
,
1859 { "C-Type", "cops.c_type",
1860 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
1861 "C-Type in COPS Object Header", HFILL
}
1864 { &hf_cops_obj_s_num
,
1865 { "S-Num", "cops.s_num",
1866 FT_UINT8
, BASE_DEC
, VALS(cops_s_num_vals
), 0x0,
1867 "S-Num in COPS-PR Object Header", HFILL
}
1869 { &hf_cops_obj_s_type
,
1870 { "S-Type", "cops.s_type",
1871 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
1872 "S-Type in COPS-PR Object Header", HFILL
}
1875 { "Handle", "cops.handle",
1876 FT_UINT32
, BASE_HEX
, NULL
, 0x0,
1877 "Handle in COPS Handle Object", HFILL
}
1879 { &hf_cops_r_type_flags
,
1880 { "R-Type", "cops.context.r_type",
1881 FT_UINT16
, BASE_HEX
, VALS(cops_r_type_vals
), 0x0,
1882 "R-Type in COPS Context Object", HFILL
}
1884 { &hf_cops_m_type_flags
,
1885 { "M-Type", "cops.context.m_type",
1886 FT_UINT16
, BASE_HEX
, NULL
, 0x0,
1887 "M-Type in COPS Context Object", HFILL
}
1889 { &hf_cops_in_int_ipv4
,
1890 { "IPv4 address", "cops.in-int.ipv4",
1891 FT_IPv4
, BASE_NONE
, NULL
, 0,
1892 "IPv4 address in COPS IN-Int object", HFILL
}
1894 { &hf_cops_in_int_ipv6
,
1895 { "IPv6 address", "cops.in-int.ipv6",
1896 FT_IPv6
, BASE_NONE
, NULL
, 0,
1897 "IPv6 address in COPS IN-Int object", HFILL
}
1899 { &hf_cops_out_int_ipv4
,
1900 { "IPv4 address", "cops.out-int.ipv4",
1901 FT_IPv4
, BASE_NONE
, NULL
, 0,
1902 "IPv4 address in COPS OUT-Int object", HFILL
}
1904 { &hf_cops_out_int_ipv6
,
1905 { "IPv6 address", "cops.out-int.ipv6",
1906 FT_IPv6
, BASE_NONE
, NULL
, 0,
1907 "IPv6 address in COPS OUT-Int", HFILL
}
1909 { &hf_cops_int_ifindex
,
1910 { "ifIndex", "cops.in-out-int.ifindex",
1911 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1912 "If SNMP is supported, corresponds to MIB-II ifIndex", HFILL
}
1915 { "Reason", "cops.reason",
1916 FT_UINT16
, BASE_DEC
, VALS(cops_reason_vals
), 0,
1917 "Reason in Reason object", HFILL
}
1919 { &hf_cops_reason_sub
,
1920 { "Reason Sub-code", "cops.reason_sub",
1921 FT_UINT16
, BASE_HEX
, NULL
, 0,
1922 "Reason Sub-code in Reason object", HFILL
}
1924 { &hf_cops_dec_cmd_code
,
1925 { "Command-Code", "cops.decision.cmd",
1926 FT_UINT16
, BASE_DEC
, VALS(cops_dec_cmd_code_vals
), 0,
1927 "Command-Code in Decision/LPDP Decision object", HFILL
}
1929 { &hf_cops_dec_flags
,
1930 { "Flags", "cops.decision.flags",
1931 FT_UINT16
, BASE_HEX
, VALS(cops_dec_cmd_flag_vals
), 0xffff,
1932 "Flags in Decision/LPDP Decision object", HFILL
}
1935 { "Error", "cops.error",
1936 FT_UINT16
, BASE_DEC
, VALS(cops_error_vals
), 0,
1937 "Error in Error object", HFILL
}
1939 { &hf_cops_error_sub
,
1940 { "Error Sub-code", "cops.error_sub",
1941 FT_UINT16
, BASE_HEX
, NULL
, 0,
1942 "Error Sub-code in Error object", HFILL
}
1945 { "Contents: KA Timer Value", "cops.katimer.value",
1946 FT_UINT16
, BASE_DEC
, NULL
, 0,
1947 "Keep-Alive Timer Value in KATimer object", HFILL
}
1950 { "Contents: PEP Id", "cops.pepid.id",
1951 FT_STRING
, BASE_NONE
, NULL
, 0,
1952 "PEP Id in PEPID object", HFILL
}
1954 { &hf_cops_report_type
,
1955 { "Contents: Report-Type", "cops.report_type",
1956 FT_UINT16
, BASE_DEC
, VALS(cops_report_type_vals
), 0,
1957 "Report-Type in Report-Type object", HFILL
}
1959 { &hf_cops_pdprediraddr_ipv4
,
1960 { "IPv4 address", "cops.pdprediraddr.ipv4",
1961 FT_IPv4
, BASE_NONE
, NULL
, 0,
1962 "IPv4 address in COPS PDPRedirAddr object", HFILL
}
1964 { &hf_cops_pdprediraddr_ipv6
,
1965 { "IPv6 address", "cops.pdprediraddr.ipv6",
1966 FT_IPv6
, BASE_NONE
, NULL
, 0,
1967 "IPv6 address in COPS PDPRedirAddr object", HFILL
}
1969 { &hf_cops_lastpdpaddr_ipv4
,
1970 { "IPv4 address", "cops.lastpdpaddr.ipv4",
1971 FT_IPv4
, BASE_NONE
, NULL
, 0,
1972 "IPv4 address in COPS LastPDPAddr object", HFILL
}
1974 { &hf_cops_lastpdpaddr_ipv6
,
1975 { "IPv6 address", "cops.lastpdpaddr.ipv6",
1976 FT_IPv6
, BASE_NONE
, NULL
, 0,
1977 "IPv6 address in COPS LastPDPAddr object", HFILL
}
1979 { &hf_cops_pdp_tcp_port
,
1980 { "TCP Port Number", "cops.pdp.tcp_port",
1981 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1982 "TCP Port Number of PDP in PDPRedirAddr/LastPDPAddr object", HFILL
}
1984 { &hf_cops_accttimer
,
1985 { "Contents: ACCT Timer Value", "cops.accttimer.value",
1986 FT_UINT16
, BASE_DEC
, NULL
, 0,
1987 "Accounting Timer Value in AcctTimer object", HFILL
}
1990 { "Contents: Key ID", "cops.integrity.key_id",
1991 FT_UINT32
, BASE_DEC
, NULL
, 0,
1992 "Key ID in Integrity object", HFILL
}
1995 { "Contents: Sequence Number", "cops.integrity.seq_num",
1996 FT_UINT32
, BASE_DEC
, NULL
, 0,
1997 "Sequence Number in Integrity object", HFILL
}
1999 { &hf_cops_keyed_message_digest
,
2000 { "Contents: Keyed Message Digest", "cops.integrity.keyed_message_digest",
2001 FT_BYTES
, BASE_NONE
, NULL
, 0,
2004 { &hf_cops_integrity_contents
,
2005 { "Contents", "cops.integrity.contents",
2006 FT_BYTES
, BASE_NONE
, NULL
, 0,
2009 { &hf_cops_opaque_data
,
2010 { "Opaque Data", "cops.opaque_data",
2011 FT_BYTES
, BASE_NONE
, NULL
, 0,
2015 { "Error", "cops.gperror",
2016 FT_UINT16
, BASE_DEC
, VALS(cops_gperror_vals
), 0,
2017 "Error in Error object", HFILL
}
2019 { &hf_cops_gperror_sub
,
2020 { "Error Sub-code", "cops.gperror_sub",
2021 FT_UINT16
, BASE_HEX
, NULL
, 0,
2022 "Error Sub-code in Error object", HFILL
}
2025 { "Error", "cops.cperror",
2026 FT_UINT16
, BASE_DEC
, VALS(cops_cperror_vals
), 0,
2027 "Error in Error object", HFILL
}
2029 { &hf_cops_cperror_sub
,
2030 { "Error Sub-code", "cops.cperror_sub",
2031 FT_UINT16
, BASE_HEX
, NULL
, 0,
2032 "Error Sub-code in Error object", HFILL
}
2035 { &hf_cops_reserved8
, { "Reserved", "cops.reserved", FT_UINT8
, BASE_HEX
, NULL
, 0, NULL
, HFILL
} },
2036 { &hf_cops_reserved16
, { "Reserved", "cops.reserved", FT_UINT16
, BASE_HEX
, NULL
, 0, NULL
, HFILL
} },
2037 { &hf_cops_reserved24
, { "Reserved", "cops.reserved", FT_UINT24
, BASE_HEX
, NULL
, 0, NULL
, HFILL
} },
2039 { &hf_cops_prid_oid
, { "PRID Instance Identifier", "cops.prid.instance_id", FT_OID
, BASE_NONE
, NULL
, 0, NULL
, HFILL
} },
2040 { &hf_cops_pprid_oid
, { "Prefix Identifier", "cops.pprid.prefix_id", FT_OID
, BASE_NONE
, NULL
, 0, NULL
, HFILL
} },
2041 { &hf_cops_errprid_oid
, { "ErrorPRID Instance Identifier", "cops.errprid.instance_id", FT_OID
, BASE_NONE
, NULL
, 0, NULL
, HFILL
} },
2042 { &hf_cops_epd_unknown
, { "EPD Unknown Data", "cops.epd.unknown", FT_BYTES
, BASE_NONE
, NULL
, 0, NULL
, HFILL
} },
2043 { &hf_cops_epd_null
, { "EPD Null Data", "cops.epd.null", FT_BYTES
, BASE_NONE
, NULL
, 0, NULL
, HFILL
} },
2044 { &hf_cops_epd_int
, { "EPD Integer Data", "cops.epd.int", FT_INT64
, BASE_DEC
, NULL
, 0, NULL
, HFILL
} },
2045 { &hf_cops_epd_octets
, { "EPD Octet String Data", "cops.epd.octets", FT_BYTES
, BASE_NONE
, NULL
, 0, NULL
, HFILL
} },
2046 { &hf_cops_epd_oid
, { "EPD OID Data", "cops.epd.oid", FT_OID
, BASE_NONE
, NULL
, 0, NULL
, HFILL
} },
2047 { &hf_cops_epd_ipv4
, { "EPD IPAddress Data", "cops.epd.ipv4", FT_IPv4
, BASE_NONE
, NULL
, 0, NULL
, HFILL
} },
2048 { &hf_cops_epd_u32
, { "EPD Unsigned32 Data", "cops.epd.unsigned32", FT_UINT64
, BASE_DEC
, NULL
, 0, NULL
, HFILL
} },
2049 { &hf_cops_epd_ticks
, { "EPD TimeTicks Data", "cops.epd.timeticks", FT_UINT64
, BASE_DEC
, NULL
, 0, NULL
, HFILL
} },
2050 { &hf_cops_epd_opaque
, { "EPD Opaque Data", "cops.epd.opaque", FT_BYTES
, BASE_NONE
, NULL
, 0, NULL
, HFILL
} },
2051 { &hf_cops_epd_i64
, { "EPD Integer64 Data", "cops.epd.integer64", FT_INT64
, BASE_DEC
, NULL
, 0, NULL
, HFILL
} },
2052 { &hf_cops_epd_u64
, { "EPD Unsigned64 Data", "cops.epd.unsigned64", FT_UINT64
, BASE_DEC
, NULL
, 0, NULL
, HFILL
} },
2054 /* Added for PacketCable */
2057 { "Object Subtree", "cops.pc_subtree",
2058 FT_NONE
, BASE_NONE
, NULL
, 0,
2061 { &hf_cops_pc_ds_field
,
2062 { "DS Field (DSCP or TOS)", "cops.pc_ds_field",
2063 FT_UINT8
, BASE_HEX
, NULL
, 0x00,
2066 { &hf_cops_pc_direction
,
2067 { "Direction", "cops.pc_direction",
2068 FT_UINT8
, BASE_HEX
, NULL
, 0x00,
2071 { &hf_cops_pc_gate_spec_flags
,
2072 { "Flags", "cops.pc_gate_spec_flags",
2073 FT_UINT8
, BASE_HEX
, NULL
, 0x00,
2076 { &hf_cops_pc_protocol_id
,
2077 { "Protocol ID", "cops.pc_protocol_id",
2078 FT_UINT8
, BASE_HEX
, NULL
, 0x00,
2081 { &hf_cops_pc_session_class
,
2082 { "Session Class", "cops.pc_session_class",
2083 FT_UINT8
, BASE_HEX
, NULL
, 0x00,
2086 { &hf_cops_pc_algorithm
,
2087 { "Algorithm", "cops.pc_algorithm",
2088 FT_UINT16
, BASE_HEX
, NULL
, 0x00,
2091 { &hf_cops_pc_cmts_ip_port
,
2092 { "CMTS IP Port", "cops.pc_cmts_ip_port",
2093 FT_UINT16
, BASE_HEX
, NULL
, 0x00,
2096 { &hf_cops_pc_prks_ip_port
,
2097 { "PRKS IP Port", "cops.pc_prks_ip_port",
2098 FT_UINT16
, BASE_HEX
, NULL
, 0x00,
2101 { &hf_cops_pc_srks_ip_port
,
2102 { "SRKS IP Port", "cops.pc_srks_ip_port",
2103 FT_UINT16
, BASE_HEX
, NULL
, 0x00,
2106 { &hf_cops_pc_dest_port
,
2107 { "Destination IP Port", "cops.pc_dest_port",
2108 FT_UINT16
, BASE_HEX
, NULL
, 0x00,
2111 { &hf_cops_pc_packetcable_err_code
,
2112 { "Error Code", "cops.pc_packetcable_err_code",
2113 FT_UINT16
, BASE_HEX
, NULL
, 0x00,
2116 { &hf_cops_pc_packetcable_sub_code
,
2117 { "Error Sub Code", "cops.pc_packetcable_sub_code",
2118 FT_UINT16
, BASE_HEX
, NULL
, 0x00,
2121 { &hf_cops_pc_remote_flags
,
2122 { "Flags", "cops.pc_remote_flags",
2123 FT_UINT16
, BASE_HEX
, NULL
, 0x00,
2126 { &hf_cops_pc_close_subcode
,
2127 { "Reason Sub Code", "cops.pc_close_subcode",
2128 FT_UINT16
, BASE_HEX
, NULL
, 0x00,
2131 { &hf_cops_pc_gate_command_type
,
2132 { "Gate Command Type", "cops.pc_gate_command_type",
2133 FT_UINT16
, BASE_HEX
, NULL
, 0x00,
2136 { &hf_cops_pc_reason_code
,
2137 { "Reason Code", "cops.pc_reason_code",
2138 FT_UINT16
, BASE_HEX
, NULL
, 0x00,
2141 { &hf_cops_pc_delete_subcode
,
2142 { "Reason Sub Code", "cops.pc_delete_subcode",
2143 FT_UINT16
, BASE_HEX
, NULL
, 0x00,
2146 { &hf_cops_pc_src_port
,
2147 { "Source IP Port", "cops.pc_src_port",
2148 FT_UINT16
, BASE_HEX
, NULL
, 0x00,
2151 { &hf_cops_pc_t1_value
,
2152 { "Timer T1 Value (sec)", "cops.pc_t1_value",
2153 FT_UINT16
, BASE_HEX
, NULL
, 0x00,
2156 { &hf_cops_pc_t7_value
,
2157 { "Timer T7 Value (sec)", "cops.pc_t7_value",
2158 FT_UINT16
, BASE_HEX
, NULL
, 0x00,
2161 { &hf_cops_pc_t8_value
,
2162 { "Timer T8 Value (sec)", "cops.pc_t8_value",
2163 FT_UINT16
, BASE_HEX
, NULL
, 0x00,
2166 { &hf_cops_pc_transaction_id
,
2167 { "Transaction Identifier", "cops.pc_transaction_id",
2168 FT_UINT16
, BASE_HEX
, NULL
, 0x00,
2171 { &hf_cops_pc_cmts_ip
,
2172 { "CMTS IP Address", "cops.pc_cmts_ip",
2173 FT_IPv4
, BASE_NONE
, NULL
, 0x00,
2176 { &hf_cops_pc_prks_ip
,
2177 { "PRKS IP Address", "cops.pc_prks_ip",
2178 FT_IPv4
, BASE_NONE
, NULL
, 0x00,
2181 { &hf_cops_pc_srks_ip
,
2182 { "SRKS IP Address", "cops.pc_srks_ip",
2183 FT_IPv4
, BASE_NONE
, NULL
, 0x00,
2186 { &hf_cops_pc_dfcdc_ip
,
2187 { "DF IP Address CDC", "cops.pc_dfcdc_ip",
2188 FT_IPv4
, BASE_NONE
, NULL
, 0x00,
2191 { &hf_cops_pc_dfccc_ip
,
2192 { "DF IP Address CCC", "cops.pc_dfccc_ip",
2193 FT_IPv4
, BASE_NONE
, NULL
, 0x00,
2196 { &hf_cops_pc_dfcdc_ip_port
,
2197 { "DF IP Port CDC", "cops.pc_dfcdc_ip_port",
2198 FT_UINT16
, BASE_HEX
, NULL
, 0x00,
2201 { &hf_cops_pc_dfccc_ip_port
,
2202 { "DF IP Port CCC", "cops.pc_dfccc_ip_port",
2203 FT_UINT16
, BASE_HEX
, NULL
, 0x00,
2206 { &hf_cops_pc_dfccc_id
,
2207 { "CCC ID", "cops.pc_dfccc_id",
2208 FT_UINT32
, BASE_DEC
, NULL
, 0x00,
2211 { &hf_cops_pc_activity_count
,
2212 { "Count", "cops.pc_activity_count",
2213 FT_UINT32
, BASE_HEX
, NULL
, 0x00,
2216 { &hf_cops_pc_dest_ip
,
2217 { "Destination IP Address", "cops.pc_dest_ip",
2218 FT_IPv4
, BASE_NONE
, NULL
, 0x00,
2221 { &hf_cops_pc_gate_id
,
2222 { "Gate Identifier", "cops.pc_gate_id",
2223 FT_UINT32
, BASE_HEX
, NULL
, 0x00,
2226 { &hf_cops_pc_max_packet_size
,
2227 { "Maximum Packet Size", "cops.pc_max_packet_size",
2228 FT_UINT32
, BASE_HEX
, NULL
, 0x00,
2231 { &hf_cops_pc_min_policed_unit
,
2232 { "Minimum Policed Unit", "cops.pc_min_policed_unit",
2233 FT_UINT32
, BASE_HEX
, NULL
, 0x00,
2236 { &hf_cops_pc_peak_data_rate
,
2237 { "Peak Data Rate", "cops.pc_peak_data_rate",
2238 FT_FLOAT
, BASE_NONE
, NULL
, 0x00,
2241 { &hf_cops_pc_spec_rate
,
2242 { "Rate", "cops.pc_spec_rate",
2243 FT_FLOAT
, BASE_NONE
, NULL
, 0x00,
2246 { &hf_cops_pc_remote_gate_id
,
2247 { "Remote Gate ID", "cops.pc_remote_gate_id",
2248 FT_UINT32
, BASE_HEX
, NULL
, 0x00,
2251 { &hf_cops_pc_reserved
,
2252 { "Reserved", "cops.pc_reserved",
2253 FT_UINT32
, BASE_HEX
, NULL
, 0x00,
2257 { "Security Key", "cops.pc_key",
2258 FT_UINT32
, BASE_HEX
, NULL
, 0x00,
2261 { &hf_cops_pc_slack_term
,
2262 { "Slack Term", "cops.pc_slack_term",
2263 FT_UINT32
, BASE_HEX
, NULL
, 0x00,
2266 { &hf_cops_pc_src_ip
,
2267 { "Source IP Address", "cops.pc_src_ip",
2268 FT_IPv4
, BASE_NONE
, NULL
, 0x00,
2271 { &hf_cops_pc_subscriber_id_ipv4
,
2272 { "Subscriber Identifier (IPv4)", "cops.pc_subscriber_id4",
2273 FT_IPv4
, BASE_NONE
, NULL
, 0x00,
2276 { &hf_cops_pc_subscriber_id_ipv6
,
2277 { "Subscriber Identifier (IPv6)", "cops.pc_subscriber_id6",
2278 FT_IPv6
, BASE_NONE
, NULL
, 0x00,
2281 { &hf_cops_pc_token_bucket_rate
,
2282 { "Token Bucket Rate", "cops.pc_token_bucket_rate",
2283 FT_FLOAT
, BASE_NONE
, NULL
, 0x00,
2286 { &hf_cops_pc_token_bucket_size
,
2287 { "Token Bucket Size", "cops.pc_token_bucket_size",
2288 FT_FLOAT
, BASE_NONE
, NULL
, 0x00,
2291 { &hf_cops_pc_bcid_id
,
2292 { "BCID - Element ID", "cops.pc_bcid.id",
2293 FT_STRING
, BASE_NONE
, NULL
, 0x00,
2296 { &hf_cops_pc_bcid_tz
,
2297 { "BCID - Time Zone", "cops.pc_bcid.tz",
2298 FT_STRING
, BASE_NONE
, NULL
, 0x00,
2301 { &hf_cops_pc_bcid_ts
,
2302 { "BDID Timestamp", "cops.pc_bcid_ts",
2303 FT_UINT32
, BASE_HEX
, NULL
, 0x00,
2304 "BCID Timestamp", HFILL
}
2306 { &hf_cops_pc_bcid_ev
,
2307 { "BDID Event Counter", "cops.pc_bcid_ev",
2308 FT_UINT32
, BASE_HEX
, NULL
, 0x00,
2309 "BCID Event Counter", HFILL
}
2312 { &hf_cops_pcmm_amid_app_type
,
2313 { "AMID Application Type", "cops.pc_mm_amid_application_type",
2314 FT_UINT32
, BASE_DEC
, NULL
, 0,
2315 "PacketCable Multimedia AMID Application Type", HFILL
}
2317 { &hf_cops_pcmm_amid_am_tag
,
2318 { "AMID Application Manager Tag", "cops.pc_mm_amid_am_tag",
2319 FT_UINT32
, BASE_DEC
, NULL
, 0,
2320 "PacketCable Multimedia AMID Application Manager Tag", HFILL
}
2323 { &hf_cops_pcmm_gate_spec_flags
,
2324 { "Flags", "cops.pc_mm_gs_flags",
2325 FT_UINT8
, BASE_HEX
, NULL
, 0,
2326 "PacketCable Multimedia GateSpec Flags", HFILL
}
2329 { &hf_cops_pcmm_gate_spec_flags_gate
,
2330 { "Gate", "cops.pc_mm_gs_flags.gate",
2331 FT_BOOLEAN
, 8, TFS(&tfs_upstream_downstream
), 0x1,
2335 { &hf_cops_pcmm_gate_spec_flags_dscp_overwrite
,
2336 { "DSCP/TOS overwrite", "cops.pc_mm_gs_flags.dscp_overwrite",
2337 FT_BOOLEAN
, 8, TFS(&tfs_enabled_disabled
), 0x2,
2341 { &hf_cops_pcmm_gate_spec_dscp_tos_field
,
2342 { "DSCP/TOS Field", "cops.pc_mm_gs_dscp",
2343 FT_UINT8
, BASE_HEX
, NULL
, 0,
2344 "PacketCable Multimedia GateSpec DSCP/TOS Field", HFILL
}
2346 { &hf_cops_pcmm_gate_spec_dscp_tos_mask
,
2347 { "DSCP/TOS Mask", "cops.pc_mm_gs_dscp_mask",
2348 FT_UINT8
, BASE_HEX
, NULL
, 0,
2349 "PacketCable Multimedia GateSpec DSCP/TOS Mask", HFILL
}
2351 { &hf_cops_pcmm_gate_spec_session_class_id
,
2352 { "SessionClassID", "cops.pc_mm_gs_scid",
2353 FT_UINT8
, BASE_DEC
, NULL
, 0,
2354 "PacketCable Multimedia GateSpec SessionClassID", HFILL
}
2356 { &hf_cops_pcmm_gate_spec_session_class_id_priority
,
2357 { "SessionClassID Priority", "cops.pc_mm_gs_scid_prio",
2358 FT_UINT8
, BASE_DEC
, NULL
, 0x07,
2359 "PacketCable Multimedia GateSpec SessionClassID Priority", HFILL
}
2361 { &hf_cops_pcmm_gate_spec_session_class_id_preemption
,
2362 { "SessionClassID Preemption", "cops.pc_mm_gs_scid_preempt",
2363 FT_UINT8
, BASE_DEC
, NULL
, 0x08,
2364 "PacketCable Multimedia GateSpec SessionClassID Preemption", HFILL
}
2366 { &hf_cops_pcmm_gate_spec_session_class_id_configurable
,
2367 { "SessionClassID Configurable", "cops.pc_mm_gs_scid_conf",
2368 FT_UINT8
, BASE_DEC
, NULL
, 0xf0,
2369 "PacketCable Multimedia GateSpec SessionClassID Configurable", HFILL
}
2371 { &hf_cops_pcmm_gate_spec_timer_t1
,
2372 { "Timer T1", "cops.pc_mm_gs_timer_t1",
2373 FT_UINT16
, BASE_DEC
, NULL
, 0,
2374 "PacketCable Multimedia GateSpec Timer T1", HFILL
}
2376 { &hf_cops_pcmm_gate_spec_timer_t2
,
2377 { "Timer T2", "cops.pc_mm_gs_timer_t2",
2378 FT_UINT16
, BASE_DEC
, NULL
, 0,
2379 "PacketCable Multimedia GateSpec Timer T2", HFILL
}
2381 { &hf_cops_pcmm_gate_spec_timer_t3
,
2382 { "Timer T3", "cops.pc_mm_gs_timer_t3",
2383 FT_UINT16
, BASE_DEC
, NULL
, 0,
2384 "PacketCable Multimedia GateSpec Timer T3", HFILL
}
2386 { &hf_cops_pcmm_gate_spec_timer_t4
,
2387 { "Timer T4", "cops.pc_mm_gs_timer_t4",
2388 FT_UINT16
, BASE_DEC
, NULL
, 0,
2389 "PacketCable Multimedia GateSpec Timer T4", HFILL
}
2392 { &hf_cops_pcmm_classifier_protocol_id
,
2393 { "Protocol ID", "cops.pc_mm_classifier_proto_id",
2394 FT_UINT16
, BASE_HEX
, NULL
, 0,
2395 "PacketCable Multimedia Classifier Protocol ID", HFILL
}
2397 { &hf_cops_pcmm_classifier_dscp_tos_field
,
2398 { "DSCP/TOS Field", "cops.pc_mm_classifier_dscp",
2399 FT_UINT8
, BASE_HEX
, NULL
, 0,
2400 "PacketCable Multimedia Classifier DSCP/TOS Field", HFILL
}
2402 { &hf_cops_pcmm_classifier_dscp_tos_mask
,
2403 { "DSCP/TOS Mask", "cops.pc_mm_classifier_dscp_mask",
2404 FT_UINT8
, BASE_HEX
, NULL
, 0,
2405 "PacketCable Multimedia Classifier DSCP/TOS Mask", HFILL
}
2407 { &hf_cops_pcmm_classifier_src_addr
,
2408 { "Source address", "cops.pc_mm_classifier_src_addr",
2409 FT_IPv4
, BASE_NONE
, NULL
, 0,
2410 "PacketCable Multimedia Classifier Source IP Address", HFILL
}
2412 { &hf_cops_pcmm_classifier_src_mask
,
2413 { "Source mask", "cops.pc_mm_classifier_src_mask",
2414 FT_IPv4
, BASE_NONE
, NULL
, 0,
2415 "PacketCable Multimedia Classifier Source Mask", HFILL
}
2417 { &hf_cops_pcmm_classifier_dst_addr
,
2418 { "Destination address", "cops.pc_mm_classifier_dst_addr",
2419 FT_IPv4
, BASE_NONE
, NULL
, 0,
2420 "PacketCable Multimedia Classifier Destination IP Address", HFILL
}
2422 { &hf_cops_pcmm_classifier_dst_mask
,
2423 { "Destination mask", "cops.pc_mm_classifier_dst_mask",
2424 FT_IPv4
, BASE_NONE
, NULL
, 0,
2425 "PacketCable Multimedia Classifier Destination Mask", HFILL
}
2427 { &hf_cops_pcmm_classifier_src_port
,
2428 { "Source Port", "cops.pc_mm_classifier_src_port",
2429 FT_UINT16
, BASE_DEC
, NULL
, 0,
2430 "PacketCable Multimedia Classifier Source Port", HFILL
}
2432 { &hf_cops_pcmm_classifier_src_port_end
,
2433 { "Source Port End", "cops.pc_mm_classifier_src_port_end",
2434 FT_UINT16
, BASE_DEC
, NULL
, 0,
2435 "PacketCable Multimedia Classifier Source Port End", HFILL
}
2437 { &hf_cops_pcmm_classifier_dst_port
,
2438 { "Destination Port", "cops.pc_mm_classifier_dst_port",
2439 FT_UINT16
, BASE_DEC
, NULL
, 0,
2440 "PacketCable Multimedia Classifier Source Port", HFILL
}
2442 { &hf_cops_pcmm_classifier_dst_port_end
,
2443 { "Destination Port End", "cops.pc_mm_classifier_dst_port_end",
2444 FT_UINT16
, BASE_DEC
, NULL
, 0,
2445 "PacketCable Multimedia Classifier Source Port End", HFILL
}
2447 { &hf_cops_pcmm_classifier_priority
,
2448 { "Priority", "cops.pc_mm_classifier_priority",
2449 FT_UINT8
, BASE_HEX
, NULL
, 0,
2450 "PacketCable Multimedia Classifier Priority", HFILL
}
2452 { &hf_cops_pcmm_classifier_classifier_id
,
2453 { "Classifier Id", "cops.pc_mm_classifier_id",
2454 FT_UINT16
, BASE_HEX
, NULL
, 0,
2455 "PacketCable Multimedia Classifier ID", HFILL
}
2457 { &hf_cops_pcmm_classifier_activation_state
,
2458 { "Activation State", "cops.pc_mm_classifier_activation_state",
2459 FT_UINT8
, BASE_HEX
, VALS(pcmm_activation_state_vals
), 0,
2460 "PacketCable Multimedia Classifier Activation State", HFILL
}
2462 { &hf_cops_pcmm_classifier_action
,
2463 { "Action", "cops.pc_mm_classifier_action",
2464 FT_UINT8
, BASE_HEX
, VALS(pcmm_action_vals
), 0,
2465 "PacketCable Multimedia Classifier Action", HFILL
}
2467 { &hf_cops_pcmm_classifier_flags
,
2468 { "Flags", "cops.pc_mm_classifier_flags",
2469 FT_UINT8
, BASE_HEX
, NULL
, 0,
2470 "PacketCable Multimedia Classifier Flags", HFILL
}
2472 { &hf_cops_pcmm_classifier_tc_low
,
2473 { "tc-low", "cops.pc_mm_classifier_tc_low",
2474 FT_UINT8
, BASE_HEX
, NULL
, 0,
2475 "PacketCable Multimedia Classifier tc-low", HFILL
}
2477 { &hf_cops_pcmm_classifier_tc_high
,
2478 { "tc-high", "cops.pc_mm_classifier_tc_high",
2479 FT_UINT8
, BASE_HEX
, NULL
, 0,
2480 "PacketCable Multimedia Classifier tc-high", HFILL
}
2482 { &hf_cops_pcmm_classifier_tc_mask
,
2483 { "tc-mask", "cops.pc_mm_classifier_tc_mask",
2484 FT_UINT8
, BASE_HEX
, NULL
, 0,
2485 "PacketCable Multimedia Classifier tc-mask", HFILL
}
2487 { &hf_cops_pcmm_classifier_flow_label
,
2488 { "Flow Label", "cops.pc_mm_classifier_flow_label",
2489 FT_UINT32
, BASE_HEX
, NULL
, 0,
2490 "PacketCable Multimedia Classifier Flow Label", HFILL
}
2492 { &hf_cops_pcmm_classifier_next_header_type
,
2493 { "Next Header Type", "cops.pc_mm_classifier_next_header_type",
2494 FT_UINT16
, BASE_HEX
, NULL
, 0,
2495 "PacketCable Multimedia Classifier Next Header Type", HFILL
}
2497 { &hf_cops_pcmm_classifier_source_prefix_length
,
2498 { "Source Prefix Length", "cops.pc_mm_classifier_source_prefix_length",
2499 FT_UINT8
, BASE_HEX
, NULL
, 0,
2500 "PacketCable Multimedia Classifier Source Prefix Length", HFILL
}
2502 { &hf_cops_pcmm_classifier_destination_prefix_length
,
2503 { "Destination Prefix Length", "cops.pc_mm_classifier_destination_prefix_length",
2504 FT_UINT8
, BASE_HEX
, NULL
, 0,
2505 "PacketCable Multimedia Classifier Destination Prefix Length", HFILL
}
2507 { &hf_cops_pcmm_classifier_src_addr_v6
,
2508 { "IPv6 Source Address", "cops.pc_mm_classifier_src_addr_v6",
2509 FT_IPv6
, BASE_NONE
, NULL
, 0,
2510 "PacketCable Multimedia Classifier IPv6 Source Address", HFILL
}
2512 { &hf_cops_pcmm_classifier_dst_addr_v6
,
2513 { "IPv6 Destination Address", "cops.pc_mm_classifier_dst_addr_v6",
2514 FT_IPv6
, BASE_NONE
, NULL
, 0,
2515 "PacketCable Multimedia Classifier IPv6 Destination Address", HFILL
}
2518 { &hf_cops_pcmm_flow_spec_envelope
,
2519 { "Envelope", "cops.pc_mm_fs_envelope",
2520 FT_UINT8
, BASE_DEC
, NULL
, 0,
2521 "PacketCable Multimedia Flow Spec Envelope", HFILL
}
2523 { &hf_cops_pcmm_flow_spec_service_number
,
2524 { "Service Number", "cops.pc_mm_fs_svc_num",
2525 FT_UINT8
, BASE_DEC
, VALS(pcmm_flow_spec_service_vals
), 0,
2526 "PacketCable Multimedia Flow Spec Service Number", HFILL
}
2529 { &hf_cops_pcmm_docsis_scn
,
2530 { "Service Class Name", "cops.pc_mm_docsis_scn",
2531 FT_STRINGZ
, BASE_NONE
, NULL
, 0,
2532 "PacketCable Multimedia DOCSIS Service Class Name", HFILL
}
2535 { &hf_cops_pcmm_envelope
,
2536 { "Envelope", "cops.pc_mm_envelope",
2537 FT_UINT8
, BASE_DEC
, NULL
, 0,
2538 "PacketCable Multimedia Envelope", HFILL
}
2541 { &hf_cops_pcmm_traffic_priority
,
2542 { "Traffic Priority", "cops.pc_mm_tp",
2543 FT_UINT8
, BASE_DEC
, NULL
, 0,
2544 "PacketCable Multimedia Committed Envelope Traffic Priority", HFILL
}
2546 { &hf_cops_pcmm_request_transmission_policy
,
2547 { "Request Transmission Policy", "cops.pc_mm_rtp",
2548 FT_UINT32
, BASE_HEX
, NULL
, 0,
2549 "PacketCable Multimedia Committed Envelope Traffic Priority", HFILL
}
2551 { &hf_cops_pcmm_request_transmission_policy_sf_all_cm
,
2552 { "The Service Flow MUST NOT use \"all CMs\" broadcast request opportunities", "cops.pc_mm_rtp.sf.all_cm",
2553 FT_BOOLEAN
, 32, TFS(&tfs_yes_no
), 0x00000001,
2556 { &hf_cops_pcmm_request_transmission_policy_sf_priority
,
2557 { "The Service Flow MUST NOT use Priority Request multicast request opportunities", "cops.pc_mm_rtp.sf.priority",
2558 FT_BOOLEAN
, 32, TFS(&tfs_yes_no
), 0x00000002,
2561 { &hf_cops_pcmm_request_transmission_policy_sf_request_for_request
,
2562 { "The Service Flow MUST NOT use Request/Data opportunities for Requests", "cops.pc_mm_rtp.sf.request_for_request",
2563 FT_BOOLEAN
, 32, TFS(&tfs_yes_no
), 0x00000004,
2566 { &hf_cops_pcmm_request_transmission_policy_sf_data_for_data
,
2567 { "The Service Flow MUST NOT use Request/Data opportunities for Data", "cops.pc_mm_rtp.sf.data_for_data",
2568 FT_BOOLEAN
, 32, TFS(&tfs_yes_no
), 0x00000008,
2571 { &hf_cops_pcmm_request_transmission_policy_sf_piggyback
,
2572 { "The Service Flow MUST NOT piggyback requests with data", "cops.pc_mm_rtp.sf.piggyback",
2573 FT_BOOLEAN
, 32, TFS(&tfs_yes_no
), 0x00000010,
2576 { &hf_cops_pcmm_request_transmission_policy_sf_concatenate
,
2577 { "The Service Flow MUST NOT concatenate data", "cops.pc_mm_rtp.sf.concatenate",
2578 FT_BOOLEAN
, 32, TFS(&tfs_yes_no
), 0x00000020,
2581 { &hf_cops_pcmm_request_transmission_policy_sf_fragment
,
2582 { "The Service Flow MUST NOT fragment data", "cops.pc_mm_rtp.sf.fragment",
2583 FT_BOOLEAN
, 32, TFS(&tfs_yes_no
), 0x00000040,
2586 { &hf_cops_pcmm_request_transmission_policy_sf_suppress
,
2587 { "The Service Flow MUST NOT suppress payload headers", "cops.pc_mm_rtp.sf.suppress",
2588 FT_BOOLEAN
, 32, TFS(&tfs_yes_no
), 0x00000080,
2591 { &hf_cops_pcmm_request_transmission_policy_sf_drop_packets
,
2592 { "The Service Flow MUST drop packets that do not fit in the Unsolicited Grant Size", "cops.pc_mm_rtp.sf.drop_packets",
2593 FT_BOOLEAN
, 32, TFS(&tfs_yes_no
), 0x00000100,
2596 { &hf_cops_pcmm_max_sustained_traffic_rate
,
2597 { "Maximum Sustained Traffic Rate", "cops.pc_mm_mstr",
2598 FT_UINT32
, BASE_DEC
, NULL
, 0,
2599 "PacketCable Multimedia Committed Envelope Maximum Sustained Traffic Rate", HFILL
}
2601 { &hf_cops_pcmm_max_traffic_burst
,
2602 { "Maximum Traffic Burst", "cops.pc_mm_mtb",
2603 FT_UINT32
, BASE_DEC
, NULL
, 0,
2604 "PacketCable Multimedia Committed Envelope Maximum Traffic Burst", HFILL
}
2606 { &hf_cops_pcmm_min_reserved_traffic_rate
,
2607 { "Minimum Reserved Traffic Rate", "cops.pc_mm_mrtr",
2608 FT_UINT32
, BASE_DEC
, NULL
, 0,
2609 "PacketCable Multimedia Committed Envelope Minimum Reserved Traffic Rate", HFILL
}
2611 { &hf_cops_pcmm_ass_min_rtr_packet_size
,
2612 { "Assumed Minimum Reserved Traffic Rate Packet Size", "cops.pc_mm_amrtrps",
2613 FT_UINT16
, BASE_DEC
, NULL
, 0,
2614 "PacketCable Multimedia Committed Envelope Assumed Minimum Reserved Traffic Rate Packet Size", HFILL
}
2616 { &hf_cops_pcmm_max_concat_burst
,
2617 { "Maximum Concatenated Burst", "cops.pc_mm_mcburst",
2618 FT_UINT16
, BASE_DEC
, NULL
, 0,
2619 "PacketCable Multimedia Committed Envelope Maximum Concatenated Burst", HFILL
}
2621 { &hf_cops_pcmm_req_att_mask
,
2622 { "Required Attribute Mask", "cops.pc_mm_ramask",
2623 FT_UINT16
, BASE_DEC
, NULL
, 0,
2624 "PacketCable Multimedia Committed Envelope Required Attribute Mask", HFILL
}
2626 { &hf_cops_pcmm_forbid_att_mask
,
2627 { "Forbidden Attribute Mask", "cops.pc_mm_famask",
2628 FT_UINT16
, BASE_DEC
, NULL
, 0,
2629 "PacketCable Multimedia Committed Envelope Forbidden Attribute Mask", HFILL
}
2631 { &hf_cops_pcmm_att_aggr_rule_mask
,
2632 { "Attribute Aggregation Rule Mask", "cops.pc_mm_aarmask",
2633 FT_UINT16
, BASE_DEC
, NULL
, 0,
2634 "PacketCable Multimedia Committed Envelope Attribute Aggregation Rule Mask", HFILL
}
2637 { &hf_cops_pcmm_nominal_polling_interval
,
2638 { "Nominal Polling Interval", "cops.pc_mm_npi",
2639 FT_UINT32
, BASE_DEC
, NULL
, 0,
2640 "PacketCable Multimedia Nominal Polling Interval", HFILL
}
2643 { &hf_cops_pcmm_tolerated_poll_jitter
,
2644 { "Tolerated Poll Jitter", "cops.pc_mm_tpj",
2645 FT_UINT32
, BASE_DEC
, NULL
, 0,
2646 "PacketCable Multimedia Tolerated Poll Jitter", HFILL
}
2649 { &hf_cops_pcmm_unsolicited_grant_size
,
2650 { "Unsolicited Grant Size", "cops.pc_mm_ugs",
2651 FT_UINT16
, BASE_DEC
, NULL
, 0,
2652 "PacketCable Multimedia Unsolicited Grant Size", HFILL
}
2654 { &hf_cops_pcmm_grants_per_interval
,
2655 { "Grants Per Interval", "cops.pc_mm_gpi",
2656 FT_UINT8
, BASE_DEC
, NULL
, 0,
2657 "PacketCable Multimedia Grants Per Interval", HFILL
}
2659 { &hf_cops_pcmm_nominal_grant_interval
,
2660 { "Nominal Grant Interval", "cops.pc_mm_ngi",
2661 FT_UINT32
, BASE_DEC
, NULL
, 0,
2662 "PacketCable Multimedia Nominal Grant Interval", HFILL
}
2664 { &hf_cops_pcmm_tolerated_grant_jitter
,
2665 { "Tolerated Grant Jitter", "cops.pc_mm_tgj",
2666 FT_UINT32
, BASE_DEC
, NULL
, 0,
2667 "PacketCable Multimedia Tolerated Grant Jitter", HFILL
}
2670 { &hf_cops_pcmm_down_resequencing
,
2671 { "Downstream Resequencing", "cops.pc_mm_downres",
2672 FT_UINT32
, BASE_DEC
, NULL
, 0,
2673 "PacketCable Multimedia Downstream Resequencing", HFILL
}
2676 { &hf_cops_pcmm_down_peak_traffic_rate
,
2677 { "Downstream Peak Traffic Rate", "cops.pc_mm_downpeak",
2678 FT_UINT32
, BASE_DEC
, NULL
, 0,
2679 "PacketCable Multimedia Downstream Peak Traffic Rate", HFILL
}
2682 { &hf_cops_pcmm_max_downstream_latency
,
2683 { "Maximum Downstream Latency", "cops.pc_mm_mdl",
2684 FT_UINT32
, BASE_DEC
, NULL
, 0,
2685 "PacketCable Multimedia Maximum Downstream Latency", HFILL
}
2688 { &hf_cops_pcmm_volume_based_usage_limit
,
2689 { "Usage Limit", "cops.pc_mm_vbul_ul",
2690 FT_UINT64
, BASE_DEC
, NULL
, 0,
2691 "PacketCable Multimedia Volume-Based Usage Limit", HFILL
}
2694 { &hf_cops_pcmm_time_based_usage_limit
,
2695 { "Usage Limit", "cops.pc_mm_tbul_ul",
2696 FT_UINT32
, BASE_DEC
, NULL
, 0,
2697 "PacketCable Multimedia Time-Based Usage Limit", HFILL
}
2700 { &hf_cops_pcmm_gate_time_info
,
2701 { "Gate Time Info", "cops.pc_mm_gti",
2702 FT_UINT32
, BASE_DEC
, NULL
, 0,
2703 "PacketCable Multimedia Gate Time Info", HFILL
}
2706 { &hf_cops_pcmm_gate_usage_info
,
2707 { "Gate Usage Info", "cops.pc_mm_gui",
2708 FT_UINT64
, BASE_DEC
, NULL
, 0,
2709 "PacketCable Multimedia Gate Usage Info", HFILL
}
2712 { &hf_cops_pcmm_packetcable_error_code
,
2713 { "Error-Code", "cops.pc_mm_error_ec",
2714 FT_UINT16
, BASE_DEC
, NULL
, 0,
2715 "PacketCable Multimedia PacketCable-Error Error-Code", HFILL
}
2717 { &hf_cops_pcmm_packetcable_error_subcode
,
2718 { "Error-code", "cops.pc_mm_error_esc",
2719 FT_UINT16
, BASE_HEX
, NULL
, 0,
2720 "PacketCable Multimedia PacketCable-Error Error Sub-code", HFILL
}
2723 { &hf_cops_pcmm_packetcable_gate_state
,
2724 { "State", "cops.pc_mm_gs_state",
2725 FT_UINT16
, BASE_DEC
, NULL
, 0,
2726 "PacketCable Multimedia Gate State", HFILL
}
2728 { &hf_cops_pcmm_packetcable_gate_state_reason
,
2729 { "Reason", "cops.pc_mm_gs_reason",
2730 FT_UINT16
, BASE_HEX
, NULL
, 0,
2731 "PacketCable Multimedia Gate State Reason", HFILL
}
2733 { &hf_cops_pcmm_packetcable_version_info_major
,
2734 { "Major Version Number", "cops.pc_mm_vi_major",
2735 FT_UINT16
, BASE_DEC
, NULL
, 0,
2736 "PacketCable Multimedia Major Version Number", HFILL
}
2738 { &hf_cops_pcmm_packetcable_version_info_minor
,
2739 { "Minor Version Number", "cops.pc_mm_vi_minor",
2740 FT_UINT16
, BASE_DEC
, NULL
, 0,
2741 "PacketCable Multimedia Minor Version Number", HFILL
}
2744 { &hf_cops_pcmm_psid
,
2745 { "PSID", "cops.pc_mm_psid",
2746 FT_UINT32
, BASE_DEC
, NULL
, 0,
2747 "PacketCable Multimedia PSID", HFILL
}
2750 { &hf_cops_pcmm_synch_options_report_type
,
2751 { "Report Type", "cops.pc_mm_synch_options_report_type",
2752 FT_UINT8
, BASE_DEC
, VALS(pcmm_report_type_vals
), 0,
2753 "PacketCable Multimedia Synch Options Report Type", HFILL
}
2755 { &hf_cops_pcmm_synch_options_synch_type
,
2756 { "Synch Type", "cops.pc_mm_synch_options_synch_type",
2757 FT_UINT8
, BASE_DEC
, VALS(pcmm_synch_type_vals
), 0,
2758 "PacketCable Multimedia Synch Options Synch Type", HFILL
}
2761 { &hf_cops_pcmm_msg_receipt_key
,
2762 { "Msg Receipt Key", "cops.pc_mm_msg_receipt_key",
2763 FT_UINT32
, BASE_HEX
, NULL
, 0,
2764 "PacketCable Multimedia Msg Receipt Key", HFILL
}
2767 { &hf_cops_pcmm_userid
,
2768 { "UserID", "cops.pc_mm_userid",
2769 FT_STRING
, BASE_NONE
, NULL
, 0,
2770 "PacketCable Multimedia UserID", HFILL
}
2773 { &hf_cops_pcmm_sharedresourceid
,
2774 { "SharedResourceID", "cops.pc_mm_sharedresourceid",
2775 FT_UINT32
, BASE_HEX
, NULL
, 0,
2776 "PacketCable Multimedia SharedResourceID", HFILL
}
2779 /* End of addition for PacketCable */
2783 /* Setup protocol subtree array */
2784 static int *ett
[] = {
2786 &ett_cops_ver_flags
,
2790 &ett_cops_r_type_flags
,
2801 &ett_docsis_request_transmission_policy
,
2804 static ei_register_info ei
[] = {
2805 { &ei_cops_pepid_not_null
, { "cops.pepid.not_null", PI_MALFORMED
, PI_NOTE
, "PEP Id is not a NULL terminated ASCII string", EXPFILL
}},
2806 { &ei_cops_trailing_garbage
, { "cops.trailing_garbage", PI_UNDECODED
, PI_NOTE
, "Trailing garbage", EXPFILL
}},
2807 { &ei_cops_bad_cops_object_length
, { "cops.bad_cops_object_length", PI_MALFORMED
, PI_ERROR
, "COPS object length is too short", EXPFILL
}},
2808 { &ei_cops_bad_cops_pr_object_length
, { "cops.bad_cops_pr_object_length", PI_MALFORMED
, PI_ERROR
, "COPS-PR object length is too short", EXPFILL
}},
2809 { &ei_cops_unknown_c_num
, { "cops.unknown_c_num", PI_UNDECODED
, PI_NOTE
, "Unknown C-Num value", EXPFILL
}},
2811 { &ei_cops_unknown_s_num
, { "cops.unknown_s_num", PI_UNDECODED
, PI_NOTE
, "Unknown S-Num value", EXPFILL
}},
2816 module_t
* cops_module
;
2817 expert_module_t
* expert_cops
;
2819 /* Register the protocol name and description */
2820 proto_cops
= proto_register_protocol("Common Open Policy Service", "COPS", "cops");
2822 /* Required function calls to register the header fields and subtrees used */
2823 proto_register_field_array(proto_cops
, hf
, array_length(hf
));
2824 proto_register_subtree_array(ett
, array_length(ett
));
2825 expert_cops
= expert_register_protocol(proto_cops
);
2826 expert_register_field_array(expert_cops
, ei
, array_length(ei
));
2828 /* Make dissector findable by name */
2829 cops_handle
= register_dissector("cops", dissect_cops
, proto_cops
);
2831 /* Register our configuration options for cops */
2832 cops_module
= prefs_register_protocol(proto_cops
, NULL
);
2833 prefs_register_bool_preference(cops_module
, "desegment",
2834 "Reassemble COPS messages spanning multiple TCP segments",
2835 "Whether the COPS dissector should reassemble messages spanning multiple TCP segments."
2836 " To use this option, you must also enable \"Allow subdissectors to reassemble TCP streams\" in the TCP protocol settings.",
2839 /* For PacketCable */
2840 prefs_register_bool_preference(cops_module
, "packetcable",
2841 "Decode for PacketCable clients",
2842 "Decode the COPS messages using PacketCable clients. (Select port 2126)",
2845 prefs_register_static_text_preference(cops_module
, "info_pibs",
2846 "PIB settings can be changed in the Name Resolution preferences",
2847 "PIB settings can be changed in the Name Resolution preferences");
2849 prefs_register_obsolete_preference(cops_module
, "typefrommib");
2852 void proto_reg_handoff_cops(void)
2854 /* These could use a separate "preference name" (to avoid collision),
2855 but they are IANA registered and users could still use Decode As */
2856 dissector_add_uint("tcp.port", TCP_PORT_PKTCABLE_COPS
, cops_handle
);
2857 dissector_add_uint("tcp.port", TCP_PORT_PKTCABLE_MM_COPS
, cops_handle
);
2859 dissector_add_uint_with_preference("tcp.port", TCP_PORT_COPS
, cops_handle
);
2863 /* Additions for PacketCable ( Added by Dick Gooris, Lucent Technologies ) */
2865 /* Definitions for print formatting */
2866 /* XXX - Why don't we just use ftenum types here? */
2874 /* Print the translated information in the display gui in a formatted way
2876 * octets = The number of octets to obtain from the buffer
2878 * vsp = If not a NULL pointer, it points to an array with text
2880 * mode = 0 -> print decimal value
2881 * 1 -> print hexadecimal vaue
2882 * 2 -> print value as an IPv4 address
2883 * 3 -> print value as an IPv6 address
2884 * 4 -> print value as an IEEE float
2885 * 5 -> print value as a string
2887 * This function in combination with the separate function info_to_cops_subtree() for subtrees.
2892 info_to_display(tvbuff_t
*tvb
, proto_item
*stt
, int offset
, int octets
, const char *str
, const value_string
*vsp
, int mode
,int *hf_proto_parameter
)
2894 proto_item
*pi
= NULL
;
2897 uint16_t code16
= 0;
2898 uint32_t codeipv4
= 0;
2899 uint32_t code32
= 0;
2900 uint64_t code64
= 0;
2901 float codefl
= 0.0f
;
2903 /* Special section for printing strings */
2904 if (mode
==FMT_STR
) {
2905 codestr
= tvb_get_string_enc(wmem_packet_scope(), tvb
, offset
, octets
, ENC_ASCII
);
2906 pi
= proto_tree_add_string_format(stt
, *hf_proto_parameter
, tvb
,
2907 offset
, octets
, codestr
, "%-28s : %s", str
, codestr
);
2911 /* Print information elements in the specified way */
2916 code8
= tvb_get_uint8( tvb
, offset
);
2918 /* Hexadecimal format */
2920 pi
= proto_tree_add_uint_format(stt
, *hf_proto_parameter
,tvb
,
2921 offset
, octets
, code8
,"%-28s : 0x%02x",str
,code8
);
2923 /* Print an 8 bits integer */
2924 pi
= proto_tree_add_uint_format(stt
, *hf_proto_parameter
,tvb
,
2925 offset
, octets
, code8
,"%-28s : %u",str
,code8
);
2928 /* Hexadecimal format */
2929 pi
= proto_tree_add_uint_format(
2930 stt
, *hf_proto_parameter
,tvb
, offset
, octets
, code8
,
2931 "%-28s : %s (0x%02x)",str
,val_to_str_const(code8
, vsp
, "Unknown"),code8
);
2933 /* String table indexed */
2934 pi
= proto_tree_add_uint_format(
2935 stt
, *hf_proto_parameter
,tvb
, offset
, octets
, code8
,
2936 "%-28s : %s (%u)",str
,val_to_str_const(code8
, vsp
, "Unknown"),code8
);
2942 /* Get the next two octets */
2943 code16
= tvb_get_ntohs(tvb
,offset
);
2945 /* Hexadecimal format */
2947 pi
= proto_tree_add_uint_format(stt
, *hf_proto_parameter
,tvb
,
2948 offset
, octets
, code16
,"%-28s : 0x%04x",str
,code16
);
2950 /* Print a 16 bits integer */
2951 pi
= proto_tree_add_uint_format(stt
, *hf_proto_parameter
,tvb
,
2952 offset
, octets
, code16
,"%-28s : %u",str
,code16
);
2955 /* Hexadecimal format */
2956 pi
= proto_tree_add_uint_format(stt
, *hf_proto_parameter
,tvb
,
2957 offset
, octets
, code16
,"%-28s : %s (0x%04x)", str
,
2958 val_to_str(code16
, vsp
, "Unknown (0x%04x)"),code16
);
2960 /* Print a 16 bits integer */
2961 pi
= proto_tree_add_uint_format(
2962 stt
, *hf_proto_parameter
,tvb
, offset
, octets
, code16
,
2963 "%-28s : %s (%u)",str
,val_to_str(code16
, vsp
, "Unknown (0x%04x)"),code16
);
2969 /* Get the next four octets */
2971 case FMT_FLT
: codefl
= tvb_get_ntohieee_float(tvb
,offset
);
2973 case FMT_IPv4
: codeipv4
= tvb_get_ipv4(tvb
, offset
);
2975 default: code32
= tvb_get_ntohl(tvb
,offset
);
2979 /* Hexadecimal format */
2980 if (mode
==FMT_HEX
) {
2981 pi
= proto_tree_add_uint_format(stt
, *hf_proto_parameter
,tvb
,
2982 offset
, octets
, code32
,"%-28s : 0x%08x",str
,code32
);
2985 /* Ip address format*/
2986 if (mode
==FMT_IPv4
) {
2987 pi
= proto_tree_add_ipv4(stt
, *hf_proto_parameter
,tvb
, offset
, octets
, codeipv4
);
2990 /* Ieee float format */
2991 if (mode
==FMT_FLT
) {
2992 pi
= proto_tree_add_float_format(stt
, *hf_proto_parameter
,tvb
, offset
, octets
,
2993 codefl
,"%-28s : %.10g",str
,codefl
);
2996 /* Print a 32 bits integer */
2997 pi
= proto_tree_add_uint_format(stt
, *hf_proto_parameter
,tvb
, offset
, octets
,
2998 code32
,"%-28s : %u",str
,code32
);
3000 /* Hexadecimal format */
3002 pi
= proto_tree_add_uint_format(stt
, *hf_proto_parameter
,tvb
, offset
, octets
,
3003 code32
,"%-28s : %s (0x%08x)",str
,val_to_str_const(code32
, vsp
, "Unknown"),code32
);
3005 /* String table indexed */
3006 pi
= proto_tree_add_uint_format(stt
, *hf_proto_parameter
,tvb
, offset
, octets
,
3007 code32
,"%-28s : %s (%u)",str
,val_to_str_const(code32
, vsp
, "Unknown"),code32
);
3011 /* In case of more than 4 octets.... */
3014 if (mode
==FMT_HEX
) {
3015 pi
= proto_tree_add_item(stt
, *hf_proto_parameter
,
3016 tvb
, offset
, octets
, ENC_NA
);
3017 } else if (mode
==FMT_IPv6
&& octets
==16) {
3018 pi
= proto_tree_add_item(stt
, *hf_proto_parameter
, tvb
, offset
, octets
,
3020 } else if (mode
==FMT_DEC
&& octets
==8) {
3021 code64
= tvb_get_ntoh64(tvb
, offset
);
3022 pi
= proto_tree_add_uint64_format(stt
, *hf_proto_parameter
, tvb
, offset
, octets
,
3023 code64
, "%-28s : %" PRIu64
, str
, code64
);
3025 pi
= proto_tree_add_uint_format(stt
, *hf_proto_parameter
,
3026 tvb
, offset
, octets
, code32
,"%s",str
);
3034 /* Print the subtree information for cops */
3036 info_to_cops_subtree(tvbuff_t
*tvb
, proto_tree
*st
, int n
, int offset
, const char *str
) {
3039 tv
= proto_tree_add_none_format( st
, hf_cops_subtree
, tvb
, offset
, n
, "%s", str
);
3040 return proto_item_add_subtree( tv
, ett_cops_subtree
);
3043 /* Cops - Section : D-QoS Transaction ID */
3045 cops_transaction_id(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*st
, uint8_t op_code
, unsigned n
, uint32_t offset
) {
3051 /* Create a subtree */
3052 stt
= info_to_cops_subtree(tvb
,st
,n
,offset
,"D-QoS Transaction ID");
3055 /* Transaction Identifier */
3056 info_to_display(tvb
,stt
,offset
,2,"D-QoS Transaction Identifier", NULL
,FMT_DEC
,&hf_cops_pc_transaction_id
);
3059 /* Gate Command Type */
3060 code16
= tvb_get_ntohs(tvb
,offset
);
3061 proto_tree_add_uint_format(stt
, hf_cops_pc_gate_command_type
,tvb
, offset
, 2,
3062 code16
,"%-28s : %s (%u)", "Gate Command Type",
3063 val_to_str(code16
,table_cops_dqos_transaction_id
, "Unknown (0x%04x)"),code16
);
3065 /* Write the right data into the 'info field' on the Gui */
3066 snprintf(info
,sizeof(info
),"COPS %-20s - %s",val_to_str_const(op_code
,cops_op_code_vals
, "Unknown"),
3067 val_to_str_const(code16
,table_cops_dqos_transaction_id
, "Unknown"));
3069 col_add_str(pinfo
->cinfo
, COL_INFO
,info
);
3072 /* Cops - Section : Subscriber IDv4 */
3074 cops_subscriber_id_v4(tvbuff_t
*tvb
, proto_tree
*st
, unsigned n
, uint32_t offset
) {
3078 /* Create a subtree */
3079 tv
= info_to_cops_subtree(tvb
,st
,n
,offset
,"Subscriber ID (IPv4)");
3082 /* Subscriber Identifier */
3083 info_to_display(tvb
,tv
,offset
,4,"Subscriber Identifier (IPv4)", NULL
,FMT_IPv4
,&hf_cops_pc_subscriber_id_ipv4
);
3086 /* Cops - Section : Subscriber IDv6 */
3088 cops_subscriber_id_v6(tvbuff_t
*tvb
, proto_tree
*st
, unsigned n
, uint32_t offset
) {
3092 /* Create a subtree */
3093 tv
= info_to_cops_subtree(tvb
,st
,n
,offset
,"Subscriber ID (IPv6)");
3096 /* Subscriber Identifier */
3097 info_to_display(tvb
,tv
,offset
,16,"Subscriber Identifier (IPv6)", NULL
,FMT_IPv6
,&hf_cops_pc_subscriber_id_ipv6
);
3100 /* Cops - Section : Gate ID */
3102 cops_gate_id(tvbuff_t
*tvb
, proto_tree
*st
, unsigned n
, uint32_t offset
) {
3106 /* Create a subtree */
3107 stt
= info_to_cops_subtree(tvb
,st
,n
,offset
,"Gate ID");
3110 /* Gate Identifier */
3111 info_to_display(tvb
,stt
,offset
,4,"Gate Identifier", NULL
,FMT_HEX
,&hf_cops_pc_gate_id
);
3114 /* Cops - Section : Activity Count */
3116 cops_activity_count(tvbuff_t
*tvb
, proto_tree
*st
, unsigned n
, uint32_t offset
) {
3120 /* Create a subtree */
3121 stt
= info_to_cops_subtree(tvb
,st
,n
,offset
,"Activity Count");
3124 /* Activity Count */
3125 info_to_display(tvb
,stt
,offset
,4,"Count", NULL
,FMT_DEC
,&hf_cops_pc_activity_count
);
3128 /* Cops - Section : Gate Specifications */
3130 cops_gate_specs(tvbuff_t
*tvb
, proto_tree
*st
, unsigned n
, uint32_t offset
) {
3134 /* Create a subtree */
3135 stt
= info_to_cops_subtree(tvb
,st
,n
,offset
,"Gate Specifications");
3139 info_to_display(tvb
,stt
,offset
,1,"Direction",table_cops_direction
,FMT_DEC
,&hf_cops_pc_direction
);
3143 info_to_display(tvb
,stt
,offset
,1,"Protocol ID",NULL
,FMT_DEC
,&hf_cops_pc_protocol_id
);
3147 info_to_display(tvb
,stt
,offset
,1,"Flags",NULL
,FMT_DEC
,&hf_cops_pc_gate_spec_flags
);
3151 info_to_display(tvb
,stt
,offset
,1,"Session Class",table_cops_session_class
,FMT_DEC
,&hf_cops_pc_session_class
);
3154 /* Source IP Address */
3155 info_to_display(tvb
,stt
,offset
,4,"Source IP Address",NULL
,FMT_IPv4
,&hf_cops_pc_src_ip
);
3158 /* Destination IP Address */
3159 info_to_display(tvb
,stt
,offset
,4,"Destination IP Address",NULL
,FMT_IPv4
,&hf_cops_pc_dest_ip
);
3162 /* Source IP Port */
3163 info_to_display(tvb
,stt
,offset
,2,"Source IP Port",NULL
,FMT_DEC
,&hf_cops_pc_src_port
);
3166 /* Destination IP Port */
3167 info_to_display(tvb
,stt
,offset
,2,"Destination IP Port",NULL
,FMT_DEC
,&hf_cops_pc_dest_port
);
3170 /* DiffServ Code Point */
3171 info_to_display(tvb
,stt
,offset
,1,"DS Field (DSCP or TOS)",NULL
,FMT_HEX
,&hf_cops_pc_ds_field
);
3174 /* 3 octets Not specified */
3177 /* Timer T1 Value */
3178 info_to_display(tvb
,stt
,offset
,2,"Timer T1 Value (sec)",NULL
,FMT_DEC
,&hf_cops_pc_t1_value
);
3182 info_to_display(tvb
,stt
,offset
,2,"Reserved",NULL
,FMT_DEC
,&hf_cops_pc_reserved
);
3185 /* Timer T7 Value */
3186 info_to_display(tvb
,stt
,offset
,2,"Timer T7 Value (sec)",NULL
,FMT_DEC
,&hf_cops_pc_t7_value
);
3189 /* Timer T8 Value */
3190 info_to_display(tvb
,stt
,offset
,2,"Timer T8 Value (sec)",NULL
,FMT_DEC
,&hf_cops_pc_t8_value
);
3193 /* Token Bucket Rate */
3194 info_to_display(tvb
,stt
,offset
,4,"Token Bucket Rate",NULL
,FMT_FLT
,&hf_cops_pc_token_bucket_rate
);
3197 /* Token Bucket Size */
3198 info_to_display(tvb
,stt
,offset
,4,"Token Bucket Size",NULL
,FMT_FLT
,&hf_cops_pc_token_bucket_size
);
3201 /* Peak Data Rate */
3202 info_to_display(tvb
,stt
,offset
,4,"Peak Data Rate",NULL
,FMT_FLT
,&hf_cops_pc_peak_data_rate
);
3205 /* Minimum Policed Unit */
3206 info_to_display(tvb
,stt
,offset
,4,"Minimum Policed Unit",NULL
,FMT_DEC
,&hf_cops_pc_min_policed_unit
);
3209 /* Maximum Packet Size */
3210 info_to_display(tvb
,stt
,offset
,4,"Maximum Packet Size",NULL
,FMT_DEC
,&hf_cops_pc_max_packet_size
);
3214 info_to_display(tvb
,stt
,offset
,4,"Rate",NULL
,FMT_FLT
,&hf_cops_pc_spec_rate
);
3218 info_to_display(tvb
,stt
,offset
,4,"Slack Term",NULL
,FMT_DEC
,&hf_cops_pc_slack_term
);
3221 /* Cops - Section : Electronic Surveillance Parameters */
3223 cops_surveillance_parameters(tvbuff_t
*tvb
, proto_tree
*st
, unsigned n
, uint32_t offset
) {
3227 /* Create a subtree */
3228 stt
= info_to_cops_subtree(tvb
,st
,n
,offset
,"Electronic Surveillance Parameters");
3231 /* DF IP Address for CDC */
3232 info_to_display(tvb
,stt
,offset
,4,"DF IP Address for CDC", NULL
,FMT_IPv4
,&hf_cops_pc_dfcdc_ip
);
3235 /* DF IP Port for CDC */
3236 info_to_display(tvb
,stt
,offset
,2,"DF IP Port for CDC",NULL
,FMT_DEC
,&hf_cops_pc_dfcdc_ip_port
);
3240 info_to_display(tvb
,stt
,offset
,2,"Flags",NULL
,FMT_HEX
,&hf_cops_pc_gate_spec_flags
);
3243 /* DF IP Address for CCC */
3244 info_to_display(tvb
,stt
,offset
,4,"DF IP Address for CCC", NULL
,FMT_IPv4
,&hf_cops_pc_dfccc_ip
);
3247 /* DF IP Port for CCC */
3248 info_to_display(tvb
,stt
,offset
,2,"DF IP Port for CCC",NULL
,FMT_DEC
,&hf_cops_pc_dfccc_ip_port
);
3252 info_to_display(tvb
,stt
,offset
,2,"Reserved",NULL
,FMT_HEX
,&hf_cops_pc_reserved
);
3256 info_to_display(tvb
,stt
,offset
,4,"CCCID", NULL
,FMT_DEC
,&hf_cops_pc_dfccc_id
);
3259 /* BCID Timestamp */
3260 info_to_display(tvb
,stt
,offset
,4,"BCID - Timestamp",NULL
,FMT_HEX
,&hf_cops_pc_bcid_ts
);
3263 /* BCID Element ID */
3264 proto_tree_add_item(stt
, hf_cops_pc_bcid_id
, tvb
, offset
, 8, ENC_ASCII
);
3267 /* BCID Time Zone */
3268 proto_tree_add_item(stt
, hf_cops_pc_bcid_tz
, tvb
, offset
, 8, ENC_ASCII
);
3271 /* BCID Event Counter */
3272 info_to_display(tvb
,stt
,offset
,4,"BCID - Event Counter",NULL
,FMT_DEC
,&hf_cops_pc_bcid_ev
);
3275 /* Cops - Section : Event Gereration-Info */
3277 cops_event_generation_info(tvbuff_t
*tvb
, proto_tree
*st
, unsigned n
, uint32_t offset
) {
3281 /* Create a subtree */
3282 stt
= info_to_cops_subtree(tvb
,st
,n
,offset
,"Event Generation Info");
3285 /* Primary Record Keeping Server IP Address */
3286 info_to_display(tvb
,stt
,offset
,4,"PRKS IP Address", NULL
,FMT_IPv4
,&hf_cops_pc_prks_ip
);
3289 /* Primary Record Keeping Server IP Port */
3290 info_to_display(tvb
,stt
,offset
,2,"PRKS IP Port",NULL
,FMT_DEC
,&hf_cops_pc_prks_ip_port
);
3294 info_to_display(tvb
,stt
,offset
,1,"Flags",NULL
,FMT_HEX
,&hf_cops_pc_gate_spec_flags
);
3298 info_to_display(tvb
,stt
,offset
,1,"Reserved",NULL
,FMT_HEX
,&hf_cops_pc_reserved
);
3301 /* Secondary Record Keeping Server IP Address */
3302 info_to_display(tvb
,stt
,offset
,4,"SRKS IP Address", NULL
,FMT_IPv4
,&hf_cops_pc_srks_ip
);
3305 /* Secondary Record Keeping Server IP Port */
3306 info_to_display(tvb
,stt
,offset
,2,"SRKS IP Port",NULL
,FMT_DEC
,&hf_cops_pc_srks_ip_port
);
3310 info_to_display(tvb
,stt
,offset
,1,"Flags",NULL
,FMT_DEC
,&hf_cops_pc_gate_spec_flags
);
3314 info_to_display(tvb
,stt
,offset
,1,"Reserved",NULL
,FMT_HEX
,&hf_cops_pc_reserved
);
3317 /* BCID Timestamp */
3318 info_to_display(tvb
,stt
,offset
,4,"BCID - Timestamp",NULL
,FMT_HEX
,&hf_cops_pc_bcid_ts
);
3321 /* BCID Element ID */
3322 proto_tree_add_item(stt
, hf_cops_pc_bcid_id
, tvb
, offset
, 8, ENC_ASCII
);
3325 /* BCID Time Zone */
3326 proto_tree_add_item(stt
, hf_cops_pc_bcid_tz
, tvb
, offset
, 8, ENC_ASCII
);
3329 /* BCID Event Counter */
3330 info_to_display(tvb
,stt
,offset
,4,"BCID - Event Counter",NULL
,FMT_DEC
,&hf_cops_pc_bcid_ev
);
3333 /* Cops - Section : Remote Gate */
3335 cops_remote_gate_info(tvbuff_t
*tvb
, proto_tree
*st
, unsigned n
, uint32_t offset
) {
3339 /* Create a subtree */
3340 stt
= info_to_cops_subtree(tvb
,st
,n
,offset
,"Remote Gate Info");
3343 /* CMTS IP Address */
3344 info_to_display(tvb
,stt
,offset
,4,"CMTS IP Address", NULL
,FMT_IPv4
,&hf_cops_pc_cmts_ip
);
3348 info_to_display(tvb
,stt
,offset
,2,"CMTS IP Port",NULL
,FMT_DEC
,&hf_cops_pc_cmts_ip_port
);
3352 info_to_display(tvb
,stt
,offset
,2,"Flags",NULL
,FMT_DEC
,&hf_cops_pc_remote_flags
);
3355 /* Remote Gate ID */
3356 info_to_display(tvb
,stt
,offset
,4,"Remote Gate ID", NULL
,FMT_HEX
,&hf_cops_pc_remote_gate_id
);
3360 info_to_display(tvb
,stt
,offset
,2,"Algorithm", NULL
,FMT_DEC
,&hf_cops_pc_algorithm
);
3364 info_to_display(tvb
,stt
,offset
,4,"Reserved", NULL
,FMT_HEX
,&hf_cops_pc_reserved
);
3368 info_to_display(tvb
,stt
,offset
,4,"Security Key", NULL
,FMT_HEX
,&hf_cops_pc_key
);
3372 info_to_display(tvb
,stt
,offset
,4,"Security Key (cont)", NULL
,FMT_HEX
,&hf_cops_pc_key
);
3376 info_to_display(tvb
,stt
,offset
,4,"Security Key (cont)", NULL
,FMT_HEX
,&hf_cops_pc_key
);
3380 info_to_display(tvb
,stt
,offset
,4,"Security Key (cont)", NULL
,FMT_HEX
,&hf_cops_pc_key
);
3383 /* Cops - Section : PacketCable reason */
3385 cops_packetcable_reason(tvbuff_t
*tvb
, proto_tree
*st
, unsigned n
, uint32_t offset
) {
3390 /* Create a subtree */
3391 stt
= info_to_cops_subtree(tvb
,st
,n
,offset
,"PacketCable Reason");
3395 code16
= tvb_get_ntohs(tvb
,offset
);
3396 proto_tree_add_uint_format(stt
, hf_cops_pc_reason_code
,tvb
, offset
, 2,
3397 code16
, "%-28s : %s (%u)","Reason Code",
3398 val_to_str(code16
, table_cops_reason_code
, "Unknown (0x%04x)"),code16
);
3401 if ( code16
== 0 ) {
3402 /* Reason Sub Code with Delete */
3403 info_to_display(tvb
,stt
,offset
,2,"Reason Sub Code",table_cops_reason_subcode_delete
,FMT_DEC
,&hf_cops_pc_delete_subcode
);
3405 /* Reason Sub Code with Close */
3406 info_to_display(tvb
,stt
,offset
,2,"Reason Sub Code",table_cops_reason_subcode_close
,FMT_DEC
,&hf_cops_pc_close_subcode
);
3410 /* Cops - Section : PacketCable error */
3412 cops_packetcable_error(tvbuff_t
*tvb
, proto_tree
*st
, unsigned n
, uint32_t offset
) {
3416 /* Create a subtree */
3417 stt
= info_to_cops_subtree(tvb
,st
,n
,offset
,"PacketCable Error");
3421 info_to_display(tvb
,stt
,offset
,2,"Error Code",table_cops_packetcable_error
,FMT_DEC
,&hf_cops_pc_packetcable_err_code
);
3424 /* Error Sub Code */
3425 info_to_display(tvb
,stt
,offset
,2,"Error Sub Code",NULL
,FMT_HEX
,&hf_cops_pc_packetcable_sub_code
);
3429 /* Cops - Section : Multimedia Transaction ID */
3431 cops_mm_transaction_id(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*st
, uint8_t op_code
, unsigned n
, uint32_t offset
) {
3437 /* Create a subtree */
3438 stt
= info_to_cops_subtree(tvb
,st
,n
,offset
,"MM Transaction ID");
3441 /* Transaction Identifier */
3442 info_to_display(tvb
,stt
,offset
,2,"Multimedia Transaction Identifier", NULL
,FMT_DEC
,&hf_cops_pc_transaction_id
);
3445 /* Gate Command Type */
3446 code16
= tvb_get_ntohs(tvb
,offset
);
3447 proto_tree_add_uint_format(stt
, hf_cops_pc_gate_command_type
,tvb
, offset
, 2,
3448 code16
,"%-28s : %s (%u)", "Gate Command Type",
3449 val_to_str(code16
,table_cops_mm_transaction_id
, "Unknown (0x%04x)"),code16
);
3451 /* Write the right data into the 'info field' on the Gui */
3452 snprintf(info
,sizeof(info
),"COPS %-20s - %s",val_to_str_const(op_code
,cops_op_code_vals
, "Unknown"),
3453 val_to_str_const(code16
,table_cops_mm_transaction_id
, "Unknown"));
3455 col_add_str(pinfo
->cinfo
, COL_INFO
,info
);
3458 /* Cops - Section : AMID */
3460 cops_amid(tvbuff_t
*tvb
, proto_tree
*st
, unsigned n
, uint32_t offset
) {
3464 /* Create a subtree */
3465 stt
= info_to_cops_subtree(tvb
,st
,n
,offset
,"AMID");
3468 /* Application Type */
3469 info_to_display(tvb
,stt
,offset
,2,"Application Manager ID Application Type", NULL
,FMT_DEC
,&hf_cops_pcmm_amid_app_type
);
3472 /* Application Manager Tag */
3473 info_to_display(tvb
,stt
,offset
,2,"Application Manager ID Application Manager Tag", NULL
,FMT_DEC
,&hf_cops_pcmm_amid_am_tag
);
3478 /* Cops - Section : Multimedia Gate Specifications */
3480 cops_mm_gate_spec(tvbuff_t
*tvb
, proto_tree
*st
, unsigned n
, uint32_t offset
) {
3482 proto_tree
*stt
, *object_tree
;
3484 /* Create a subtree */
3485 stt
= info_to_cops_subtree(tvb
,st
,n
,offset
,"Gate Spec");
3489 ti
= info_to_display(tvb
,stt
,offset
,1,"Flags",NULL
,FMT_HEX
,&hf_cops_pcmm_gate_spec_flags
);
3490 object_tree
= proto_item_add_subtree(ti
, ett_cops_subtree
);
3491 proto_tree_add_item(object_tree
, hf_cops_pcmm_gate_spec_flags_gate
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
3492 proto_tree_add_item(object_tree
, hf_cops_pcmm_gate_spec_flags_dscp_overwrite
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
3495 /* DiffServ Code Point */
3496 info_to_display(tvb
,stt
,offset
,1,"DS Field (DSCP or TOS)",NULL
,FMT_HEX
,&hf_cops_pcmm_gate_spec_dscp_tos_field
);
3499 /* DiffServ Code Point Mask */
3500 info_to_display(tvb
,stt
,offset
,1,"DS Field (DSCP or TOS) Mask",NULL
,FMT_HEX
,&hf_cops_pcmm_gate_spec_dscp_tos_mask
);
3504 ti
= info_to_display(tvb
,stt
,offset
,1,"Session Class",table_cops_session_class
,FMT_DEC
,&hf_cops_pcmm_gate_spec_session_class_id
);
3505 object_tree
= proto_item_add_subtree(ti
, ett_cops_subtree
);
3506 proto_tree_add_item(object_tree
, hf_cops_pcmm_gate_spec_session_class_id_priority
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
3507 proto_tree_add_item(object_tree
, hf_cops_pcmm_gate_spec_session_class_id_preemption
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
3508 proto_tree_add_item(object_tree
, hf_cops_pcmm_gate_spec_session_class_id_configurable
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
3511 /* Timer T1 Value */
3512 info_to_display(tvb
,stt
,offset
,2,"Timer T1 Value (sec)",NULL
,FMT_DEC
,&hf_cops_pcmm_gate_spec_timer_t1
);
3515 /* Timer T2 Value */
3516 info_to_display(tvb
,stt
,offset
,2,"Timer T2 Value (sec)",NULL
,FMT_DEC
,&hf_cops_pcmm_gate_spec_timer_t2
);
3519 /* Timer T3 Value */
3520 info_to_display(tvb
,stt
,offset
,2,"Timer T3 Value (sec)",NULL
,FMT_DEC
,&hf_cops_pcmm_gate_spec_timer_t3
);
3523 /* Timer T4 Value */
3524 info_to_display(tvb
,stt
,offset
,2,"Timer T4 Value (sec)",NULL
,FMT_DEC
,&hf_cops_pcmm_gate_spec_timer_t4
);
3530 /* Cops - Section : Classifier */
3532 cops_classifier(tvbuff_t
*tvb
, proto_tree
*st
, unsigned n
, uint32_t offset
, bool extended
) {
3536 /* Create a subtree */
3537 stt
= info_to_cops_subtree(tvb
,st
,n
,offset
,
3538 extended
? "Extended Classifier" : "Classifier");
3542 info_to_display(tvb
,stt
,offset
,2,"Protocol ID",NULL
,FMT_DEC
,&hf_cops_pcmm_classifier_protocol_id
);
3545 /* DiffServ Code Point */
3546 info_to_display(tvb
,stt
,offset
,1,"DS Field (DSCP or TOS)",NULL
,FMT_HEX
,&hf_cops_pcmm_classifier_dscp_tos_field
);
3549 /* DiffServ Code Point Mask */
3550 info_to_display(tvb
,stt
,offset
,1,"DS Field (DSCP or TOS) Mask",NULL
,FMT_HEX
,&hf_cops_pcmm_classifier_dscp_tos_mask
);
3553 /* Source IP Address */
3554 info_to_display(tvb
,stt
,offset
,4,"Source IP Address",NULL
,FMT_IPv4
,&hf_cops_pcmm_classifier_src_addr
);
3559 info_to_display(tvb
,stt
,offset
,4,"Source Mask",NULL
,FMT_IPv4
,&hf_cops_pcmm_classifier_src_mask
);
3563 /* Destination IP Address */
3564 info_to_display(tvb
,stt
,offset
,4,"Destination IP Address",NULL
,FMT_IPv4
,&hf_cops_pcmm_classifier_dst_addr
);
3568 /* Destination Mask */
3569 info_to_display(tvb
,stt
,offset
,4,"Destination Mask",NULL
,FMT_IPv4
,&hf_cops_pcmm_classifier_dst_mask
);
3573 /* Source IP Port */
3574 info_to_display(tvb
,stt
,offset
,2,"Source IP Port",NULL
,FMT_DEC
,&hf_cops_pcmm_classifier_src_port
);
3578 /* Source Port End */
3579 info_to_display(tvb
,stt
,offset
,2,"Source Port End",NULL
,FMT_DEC
,&hf_cops_pcmm_classifier_src_port_end
);
3583 /* Destination IP Port */
3584 info_to_display(tvb
,stt
,offset
,2,"Destination IP Port",NULL
,FMT_DEC
,&hf_cops_pcmm_classifier_dst_port
);
3588 /* Destination Port End */
3589 info_to_display(tvb
,stt
,offset
,2,"Destination Port End",NULL
,FMT_DEC
,&hf_cops_pcmm_classifier_dst_port_end
);
3595 info_to_display(tvb
,stt
,offset
,2,"ClassifierID",NULL
,FMT_HEX
,&hf_cops_pcmm_classifier_classifier_id
);
3600 info_to_display(tvb
,stt
,offset
,1,"Priority",NULL
,FMT_HEX
,&hf_cops_pcmm_classifier_priority
);
3604 /* Activation State */
3605 info_to_display(tvb
,stt
,offset
,1,"Activation State",NULL
,FMT_HEX
,&hf_cops_pcmm_classifier_activation_state
);
3609 info_to_display(tvb
,stt
,offset
,1,"Action",NULL
,FMT_HEX
,&hf_cops_pcmm_classifier_action
);
3613 /* 3 octets Not specified */
3619 /* Cops - Section : IPv6 Classifier */
3621 cops_ipv6_classifier(tvbuff_t
*tvb
, proto_tree
*st
, unsigned n
, uint32_t offset
) {
3625 /* Create a subtree */
3626 stt
= info_to_cops_subtree(tvb
,st
,n
,offset
, "IPv6 Classifier");
3629 /* Reserved/Flags */
3630 info_to_display(tvb
,stt
,offset
,1,"Flags",NULL
,FMT_HEX
,&hf_cops_pcmm_classifier_flags
);
3634 info_to_display(tvb
,stt
,offset
,1,"tc-low",NULL
,FMT_HEX
,&hf_cops_pcmm_classifier_tc_low
);
3638 info_to_display(tvb
,stt
,offset
,1,"tc-high",NULL
,FMT_HEX
,&hf_cops_pcmm_classifier_tc_high
);
3642 info_to_display(tvb
,stt
,offset
,1,"tc-mask",NULL
,FMT_HEX
,&hf_cops_pcmm_classifier_tc_mask
);
3646 info_to_display(tvb
,stt
,offset
,4,"Flow Label",NULL
,FMT_HEX
,&hf_cops_pcmm_classifier_flow_label
);
3649 /* Next Header Type */
3650 info_to_display(tvb
,stt
,offset
,2,"Next Header Type",NULL
,FMT_DEC
,&hf_cops_pcmm_classifier_next_header_type
);
3653 /* Source Prefix Length */
3654 info_to_display(tvb
,stt
,offset
,1,"Source Prefix Length",NULL
,FMT_DEC
,&hf_cops_pcmm_classifier_source_prefix_length
);
3657 /* Destination Prefix Length */
3658 info_to_display(tvb
,stt
,offset
,1,"Destination Prefix Length",NULL
,FMT_DEC
,&hf_cops_pcmm_classifier_destination_prefix_length
);
3661 /* Source IP Address */
3662 info_to_display(tvb
,stt
,offset
,16,"IPv6 Source Address",NULL
,FMT_IPv6
,&hf_cops_pcmm_classifier_src_addr_v6
);
3665 /* Destination IP Address */
3666 info_to_display(tvb
,stt
,offset
,16,"IPv6 Destination Address",NULL
,FMT_IPv6
,&hf_cops_pcmm_classifier_dst_addr_v6
);
3669 /* Source IP Port */
3670 info_to_display(tvb
,stt
,offset
,2,"Source Port Start",NULL
,FMT_DEC
,&hf_cops_pcmm_classifier_src_port
);
3673 /* Source Port End */
3674 info_to_display(tvb
,stt
,offset
,2,"Source Port End",NULL
,FMT_DEC
,&hf_cops_pcmm_classifier_src_port_end
);
3677 /* Destination IP Port */
3678 info_to_display(tvb
,stt
,offset
,2,"Destination Port Start",NULL
,FMT_DEC
,&hf_cops_pcmm_classifier_dst_port
);
3681 /* Destination Port End */
3682 info_to_display(tvb
,stt
,offset
,2,"Destination Port End",NULL
,FMT_DEC
,&hf_cops_pcmm_classifier_dst_port_end
);
3686 info_to_display(tvb
,stt
,offset
,2,"ClassifierID",NULL
,FMT_HEX
,&hf_cops_pcmm_classifier_classifier_id
);
3690 info_to_display(tvb
,stt
,offset
,1,"Priority",NULL
,FMT_HEX
,&hf_cops_pcmm_classifier_priority
);
3693 /* Activation State */
3694 info_to_display(tvb
,stt
,offset
,1,"Activation State",NULL
,FMT_HEX
,&hf_cops_pcmm_classifier_activation_state
);
3698 info_to_display(tvb
,stt
,offset
,1,"Action",NULL
,FMT_HEX
,&hf_cops_pcmm_classifier_action
);
3701 /* 3 octets Not specified */
3707 /* Cops - Section : Gate Specifications */
3709 cops_flow_spec(tvbuff_t
*tvb
, proto_tree
*st
, unsigned n
, uint32_t offset
) {
3710 proto_tree
*stt
, *object_tree
;
3712 /* Create a subtree */
3713 stt
= info_to_cops_subtree(tvb
,st
,n
,offset
,"Flow Spec");
3717 info_to_display(tvb
,stt
,offset
,1,"Envelope",NULL
,FMT_DEC
,&hf_cops_pcmm_flow_spec_envelope
);
3720 /* Service Number */
3721 info_to_display(tvb
,stt
,offset
,1,"Service Number",NULL
,FMT_DEC
,&hf_cops_pcmm_flow_spec_service_number
);
3725 info_to_display(tvb
,stt
,offset
,2,"Reserved",NULL
,FMT_HEX
,&hf_cops_pc_reserved
);
3728 /* Authorized Envelope */
3729 object_tree
= proto_tree_add_subtree(stt
, tvb
, offset
, 28, ett_cops_subtree
, NULL
, "Authorized Envelope");
3731 /* Token Bucket Rate */
3732 info_to_display(tvb
,object_tree
,offset
,4,"Token Bucket Rate",NULL
,FMT_FLT
,&hf_cops_pc_token_bucket_rate
);
3735 /* Token Bucket Size */
3736 info_to_display(tvb
,object_tree
,offset
,4,"Token Bucket Size",NULL
,FMT_FLT
,&hf_cops_pc_token_bucket_size
);
3739 /* Peak Data Rate */
3740 info_to_display(tvb
,object_tree
,offset
,4,"Peak Data Rate",NULL
,FMT_FLT
,&hf_cops_pc_peak_data_rate
);
3743 /* Minimum Policed Unit */
3744 info_to_display(tvb
,object_tree
,offset
,4,"Minimum Policed Unit",NULL
,FMT_DEC
,&hf_cops_pc_min_policed_unit
);
3747 /* Maximum Packet Size */
3748 info_to_display(tvb
,object_tree
,offset
,4,"Maximum Packet Size",NULL
,FMT_DEC
,&hf_cops_pc_max_packet_size
);
3752 info_to_display(tvb
,object_tree
,offset
,4,"Rate",NULL
,FMT_FLT
,&hf_cops_pc_spec_rate
);
3756 info_to_display(tvb
,object_tree
,offset
,4,"Slack Term",NULL
,FMT_DEC
,&hf_cops_pc_slack_term
);
3759 if (n
< 64) return offset
;
3761 /* Reserved Envelope */
3762 object_tree
= proto_tree_add_subtree(stt
, tvb
, offset
, 28, ett_cops_subtree
, NULL
, "Reserved Envelope");
3764 /* Token Bucket Rate */
3765 info_to_display(tvb
,object_tree
,offset
,4,"Token Bucket Rate",NULL
,FMT_FLT
,&hf_cops_pc_token_bucket_rate
);
3768 /* Token Bucket Size */
3769 info_to_display(tvb
,object_tree
,offset
,4,"Token Bucket Size",NULL
,FMT_FLT
,&hf_cops_pc_token_bucket_size
);
3772 /* Peak Data Rate */
3773 info_to_display(tvb
,object_tree
,offset
,4,"Peak Data Rate",NULL
,FMT_FLT
,&hf_cops_pc_peak_data_rate
);
3776 /* Minimum Policed Unit */
3777 info_to_display(tvb
,object_tree
,offset
,4,"Minimum Policed Unit",NULL
,FMT_DEC
,&hf_cops_pc_min_policed_unit
);
3780 /* Maximum Packet Size */
3781 info_to_display(tvb
,object_tree
,offset
,4,"Maximum Packet Size",NULL
,FMT_DEC
,&hf_cops_pc_max_packet_size
);
3785 info_to_display(tvb
,object_tree
,offset
,4,"Rate",NULL
,FMT_FLT
,&hf_cops_pc_spec_rate
);
3789 info_to_display(tvb
,object_tree
,offset
,4,"Slack Term",NULL
,FMT_DEC
,&hf_cops_pc_slack_term
);
3792 if (n
< 92) return offset
;
3794 /* Committed Envelope */
3795 object_tree
= proto_tree_add_subtree(stt
, tvb
, offset
, 28, ett_cops_subtree
, NULL
, "Committed Envelope");
3797 /* Token Bucket Rate */
3798 info_to_display(tvb
,object_tree
,offset
,4,"Token Bucket Rate",NULL
,FMT_FLT
,&hf_cops_pc_token_bucket_rate
);
3801 /* Token Bucket Size */
3802 info_to_display(tvb
,object_tree
,offset
,4,"Token Bucket Size",NULL
,FMT_FLT
,&hf_cops_pc_token_bucket_size
);
3805 /* Peak Data Rate */
3806 info_to_display(tvb
,object_tree
,offset
,4,"Peak Data Rate",NULL
,FMT_FLT
,&hf_cops_pc_peak_data_rate
);
3809 /* Minimum Policed Unit */
3810 info_to_display(tvb
,object_tree
,offset
,4,"Minimum Policed Unit",NULL
,FMT_DEC
,&hf_cops_pc_min_policed_unit
);
3813 /* Maximum Packet Size */
3814 info_to_display(tvb
,object_tree
,offset
,4,"Maximum Packet Size",NULL
,FMT_DEC
,&hf_cops_pc_max_packet_size
);
3818 info_to_display(tvb
,object_tree
,offset
,4,"Rate",NULL
,FMT_FLT
,&hf_cops_pc_spec_rate
);
3822 info_to_display(tvb
,object_tree
,offset
,4,"Slack Term",NULL
,FMT_DEC
,&hf_cops_pc_slack_term
);
3828 /* Cops - Section : DOCSIS Service Class Name */
3830 cops_docsis_service_class_name(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*st
, unsigned object_len
, uint32_t offset
) {
3834 /* Create a subtree */
3835 stt
= info_to_cops_subtree(tvb
,st
,object_len
,offset
,"DOCSIS Service Class Name");
3839 info_to_display(tvb
,stt
,offset
,1,"Envelope",NULL
,FMT_DEC
,&hf_cops_pcmm_envelope
);
3842 proto_tree_add_item(stt
, hf_cops_reserved24
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
3845 if (object_len
>= 12) {
3846 proto_tree_add_item(stt
, hf_cops_pcmm_docsis_scn
, tvb
, offset
, object_len
- 8, ENC_ASCII
);
3847 offset
+= object_len
- 8;
3849 proto_tree_add_expert_format(stt
, pinfo
, &ei_cops_bad_cops_object_length
,
3850 tvb
, offset
- 8, 2, "Invalid object length: %u", object_len
);
3856 /* New functions were made with the i04 suffix to maintain backward compatibility with I03
3862 /* Cops - Section : Best Effort Service */
3864 cops_best_effort_service_i04_i05(tvbuff_t
*tvb
, proto_tree
*st
, unsigned n
, uint32_t offset
, bool i05
) {
3865 proto_tree
*stt
, *object_tree
;
3867 /* Create a subtree */
3868 stt
= info_to_cops_subtree(tvb
,st
,n
,offset
,"Best Effort Service");
3872 info_to_display(tvb
,stt
,offset
,1,"Envelope",NULL
,FMT_DEC
,&hf_cops_pcmm_envelope
);
3875 proto_tree_add_item(stt
, hf_cops_reserved24
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
3878 /* Authorized Envelope */
3879 object_tree
= proto_tree_add_subtree(stt
, tvb
, offset
, i05
? 36 : 32, ett_cops_subtree
, NULL
, "Authorized Envelope");
3881 /* Traffic Priority */
3882 info_to_display(tvb
,object_tree
,offset
,1,"Traffic Priority",NULL
,FMT_HEX
,&hf_cops_pcmm_traffic_priority
);
3885 proto_tree_add_item(object_tree
, hf_cops_reserved24
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
3888 /* Request Transmission Policy */
3889 decode_docsis_request_transmission_policy(tvb
, offset
, object_tree
);
3892 /* Maximum Sustained Traffic Rate */
3893 info_to_display(tvb
,object_tree
,offset
,4,"Maximum Sustained Traffic Rate",NULL
,FMT_DEC
,&hf_cops_pcmm_max_sustained_traffic_rate
);
3896 /* Maximum Traffic Burst */
3897 info_to_display(tvb
,object_tree
,offset
,4,"Maximum Traffic Burst",NULL
,FMT_DEC
,&hf_cops_pcmm_max_traffic_burst
);
3900 /* Minimum Reserved Traffic Rate */
3901 info_to_display(tvb
,object_tree
,offset
,4,"Minimum Reserved Traffic Rate",NULL
,FMT_DEC
,&hf_cops_pcmm_min_reserved_traffic_rate
);
3904 /* Assumed Minimum Reserved Traffic Rate Packet Size */
3905 info_to_display(tvb
,object_tree
,offset
,2,"Assumed Minimum Reserved Traffic Rate Packet Size",NULL
,FMT_DEC
,&hf_cops_pcmm_ass_min_rtr_packet_size
);
3908 /* Maximum Concatenated Burst */
3909 info_to_display(tvb
,object_tree
,offset
,2,"Maximum Concatenated Burst",NULL
,FMT_DEC
,&hf_cops_pcmm_max_concat_burst
);
3912 /* Required Attribute Mask */
3913 info_to_display(tvb
,object_tree
,offset
,4,"Required Attribute Mask",NULL
,FMT_DEC
,&hf_cops_pcmm_req_att_mask
);
3916 /* Forbidden Attribute Mask */
3917 info_to_display(tvb
,object_tree
,offset
,4,"Forbidden Attribute Mask",NULL
,FMT_DEC
,&hf_cops_pcmm_forbid_att_mask
);
3921 /* Attribute Aggregation Rule Mask */
3922 info_to_display(tvb
,object_tree
,offset
,4,"Attribute Aggregation Rule Mask",NULL
,FMT_DEC
,&hf_cops_pcmm_att_aggr_rule_mask
);
3926 if (n
< 56) return offset
;
3928 /* Reserved Envelope */
3929 object_tree
= proto_tree_add_subtree(stt
, tvb
, offset
, i05
? 36 : 32, ett_cops_subtree
, NULL
, "Reserved Envelope");
3931 /* Traffic Priority */
3932 info_to_display(tvb
,object_tree
,offset
,1,"Traffic Priority",NULL
,FMT_HEX
,&hf_cops_pcmm_traffic_priority
);
3935 proto_tree_add_item(object_tree
, hf_cops_reserved24
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
3938 /* Request Transmission Policy */
3939 decode_docsis_request_transmission_policy(tvb
, offset
, object_tree
);
3942 /* Maximum Sustained Traffic Rate */
3943 info_to_display(tvb
,object_tree
,offset
,4,"Maximum Sustained Traffic Rate",NULL
,FMT_DEC
,&hf_cops_pcmm_max_sustained_traffic_rate
);
3946 /* Maximum Traffic Burst */
3947 info_to_display(tvb
,object_tree
,offset
,4,"Maximum Traffic Burst",NULL
,FMT_DEC
,&hf_cops_pcmm_max_traffic_burst
);
3950 /* Minimum Reserved Traffic Rate */
3951 info_to_display(tvb
,object_tree
,offset
,4,"Minimum Reserved Traffic Rate",NULL
,FMT_DEC
,&hf_cops_pcmm_min_reserved_traffic_rate
);
3954 /* Assumed Minimum Reserved Traffic Rate Packet Size */
3955 info_to_display(tvb
,object_tree
,offset
,2,"Assumed Minimum Reserved Traffic Rate Packet Size",NULL
,FMT_DEC
,&hf_cops_pcmm_ass_min_rtr_packet_size
);
3958 /* Maximum Concatenated Burst */
3959 info_to_display(tvb
,object_tree
,offset
,2,"Maximum Concatenated Burst",NULL
,FMT_DEC
,&hf_cops_pcmm_max_concat_burst
);
3962 /* Required Attribute Mask */
3963 info_to_display(tvb
,object_tree
,offset
,4,"Required Attribute Mask",NULL
,FMT_DEC
,&hf_cops_pcmm_req_att_mask
);
3966 /* Forbidden Attribute Mask */
3967 info_to_display(tvb
,object_tree
,offset
,4,"Forbidden Attribute Mask",NULL
,FMT_DEC
,&hf_cops_pcmm_forbid_att_mask
);
3971 /* Attribute Aggregation Rule Mask */
3972 info_to_display(tvb
,object_tree
,offset
,4,"Attribute Aggregation Rule Mask",NULL
,FMT_DEC
,&hf_cops_pcmm_att_aggr_rule_mask
);
3976 if (n
< 80) return offset
;
3978 /* Committed Envelope */
3979 object_tree
= proto_tree_add_subtree(stt
, tvb
, offset
, i05
? 36 : 32, ett_cops_subtree
, NULL
, "Committed Envelope");
3981 /* Traffic Priority */
3982 info_to_display(tvb
,object_tree
,offset
,1,"Traffic Priority",NULL
,FMT_HEX
,&hf_cops_pcmm_traffic_priority
);
3985 proto_tree_add_item(object_tree
, hf_cops_reserved24
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
3988 /* Request Transmission Policy */
3989 decode_docsis_request_transmission_policy(tvb
, offset
, object_tree
);
3992 /* Maximum Sustained Traffic Rate */
3993 info_to_display(tvb
,object_tree
,offset
,4,"Maximum Sustained Traffic Rate",NULL
,FMT_DEC
,&hf_cops_pcmm_max_sustained_traffic_rate
);
3996 /* Maximum Traffic Burst */
3997 info_to_display(tvb
,object_tree
,offset
,4,"Maximum Traffic Burst",NULL
,FMT_DEC
,&hf_cops_pcmm_max_traffic_burst
);
4000 /* Minimum Reserved Traffic Rate */
4001 info_to_display(tvb
,object_tree
,offset
,4,"Minimum Reserved Traffic Rate",NULL
,FMT_DEC
,&hf_cops_pcmm_min_reserved_traffic_rate
);
4004 /* Assumed Minimum Reserved Traffic Rate Packet Size */
4005 info_to_display(tvb
,object_tree
,offset
,2,"Assumed Minimum Reserved Traffic Rate Packet Size",NULL
,FMT_DEC
,&hf_cops_pcmm_ass_min_rtr_packet_size
);
4008 /* Maximum Concatenated Burst */
4009 info_to_display(tvb
,object_tree
,offset
,2,"Maximum Concatenated Burst",NULL
,FMT_DEC
,&hf_cops_pcmm_max_concat_burst
);
4012 /* Required Attribute Mask */
4013 info_to_display(tvb
,object_tree
,offset
,4,"Required Attribute Mask",NULL
,FMT_DEC
,&hf_cops_pcmm_req_att_mask
);
4016 /* Forbidden Attribute Mask */
4017 info_to_display(tvb
,object_tree
,offset
,4,"Forbidden Attribute Mask",NULL
,FMT_DEC
,&hf_cops_pcmm_forbid_att_mask
);
4021 /* Attribute Aggregation Rule Mask */
4022 info_to_display(tvb
,object_tree
,offset
,4,"Attribute Aggregation Rule Mask",NULL
,FMT_DEC
,&hf_cops_pcmm_att_aggr_rule_mask
);
4029 /* Cops - Section : Non-Real-Time Polling Service */
4031 cops_non_real_time_polling_service_i04_i05(tvbuff_t
*tvb
, proto_tree
*st
, unsigned n
, uint32_t offset
, bool i05
) {
4032 proto_tree
*stt
, *object_tree
;
4034 /* Create a subtree */
4035 stt
= info_to_cops_subtree(tvb
,st
,n
,offset
,"Non-Real-Time Polling Service");
4039 info_to_display(tvb
,stt
,offset
,1,"Envelope",NULL
,FMT_DEC
,&hf_cops_pcmm_envelope
);
4042 proto_tree_add_item(stt
, hf_cops_reserved24
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
4045 /* Authorized Envelope */
4046 object_tree
= proto_tree_add_subtree(stt
, tvb
, offset
, i05
? 40 : 36, ett_cops_subtree
, NULL
, "Authorized Envelope");
4048 /* Traffic Priority */
4049 info_to_display(tvb
,object_tree
,offset
,1,"Traffic Priority",NULL
,FMT_HEX
,&hf_cops_pcmm_traffic_priority
);
4052 proto_tree_add_item(object_tree
, hf_cops_reserved24
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
4055 /* Request Transmission Policy */
4056 decode_docsis_request_transmission_policy(tvb
, offset
, object_tree
);
4059 /* Maximum Sustained Traffic Rate */
4060 info_to_display(tvb
,object_tree
,offset
,4,"Maximum Sustained Traffic Rate",NULL
,FMT_DEC
,&hf_cops_pcmm_max_sustained_traffic_rate
);
4063 /* Maximum Traffic Burst */
4064 info_to_display(tvb
,object_tree
,offset
,4,"Maximum Traffic Burst",NULL
,FMT_DEC
,&hf_cops_pcmm_max_traffic_burst
);
4067 /* Minimum Reserved Traffic Rate */
4068 info_to_display(tvb
,object_tree
,offset
,4,"Minimum Reserved Traffic Rate",NULL
,FMT_DEC
,&hf_cops_pcmm_min_reserved_traffic_rate
);
4071 /* Assumed Minimum Reserved Traffic Rate Packet Size */
4072 info_to_display(tvb
,object_tree
,offset
,2,"Assumed Minimum Reserved Traffic Rate Packet Size",NULL
,FMT_DEC
,&hf_cops_pcmm_ass_min_rtr_packet_size
);
4075 /* Maximum Concatenated Burst */
4076 info_to_display(tvb
,object_tree
,offset
,2,"Maximum Concatenated Burst",NULL
,FMT_DEC
,&hf_cops_pcmm_max_concat_burst
);
4079 /* Nominal Polling Interval */
4080 info_to_display(tvb
,object_tree
,offset
,4,"Nominal Polling Interval",NULL
,FMT_DEC
,&hf_cops_pcmm_nominal_polling_interval
);
4083 /* Required Attribute Mask */
4084 info_to_display(tvb
,object_tree
,offset
,4,"Required Attribute Mask",NULL
,FMT_DEC
,&hf_cops_pcmm_req_att_mask
);
4087 /* Forbidden Attribute Mask */
4088 info_to_display(tvb
,object_tree
,offset
,4,"Forbidden Attribute Mask",NULL
,FMT_DEC
,&hf_cops_pcmm_forbid_att_mask
);
4092 /* Attribute Aggregation Rule Mask */
4093 info_to_display(tvb
,object_tree
,offset
,4,"Attribute Aggregation Rule Mask",NULL
,FMT_DEC
,&hf_cops_pcmm_att_aggr_rule_mask
);
4097 if (n
< 64) return offset
;
4099 /* Reserved Envelope */
4100 object_tree
= proto_tree_add_subtree(stt
, tvb
, offset
, i05
? 40 : 36, ett_cops_subtree
, NULL
, "Reserved Envelope");
4102 /* Traffic Priority */
4103 info_to_display(tvb
,object_tree
,offset
,1,"Traffic Priority",NULL
,FMT_HEX
,&hf_cops_pcmm_traffic_priority
);
4106 proto_tree_add_item(object_tree
, hf_cops_reserved24
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
4109 /* Request Transmission Policy */
4110 decode_docsis_request_transmission_policy(tvb
, offset
, object_tree
);
4113 /* Maximum Sustained Traffic Rate */
4114 info_to_display(tvb
,object_tree
,offset
,4,"Maximum Sustained Traffic Rate",NULL
,FMT_DEC
,&hf_cops_pcmm_max_sustained_traffic_rate
);
4117 /* Maximum Traffic Burst */
4118 info_to_display(tvb
,object_tree
,offset
,4,"Maximum Traffic Burst",NULL
,FMT_DEC
,&hf_cops_pcmm_max_traffic_burst
);
4121 /* Minimum Reserved Traffic Rate */
4122 info_to_display(tvb
,object_tree
,offset
,4,"Minimum Reserved Traffic Rate",NULL
,FMT_DEC
,&hf_cops_pcmm_min_reserved_traffic_rate
);
4125 /* Assumed Minimum Reserved Traffic Rate Packet Size */
4126 info_to_display(tvb
,object_tree
,offset
,2,"Assumed Minimum Reserved Traffic Rate Packet Size",NULL
,FMT_DEC
,&hf_cops_pcmm_ass_min_rtr_packet_size
);
4129 /* Maximum Concatenated Burst */
4130 info_to_display(tvb
,object_tree
,offset
,2,"Maximum Concatenated Burst",NULL
,FMT_DEC
,&hf_cops_pcmm_max_concat_burst
);
4133 /* Nominal Polling Interval */
4134 info_to_display(tvb
,object_tree
,offset
,4,"Nominal Polling Interval",NULL
,FMT_DEC
,&hf_cops_pcmm_nominal_polling_interval
);
4137 /* Required Attribute Mask */
4138 info_to_display(tvb
,object_tree
,offset
,4,"Required Attribute Mask",NULL
,FMT_DEC
,&hf_cops_pcmm_req_att_mask
);
4141 /* Forbidden Attribute Mask */
4142 info_to_display(tvb
,object_tree
,offset
,4,"Forbidden Attribute Mask",NULL
,FMT_DEC
,&hf_cops_pcmm_forbid_att_mask
);
4146 /* Attribute Aggregation Rule Mask */
4147 info_to_display(tvb
,object_tree
,offset
,4,"Attribute Aggregation Rule Mask",NULL
,FMT_DEC
,&hf_cops_pcmm_att_aggr_rule_mask
);
4151 if (n
< 92) return offset
;
4153 /* Committed Envelope */
4154 object_tree
= proto_tree_add_subtree(stt
, tvb
, offset
, i05
? 40 : 36, ett_cops_subtree
, NULL
, "Committed Envelope");
4156 /* Traffic Priority */
4157 info_to_display(tvb
,object_tree
,offset
,1,"Traffic Priority",NULL
,FMT_HEX
,&hf_cops_pcmm_traffic_priority
);
4160 proto_tree_add_item(object_tree
, hf_cops_reserved24
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
4163 /* Request Transmission Policy */
4164 decode_docsis_request_transmission_policy(tvb
, offset
, object_tree
);
4167 /* Maximum Sustained Traffic Rate */
4168 info_to_display(tvb
,object_tree
,offset
,4,"Maximum Sustained Traffic Rate",NULL
,FMT_DEC
,&hf_cops_pcmm_max_sustained_traffic_rate
);
4171 /* Maximum Traffic Burst */
4172 info_to_display(tvb
,object_tree
,offset
,4,"Maximum Traffic Burst",NULL
,FMT_DEC
,&hf_cops_pcmm_max_traffic_burst
);
4175 /* Minimum Reserved Traffic Rate */
4176 info_to_display(tvb
,object_tree
,offset
,4,"Minimum Reserved Traffic Rate",NULL
,FMT_DEC
,&hf_cops_pcmm_min_reserved_traffic_rate
);
4179 /* Assumed Minimum Reserved Traffic Rate Packet Size */
4180 info_to_display(tvb
,object_tree
,offset
,2,"Assumed Minimum Reserved Traffic Rate Packet Size",NULL
,FMT_DEC
,&hf_cops_pcmm_ass_min_rtr_packet_size
);
4183 /* Maximum Concatenated Burst */
4184 info_to_display(tvb
,object_tree
,offset
,2,"Maximum Concatenated Burst",NULL
,FMT_DEC
,&hf_cops_pcmm_max_concat_burst
);
4187 /* Nominal Polling Interval */
4188 info_to_display(tvb
,object_tree
,offset
,4,"Nominal Polling Interval",NULL
,FMT_DEC
,&hf_cops_pcmm_nominal_polling_interval
);
4191 /* Required Attribute Mask */
4192 info_to_display(tvb
,object_tree
,offset
,4,"Required Attribute Mask",NULL
,FMT_DEC
,&hf_cops_pcmm_req_att_mask
);
4195 /* Forbidden Attribute Mask */
4196 info_to_display(tvb
,object_tree
,offset
,4,"Forbidden Attribute Mask",NULL
,FMT_DEC
,&hf_cops_pcmm_forbid_att_mask
);
4200 /* Attribute Aggregation Rule Mask */
4201 info_to_display(tvb
,object_tree
,offset
,4,"Attribute Aggregation Rule Mask",NULL
,FMT_DEC
,&hf_cops_pcmm_att_aggr_rule_mask
);
4208 /* Cops - Section : Real-Time Polling Service */
4210 cops_real_time_polling_service_i04_i05(tvbuff_t
*tvb
, proto_tree
*st
, unsigned n
, uint32_t offset
, bool i05
) {
4211 proto_tree
*stt
, *object_tree
;
4213 /* Create a subtree */
4214 stt
= info_to_cops_subtree(tvb
,st
,n
,offset
,"Real-Time Polling Service");
4218 info_to_display(tvb
,stt
,offset
,1,"Envelope",NULL
,FMT_DEC
,&hf_cops_pcmm_envelope
);
4221 proto_tree_add_item(stt
, hf_cops_reserved24
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
4224 /* Authorized Envelope */
4225 object_tree
= proto_tree_add_subtree(stt
, tvb
, offset
, i05
? 40 : 36, ett_cops_subtree
, NULL
, "Authorized Envelope");
4227 /* Request Transmission Policy */
4228 decode_docsis_request_transmission_policy(tvb
, offset
, object_tree
);
4231 /* Maximum Sustained Traffic Rate */
4232 info_to_display(tvb
,object_tree
,offset
,4,"Maximum Sustained Traffic Rate",NULL
,FMT_DEC
,&hf_cops_pcmm_max_sustained_traffic_rate
);
4235 /* Maximum Traffic Burst */
4236 info_to_display(tvb
,object_tree
,offset
,4,"Maximum Traffic Burst",NULL
,FMT_DEC
,&hf_cops_pcmm_max_traffic_burst
);
4239 /* Minimum Reserved Traffic Rate */
4240 info_to_display(tvb
,object_tree
,offset
,4,"Minimum Reserved Traffic Rate",NULL
,FMT_DEC
,&hf_cops_pcmm_min_reserved_traffic_rate
);
4243 /* Assumed Minimum Reserved Traffic Rate Packet Size */
4244 info_to_display(tvb
,object_tree
,offset
,2,"Assumed Minimum Reserved Traffic Rate Packet Size",NULL
,FMT_DEC
,&hf_cops_pcmm_ass_min_rtr_packet_size
);
4247 /* Maximum Concatenated Burst */
4248 info_to_display(tvb
,object_tree
,offset
,2,"Maximum Concatenated Burst",NULL
,FMT_DEC
,&hf_cops_pcmm_max_concat_burst
);
4251 /* Nominal Polling Interval */
4252 info_to_display(tvb
,object_tree
,offset
,4,"Nominal Polling Interval",NULL
,FMT_DEC
,&hf_cops_pcmm_nominal_polling_interval
);
4255 /* Tolerated Poll Jitter */
4256 info_to_display(tvb
,object_tree
,offset
,4,"Tolerated Poll Jitter",NULL
,FMT_DEC
,&hf_cops_pcmm_tolerated_poll_jitter
);
4259 /* Required Attribute Mask */
4260 info_to_display(tvb
,object_tree
,offset
,4,"Required Attribute Mask",NULL
,FMT_DEC
,&hf_cops_pcmm_req_att_mask
);
4263 /* Forbidden Attribute Mask */
4264 info_to_display(tvb
,object_tree
,offset
,4,"Forbidden Attribute Mask",NULL
,FMT_DEC
,&hf_cops_pcmm_forbid_att_mask
);
4268 /* Attribute Aggregation Rule Mask */
4269 info_to_display(tvb
,object_tree
,offset
,4,"Attribute Aggregation Rule Mask",NULL
,FMT_DEC
,&hf_cops_pcmm_att_aggr_rule_mask
);
4273 if (n
< 64) return offset
;
4275 /* Reserved Envelope */
4276 object_tree
= proto_tree_add_subtree(stt
, tvb
, offset
, i05
? 40 : 36, ett_cops_subtree
, NULL
, "Reserved Envelope");
4278 /* Request Transmission Policy */
4279 decode_docsis_request_transmission_policy(tvb
, offset
, object_tree
);
4282 /* Maximum Sustained Traffic Rate */
4283 info_to_display(tvb
,object_tree
,offset
,4,"Maximum Sustained Traffic Rate",NULL
,FMT_DEC
,&hf_cops_pcmm_max_sustained_traffic_rate
);
4286 /* Maximum Traffic Burst */
4287 info_to_display(tvb
,object_tree
,offset
,4,"Maximum Traffic Burst",NULL
,FMT_DEC
,&hf_cops_pcmm_max_traffic_burst
);
4290 /* Minimum Reserved Traffic Rate */
4291 info_to_display(tvb
,object_tree
,offset
,4,"Minimum Reserved Traffic Rate",NULL
,FMT_DEC
,&hf_cops_pcmm_min_reserved_traffic_rate
);
4294 /* Assumed Minimum Reserved Traffic Rate Packet Size */
4295 info_to_display(tvb
,object_tree
,offset
,2,"Assumed Minimum Reserved Traffic Rate Packet Size",NULL
,FMT_DEC
,&hf_cops_pcmm_ass_min_rtr_packet_size
);
4298 /* Maximum Concatenated Burst */
4299 info_to_display(tvb
,object_tree
,offset
,2,"Maximum Concatenated Burst",NULL
,FMT_DEC
,&hf_cops_pcmm_max_concat_burst
);
4302 /* Nominal Polling Interval */
4303 info_to_display(tvb
,object_tree
,offset
,4,"Nominal Polling Interval",NULL
,FMT_DEC
,&hf_cops_pcmm_nominal_polling_interval
);
4306 /* Tolerated Poll Jitter */
4307 info_to_display(tvb
,object_tree
,offset
,4,"Tolerated Poll Jitter",NULL
,FMT_DEC
,&hf_cops_pcmm_tolerated_poll_jitter
);
4310 /* Required Attribute Mask */
4311 info_to_display(tvb
,object_tree
,offset
,4,"Required Attribute Mask",NULL
,FMT_DEC
,&hf_cops_pcmm_req_att_mask
);
4314 /* Forbidden Attribute Mask */
4315 info_to_display(tvb
,object_tree
,offset
,4,"Forbidden Attribute Mask",NULL
,FMT_DEC
,&hf_cops_pcmm_forbid_att_mask
);
4319 /* Attribute Aggregation Rule Mask */
4320 info_to_display(tvb
,object_tree
,offset
,4,"Attribute Aggregation Rule Mask",NULL
,FMT_DEC
,&hf_cops_pcmm_att_aggr_rule_mask
);
4324 if (n
< 92) return offset
;
4326 /* Committed Envelope */
4327 object_tree
= proto_tree_add_subtree(stt
, tvb
, offset
, i05
? 40 : 36, ett_cops_subtree
, NULL
, "Committed Envelope");
4329 /* Request Transmission Policy */
4330 decode_docsis_request_transmission_policy(tvb
, offset
, object_tree
);
4333 /* Maximum Sustained Traffic Rate */
4334 info_to_display(tvb
,object_tree
,offset
,4,"Maximum Sustained Traffic Rate",NULL
,FMT_DEC
,&hf_cops_pcmm_max_sustained_traffic_rate
);
4337 /* Maximum Traffic Burst */
4338 info_to_display(tvb
,object_tree
,offset
,4,"Maximum Traffic Burst",NULL
,FMT_DEC
,&hf_cops_pcmm_max_traffic_burst
);
4341 /* Minimum Reserved Traffic Rate */
4342 info_to_display(tvb
,object_tree
,offset
,4,"Minimum Reserved Traffic Rate",NULL
,FMT_DEC
,&hf_cops_pcmm_min_reserved_traffic_rate
);
4345 /* Assumed Minimum Reserved Traffic Rate Packet Size */
4346 info_to_display(tvb
,object_tree
,offset
,2,"Assumed Minimum Reserved Traffic Rate Packet Size",NULL
,FMT_DEC
,&hf_cops_pcmm_ass_min_rtr_packet_size
);
4349 /* Maximum Concatenated Burst */
4350 info_to_display(tvb
,object_tree
,offset
,2,"Maximum Concatenated Burst",NULL
,FMT_DEC
,&hf_cops_pcmm_max_concat_burst
);
4353 /* Nominal Polling Interval */
4354 info_to_display(tvb
,object_tree
,offset
,4,"Nominal Polling Interval",NULL
,FMT_DEC
,&hf_cops_pcmm_nominal_polling_interval
);
4357 /* Tolerated Poll Jitter */
4358 info_to_display(tvb
,object_tree
,offset
,4,"Tolerated Poll Jitter",NULL
,FMT_DEC
,&hf_cops_pcmm_tolerated_poll_jitter
);
4361 /* Required Attribute Mask */
4362 info_to_display(tvb
,object_tree
,offset
,4,"Required Attribute Mask",NULL
,FMT_DEC
,&hf_cops_pcmm_req_att_mask
);
4365 /* Forbidden Attribute Mask */
4366 info_to_display(tvb
,object_tree
,offset
,4,"Forbidden Attribute Mask",NULL
,FMT_DEC
,&hf_cops_pcmm_forbid_att_mask
);
4370 /* Attribute Aggregation Rule Mask */
4371 info_to_display(tvb
,object_tree
,offset
,4,"Attribute Aggregation Rule Mask",NULL
,FMT_DEC
,&hf_cops_pcmm_att_aggr_rule_mask
);
4378 /* Cops - Section : Unsolicited Grant Service */
4380 cops_unsolicited_grant_service_i04_i05(tvbuff_t
*tvb
, proto_tree
*st
, unsigned n
, uint32_t offset
, bool i05
) {
4381 proto_tree
*stt
, *object_tree
;
4383 /* Create a subtree */
4384 stt
= info_to_cops_subtree(tvb
,st
,n
,offset
,"Unsolicited Grant Service");
4388 info_to_display(tvb
,stt
,offset
,1,"Envelope",NULL
,FMT_DEC
,&hf_cops_pcmm_envelope
);
4391 proto_tree_add_item(stt
, hf_cops_reserved24
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
4394 /* Authorized Envelope */
4395 object_tree
= proto_tree_add_subtree(stt
, tvb
, offset
, i05
? 28 : 24, ett_cops_subtree
, NULL
, "Authorized Envelope");
4397 /* Request Transmission Policy */
4398 decode_docsis_request_transmission_policy(tvb
, offset
, object_tree
);
4401 /* Unsolicited Grant Size */
4402 info_to_display(tvb
,object_tree
,offset
,2,"Unsolicited Grant Size",NULL
,FMT_DEC
,&hf_cops_pcmm_unsolicited_grant_size
);
4405 /* Grants Per Interval */
4406 info_to_display(tvb
,object_tree
,offset
,1,"Grants Per Interval",NULL
,FMT_DEC
,&hf_cops_pcmm_grants_per_interval
);
4409 proto_tree_add_item(object_tree
, hf_cops_reserved8
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
4412 /* Nominal Grant Interval */
4413 info_to_display(tvb
,object_tree
,offset
,4,"Nominal Grant Interval",NULL
,FMT_DEC
,&hf_cops_pcmm_nominal_grant_interval
);
4416 /* Tolerated Grant Jitter */
4417 info_to_display(tvb
,object_tree
,offset
,4,"Tolerated Grant Jitter",NULL
,FMT_DEC
,&hf_cops_pcmm_tolerated_grant_jitter
);
4420 /* Required Attribute Mask */
4421 info_to_display(tvb
,object_tree
,offset
,4,"Required Attribute Mask",NULL
,FMT_DEC
,&hf_cops_pcmm_req_att_mask
);
4424 /* Forbidden Attribute Mask */
4425 info_to_display(tvb
,object_tree
,offset
,4,"Forbidden Attribute Mask",NULL
,FMT_DEC
,&hf_cops_pcmm_forbid_att_mask
);
4429 /* Attribute Aggregation Rule Mask */
4430 info_to_display(tvb
,object_tree
,offset
,4,"Attribute Aggregation Rule Mask",NULL
,FMT_DEC
,&hf_cops_pcmm_att_aggr_rule_mask
);
4434 if (n
< 40) return offset
;
4436 /* Reserved Envelope */
4437 object_tree
= proto_tree_add_subtree(stt
, tvb
, offset
, i05
? 28 : 24, ett_cops_subtree
, NULL
, "Reserved Envelope");
4439 /* Request Transmission Policy */
4440 decode_docsis_request_transmission_policy(tvb
, offset
, object_tree
);
4443 /* Unsolicited Grant Size */
4444 info_to_display(tvb
,object_tree
,offset
,2,"Unsolicited Grant Size",NULL
,FMT_DEC
,&hf_cops_pcmm_unsolicited_grant_size
);
4447 /* Grants Per Interval */
4448 info_to_display(tvb
,object_tree
,offset
,1,"Grants Per Interval",NULL
,FMT_DEC
,&hf_cops_pcmm_grants_per_interval
);
4451 proto_tree_add_item(object_tree
, hf_cops_reserved8
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
4454 /* Nominal Grant Interval */
4455 info_to_display(tvb
,object_tree
,offset
,4,"Nominal Grant Interval",NULL
,FMT_DEC
,&hf_cops_pcmm_nominal_grant_interval
);
4458 /* Tolerated Grant Jitter */
4459 info_to_display(tvb
,object_tree
,offset
,4,"Tolerated Grant Jitter",NULL
,FMT_DEC
,&hf_cops_pcmm_tolerated_grant_jitter
);
4462 /* Required Attribute Mask */
4463 info_to_display(tvb
,object_tree
,offset
,4,"Required Attribute Mask",NULL
,FMT_DEC
,&hf_cops_pcmm_req_att_mask
);
4466 /* Forbidden Attribute Mask */
4467 info_to_display(tvb
,object_tree
,offset
,4,"Forbidden Attribute Mask",NULL
,FMT_DEC
,&hf_cops_pcmm_forbid_att_mask
);
4471 /* Attribute Aggregation Rule Mask */
4472 info_to_display(tvb
,object_tree
,offset
,4,"Attribute Aggregation Rule Mask",NULL
,FMT_DEC
,&hf_cops_pcmm_att_aggr_rule_mask
);
4476 if (n
< 56) return offset
;
4478 /* Committed Envelope */
4479 object_tree
= proto_tree_add_subtree(stt
, tvb
, offset
, i05
? 28 : 24, ett_cops_subtree
, NULL
, "Committed Envelope");
4481 /* Request Transmission Policy */
4482 decode_docsis_request_transmission_policy(tvb
, offset
, object_tree
);
4485 /* Unsolicited Grant Size */
4486 info_to_display(tvb
,object_tree
,offset
,2,"Unsolicited Grant Size",NULL
,FMT_DEC
,&hf_cops_pcmm_unsolicited_grant_size
);
4489 /* Grants Per Interval */
4490 info_to_display(tvb
,object_tree
,offset
,1,"Grants Per Interval",NULL
,FMT_DEC
,&hf_cops_pcmm_grants_per_interval
);
4493 proto_tree_add_item(object_tree
, hf_cops_reserved8
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
4496 /* Nominal Grant Interval */
4497 info_to_display(tvb
,object_tree
,offset
,4,"Nominal Grant Interval",NULL
,FMT_DEC
,&hf_cops_pcmm_nominal_grant_interval
);
4500 /* Tolerated Grant Jitter */
4501 info_to_display(tvb
,object_tree
,offset
,4,"Tolerated Grant Jitter",NULL
,FMT_DEC
,&hf_cops_pcmm_tolerated_grant_jitter
);
4504 /* Required Attribute Mask */
4505 info_to_display(tvb
,object_tree
,offset
,4,"Required Attribute Mask",NULL
,FMT_DEC
,&hf_cops_pcmm_req_att_mask
);
4508 /* Forbidden Attribute Mask */
4509 info_to_display(tvb
,object_tree
,offset
,4,"Forbidden Attribute Mask",NULL
,FMT_DEC
,&hf_cops_pcmm_forbid_att_mask
);
4513 /* Attribute Aggregation Rule Mask */
4514 info_to_display(tvb
,object_tree
,offset
,4,"Attribute Aggregation Rule Mask",NULL
,FMT_DEC
,&hf_cops_pcmm_att_aggr_rule_mask
);
4521 /* Cops - Section : Unsolicited Grant Service with Activity Detection */
4523 cops_ugs_with_activity_detection_i04_i05(tvbuff_t
*tvb
, proto_tree
*st
, unsigned n
, uint32_t offset
, bool i05
) {
4524 proto_tree
*stt
, *object_tree
;
4526 /* Create a subtree */
4527 stt
= info_to_cops_subtree(tvb
,st
,n
,offset
,"Unsolicited Grant Service with Activity Detection");
4531 info_to_display(tvb
,stt
,offset
,1,"Envelope",NULL
,FMT_DEC
,&hf_cops_pcmm_envelope
);
4534 proto_tree_add_item(stt
, hf_cops_reserved24
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
4537 /* Authorized Envelope */
4538 object_tree
= proto_tree_add_subtree(stt
, tvb
, offset
, i05
? 36 : 32, ett_cops_subtree
, NULL
, "Authorized Envelope");
4540 /* Request Transmission Policy */
4541 decode_docsis_request_transmission_policy(tvb
, offset
, object_tree
);
4544 /* Unsolicited Grant Size */
4545 info_to_display(tvb
,object_tree
,offset
,2,"Unsolicited Grant Size",NULL
,FMT_DEC
,&hf_cops_pcmm_unsolicited_grant_size
);
4548 /* Grants Per Interval */
4549 info_to_display(tvb
,object_tree
,offset
,1,"Grants Per Interval",NULL
,FMT_DEC
,&hf_cops_pcmm_grants_per_interval
);
4552 proto_tree_add_item(object_tree
, hf_cops_reserved8
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
4555 /* Nominal Grant Interval */
4556 info_to_display(tvb
,object_tree
,offset
,4,"Nominal Grant Interval",NULL
,FMT_DEC
,&hf_cops_pcmm_nominal_grant_interval
);
4559 /* Tolerated Grant Jitter */
4560 info_to_display(tvb
,object_tree
,offset
,4,"Tolerated Grant Jitter",NULL
,FMT_DEC
,&hf_cops_pcmm_tolerated_grant_jitter
);
4563 /* Nominal Polling Interval */
4564 info_to_display(tvb
,object_tree
,offset
,4,"Nominal Polling Interval",NULL
,FMT_DEC
,&hf_cops_pcmm_nominal_polling_interval
);
4567 /* Tolerated Poll Jitter */
4568 info_to_display(tvb
,object_tree
,offset
,4,"Tolerated Poll Jitter",NULL
,FMT_DEC
,&hf_cops_pcmm_tolerated_poll_jitter
);
4571 /* Required Attribute Mask */
4572 info_to_display(tvb
,object_tree
,offset
,4,"Required Attribute Mask",NULL
,FMT_DEC
,&hf_cops_pcmm_req_att_mask
);
4575 /* Forbidden Attribute Mask */
4576 info_to_display(tvb
,object_tree
,offset
,4,"Forbidden Attribute Mask",NULL
,FMT_DEC
,&hf_cops_pcmm_forbid_att_mask
);
4580 /* Attribute Aggregation Rule Mask */
4581 info_to_display(tvb
,object_tree
,offset
,4,"Attribute Aggregation Rule Mask",NULL
,FMT_DEC
,&hf_cops_pcmm_att_aggr_rule_mask
);
4585 if (n
< 56) return offset
;
4587 /* Reserved Envelope */
4588 object_tree
= proto_tree_add_subtree(stt
, tvb
, offset
, i05
? 36 : 32, ett_cops_subtree
, NULL
, "Reserved Envelope");
4590 /* Request Transmission Policy */
4591 decode_docsis_request_transmission_policy(tvb
, offset
, object_tree
);
4594 /* Unsolicited Grant Size */
4595 info_to_display(tvb
,object_tree
,offset
,2,"Unsolicited Grant Size",NULL
,FMT_DEC
,&hf_cops_pcmm_unsolicited_grant_size
);
4598 /* Grants Per Interval */
4599 info_to_display(tvb
,object_tree
,offset
,1,"Grants Per Interval",NULL
,FMT_DEC
,&hf_cops_pcmm_grants_per_interval
);
4602 proto_tree_add_item(object_tree
, hf_cops_reserved8
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
4605 /* Nominal Grant Interval */
4606 info_to_display(tvb
,object_tree
,offset
,4,"Nominal Grant Interval",NULL
,FMT_DEC
,&hf_cops_pcmm_nominal_grant_interval
);
4609 /* Tolerated Grant Jitter */
4610 info_to_display(tvb
,object_tree
,offset
,4,"Tolerated Grant Jitter",NULL
,FMT_DEC
,&hf_cops_pcmm_tolerated_grant_jitter
);
4613 /* Nominal Polling Interval */
4614 info_to_display(tvb
,object_tree
,offset
,4,"Nominal Polling Interval",NULL
,FMT_DEC
,&hf_cops_pcmm_nominal_polling_interval
);
4617 /* Tolerated Poll Jitter */
4618 info_to_display(tvb
,object_tree
,offset
,4,"Tolerated Poll Jitter",NULL
,FMT_DEC
,&hf_cops_pcmm_tolerated_poll_jitter
);
4621 /* Required Attribute Mask */
4622 info_to_display(tvb
,object_tree
,offset
,4,"Required Attribute Mask",NULL
,FMT_DEC
,&hf_cops_pcmm_req_att_mask
);
4625 /* Forbidden Attribute Mask */
4626 info_to_display(tvb
,object_tree
,offset
,4,"Forbidden Attribute Mask",NULL
,FMT_DEC
,&hf_cops_pcmm_forbid_att_mask
);
4630 /* Attribute Aggregation Rule Mask */
4631 info_to_display(tvb
,object_tree
,offset
,4,"Attribute Aggregation Rule Mask",NULL
,FMT_DEC
,&hf_cops_pcmm_att_aggr_rule_mask
);
4635 if (n
< 80) return offset
;
4637 /* Committed Envelope */
4638 object_tree
= proto_tree_add_subtree(stt
, tvb
, offset
, i05
? 36 : 32, ett_cops_subtree
, NULL
, "Committed Envelope");
4640 /* Request Transmission Policy */
4641 decode_docsis_request_transmission_policy(tvb
, offset
, object_tree
);
4644 /* Unsolicited Grant Size */
4645 info_to_display(tvb
,object_tree
,offset
,2,"Unsolicited Grant Size",NULL
,FMT_DEC
,&hf_cops_pcmm_unsolicited_grant_size
);
4648 /* Grants Per Interval */
4649 info_to_display(tvb
,object_tree
,offset
,1,"Grants Per Interval",NULL
,FMT_DEC
,&hf_cops_pcmm_grants_per_interval
);
4652 proto_tree_add_item(object_tree
, hf_cops_reserved8
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
4655 /* Nominal Grant Interval */
4656 info_to_display(tvb
,object_tree
,offset
,4,"Nominal Grant Interval",NULL
,FMT_DEC
,&hf_cops_pcmm_nominal_grant_interval
);
4659 /* Tolerated Grant Jitter */
4660 info_to_display(tvb
,object_tree
,offset
,4,"Tolerated Grant Jitter",NULL
,FMT_DEC
,&hf_cops_pcmm_tolerated_grant_jitter
);
4663 /* Nominal Polling Interval */
4664 info_to_display(tvb
,object_tree
,offset
,4,"Nominal Polling Interval",NULL
,FMT_DEC
,&hf_cops_pcmm_nominal_polling_interval
);
4667 /* Tolerated Poll Jitter */
4668 info_to_display(tvb
,object_tree
,offset
,4,"Tolerated Poll Jitter",NULL
,FMT_DEC
,&hf_cops_pcmm_tolerated_poll_jitter
);
4671 /* Required Attribute Mask */
4672 info_to_display(tvb
,object_tree
,offset
,4,"Required Attribute Mask",NULL
,FMT_DEC
,&hf_cops_pcmm_req_att_mask
);
4675 /* Forbidden Attribute Mask */
4676 info_to_display(tvb
,object_tree
,offset
,4,"Forbidden Attribute Mask",NULL
,FMT_DEC
,&hf_cops_pcmm_forbid_att_mask
);
4680 /* Attribute Aggregation Rule Mask */
4681 info_to_display(tvb
,object_tree
,offset
,4,"Attribute Aggregation Rule Mask",NULL
,FMT_DEC
,&hf_cops_pcmm_att_aggr_rule_mask
);
4688 /* Cops - Section : Downstream Service */
4690 cops_downstream_service_i04_i05(tvbuff_t
*tvb
, proto_tree
*st
, unsigned n
, uint32_t offset
, bool i05
) {
4691 proto_tree
*stt
, *object_tree
;
4693 /* Create a subtree */
4694 stt
= info_to_cops_subtree(tvb
,st
,n
,offset
,"Downstream Service");
4698 info_to_display(tvb
,stt
,offset
,1,"Envelope",NULL
,FMT_DEC
,&hf_cops_pcmm_envelope
);
4701 proto_tree_add_item(stt
, hf_cops_reserved24
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
4704 /* Authorized Envelope */
4705 object_tree
= proto_tree_add_subtree(stt
, tvb
, offset
, i05
? 40 : 36, ett_cops_subtree
, NULL
, "Authorized Envelope");
4707 /* Traffic Priority */
4708 info_to_display(tvb
,object_tree
,offset
,1,"Traffic Priority",NULL
,FMT_HEX
,&hf_cops_pcmm_traffic_priority
);
4711 /* Downstream Resequencing */
4712 info_to_display(tvb
,object_tree
,offset
,1,"Downstream Resequencing",NULL
,FMT_HEX
,&hf_cops_pcmm_down_resequencing
);
4715 proto_tree_add_item(object_tree
, hf_cops_reserved16
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
4718 /* Maximum Sustained Traffic Rate */
4719 info_to_display(tvb
,object_tree
,offset
,4,"Maximum Sustained Traffic Rate",NULL
,FMT_DEC
,&hf_cops_pcmm_max_sustained_traffic_rate
);
4722 /* Maximum Traffic Burst */
4723 info_to_display(tvb
,object_tree
,offset
,4,"Maximum Traffic Burst",NULL
,FMT_DEC
,&hf_cops_pcmm_max_traffic_burst
);
4726 /* Minimum Reserved Traffic Rate */
4727 info_to_display(tvb
,object_tree
,offset
,4,"Minimum Reserved Traffic Rate",NULL
,FMT_DEC
,&hf_cops_pcmm_min_reserved_traffic_rate
);
4730 /* Assumed Minimum Reserved Traffic Rate Packet Size */
4731 info_to_display(tvb
,object_tree
,offset
,2,"Assumed Minimum Reserved Traffic Rate Packet Size",NULL
,FMT_DEC
,&hf_cops_pcmm_ass_min_rtr_packet_size
);
4735 info_to_display(tvb
,object_tree
,offset
,2,"Reserved",NULL
,FMT_HEX
,&hf_cops_pc_reserved
);
4738 /* Maximum Downstream Latency */
4739 info_to_display(tvb
,object_tree
,offset
,4,"Maximum Downstream Latency",NULL
,FMT_DEC
,&hf_cops_pcmm_max_downstream_latency
);
4742 /* Downstream Peak Traffic Rate */
4743 info_to_display(tvb
,object_tree
,offset
,4,"Downstream Peak Traffic Rate",NULL
,FMT_DEC
,&hf_cops_pcmm_down_peak_traffic_rate
);
4746 /* Required Attribute Mask */
4747 info_to_display(tvb
,object_tree
,offset
,4,"Required Attribute Mask",NULL
,FMT_DEC
,&hf_cops_pcmm_req_att_mask
);
4750 /* Forbidden Attribute Mask */
4751 info_to_display(tvb
,object_tree
,offset
,4,"Forbidden Attribute Mask",NULL
,FMT_DEC
,&hf_cops_pcmm_forbid_att_mask
);
4755 /* Attribute Aggregation Rule Mask */
4756 info_to_display(tvb
,object_tree
,offset
,4,"Attribute Aggregation Rule Mask",NULL
,FMT_DEC
,&hf_cops_pcmm_att_aggr_rule_mask
);
4760 if (n
< 56) return offset
;
4762 /* Reserved Envelope */
4763 object_tree
= proto_tree_add_subtree(stt
, tvb
, offset
, i05
? 40 : 36, ett_cops_subtree
, NULL
, "Reserved Envelope");
4765 /* Traffic Priority */
4766 info_to_display(tvb
,object_tree
,offset
,1,"Traffic Priority",NULL
,FMT_HEX
,&hf_cops_pcmm_traffic_priority
);
4769 /* Downstream Resequencing */
4770 info_to_display(tvb
,object_tree
,offset
,1,"Downstream Resequencing",NULL
,FMT_HEX
,&hf_cops_pcmm_down_resequencing
);
4773 proto_tree_add_item(object_tree
, hf_cops_reserved16
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
4776 /* Maximum Sustained Traffic Rate */
4777 info_to_display(tvb
,object_tree
,offset
,4,"Maximum Sustained Traffic Rate",NULL
,FMT_DEC
,&hf_cops_pcmm_max_sustained_traffic_rate
);
4780 /* Maximum Traffic Burst */
4781 info_to_display(tvb
,object_tree
,offset
,4,"Maximum Traffic Burst",NULL
,FMT_DEC
,&hf_cops_pcmm_max_traffic_burst
);
4784 /* Minimum Reserved Traffic Rate */
4785 info_to_display(tvb
,object_tree
,offset
,4,"Minimum Reserved Traffic Rate",NULL
,FMT_DEC
,&hf_cops_pcmm_min_reserved_traffic_rate
);
4788 /* Assumed Minimum Reserved Traffic Rate Packet Size */
4789 info_to_display(tvb
,object_tree
,offset
,2,"Assumed Minimum Reserved Traffic Rate Packet Size",NULL
,FMT_DEC
,&hf_cops_pcmm_ass_min_rtr_packet_size
);
4793 info_to_display(tvb
,object_tree
,offset
,2,"Reserved",NULL
,FMT_HEX
,&hf_cops_pc_reserved
);
4796 /* Maximum Downstream Latency */
4797 info_to_display(tvb
,object_tree
,offset
,4,"Maximum Downstream Latency",NULL
,FMT_DEC
,&hf_cops_pcmm_max_downstream_latency
);
4800 /* Downstream Peak Traffic Rate */
4801 info_to_display(tvb
,object_tree
,offset
,4,"Downstream Peak Traffic Rate",NULL
,FMT_DEC
,&hf_cops_pcmm_down_peak_traffic_rate
);
4804 /* Required Attribute Mask */
4805 info_to_display(tvb
,object_tree
,offset
,4,"Required Attribute Mask",NULL
,FMT_DEC
,&hf_cops_pcmm_req_att_mask
);
4808 /* Forbidden Attribute Mask */
4809 info_to_display(tvb
,object_tree
,offset
,4,"Forbidden Attribute Mask",NULL
,FMT_DEC
,&hf_cops_pcmm_forbid_att_mask
);
4813 /* Attribute Aggregation Rule Mask */
4814 info_to_display(tvb
,object_tree
,offset
,4,"Attribute Aggregation Rule Mask",NULL
,FMT_DEC
,&hf_cops_pcmm_att_aggr_rule_mask
);
4818 if (n
< 80) return offset
;
4820 /* Committed Envelope */
4821 object_tree
= proto_tree_add_subtree(stt
, tvb
, offset
, i05
? 40 : 36, ett_cops_subtree
, NULL
, "Committed Envelope");
4823 /* Traffic Priority */
4824 info_to_display(tvb
,object_tree
,offset
,1,"Traffic Priority",NULL
,FMT_HEX
,&hf_cops_pcmm_traffic_priority
);
4827 /* Downstream Resequencing */
4828 info_to_display(tvb
,object_tree
,offset
,1,"Downstream Resequencing",NULL
,FMT_HEX
,&hf_cops_pcmm_down_resequencing
);
4831 proto_tree_add_item(object_tree
, hf_cops_reserved16
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
4834 /* Maximum Sustained Traffic Rate */
4835 info_to_display(tvb
,object_tree
,offset
,4,"Maximum Sustained Traffic Rate",NULL
,FMT_DEC
,&hf_cops_pcmm_max_sustained_traffic_rate
);
4838 /* Maximum Traffic Burst */
4839 info_to_display(tvb
,object_tree
,offset
,4,"Maximum Traffic Burst",NULL
,FMT_DEC
,&hf_cops_pcmm_max_traffic_burst
);
4842 /* Minimum Reserved Traffic Rate */
4843 info_to_display(tvb
,object_tree
,offset
,4,"Minimum Reserved Traffic Rate",NULL
,FMT_DEC
,&hf_cops_pcmm_min_reserved_traffic_rate
);
4846 /* Assumed Minimum Reserved Traffic Rate Packet Size */
4847 info_to_display(tvb
,object_tree
,offset
,2,"Assumed Minimum Reserved Traffic Rate Packet Size",NULL
,FMT_DEC
,&hf_cops_pcmm_ass_min_rtr_packet_size
);
4851 info_to_display(tvb
,object_tree
,offset
,2,"Reserved",NULL
,FMT_HEX
,&hf_cops_pc_reserved
);
4854 /* Maximum Downstream Latency */
4855 info_to_display(tvb
,object_tree
,offset
,4,"Maximum Downstream Latency",NULL
,FMT_DEC
,&hf_cops_pcmm_max_downstream_latency
);
4858 /* Downstream Peak Traffic Rate */
4859 info_to_display(tvb
,object_tree
,offset
,4,"Downstream Peak Traffic Rate",NULL
,FMT_DEC
,&hf_cops_pcmm_down_peak_traffic_rate
);
4862 /* Required Attribute Mask */
4863 info_to_display(tvb
,object_tree
,offset
,4,"Required Attribute Mask",NULL
,FMT_DEC
,&hf_cops_pcmm_req_att_mask
);
4866 /* Forbidden Attribute Mask */
4867 info_to_display(tvb
,object_tree
,offset
,4,"Forbidden Attribute Mask",NULL
,FMT_DEC
,&hf_cops_pcmm_forbid_att_mask
);
4871 /* Attribute Aggregation Rule Mask */
4872 info_to_display(tvb
,object_tree
,offset
,4,"Attribute Aggregation Rule Mask",NULL
,FMT_DEC
,&hf_cops_pcmm_att_aggr_rule_mask
);
4879 /* Cops - Section : Upstream Drop */
4881 cops_upstream_drop_i04(tvbuff_t
*tvb
, proto_tree
*st
, unsigned n
, uint32_t offset
) {
4884 /* Create a subtree */
4885 stt
= info_to_cops_subtree(tvb
,st
,n
,offset
,"Upstream Drop");
4889 info_to_display(tvb
,stt
,offset
,1,"Envelope",NULL
,FMT_DEC
,&hf_cops_pcmm_envelope
);
4892 proto_tree_add_item(stt
, hf_cops_reserved24
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
4900 /* Cops - Section : Best Effort Service */
4902 cops_best_effort_service(tvbuff_t
*tvb
, proto_tree
*st
, unsigned n
, uint32_t offset
) {
4903 proto_tree
*stt
, *object_tree
;
4905 /* Create a subtree */
4906 stt
= info_to_cops_subtree(tvb
,st
,n
,offset
,"Best Effort Service");
4910 info_to_display(tvb
,stt
,offset
,1,"Envelope",NULL
,FMT_DEC
,&hf_cops_pcmm_envelope
);
4913 proto_tree_add_item(stt
, hf_cops_reserved24
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
4916 /* Authorized Envelope */
4917 object_tree
= proto_tree_add_subtree(stt
, tvb
, offset
, 24, ett_cops_subtree
, NULL
, "Authorized Envelope");
4919 /* Traffic Priority */
4920 info_to_display(tvb
,object_tree
,offset
,1,"Traffic Priority",NULL
,FMT_HEX
,&hf_cops_pcmm_traffic_priority
);
4923 proto_tree_add_item(object_tree
, hf_cops_reserved24
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
4926 /* Request Transmission Policy */
4927 decode_docsis_request_transmission_policy(tvb
, offset
, object_tree
);
4930 /* Maximum Sustained Traffic Rate */
4931 info_to_display(tvb
,object_tree
,offset
,4,"Maximum Sustained Traffic Rate",NULL
,FMT_DEC
,&hf_cops_pcmm_max_sustained_traffic_rate
);
4934 /* Maximum Traffic Burst */
4935 info_to_display(tvb
,object_tree
,offset
,4,"Maximum Traffic Burst",NULL
,FMT_DEC
,&hf_cops_pcmm_max_traffic_burst
);
4938 /* Minimum Reserved Traffic Rate */
4939 info_to_display(tvb
,object_tree
,offset
,4,"Minimum Reserved Traffic Rate",NULL
,FMT_DEC
,&hf_cops_pcmm_min_reserved_traffic_rate
);
4942 /* Assumed Minimum Reserved Traffic Rate Packet Size */
4943 info_to_display(tvb
,object_tree
,offset
,2,"Assumed Minimum Reserved Traffic Rate Packet Size",NULL
,FMT_DEC
,&hf_cops_pcmm_ass_min_rtr_packet_size
);
4947 info_to_display(tvb
,object_tree
,offset
,2,"Reserved",NULL
,FMT_HEX
,&hf_cops_pc_reserved
);
4950 if (n
< 56) return offset
;
4952 /* Reserved Envelope */
4953 object_tree
= proto_tree_add_subtree(stt
, tvb
, offset
, 24, ett_cops_subtree
, NULL
, "Reserved Envelope");
4955 /* Traffic Priority */
4956 info_to_display(tvb
,object_tree
,offset
,1,"Traffic Priority",NULL
,FMT_HEX
,&hf_cops_pcmm_traffic_priority
);
4959 proto_tree_add_item(object_tree
, hf_cops_reserved24
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
4962 /* Request Transmission Policy */
4963 decode_docsis_request_transmission_policy(tvb
, offset
, object_tree
);
4966 /* Maximum Sustained Traffic Rate */
4967 info_to_display(tvb
,object_tree
,offset
,4,"Maximum Sustained Traffic Rate",NULL
,FMT_DEC
,&hf_cops_pcmm_max_sustained_traffic_rate
);
4970 /* Maximum Traffic Burst */
4971 info_to_display(tvb
,object_tree
,offset
,4,"Maximum Traffic Burst",NULL
,FMT_DEC
,&hf_cops_pcmm_max_traffic_burst
);
4974 /* Minimum Reserved Traffic Rate */
4975 info_to_display(tvb
,object_tree
,offset
,4,"Minimum Reserved Traffic Rate",NULL
,FMT_DEC
,&hf_cops_pcmm_min_reserved_traffic_rate
);
4978 /* Assumed Minimum Reserved Traffic Rate Packet Size */
4979 info_to_display(tvb
,object_tree
,offset
,2,"Assumed Minimum Reserved Traffic Rate Packet Size",NULL
,FMT_DEC
,&hf_cops_pcmm_ass_min_rtr_packet_size
);
4983 info_to_display(tvb
,object_tree
,offset
,2,"Reserved",NULL
,FMT_HEX
,&hf_cops_pc_reserved
);
4986 if (n
< 80) return offset
;
4988 /* Committed Envelope */
4989 object_tree
= proto_tree_add_subtree(stt
, tvb
, offset
, 24, ett_cops_subtree
, NULL
, "Committed Envelope");
4991 /* Traffic Priority */
4992 info_to_display(tvb
,object_tree
,offset
,1,"Traffic Priority",NULL
,FMT_HEX
,&hf_cops_pcmm_traffic_priority
);
4995 proto_tree_add_item(object_tree
, hf_cops_reserved24
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
4998 /* Request Transmission Policy */
4999 decode_docsis_request_transmission_policy(tvb
, offset
, object_tree
);
5002 /* Maximum Sustained Traffic Rate */
5003 info_to_display(tvb
,object_tree
,offset
,4,"Maximum Sustained Traffic Rate",NULL
,FMT_DEC
,&hf_cops_pcmm_max_sustained_traffic_rate
);
5006 /* Maximum Traffic Burst */
5007 info_to_display(tvb
,object_tree
,offset
,4,"Maximum Traffic Burst",NULL
,FMT_DEC
,&hf_cops_pcmm_max_traffic_burst
);
5010 /* Minimum Reserved Traffic Rate */
5011 info_to_display(tvb
,object_tree
,offset
,4,"Minimum Reserved Traffic Rate",NULL
,FMT_DEC
,&hf_cops_pcmm_min_reserved_traffic_rate
);
5014 /* Assumed Minimum Reserved Traffic Rate Packet Size */
5015 info_to_display(tvb
,object_tree
,offset
,2,"Assumed Minimum Reserved Traffic Rate Packet Size",NULL
,FMT_DEC
,&hf_cops_pcmm_ass_min_rtr_packet_size
);
5019 info_to_display(tvb
,object_tree
,offset
,2,"Reserved",NULL
,FMT_HEX
,&hf_cops_pc_reserved
);
5025 /* Cops - Section : Non-Real-Time Polling Service */
5027 cops_non_real_time_polling_service(tvbuff_t
*tvb
, proto_tree
*st
, unsigned n
, uint32_t offset
) {
5028 proto_tree
*stt
, *object_tree
;
5030 /* Create a subtree */
5031 stt
= info_to_cops_subtree(tvb
,st
,n
,offset
,"Non-Real-Time Polling Service");
5035 info_to_display(tvb
,stt
,offset
,1,"Envelope",NULL
,FMT_DEC
,&hf_cops_pcmm_envelope
);
5038 proto_tree_add_item(stt
, hf_cops_reserved24
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
5041 /* Authorized Envelope */
5042 object_tree
= proto_tree_add_subtree(stt
, tvb
, offset
, 28, ett_cops_subtree
, NULL
, "Authorized Envelope");
5044 /* Traffic Priority */
5045 info_to_display(tvb
,object_tree
,offset
,1,"Traffic Priority",NULL
,FMT_HEX
,&hf_cops_pcmm_traffic_priority
);
5048 proto_tree_add_item(object_tree
, hf_cops_reserved24
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
5051 /* Request Transmission Policy */
5052 decode_docsis_request_transmission_policy(tvb
, offset
, object_tree
);
5055 /* Maximum Sustained Traffic Rate */
5056 info_to_display(tvb
,object_tree
,offset
,4,"Maximum Sustained Traffic Rate",NULL
,FMT_DEC
,&hf_cops_pcmm_max_sustained_traffic_rate
);
5059 /* Maximum Traffic Burst */
5060 info_to_display(tvb
,object_tree
,offset
,4,"Maximum Traffic Burst",NULL
,FMT_DEC
,&hf_cops_pcmm_max_traffic_burst
);
5063 /* Minimum Reserved Traffic Rate */
5064 info_to_display(tvb
,object_tree
,offset
,4,"Minimum Reserved Traffic Rate",NULL
,FMT_DEC
,&hf_cops_pcmm_min_reserved_traffic_rate
);
5067 /* Assumed Minimum Reserved Traffic Rate Packet Size */
5068 info_to_display(tvb
,object_tree
,offset
,2,"Assumed Minimum Reserved Traffic Rate Packet Size",NULL
,FMT_DEC
,&hf_cops_pcmm_ass_min_rtr_packet_size
);
5072 info_to_display(tvb
,object_tree
,offset
,2,"Reserved",NULL
,FMT_HEX
,&hf_cops_pc_reserved
);
5075 /* Nominal Polling Interval */
5076 info_to_display(tvb
,object_tree
,offset
,4,"Nominal Polling Interval",NULL
,FMT_DEC
,&hf_cops_pcmm_nominal_polling_interval
);
5079 if (n
< 64) return offset
;
5081 /* Reserved Envelope */
5082 object_tree
= proto_tree_add_subtree(stt
, tvb
, offset
, 24, ett_cops_subtree
, NULL
, "Reserved Envelope");
5084 /* Traffic Priority */
5085 info_to_display(tvb
,object_tree
,offset
,1,"Traffic Priority",NULL
,FMT_HEX
,&hf_cops_pcmm_traffic_priority
);
5088 proto_tree_add_item(object_tree
, hf_cops_reserved24
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
5091 /* Request Transmission Policy */
5092 decode_docsis_request_transmission_policy(tvb
, offset
, object_tree
);
5095 /* Maximum Sustained Traffic Rate */
5096 info_to_display(tvb
,object_tree
,offset
,4,"Maximum Sustained Traffic Rate",NULL
,FMT_DEC
,&hf_cops_pcmm_max_sustained_traffic_rate
);
5099 /* Maximum Traffic Burst */
5100 info_to_display(tvb
,object_tree
,offset
,4,"Maximum Traffic Burst",NULL
,FMT_DEC
,&hf_cops_pcmm_max_traffic_burst
);
5103 /* Minimum Reserved Traffic Rate */
5104 info_to_display(tvb
,object_tree
,offset
,4,"Minimum Reserved Traffic Rate",NULL
,FMT_DEC
,&hf_cops_pcmm_min_reserved_traffic_rate
);
5107 /* Assumed Minimum Reserved Traffic Rate Packet Size */
5108 info_to_display(tvb
,object_tree
,offset
,2,"Assumed Minimum Reserved Traffic Rate Packet Size",NULL
,FMT_DEC
,&hf_cops_pcmm_ass_min_rtr_packet_size
);
5112 info_to_display(tvb
,object_tree
,offset
,2,"Reserved",NULL
,FMT_HEX
,&hf_cops_pc_reserved
);
5115 /* Nominal Polling Interval */
5116 info_to_display(tvb
,object_tree
,offset
,4,"Nominal Polling Interval",NULL
,FMT_DEC
,&hf_cops_pcmm_nominal_polling_interval
);
5119 if (n
< 92) return offset
;
5121 /* Committed Envelope */
5122 object_tree
= proto_tree_add_subtree(stt
, tvb
, offset
, 24, ett_cops_subtree
, NULL
, "Committed Envelope");
5124 /* Traffic Priority */
5125 info_to_display(tvb
,object_tree
,offset
,1,"Traffic Priority",NULL
,FMT_HEX
,&hf_cops_pcmm_traffic_priority
);
5128 proto_tree_add_item(object_tree
, hf_cops_reserved24
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
5131 /* Request Transmission Policy */
5132 decode_docsis_request_transmission_policy(tvb
, offset
, object_tree
);
5135 /* Maximum Sustained Traffic Rate */
5136 info_to_display(tvb
,object_tree
,offset
,4,"Maximum Sustained Traffic Rate",NULL
,FMT_DEC
,&hf_cops_pcmm_max_sustained_traffic_rate
);
5139 /* Maximum Traffic Burst */
5140 info_to_display(tvb
,object_tree
,offset
,4,"Maximum Traffic Burst",NULL
,FMT_DEC
,&hf_cops_pcmm_max_traffic_burst
);
5143 /* Minimum Reserved Traffic Rate */
5144 info_to_display(tvb
,object_tree
,offset
,4,"Minimum Reserved Traffic Rate",NULL
,FMT_DEC
,&hf_cops_pcmm_min_reserved_traffic_rate
);
5147 /* Assumed Minimum Reserved Traffic Rate Packet Size */
5148 info_to_display(tvb
,object_tree
,offset
,2,"Assumed Minimum Reserved Traffic Rate Packet Size",NULL
,FMT_DEC
,&hf_cops_pcmm_ass_min_rtr_packet_size
);
5152 info_to_display(tvb
,object_tree
,offset
,2,"Reserved",NULL
,FMT_HEX
,&hf_cops_pc_reserved
);
5155 /* Nominal Polling Interval */
5156 info_to_display(tvb
,object_tree
,offset
,4,"Nominal Polling Interval",NULL
,FMT_DEC
,&hf_cops_pcmm_nominal_polling_interval
);
5162 /* Cops - Section : Real-Time Polling Service */
5164 cops_real_time_polling_service(tvbuff_t
*tvb
, proto_tree
*st
, unsigned n
, uint32_t offset
) {
5165 proto_tree
*stt
, *object_tree
;
5167 /* Create a subtree */
5168 stt
= info_to_cops_subtree(tvb
,st
,n
,offset
,"Real-Time Polling Service");
5172 info_to_display(tvb
,stt
,offset
,1,"Envelope",NULL
,FMT_DEC
,&hf_cops_pcmm_envelope
);
5175 proto_tree_add_item(stt
, hf_cops_reserved24
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
5178 /* Authorized Envelope */
5179 object_tree
= proto_tree_add_subtree(stt
, tvb
, offset
, 28, ett_cops_subtree
, NULL
, "Authorized Envelope");
5181 /* Request Transmission Policy */
5182 decode_docsis_request_transmission_policy(tvb
, offset
, object_tree
);
5185 /* Maximum Sustained Traffic Rate */
5186 info_to_display(tvb
,object_tree
,offset
,4,"Maximum Sustained Traffic Rate",NULL
,FMT_DEC
,&hf_cops_pcmm_max_sustained_traffic_rate
);
5189 /* Maximum Traffic Burst */
5190 info_to_display(tvb
,object_tree
,offset
,4,"Maximum Traffic Burst",NULL
,FMT_DEC
,&hf_cops_pcmm_max_traffic_burst
);
5193 /* Minimum Reserved Traffic Rate */
5194 info_to_display(tvb
,object_tree
,offset
,4,"Minimum Reserved Traffic Rate",NULL
,FMT_DEC
,&hf_cops_pcmm_min_reserved_traffic_rate
);
5197 /* Assumed Minimum Reserved Traffic Rate Packet Size */
5198 info_to_display(tvb
,object_tree
,offset
,2,"Assumed Minimum Reserved Traffic Rate Packet Size",NULL
,FMT_DEC
,&hf_cops_pcmm_ass_min_rtr_packet_size
);
5202 info_to_display(tvb
,object_tree
,offset
,2,"Reserved",NULL
,FMT_HEX
,&hf_cops_pc_reserved
);
5205 /* Nominal Polling Interval */
5206 info_to_display(tvb
,object_tree
,offset
,4,"Nominal Polling Interval",NULL
,FMT_DEC
,&hf_cops_pcmm_nominal_polling_interval
);
5209 /* Tolerated Poll Jitter */
5210 info_to_display(tvb
,object_tree
,offset
,4,"Tolerated Poll Jitter",NULL
,FMT_DEC
,&hf_cops_pcmm_tolerated_poll_jitter
);
5213 if (n
< 64) return offset
;
5215 /* Reserved Envelope */
5216 object_tree
= proto_tree_add_subtree(stt
, tvb
, offset
, 24, ett_cops_subtree
, NULL
, "Reserved Envelope");
5218 /* Request Transmission Policy */
5219 decode_docsis_request_transmission_policy(tvb
, offset
, object_tree
);
5222 /* Maximum Sustained Traffic Rate */
5223 info_to_display(tvb
,object_tree
,offset
,4,"Maximum Sustained Traffic Rate",NULL
,FMT_DEC
,&hf_cops_pcmm_max_sustained_traffic_rate
);
5226 /* Maximum Traffic Burst */
5227 info_to_display(tvb
,object_tree
,offset
,4,"Maximum Traffic Burst",NULL
,FMT_DEC
,&hf_cops_pcmm_max_traffic_burst
);
5230 /* Minimum Reserved Traffic Rate */
5231 info_to_display(tvb
,object_tree
,offset
,4,"Minimum Reserved Traffic Rate",NULL
,FMT_DEC
,&hf_cops_pcmm_min_reserved_traffic_rate
);
5234 /* Assumed Minimum Reserved Traffic Rate Packet Size */
5235 info_to_display(tvb
,object_tree
,offset
,2,"Assumed Minimum Reserved Traffic Rate Packet Size",NULL
,FMT_DEC
,&hf_cops_pcmm_ass_min_rtr_packet_size
);
5239 info_to_display(tvb
,object_tree
,offset
,2,"Reserved",NULL
,FMT_HEX
,&hf_cops_pc_reserved
);
5242 /* Nominal Polling Interval */
5243 info_to_display(tvb
,object_tree
,offset
,4,"Nominal Polling Interval",NULL
,FMT_DEC
,&hf_cops_pcmm_nominal_polling_interval
);
5246 /* Tolerated Poll Jitter */
5247 info_to_display(tvb
,object_tree
,offset
,4,"Tolerated Poll Jitter",NULL
,FMT_DEC
,&hf_cops_pcmm_tolerated_poll_jitter
);
5250 if (n
< 92) return offset
;
5252 /* Committed Envelope */
5253 object_tree
= proto_tree_add_subtree(stt
, tvb
, offset
, 24, ett_cops_subtree
, NULL
, "Committed Envelope");
5255 /* Request Transmission Policy */
5256 decode_docsis_request_transmission_policy(tvb
, offset
, object_tree
);
5259 /* Maximum Sustained Traffic Rate */
5260 info_to_display(tvb
,object_tree
,offset
,4,"Maximum Sustained Traffic Rate",NULL
,FMT_DEC
,&hf_cops_pcmm_max_sustained_traffic_rate
);
5263 /* Maximum Traffic Burst */
5264 info_to_display(tvb
,object_tree
,offset
,4,"Maximum Traffic Burst",NULL
,FMT_DEC
,&hf_cops_pcmm_max_traffic_burst
);
5267 /* Minimum Reserved Traffic Rate */
5268 info_to_display(tvb
,object_tree
,offset
,4,"Minimum Reserved Traffic Rate",NULL
,FMT_DEC
,&hf_cops_pcmm_min_reserved_traffic_rate
);
5271 /* Assumed Minimum Reserved Traffic Rate Packet Size */
5272 info_to_display(tvb
,object_tree
,offset
,2,"Assumed Minimum Reserved Traffic Rate Packet Size",NULL
,FMT_DEC
,&hf_cops_pcmm_ass_min_rtr_packet_size
);
5276 info_to_display(tvb
,object_tree
,offset
,2,"Reserved",NULL
,FMT_HEX
,&hf_cops_pc_reserved
);
5279 /* Nominal Polling Interval */
5280 info_to_display(tvb
,object_tree
,offset
,4,"Nominal Polling Interval",NULL
,FMT_DEC
,&hf_cops_pcmm_nominal_polling_interval
);
5283 /* Tolerated Poll Jitter */
5284 info_to_display(tvb
,object_tree
,offset
,4,"Tolerated Poll Jitter",NULL
,FMT_DEC
,&hf_cops_pcmm_tolerated_poll_jitter
);
5290 /* Cops - Section : Unsolicited Grant Service */
5292 cops_unsolicited_grant_service(tvbuff_t
*tvb
, proto_tree
*st
, unsigned n
, uint32_t offset
) {
5293 proto_tree
*stt
, *object_tree
;
5295 /* Create a subtree */
5296 stt
= info_to_cops_subtree(tvb
,st
,n
,offset
,"Unsolicited Grant Service");
5300 info_to_display(tvb
,stt
,offset
,1,"Envelope",NULL
,FMT_DEC
,&hf_cops_pcmm_envelope
);
5303 proto_tree_add_item(stt
, hf_cops_reserved24
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
5306 /* Authorized Envelope */
5307 object_tree
= proto_tree_add_subtree(stt
, tvb
, offset
, 16, ett_cops_subtree
, NULL
, "Authorized Envelope");
5309 /* Request Transmission Policy */
5310 decode_docsis_request_transmission_policy(tvb
, offset
, object_tree
);
5313 /* Unsolicited Grant Size */
5314 info_to_display(tvb
,object_tree
,offset
,2,"Unsolicited Grant Size",NULL
,FMT_DEC
,&hf_cops_pcmm_unsolicited_grant_size
);
5317 /* Grants Per Interval */
5318 info_to_display(tvb
,object_tree
,offset
,1,"Grants Per Interval",NULL
,FMT_DEC
,&hf_cops_pcmm_grants_per_interval
);
5321 proto_tree_add_item(object_tree
, hf_cops_reserved8
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
5324 /* Nominal Grant Interval */
5325 info_to_display(tvb
,object_tree
,offset
,4,"Nominal Grant Interval",NULL
,FMT_DEC
,&hf_cops_pcmm_nominal_grant_interval
);
5328 /* Tolerated Grant Jitter */
5329 info_to_display(tvb
,object_tree
,offset
,4,"Tolerated Grant Jitter",NULL
,FMT_DEC
,&hf_cops_pcmm_tolerated_grant_jitter
);
5332 if (n
< 40) return offset
;
5334 /* Reserved Envelope */
5335 object_tree
= proto_tree_add_subtree(stt
, tvb
, offset
, 16, ett_cops_subtree
, NULL
, "Reserved Envelope");
5337 /* Request Transmission Policy */
5338 decode_docsis_request_transmission_policy(tvb
, offset
, object_tree
);
5341 /* Unsolicited Grant Size */
5342 info_to_display(tvb
,object_tree
,offset
,2,"Unsolicited Grant Size",NULL
,FMT_DEC
,&hf_cops_pcmm_unsolicited_grant_size
);
5345 /* Grants Per Interval */
5346 info_to_display(tvb
,object_tree
,offset
,1,"Grants Per Interval",NULL
,FMT_DEC
,&hf_cops_pcmm_grants_per_interval
);
5349 proto_tree_add_item(object_tree
, hf_cops_reserved8
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
5352 /* Nominal Grant Interval */
5353 info_to_display(tvb
,object_tree
,offset
,4,"Nominal Grant Interval",NULL
,FMT_DEC
,&hf_cops_pcmm_nominal_grant_interval
);
5356 /* Tolerated Grant Jitter */
5357 info_to_display(tvb
,object_tree
,offset
,4,"Tolerated Grant Jitter",NULL
,FMT_DEC
,&hf_cops_pcmm_tolerated_grant_jitter
);
5360 if (n
< 56) return offset
;
5362 /* Committed Envelope */
5363 object_tree
= proto_tree_add_subtree(stt
, tvb
, offset
, 16, ett_cops_subtree
, NULL
, "Committed Envelope");
5365 /* Request Transmission Policy */
5366 decode_docsis_request_transmission_policy(tvb
, offset
, object_tree
);
5369 /* Unsolicited Grant Size */
5370 info_to_display(tvb
,object_tree
,offset
,2,"Unsolicited Grant Size",NULL
,FMT_DEC
,&hf_cops_pcmm_unsolicited_grant_size
);
5373 /* Grants Per Interval */
5374 info_to_display(tvb
,object_tree
,offset
,1,"Grants Per Interval",NULL
,FMT_DEC
,&hf_cops_pcmm_grants_per_interval
);
5377 proto_tree_add_item(object_tree
, hf_cops_reserved8
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
5380 /* Nominal Grant Interval */
5381 info_to_display(tvb
,object_tree
,offset
,4,"Nominal Grant Interval",NULL
,FMT_DEC
,&hf_cops_pcmm_nominal_grant_interval
);
5384 /* Tolerated Grant Jitter */
5385 info_to_display(tvb
,object_tree
,offset
,4,"Tolerated Grant Jitter",NULL
,FMT_DEC
,&hf_cops_pcmm_tolerated_grant_jitter
);
5391 /* Cops - Section : Unsolicited Grant Service with Activity Detection */
5393 cops_ugs_with_activity_detection(tvbuff_t
*tvb
, proto_tree
*st
, unsigned n
, uint32_t offset
) {
5394 proto_tree
*stt
, *object_tree
;
5396 /* Create a subtree */
5397 stt
= info_to_cops_subtree(tvb
,st
,n
,offset
,"Unsolicited Grant Service with Activity Detection");
5401 info_to_display(tvb
,stt
,offset
,1,"Envelope",NULL
,FMT_DEC
,&hf_cops_pcmm_envelope
);
5404 proto_tree_add_item(stt
, hf_cops_reserved24
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
5407 /* Authorized Envelope */
5408 object_tree
= proto_tree_add_subtree(stt
, tvb
, offset
, 24, ett_cops_subtree
, NULL
, "Authorized Envelope");
5410 /* Request Transmission Policy */
5411 decode_docsis_request_transmission_policy(tvb
, offset
, object_tree
);
5414 /* Unsolicited Grant Size */
5415 info_to_display(tvb
,object_tree
,offset
,2,"Unsolicited Grant Size",NULL
,FMT_DEC
,&hf_cops_pcmm_unsolicited_grant_size
);
5418 /* Grants Per Interval */
5419 info_to_display(tvb
,object_tree
,offset
,1,"Grants Per Interval",NULL
,FMT_DEC
,&hf_cops_pcmm_grants_per_interval
);
5422 proto_tree_add_item(object_tree
, hf_cops_reserved8
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
5425 /* Nominal Grant Interval */
5426 info_to_display(tvb
,object_tree
,offset
,4,"Nominal Grant Interval",NULL
,FMT_DEC
,&hf_cops_pcmm_nominal_grant_interval
);
5429 /* Tolerated Grant Jitter */
5430 info_to_display(tvb
,object_tree
,offset
,4,"Tolerated Grant Jitter",NULL
,FMT_DEC
,&hf_cops_pcmm_tolerated_grant_jitter
);
5433 /* Nominal Polling Interval */
5434 info_to_display(tvb
,object_tree
,offset
,4,"Nominal Polling Interval",NULL
,FMT_DEC
,&hf_cops_pcmm_nominal_polling_interval
);
5437 /* Tolerated Poll Jitter */
5438 info_to_display(tvb
,object_tree
,offset
,4,"Tolerated Poll Jitter",NULL
,FMT_DEC
,&hf_cops_pcmm_tolerated_poll_jitter
);
5441 if (n
< 56) return offset
;
5443 /* Reserved Envelope */
5444 object_tree
= proto_tree_add_subtree(stt
, tvb
, offset
, 24, ett_cops_subtree
, NULL
, "Reserved Envelope");
5446 /* Request Transmission Policy */
5447 decode_docsis_request_transmission_policy(tvb
, offset
, object_tree
);
5450 /* Unsolicited Grant Size */
5451 info_to_display(tvb
,object_tree
,offset
,2,"Unsolicited Grant Size",NULL
,FMT_DEC
,&hf_cops_pcmm_unsolicited_grant_size
);
5454 /* Grants Per Interval */
5455 info_to_display(tvb
,object_tree
,offset
,1,"Grants Per Interval",NULL
,FMT_DEC
,&hf_cops_pcmm_grants_per_interval
);
5458 proto_tree_add_item(object_tree
, hf_cops_reserved8
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
5461 /* Nominal Grant Interval */
5462 info_to_display(tvb
,object_tree
,offset
,4,"Nominal Grant Interval",NULL
,FMT_DEC
,&hf_cops_pcmm_nominal_grant_interval
);
5465 /* Tolerated Grant Jitter */
5466 info_to_display(tvb
,object_tree
,offset
,4,"Tolerated Grant Jitter",NULL
,FMT_DEC
,&hf_cops_pcmm_tolerated_grant_jitter
);
5469 /* Nominal Polling Interval */
5470 info_to_display(tvb
,object_tree
,offset
,4,"Nominal Polling Interval",NULL
,FMT_DEC
,&hf_cops_pcmm_nominal_polling_interval
);
5473 /* Tolerated Poll Jitter */
5474 info_to_display(tvb
,object_tree
,offset
,4,"Tolerated Poll Jitter",NULL
,FMT_DEC
,&hf_cops_pcmm_tolerated_poll_jitter
);
5477 if (n
< 80) return offset
;
5479 /* Committed Envelope */
5480 object_tree
= proto_tree_add_subtree(stt
, tvb
, offset
, 24, ett_cops_subtree
, NULL
, "Committed Envelope");
5482 /* Request Transmission Policy */
5483 decode_docsis_request_transmission_policy(tvb
, offset
, object_tree
);
5486 /* Unsolicited Grant Size */
5487 info_to_display(tvb
,object_tree
,offset
,2,"Unsolicited Grant Size",NULL
,FMT_DEC
,&hf_cops_pcmm_unsolicited_grant_size
);
5490 /* Grants Per Interval */
5491 info_to_display(tvb
,object_tree
,offset
,1,"Grants Per Interval",NULL
,FMT_DEC
,&hf_cops_pcmm_grants_per_interval
);
5494 proto_tree_add_item(object_tree
, hf_cops_reserved8
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
5497 /* Nominal Grant Interval */
5498 info_to_display(tvb
,object_tree
,offset
,4,"Nominal Grant Interval",NULL
,FMT_DEC
,&hf_cops_pcmm_nominal_grant_interval
);
5501 /* Tolerated Grant Jitter */
5502 info_to_display(tvb
,object_tree
,offset
,4,"Tolerated Grant Jitter",NULL
,FMT_DEC
,&hf_cops_pcmm_tolerated_grant_jitter
);
5505 /* Nominal Polling Interval */
5506 info_to_display(tvb
,object_tree
,offset
,4,"Nominal Polling Interval",NULL
,FMT_DEC
,&hf_cops_pcmm_nominal_polling_interval
);
5509 /* Tolerated Poll Jitter */
5510 info_to_display(tvb
,object_tree
,offset
,4,"Tolerated Poll Jitter",NULL
,FMT_DEC
,&hf_cops_pcmm_tolerated_poll_jitter
);
5516 /* Cops - Section : Downstream Service */
5518 cops_downstream_service(tvbuff_t
*tvb
, proto_tree
*st
, unsigned n
, uint32_t offset
) {
5519 proto_tree
*stt
, *object_tree
;
5521 /* Create a subtree */
5522 stt
= info_to_cops_subtree(tvb
,st
,n
,offset
,"Downstream Service");
5526 info_to_display(tvb
,stt
,offset
,1,"Envelope",NULL
,FMT_DEC
,&hf_cops_pcmm_envelope
);
5529 proto_tree_add_item(stt
, hf_cops_reserved24
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
5532 /* Authorized Envelope */
5533 object_tree
= proto_tree_add_subtree(stt
, tvb
, offset
, 24, ett_cops_subtree
, NULL
, "Authorized Envelope");
5535 /* Traffic Priority */
5536 info_to_display(tvb
,object_tree
,offset
,1,"Traffic Priority",NULL
,FMT_HEX
,&hf_cops_pcmm_traffic_priority
);
5539 proto_tree_add_item(object_tree
, hf_cops_reserved24
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
5542 /* Maximum Sustained Traffic Rate */
5543 info_to_display(tvb
,object_tree
,offset
,4,"Maximum Sustained Traffic Rate",NULL
,FMT_DEC
,&hf_cops_pcmm_max_sustained_traffic_rate
);
5546 /* Maximum Traffic Burst */
5547 info_to_display(tvb
,object_tree
,offset
,4,"Maximum Traffic Burst",NULL
,FMT_DEC
,&hf_cops_pcmm_max_traffic_burst
);
5550 /* Minimum Reserved Traffic Rate */
5551 info_to_display(tvb
,object_tree
,offset
,4,"Minimum Reserved Traffic Rate",NULL
,FMT_DEC
,&hf_cops_pcmm_min_reserved_traffic_rate
);
5554 /* Assumed Minimum Reserved Traffic Rate Packet Size */
5555 info_to_display(tvb
,object_tree
,offset
,2,"Assumed Minimum Reserved Traffic Rate Packet Size",NULL
,FMT_DEC
,&hf_cops_pcmm_ass_min_rtr_packet_size
);
5559 info_to_display(tvb
,object_tree
,offset
,2,"Reserved",NULL
,FMT_HEX
,&hf_cops_pc_reserved
);
5562 /* Maximum Downstream Latency */
5563 info_to_display(tvb
,object_tree
,offset
,4,"Maximum Downstream Latency",NULL
,FMT_DEC
,&hf_cops_pcmm_max_downstream_latency
);
5566 if (n
< 56) return offset
;
5568 /* Reserved Envelope */
5569 object_tree
= proto_tree_add_subtree(stt
, tvb
, offset
, 24, ett_cops_subtree
, NULL
, "Reserved Envelope");
5571 /* Traffic Priority */
5572 info_to_display(tvb
,object_tree
,offset
,1,"Traffic Priority",NULL
,FMT_HEX
,&hf_cops_pcmm_traffic_priority
);
5575 proto_tree_add_item(object_tree
, hf_cops_reserved24
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
5578 /* Maximum Sustained Traffic Rate */
5579 info_to_display(tvb
,object_tree
,offset
,4,"Maximum Sustained Traffic Rate",NULL
,FMT_DEC
,&hf_cops_pcmm_max_sustained_traffic_rate
);
5582 /* Maximum Traffic Burst */
5583 info_to_display(tvb
,object_tree
,offset
,4,"Maximum Traffic Burst",NULL
,FMT_DEC
,&hf_cops_pcmm_max_traffic_burst
);
5586 /* Minimum Reserved Traffic Rate */
5587 info_to_display(tvb
,object_tree
,offset
,4,"Minimum Reserved Traffic Rate",NULL
,FMT_DEC
,&hf_cops_pcmm_min_reserved_traffic_rate
);
5590 /* Assumed Minimum Reserved Traffic Rate Packet Size */
5591 info_to_display(tvb
,object_tree
,offset
,2,"Assumed Minimum Reserved Traffic Rate Packet Size",NULL
,FMT_DEC
,&hf_cops_pcmm_ass_min_rtr_packet_size
);
5595 info_to_display(tvb
,object_tree
,offset
,2,"Reserved",NULL
,FMT_HEX
,&hf_cops_pc_reserved
);
5598 /* Maximum Downstream Latency */
5599 info_to_display(tvb
,object_tree
,offset
,4,"Maximum Downstream Latency",NULL
,FMT_DEC
,&hf_cops_pcmm_max_downstream_latency
);
5602 if (n
< 80) return offset
;
5604 /* Committed Envelope */
5605 object_tree
= proto_tree_add_subtree(stt
, tvb
, offset
, 24, ett_cops_subtree
, NULL
, "Committed Envelope");
5607 /* Traffic Priority */
5608 info_to_display(tvb
,object_tree
,offset
,1,"Traffic Priority",NULL
,FMT_HEX
,&hf_cops_pcmm_traffic_priority
);
5611 proto_tree_add_item(object_tree
, hf_cops_reserved24
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
5614 /* Maximum Sustained Traffic Rate */
5615 info_to_display(tvb
,object_tree
,offset
,4,"Maximum Sustained Traffic Rate",NULL
,FMT_DEC
,&hf_cops_pcmm_max_sustained_traffic_rate
);
5618 /* Maximum Traffic Burst */
5619 info_to_display(tvb
,object_tree
,offset
,4,"Maximum Traffic Burst",NULL
,FMT_DEC
,&hf_cops_pcmm_max_traffic_burst
);
5622 /* Minimum Reserved Traffic Rate */
5623 info_to_display(tvb
,object_tree
,offset
,4,"Minimum Reserved Traffic Rate",NULL
,FMT_DEC
,&hf_cops_pcmm_min_reserved_traffic_rate
);
5626 /* Assumed Minimum Reserved Traffic Rate Packet Size */
5627 info_to_display(tvb
,object_tree
,offset
,2,"Assumed Minimum Reserved Traffic Rate Packet Size",NULL
,FMT_DEC
,&hf_cops_pcmm_ass_min_rtr_packet_size
);
5631 info_to_display(tvb
,object_tree
,offset
,2,"Reserved",NULL
,FMT_HEX
,&hf_cops_pc_reserved
);
5634 /* Maximum Downstream Latency */
5635 info_to_display(tvb
,object_tree
,offset
,4,"Maximum Downstream Latency",NULL
,FMT_DEC
,&hf_cops_pcmm_max_downstream_latency
);
5641 /* Cops - Section : PacketCable Multimedia Event Gereration-Info */
5643 cops_mm_event_generation_info(tvbuff_t
*tvb
, proto_tree
*st
, unsigned n
, uint32_t offset
) {
5647 /* Create a subtree */
5648 stt
= info_to_cops_subtree(tvb
,st
,n
,offset
,"Event Generation Info");
5651 /* Primary Record Keeping Server IP Address */
5652 info_to_display(tvb
,stt
,offset
,4,"PRKS IP Address", NULL
,FMT_IPv4
,&hf_cops_pc_prks_ip
);
5655 /* Primary Record Keeping Server IP Port */
5656 info_to_display(tvb
,stt
,offset
,2,"PRKS IP Port",NULL
,FMT_DEC
,&hf_cops_pc_prks_ip_port
);
5660 info_to_display(tvb
,stt
,offset
,2,"Reserved",NULL
,FMT_HEX
,&hf_cops_pc_reserved
);
5663 /* Secondary Record Keeping Server IP Address */
5664 info_to_display(tvb
,stt
,offset
,4,"SRKS IP Address", NULL
,FMT_IPv4
,&hf_cops_pc_srks_ip
);
5667 /* Secondary Record Keeping Server IP Port */
5668 info_to_display(tvb
,stt
,offset
,2,"SRKS IP Port",NULL
,FMT_DEC
,&hf_cops_pc_srks_ip_port
);
5672 info_to_display(tvb
,stt
,offset
,2,"Reserved",NULL
,FMT_HEX
,&hf_cops_pc_reserved
);
5675 /* BCID Timestamp */
5676 info_to_display(tvb
,stt
,offset
,4,"BCID - Timestamp",NULL
,FMT_HEX
,&hf_cops_pc_bcid_ts
);
5679 /* BCID Element ID */
5680 proto_tree_add_item(stt
, hf_cops_pc_bcid_id
, tvb
, offset
, 8, ENC_ASCII
);
5683 /* BCID Time Zone */
5684 proto_tree_add_item(stt
, hf_cops_pc_bcid_tz
, tvb
, offset
, 8, ENC_ASCII
);
5687 /* BCID Event Counter */
5688 info_to_display(tvb
,stt
,offset
,4,"BCID - Event Counter",NULL
,FMT_DEC
,&hf_cops_pc_bcid_ev
);
5691 /* Cops - Section : Volume-Based Usage Limit */
5693 cops_volume_based_usage_limit(tvbuff_t
*tvb
, proto_tree
*st
, unsigned object_len
, uint32_t offset
) {
5697 /* Create a subtree */
5698 stt
= info_to_cops_subtree(tvb
,st
,object_len
,offset
,"Volume-Based Usage Limit");
5702 proto_tree_add_item(stt
, hf_cops_pcmm_volume_based_usage_limit
, tvb
, offset
, 8,
5709 /* Cops - Section : Time-Based Usage Limit */
5711 cops_time_based_usage_limit(tvbuff_t
*tvb
, proto_tree
*st
, unsigned n
, uint32_t offset
) {
5715 /* Create a subtree */
5716 stt
= info_to_cops_subtree(tvb
,st
,n
,offset
,"Time-Based Usage Limit");
5720 info_to_display(tvb
,stt
,offset
,4,"Time Limit", NULL
,FMT_DEC
,&hf_cops_pcmm_time_based_usage_limit
);
5726 /* Cops - Section : Opaque Data */
5728 cops_opaque_data(tvbuff_t
*tvb
, proto_tree
*st
, unsigned object_len
, uint32_t offset
) {
5732 /* Create a subtree */
5733 stt
= info_to_cops_subtree(tvb
,st
,object_len
,offset
,"Opaque Data");
5737 proto_tree_add_item(stt
, hf_cops_opaque_data
, tvb
, offset
, 8, ENC_NA
);
5740 /* Cops - Section : Gate Time Info */
5742 cops_gate_time_info(tvbuff_t
*tvb
, proto_tree
*st
, unsigned n
, uint32_t offset
) {
5746 /* Create a subtree */
5747 stt
= info_to_cops_subtree(tvb
,st
,n
,offset
,"Gate Time Info");
5750 /* Gate Time Info */
5751 info_to_display(tvb
,stt
,offset
,4,"Time Committed", NULL
,FMT_DEC
,&hf_cops_pcmm_gate_time_info
);
5757 /* Cops - Section : Gate Usage Info */
5759 cops_gate_usage_info(tvbuff_t
*tvb
, proto_tree
*st
, unsigned n
, uint32_t offset
) {
5763 /* Create a subtree */
5764 stt
= info_to_cops_subtree(tvb
,st
,n
,offset
,"Gate Usage Info");
5767 /* Gate Usage Info */
5768 info_to_display(tvb
,stt
,offset
,8,"Octet Count", NULL
,FMT_DEC
,&hf_cops_pcmm_gate_usage_info
);
5771 /* Cops - Section : PacketCable error */
5773 cops_packetcable_mm_error(tvbuff_t
*tvb
, proto_tree
*st
, unsigned n
, uint32_t offset
) {
5776 uint16_t code
, subcode
;
5778 /* Create a subtree */
5779 stt
= info_to_cops_subtree(tvb
,st
,n
,offset
,"PacketCable Error");
5782 code
= tvb_get_ntohs(tvb
, offset
);
5783 proto_tree_add_uint_format(stt
, hf_cops_pcmm_packetcable_error_code
, tvb
, offset
, 2, code
,
5784 "Error Code: %s (%u)", val_to_str_const(code
, pcmm_packetcable_error_code
, "Unknown"),
5788 subcode
= tvb_get_ntohs(tvb
, offset
);
5789 if (code
== 6 || code
== 7)
5790 proto_tree_add_uint_format(stt
, hf_cops_pcmm_packetcable_error_subcode
,
5791 tvb
, offset
, 2, code
, "Error-Subcode: 0x%02x, S-Num: 0x%02x, S-Type: 0x%02x",
5792 subcode
, subcode
>> 8, subcode
& 0xf);
5794 proto_tree_add_uint_format(stt
, hf_cops_pcmm_packetcable_error_subcode
,
5795 tvb
, offset
, 2, code
, "Error-Subcode: 0x%04x", subcode
);
5801 /* Cops - Section : Gate State */
5803 cops_gate_state(tvbuff_t
*tvb
, proto_tree
*st
, unsigned n
, uint32_t offset
) {
5807 /* Create a subtree */
5808 stt
= info_to_cops_subtree(tvb
,st
,n
,offset
,"Gate State");
5812 info_to_display(tvb
,stt
,offset
,2,"State",pcmm_gate_state
,FMT_DEC
,&hf_cops_pcmm_packetcable_gate_state
);
5816 info_to_display(tvb
,stt
,offset
,2,"Reason",pcmm_gate_state_reason
,FMT_DEC
,&hf_cops_pcmm_packetcable_gate_state_reason
);
5822 /* Cops - Section : Version Info */
5824 cops_version_info(tvbuff_t
*tvb
, proto_tree
*st
, unsigned n
, uint32_t offset
) {
5828 /* Create a subtree */
5829 stt
= info_to_cops_subtree(tvb
,st
,n
,offset
,"Version Info");
5833 info_to_display(tvb
,stt
,offset
,2,"Major Version Number",NULL
,FMT_DEC
,&hf_cops_pcmm_packetcable_version_info_major
);
5837 info_to_display(tvb
,stt
,offset
,2,"Minor Version Number",NULL
,FMT_DEC
,&hf_cops_pcmm_packetcable_version_info_minor
);
5843 /* Cops - Section : PSID */
5845 cops_psid(tvbuff_t
*tvb
, proto_tree
*st
, unsigned n
, uint32_t offset
) {
5849 /* Create a subtree */
5850 stt
= info_to_cops_subtree(tvb
,st
,n
,offset
,"PSID");
5854 info_to_display(tvb
,stt
,offset
,4,"PSID", NULL
,FMT_DEC
,&hf_cops_pcmm_psid
);
5857 /* Cops - Section : Synch Options */
5859 cops_synch_options(tvbuff_t
*tvb
, proto_tree
*st
, unsigned n
, uint32_t offset
) {
5863 /* Create a subtree */
5864 stt
= info_to_cops_subtree(tvb
,st
,n
,offset
,"Synch Options");
5867 proto_tree_add_item(stt
, hf_cops_reserved16
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
5871 info_to_display(tvb
,stt
,offset
,1,"Report Type", pcmm_report_type_vals
,FMT_DEC
,&hf_cops_pcmm_synch_options_report_type
);
5875 info_to_display(tvb
,stt
,offset
,1,"Synch Type", pcmm_synch_type_vals
,FMT_DEC
,&hf_cops_pcmm_synch_options_synch_type
);
5881 /* Cops - Section : Msg Receipt Key */
5883 cops_msg_receipt_key(tvbuff_t
*tvb
, proto_tree
*st
, unsigned n
, uint32_t offset
) {
5887 /* Create a subtree */
5888 stt
= info_to_cops_subtree(tvb
,st
,n
,offset
,"Msg Receipt Key");
5891 /* Msg Receipt Key */
5892 info_to_display(tvb
,stt
,offset
,4,"Msg Receipt Key", NULL
,FMT_HEX
,&hf_cops_pcmm_msg_receipt_key
);
5895 /* Cops - Section : UserID */
5897 cops_userid(tvbuff_t
*tvb
, proto_tree
*st
, unsigned n
, uint32_t offset
) {
5901 /* Create a subtree */
5902 stt
= info_to_cops_subtree(tvb
, st
, n
, offset
, "UserID");
5906 info_to_display(tvb
, stt
, offset
, n
-4, "UserID", NULL
, FMT_STR
, &hf_cops_pcmm_userid
);
5909 /* Cops - Section : SharedResourceID */
5911 cops_sharedresourceid(tvbuff_t
*tvb
, proto_tree
*st
, unsigned n
, uint32_t offset
) {
5915 /* Create a subtree */
5916 stt
= info_to_cops_subtree(tvb
,st
,n
,offset
,"SharedResourceID");
5919 /* SharedResourceID */
5920 info_to_display(tvb
,stt
,offset
,4,"SharedResourceID", NULL
,FMT_HEX
,&hf_cops_pcmm_sharedresourceid
);
5923 /* PacketCable D-QoS S-Num/S-Type globs */
5924 #define PCDQ_TRANSACTION_ID 0x0101
5925 #define PCDQ_SUBSCRIBER_IDv4 0x0201
5926 #define PCDQ_SUBSCRIBER_IDv6 0x0202
5927 #define PCDQ_GATE_ID 0x0301
5928 #define PCDQ_ACTIVITY_COUNT 0x0401
5929 #define PCDQ_GATE_SPEC 0x0501
5930 #define PCDQ_REMOTE_GATE_INFO 0x0601
5931 #define PCDQ_EVENT_GENERATION_INFO 0x0701
5932 #define PCDQ_MEDIA_CONNECTION_EVENT_INFO 0x0801
5933 #define PCDQ_PACKETCABLE_ERROR 0x0901
5934 #define PCDQ_PACKETCABLE_REASON 0x0d01
5935 #define PCDQ_ELECTRONIC_SURVEILLANCE 0x0a01
5936 #define PCDQ_SESSION_DESCRIPTION 0x0b01
5938 /* Analyze the PacketCable objects */
5940 cops_analyze_packetcable_dqos_obj(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, uint8_t op_code
, uint32_t offset
) {
5943 uint16_t object_len
;
5944 uint8_t s_num
, s_type
;
5945 uint16_t num_type_glob
;
5947 /* Only if this option is enabled by the Gui */
5948 if ( cops_packetcable
== false ) {
5952 /* Do the remaining client specific objects */
5953 remdata
= tvb_reported_length_remaining(tvb
, offset
);
5954 while (remdata
> 4) {
5956 /* In case we have remaining data, then lets try to get this analyzed */
5957 object_len
= tvb_get_ntohs(tvb
, offset
);
5958 if (object_len
< 4) {
5959 proto_tree_add_expert_format(tree
, pinfo
, &ei_cops_bad_cops_object_length
, tvb
, offset
, 2,
5960 "Incorrect PacketCable object length %u < 4", object_len
);
5964 s_num
= tvb_get_uint8(tvb
, offset
+ 2);
5965 s_type
= tvb_get_uint8(tvb
, offset
+ 3);
5967 /* Glom the s_num and s_type together to make switching easier */
5968 num_type_glob
= s_num
<< 8 | s_type
;
5970 /* Perform the appropriate functions */
5971 switch (num_type_glob
){
5972 case PCDQ_TRANSACTION_ID
:
5973 cops_transaction_id(tvb
, pinfo
, tree
, op_code
, object_len
, offset
);
5975 case PCDQ_SUBSCRIBER_IDv4
:
5976 cops_subscriber_id_v4(tvb
, tree
, object_len
, offset
);
5978 case PCDQ_SUBSCRIBER_IDv6
:
5979 cops_subscriber_id_v6(tvb
, tree
, object_len
, offset
);
5982 cops_gate_id(tvb
, tree
, object_len
, offset
);
5984 case PCDQ_ACTIVITY_COUNT
:
5985 cops_activity_count(tvb
, tree
, object_len
, offset
);
5987 case PCDQ_GATE_SPEC
:
5988 cops_gate_specs(tvb
, tree
, object_len
, offset
);
5990 case PCDQ_REMOTE_GATE_INFO
:
5991 cops_remote_gate_info(tvb
, tree
, object_len
, offset
);
5993 case PCDQ_EVENT_GENERATION_INFO
:
5994 cops_event_generation_info(tvb
, tree
, object_len
, offset
);
5996 case PCDQ_PACKETCABLE_ERROR
:
5997 cops_packetcable_error(tvb
, tree
, object_len
, offset
);
5999 case PCDQ_ELECTRONIC_SURVEILLANCE
:
6000 cops_surveillance_parameters(tvb
, tree
, object_len
, offset
);
6002 case PCDQ_PACKETCABLE_REASON
:
6003 cops_packetcable_reason(tvb
, tree
, object_len
, offset
);
6008 offset
+= object_len
;
6010 /* See what we can still get from the buffer */
6011 remdata
= tvb_reported_length_remaining(tvb
, offset
);
6015 /* XXX - This duplicates code in the DOCSIS dissector. */
6017 decode_docsis_request_transmission_policy(tvbuff_t
*tvb
, uint32_t offset
, proto_tree
*tree
) {
6019 static int * const policies
[] = {
6020 &hf_cops_pcmm_request_transmission_policy_sf_all_cm
,
6021 &hf_cops_pcmm_request_transmission_policy_sf_priority
,
6022 &hf_cops_pcmm_request_transmission_policy_sf_request_for_request
,
6023 &hf_cops_pcmm_request_transmission_policy_sf_data_for_data
,
6024 &hf_cops_pcmm_request_transmission_policy_sf_piggyback
,
6025 &hf_cops_pcmm_request_transmission_policy_sf_concatenate
,
6026 &hf_cops_pcmm_request_transmission_policy_sf_fragment
,
6027 &hf_cops_pcmm_request_transmission_policy_sf_suppress
,
6028 &hf_cops_pcmm_request_transmission_policy_sf_drop_packets
,
6032 proto_tree_add_bitmask(tree
, tvb
, offset
, hf_cops_pcmm_request_transmission_policy
,
6033 ett_docsis_request_transmission_policy
,
6039 #define PCMM_TRANSACTION_ID 0x0101
6040 #define PCMM_AMID 0x0201
6041 #define PCMM_SUBSCRIBER_ID 0x0301
6042 #define PCMM_SUBSCRIBER_ID_V6 0x0302
6043 #define PCMM_GATE_ID 0x0401
6044 #define PCMM_GATE_SPEC 0x0501
6045 #define PCMM_CLASSIFIER 0x0601
6046 #define PCMM_EXTENDED_CLASSIFIER 0x0602
6047 #define PCMM_IPV6_CLASSIFIER 0x0603
6048 #define PCMM_FLOW_SPEC 0x0701
6049 #define PCMM_DOCSIS_SERVICE_CLASS_NAME 0x0702
6050 #define PCMM_BEST_EFFORT_SERVICE 0x0703
6051 #define PCMM_NON_REAL_TIME_POLLING_SERVICE 0x0704
6052 #define PCMM_REAL_TIME_POLLING_SERVICE 0x0705
6053 #define PCMM_UNSOLICITED_GRANT_SERVICE 0x0706
6054 #define PCMM_UGS_WITH_ACTIVITY_DETECTION 0x0707
6055 #define PCMM_DOWNSTREAM_SERVICE 0x0708
6056 #define PCMM_UPSTREAM_DROP 0x0709
6057 #define PCMM_EVENT_GENERATION_INFO 0x0801
6058 #define PCMM_VOLUME_BASED_USAGE_LIMIT 0x0901
6059 #define PCMM_TIME_BASED_USAGE_LIMIT 0x0a01
6060 #define PCMM_OPAQUE_DATA 0x0b01
6061 #define PCMM_GATE_TIME_INFO 0x0c01
6062 #define PCMM_GATE_USAGE_INFO 0x0d01
6063 #define PCMM_PACKETCABLE_ERROR 0x0e01
6064 #define PCMM_GATE_STATE 0x0f01
6065 #define PCMM_VERSION_INFO 0x1001
6066 #define PCMM_PSID 0x1101
6067 #define PCMM_SYNCH_OPTIONS 0x1201
6068 #define PCMM_MSG_RECEIPT_KEY 0x1301
6069 #define PCMM_USERID 0x1501
6070 #define PCMM_SHAREDRESOURCEID 0x1601
6074 cops_analyze_packetcable_mm_obj(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, uint8_t op_code
, uint32_t offset
) {
6076 uint16_t object_len
;
6077 uint8_t s_num
, s_type
;
6078 uint16_t num_type_glob
;
6080 /* Only if this option is enabled by the Gui */
6081 if ( cops_packetcable
== false ) {
6085 /* Do the remaining client specific objects */
6086 while (tvb_reported_length_remaining(tvb
, offset
) > 4) {
6088 /* In case we have remaining data, then lets try to get this analyzed */
6089 object_len
= tvb_get_ntohs(tvb
, offset
);
6090 if (object_len
< 4) {
6091 proto_tree_add_expert_format(tree
, pinfo
, &ei_cops_bad_cops_object_length
, tvb
, offset
, 2,
6092 "Incorrect PacketCable object length %u < 4", object_len
);
6096 s_num
= tvb_get_uint8(tvb
, offset
+ 2);
6097 s_type
= tvb_get_uint8(tvb
, offset
+ 3);
6099 /* Glom the s_num and s_type together to make switching easier */
6100 num_type_glob
= s_num
<< 8 | s_type
;
6102 /* Perform the appropriate functions */
6103 switch (num_type_glob
){
6104 case PCMM_TRANSACTION_ID
:
6105 cops_mm_transaction_id(tvb
, pinfo
, tree
, op_code
, object_len
, offset
);
6108 cops_amid(tvb
, tree
, object_len
, offset
);
6110 case PCMM_SUBSCRIBER_ID
:
6111 cops_subscriber_id_v4(tvb
, tree
, object_len
, offset
);
6113 case PCMM_SUBSCRIBER_ID_V6
:
6114 cops_subscriber_id_v6(tvb
, tree
, object_len
, offset
);
6117 cops_gate_id(tvb
, tree
, object_len
, offset
);
6119 case PCMM_GATE_SPEC
:
6120 cops_mm_gate_spec(tvb
, tree
, object_len
, offset
);
6122 case PCMM_CLASSIFIER
:
6123 cops_classifier(tvb
, tree
, object_len
, offset
, false);
6125 case PCMM_EXTENDED_CLASSIFIER
:
6126 cops_classifier(tvb
, tree
, object_len
, offset
, true);
6128 case PCMM_IPV6_CLASSIFIER
:
6129 cops_ipv6_classifier(tvb
, tree
, object_len
, offset
);
6131 case PCMM_FLOW_SPEC
:
6132 cops_flow_spec(tvb
, tree
, object_len
, offset
);
6134 case PCMM_DOCSIS_SERVICE_CLASS_NAME
:
6135 cops_docsis_service_class_name(tvb
, pinfo
, tree
, object_len
, offset
);
6137 case PCMM_BEST_EFFORT_SERVICE
:
6138 if (object_len
== 44 || object_len
== 80 || object_len
== 116)
6139 cops_best_effort_service_i04_i05(tvb
, tree
, object_len
, offset
, true);
6140 else if (object_len
== 40 || object_len
== 72 || object_len
== 104)
6141 cops_best_effort_service_i04_i05(tvb
, tree
, object_len
, offset
, false);
6143 cops_best_effort_service(tvb
, tree
, object_len
, offset
);
6145 case PCMM_NON_REAL_TIME_POLLING_SERVICE
:
6146 if (object_len
== 48 || object_len
== 88 || object_len
== 128)
6147 cops_non_real_time_polling_service_i04_i05(tvb
, tree
, object_len
, offset
, true);
6148 else if (object_len
== 44 || object_len
== 80 || object_len
== 116)
6149 cops_non_real_time_polling_service_i04_i05(tvb
, tree
, object_len
, offset
, false);
6151 cops_non_real_time_polling_service(tvb
, tree
, object_len
, offset
);
6153 case PCMM_REAL_TIME_POLLING_SERVICE
:
6154 if (object_len
== 48 || object_len
== 88 || object_len
== 128)
6155 cops_real_time_polling_service_i04_i05(tvb
, tree
, object_len
, offset
, true);
6156 else if (object_len
== 44 || object_len
== 80 || object_len
== 116)
6157 cops_real_time_polling_service_i04_i05(tvb
, tree
, object_len
, offset
, false);
6159 cops_real_time_polling_service(tvb
, tree
, object_len
, offset
);
6161 case PCMM_UNSOLICITED_GRANT_SERVICE
:
6162 if (object_len
== 36 || object_len
== 64 || object_len
== 92)
6163 cops_unsolicited_grant_service_i04_i05(tvb
, tree
, object_len
, offset
, true);
6164 else if (object_len
== 32 || object_len
== 56 || object_len
== 80)
6165 cops_unsolicited_grant_service_i04_i05(tvb
, tree
, object_len
, offset
, false);
6167 cops_unsolicited_grant_service(tvb
, tree
, object_len
, offset
);
6169 case PCMM_UGS_WITH_ACTIVITY_DETECTION
:
6170 if (object_len
== 44 || object_len
== 80 || object_len
== 116)
6171 cops_ugs_with_activity_detection_i04_i05(tvb
, tree
, object_len
, offset
, true);
6172 else if (object_len
== 40 || object_len
== 72 || object_len
== 104)
6173 cops_ugs_with_activity_detection_i04_i05(tvb
, tree
, object_len
, offset
, false);
6175 cops_ugs_with_activity_detection(tvb
, tree
, object_len
, offset
);
6177 case PCMM_DOWNSTREAM_SERVICE
:
6178 if (object_len
== 48 || object_len
== 88 || object_len
== 128)
6179 cops_downstream_service_i04_i05(tvb
, tree
, object_len
, offset
, true);
6180 else if (object_len
== 40 || object_len
== 72 || object_len
== 104)
6181 cops_downstream_service_i04_i05(tvb
, tree
, object_len
, offset
, false);
6183 cops_downstream_service(tvb
, tree
, object_len
, offset
);
6185 case PCMM_UPSTREAM_DROP
:
6186 cops_upstream_drop_i04(tvb
, tree
, object_len
, offset
);
6188 case PCMM_EVENT_GENERATION_INFO
:
6189 cops_mm_event_generation_info(tvb
, tree
, object_len
, offset
);
6191 case PCMM_VOLUME_BASED_USAGE_LIMIT
:
6192 cops_volume_based_usage_limit(tvb
, tree
, object_len
, offset
);
6194 case PCMM_TIME_BASED_USAGE_LIMIT
:
6195 cops_time_based_usage_limit(tvb
, tree
, object_len
, offset
);
6197 case PCMM_OPAQUE_DATA
:
6198 cops_opaque_data(tvb
, tree
, object_len
, offset
);
6200 case PCMM_GATE_TIME_INFO
:
6201 cops_gate_time_info(tvb
, tree
, object_len
, offset
);
6203 case PCMM_GATE_USAGE_INFO
:
6204 cops_gate_usage_info(tvb
, tree
, object_len
, offset
);
6206 case PCMM_PACKETCABLE_ERROR
:
6207 cops_packetcable_mm_error(tvb
, tree
, object_len
, offset
);
6209 case PCMM_GATE_STATE
:
6210 cops_gate_state(tvb
, tree
, object_len
, offset
);
6212 case PCMM_VERSION_INFO
:
6213 cops_version_info(tvb
, tree
, object_len
, offset
);
6216 cops_psid(tvb
, tree
, object_len
, offset
);
6218 case PCMM_SYNCH_OPTIONS
:
6219 cops_synch_options(tvb
, tree
, object_len
, offset
);
6221 case PCMM_MSG_RECEIPT_KEY
:
6222 cops_msg_receipt_key(tvb
, tree
, object_len
, offset
);
6225 cops_userid(tvb
, tree
, object_len
, offset
);
6227 case PCMM_SHAREDRESOURCEID
:
6228 cops_sharedresourceid(tvb
, tree
, object_len
, offset
);
6234 offset
+= object_len
;
6239 /* End of PacketCable Addition */
6242 * Editor modelines - https://www.wireshark.org/tools/modelines.html
6247 * indent-tabs-mode: nil
6250 * vi: set shiftwidth=4 tabstop=8 expandtab:
6251 * :indentSize=4:tabSize=8:noTabs=true: