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
27 * Wireshark - Network traffic analyzer
28 * By Gerald Combs <gerald@wireshark.org>
29 * Copyright 1998 Gerald Combs
31 * This program is free software; you can redistribute it and/or
32 * modify it under the terms of the GNU General Public License
33 * as published by the Free Software Foundation; either version 2
34 * of the License, or (at your option) any later version.
36 * This program is distributed in the hope that it will be useful,
37 * but WITHOUT ANY WARRANTY; without even the implied warranty of
38 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
39 * GNU General Public License for more details.
41 * You should have received a copy of the GNU General Public License
42 * along with this program; if not, write to the Free Software
43 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
47 * Some of the development of the COPS protocol decoder was sponsored by
48 * Cable Television Laboratories, Inc. ("CableLabs") based upon proprietary
49 * CableLabs' specifications. Your license and use of this protocol decoder
50 * does not mean that you are licensed to use the CableLabs'
51 * specifications. If you have questions about this protocol, contact
52 * jf.mule [AT] cablelabs.com or c.stuart [AT] cablelabs.com for additional
63 #include <epan/packet.h>
64 #include <epan/conversation.h>
65 #include <epan/wmem/wmem.h>
66 #include <epan/emem.h>
67 #include "packet-tcp.h"
69 #include <epan/oids.h>
70 #include <epan/prefs.h>
71 #include <epan/expert.h>
72 #include <epan/asn1.h>
73 #include "packet-ber.h"
75 /* XXX - The "plain" COPS port (3288) can be overridden in the prefs.
76 The PacketCable port cannot - should this be the case? */
77 #define TCP_PORT_COPS 3288
78 #define TCP_PORT_PKTCABLE_COPS 2126
79 #define TCP_PORT_PKTCABLE_MM_COPS 3918
81 void proto_register_cops(void);
83 /* Preference: Variable to hold the tcp port preference */
84 static guint global_cops_tcp_port
= TCP_PORT_COPS
;
86 /* Preference: desegmentation of COPS */
87 static gboolean cops_desegment
= TRUE
;
89 #define COPS_OBJECT_HDR_SIZE 4
92 /* Null string of type "guchar[]". */
93 static const guchar nullstring
[] = "";
95 #define SAFE_STRING(s) (((s) != NULL) ? (s) : nullstring)
98 static const value_string cops_flags_vals
[] = {
100 { 0x01, "Solicited Message Flag Bit" },
104 /* The different COPS message types */
106 COPS_NO_MSG
, /* Not a COPS Message type */
108 COPS_MSG_REQ
, /* Request (REQ) */
109 COPS_MSG_DEC
, /* Decision (DEC) */
110 COPS_MSG_RPT
, /* Report State (RPT) */
111 COPS_MSG_DRQ
, /* Delete Request State (DRQ) */
112 COPS_MSG_SSQ
, /* Synchronize State Req (SSQ) */
113 COPS_MSG_OPN
, /* Client-Open (OPN) */
114 COPS_MSG_CAT
, /* Client-Accept (CAT) */
115 COPS_MSG_CC
, /* Client-Close (CC) */
116 COPS_MSG_KA
, /* Keep-Alive (KA) */
117 COPS_MSG_SSC
, /* Synchronize Complete (SSC) */
119 COPS_LAST_OP_CODE
/* For error checking */
122 static const value_string cops_op_code_vals
[] = {
123 { COPS_MSG_REQ
, "Request (REQ)" },
124 { COPS_MSG_DEC
, "Decision (DEC)" },
125 { COPS_MSG_RPT
, "Report State (RPT)" },
126 { COPS_MSG_DRQ
, "Delete Request State (DRQ)" },
127 { COPS_MSG_SSQ
, "Synchronize State Req (SSQ)" },
128 { COPS_MSG_OPN
, "Client-Open (OPN)" },
129 { COPS_MSG_CAT
, "Client-Accept (CAT)" },
130 { COPS_MSG_CC
, "Client-Close (CC)" },
131 { COPS_MSG_KA
, "Keep-Alive (KA)" },
132 { COPS_MSG_SSC
, "Synchronize Complete (SSC)" },
137 /* The different objects in COPS messages */
139 COPS_NO_OBJECT
, /* Not a COPS Object type */
141 COPS_OBJ_HANDLE
, /* Handle Object (Handle) */
142 COPS_OBJ_CONTEXT
, /* Context Object (Context) */
143 COPS_OBJ_IN_INT
, /* In-Interface Object (IN-Int) */
144 COPS_OBJ_OUT_INT
, /* Out-Interface Object (OUT-Int) */
145 COPS_OBJ_REASON
, /* Reason Object (Reason) */
146 COPS_OBJ_DECISION
, /* Decision Object (Decision) */
147 COPS_OBJ_LPDPDECISION
, /* LPDP Decision Object (LPDPDecision) */
148 COPS_OBJ_ERROR
, /* Error Object (Error) */
149 COPS_OBJ_CLIENTSI
, /* Client Specific Information Object (ClientSI) */
150 COPS_OBJ_KATIMER
, /* Keep-Alive Timer Object (KATimer) */
151 COPS_OBJ_PEPID
, /* PEP Identification Object (PEPID) */
152 COPS_OBJ_REPORT_TYPE
, /* Report-Type Object (Report-Type) */
153 COPS_OBJ_PDPREDIRADDR
, /* PDP Redirect Address Object (PDPRedirAddr) */
154 COPS_OBJ_LASTPDPADDR
, /* Last PDP Address (LastPDPaddr) */
155 COPS_OBJ_ACCTTIMER
, /* Accounting Timer Object (AcctTimer) */
156 COPS_OBJ_INTEGRITY
, /* Message Integrity Object (Integrity) */
157 COPS_LAST_C_NUM
/* For error checking */
160 static const value_string cops_c_num_vals
[] = {
161 { COPS_OBJ_HANDLE
, "Handle Object (Handle)" },
162 { COPS_OBJ_CONTEXT
, "Context Object (Context)" },
163 { COPS_OBJ_IN_INT
, "In-Interface Object (IN-Int)" },
164 { COPS_OBJ_OUT_INT
, "Out-Interface Object (OUT-Int)" },
165 { COPS_OBJ_REASON
, "Reason Object (Reason)" },
166 { COPS_OBJ_DECISION
, "Decision Object (Decision)" },
167 { COPS_OBJ_LPDPDECISION
, "LPDP Decision Object (LPDPDecision)" },
168 { COPS_OBJ_ERROR
, "Error Object (Error)" },
169 { COPS_OBJ_CLIENTSI
, "Client Specific Information Object (ClientSI)" },
170 { COPS_OBJ_KATIMER
, "Keep-Alive Timer Object (KATimer)" },
171 { COPS_OBJ_PEPID
, "PEP Identification Object (PEPID)" },
172 { COPS_OBJ_REPORT_TYPE
, "Report-Type Object (Report-Type)" },
173 { COPS_OBJ_PDPREDIRADDR
, "PDP Redirect Address Object (PDPRedirAddr)" },
174 { COPS_OBJ_LASTPDPADDR
, "Last PDP Address (LastPDPaddr)" },
175 { COPS_OBJ_ACCTTIMER
, "Accounting Timer Object (AcctTimer)" },
176 { COPS_OBJ_INTEGRITY
, "Message Integrity Object (Integrity)" },
181 /* The different objects in COPS-PR messages */
183 COPS_NO_PR_OBJECT
, /* Not a COPS-PR Object type */
184 COPS_OBJ_PRID
, /* Provisioning Instance Identifier (PRID) */
185 COPS_OBJ_PPRID
, /* Prefix Provisioning Instance Identifier (PPRID) */
186 COPS_OBJ_EPD
, /* Encoded Provisioning Instance Data (EPD) */
187 COPS_OBJ_GPERR
, /* Global Provisioning Error Object (GPERR) */
188 COPS_OBJ_CPERR
, /* PRC Class Provisioning Error Object (CPERR) */
189 COPS_OBJ_ERRPRID
, /* Error Provisioning Instance Identifier (ErrorPRID)*/
191 COPS_LAST_S_NUM
/* For error checking */
195 static const value_string cops_s_num_vals
[] = {
196 { COPS_OBJ_PRID
, "Provisioning Instance Identifier (PRID)" },
197 { COPS_OBJ_PPRID
, "Prefix Provisioning Instance Identifier (PPRID)" },
198 { COPS_OBJ_EPD
, "Encoded Provisioning Instance Data (EPD)" },
199 { COPS_OBJ_GPERR
, "Global Provisioning Error Object (GPERR)" },
200 { COPS_OBJ_CPERR
, "PRC Class Provisioning Error Object (CPERR)" },
201 { COPS_OBJ_ERRPRID
, "Error Provisioning Instance Identifier (ErrorPRID)" },
206 /* R-Type is carried within the Context Object */
207 static const value_string cops_r_type_vals
[] = {
208 { 0x01, "Incoming-Message/Admission Control request" },
209 { 0x02, "Resource-Allocation request" },
210 { 0x04, "Outgoing-Message request" },
211 { 0x08, "Configuration request" },
214 /* S-Type is carried within the ClientSI Object for COPS-PR*/
215 static const value_string cops_s_type_vals
[] = {
220 /* Reason-Code is carried within the Reason object */
221 static const value_string cops_reason_vals
[] = {
222 { 1, "Unspecified" },
224 { 3, "Preempted (Another request state takes precedence)" },
225 { 4, "Tear (Used to communicate a signaled state removal)" },
226 { 5, "Timeout (Local state has timed-out)" },
227 { 6, "Route Change (Change invalidates request state)" },
228 { 7, "Insufficient Resources (No local resource available)" },
229 { 8, "PDP's Directive (PDP decision caused the delete)" },
230 { 9, "Unsupported decision (PDP decision not supported)" },
231 { 10, "Synchronize Handle Unknown" },
232 { 11, "Transient Handle (stateless event)" },
233 { 12, "Malformed Decision (could not recover)" },
234 { 13, "Unknown COPS Object from PDP" },
238 /* Command-Code is carried within the Decision object if C-Type is 1 */
239 static const value_string cops_dec_cmd_code_vals
[] = {
240 { 0, "NULL Decision (No configuration data available)" },
241 { 1, "Install (Admit request/Install configuration)" },
242 { 2, "Remove (Remove request/Remove configuration)" },
246 /* Decision flags are also carried with the Decision object if C-Type is 1 */
247 static const value_string cops_dec_cmd_flag_vals
[] = {
248 { 0x00, "<None set>" },
249 { 0x01, "Trigger Error (Trigger error message if set)" },
253 /* Error-Code from Error object */
254 static const value_string cops_error_vals
[] = {
256 {2, "Invalid handle reference" },
257 {3, "Bad message format (Malformed Message)" },
258 {4, "Unable to process (server gives up on query)" },
259 {5, "Mandatory client-specific info missing" },
260 {6, "Unsupported client" },
261 {7, "Mandatory COPS object missing" },
262 {8, "Client Failure" },
263 {9, "Communication Failure" },
264 {10, "Unspecified" },
265 {11, "Shutting down" },
266 {12, "Redirect to Preferred Server" },
267 {13, "Unknown COPS Object" },
268 {14, "Authentication Failure" },
269 {15, "Authentication Required" },
272 /* Error-Code from GPERR object */
273 static const value_string cops_gperror_vals
[] = {
275 {2, "AvailMemExhausted" },
276 {3, "unknownASN.1Tag" },
277 {4, "maxMsgSizeExceeded" },
278 {5, "unknownError" },
279 {6, "maxRequestStatesOpen" },
280 {7, "invalidASN.1Length" },
281 {8, "invalidObjectPad" },
282 {9, "unknownPIBData" },
283 {10, "unknownCOPSPRObject" },
284 {11, "malformedDecision" },
288 /* Error-Code from CPERR object */
289 static const value_string cops_cperror_vals
[] = {
290 {1, "priSpaceExhausted" },
291 {2, "priInstanceInvalid" },
292 {3, "attrValueInvalid" },
293 {4, "attrValueSupLimited" },
294 {5, "attrEnumSupLimited" },
295 {6, "attrMaxLengthExceeded" },
296 {7, "attrReferenceUnknown" },
297 {8, "priNotifyOnly" },
299 {10, "tooFewAttrs" },
300 {11, "invalidAttrType" },
301 {12, "deletedInRef" },
302 {13, "priSpecificError" },
307 /* Report-Type from Report-Type object */
308 static const value_string cops_report_type_vals
[] = {
309 {1, " Success : Decision was successful at the PEP" },
310 {2, " Failure : Decision could not be completed by PEP" },
311 {3, " Accounting: Accounting update for an installed state" },
316 /* Client-type descriptions */
317 /* http://www.iana.org/assignments/cops-parameters */
319 /* PacketCable Types */
321 /* static dissector_handle_t sdp_handle; */
323 #define COPS_CLIENT_PC_DQOS 0x8008
324 #define COPS_CLIENT_PC_MM 0x800a
326 static const value_string cops_client_type_vals
[] = {
330 {0x8001, "IP Highway"},
331 {0x8002, "IP Highway"},
332 {0x8003, "IP Highway"},
333 {0x8004, "IP Highway"},
335 {0x8006, "HP OpenView PolicyXpert"},
336 {0x8007, "HP OpenView PolicyXpert"},
337 {COPS_CLIENT_PC_DQOS
, "PacketCable Dynamic Quality-of-Service"},
339 {COPS_CLIENT_PC_MM
, "PacketCable Multimedia"},
341 {0x800c, "Q.3303.1 (Rw interface) COPS alternative"},
342 {0x800d, "Q.3304.1 (Rc interface) COPS alternative"},
346 /* The next tables are for PacketCable */
348 /* Transaction ID table */
349 static const value_string table_cops_dqos_transaction_id
[] =
351 { 0x1, "Gate Alloc" },
352 { 0x2, "Gate Alloc Ack" },
353 { 0x3, "Gate Alloc Err" },
355 { 0x5, "Gate Set Ack" },
356 { 0x6, "Gate Set Err" },
357 { 0x7, "Gate Info" },
358 { 0x8, "Gate Info Ack" },
359 { 0x9, "Gate Info Err" },
360 { 0xa, "Gate Delete" },
361 { 0xb, "Gate Delete Ack" },
362 { 0xc, "Gate Delete Err" },
363 { 0xd, "Gate Open" },
364 { 0xe, "Gate Close" },
369 static const value_string table_cops_direction
[] =
371 { 0x0, "Downstream gate" },
372 { 0x1, "Upstream gate" },
377 static const value_string table_cops_session_class
[] =
379 { 0x0, "Unspecified" },
380 { 0x1, "Normal priority VoIP session" },
381 { 0x2, "High priority VoIP session" },
387 static const value_string table_cops_reason_code
[] =
389 { 0x0, "Gate Delete Operation" },
390 { 0x1, "Gate Close Operation" },
394 /* Reason Sub Code - Delete */
395 static const value_string table_cops_reason_subcode_delete
[] =
397 { 0x0, "Normal Operation" },
398 { 0x1, "Local Gate-coordination not completed" },
399 { 0x2, "Remote Gate-coordination not completed" },
400 { 0x3, "Authorization revoked" },
401 { 0x4, "Unexpected Gate-Open" },
402 { 0x5, "Local Gate-Close failure" },
403 { 0x127,"Unspecified error" },
407 /* Reason Sub Code - Close */
408 static const value_string table_cops_reason_subcode_close
[] =
410 { 0x0, "Client initiated release (normal operation)" },
411 { 0x1, "Reservation reassignment (e.g., for priority session)" },
412 { 0x2, "Lack of reservation maintenance (e.g., RSVP refreshes)" },
413 { 0x3, "Lack of Docsis Mac-layer responses (e.g., station maintenance)" },
414 { 0x4, "Timer T0 expiration; no Gate-Set received from CMS" },
415 { 0x5, "Timer T1 expiration; no Commit received from MTA" },
416 { 0x6, "Timer T7 expiration; Service Flow reservation timeout" },
417 { 0x7, "Timer T8 expiration; Service Flow inactivity in the upstream direction" },
418 { 0x127,"Unspecified error" },
422 /* PacketCable Error */
423 static const value_string table_cops_packetcable_error
[] =
425 { 0x1, "No gates urrently available" },
426 { 0x2, "Unknown Gate ID" },
427 { 0x3, "Illegal Session Class value" },
428 { 0x4, "Subscriber exceeded gate limit" },
429 { 0x5, "Gate already set" },
430 { 0x6, "Missing Required Object" },
431 { 0x7, "Invalid Object" },
432 { 0x127,"Unspecified error" },
437 /* PacketCable Multimedia */
439 static const value_string table_cops_mm_transaction_id
[] = {
447 {8, "Gate Info Ack"},
448 {9, "Gate Info Err"},
450 {11, "Gate Delete Ack"},
451 {12, "Gate Delete Err"},
454 {15, "Gate Report State"},
455 {16, "Invalid Gate Cmd Err"},
457 {18, "PDP Config Ack"},
458 {19, "PDP Config Error"},
459 {20, "Synch Request"},
460 {21, "Synch Report"},
461 {22, "Synch Complete"},
462 {23, "Message Receipt"},
466 static const value_string pcmm_activation_state_vals
[] = {
472 static const value_string pcmm_action_vals
[] = {
473 {0, "Add classifier"},
474 {1, "Replace classifier"},
475 {2, "Delete classifier"},
480 static const value_string pcmm_flow_spec_service_vals
[] = {
481 {2, "Guaranteed Rate"},
482 {5, "Controlled Load"},
486 static const value_string pcmm_report_type_vals
[] = {
487 {0, "Standard Report Data"},
488 {1, "Complete Gate Data"},
492 static const value_string pcmm_synch_type_vals
[] = {
493 {0, "Full Synchronization"},
494 {1, "Incremental Synchronization"},
498 static const value_string pcmm_packetcable_error_code
[] = {
499 {1, "Insufficient Resources"},
500 {2, "Unknown GateID"},
501 {6, "Missing Required Object"},
502 {7, "Invalid Object"},
503 {8, "Volume-Based Usage Limit Exceeded"},
504 {9, "Time-Based Usage Limit Exceeded"},
505 {10, "Session Class Limit Exceeded"},
506 {11, "Undefined Service Class Name"},
507 {12, "Incompatible Envelope"},
508 {13, "Invalid SubscriberID"},
509 {14, "Unauthorized AMID"},
510 {15, "Number of Classifiers Not Supported"},
511 {16, "Policy Exception"},
512 {17, "Invalid Field Value in Object"},
513 {18, "Transport Error"},
514 {19, "Unknown Gate Command"},
515 {20, "Unauthorized PSID"},
516 {21, "No State for PDP"},
517 {22, "Unsupported Synch Type"},
518 {23, "Incremental Data Incomplete"},
519 {127, "Other, Unspecified Error"},
523 static const value_string pcmm_gate_state
[] = {
528 {5, "Committed-Recovery"},
532 static const value_string pcmm_gate_state_reason
[] = {
533 {1, "Close initiated by CMTS due to reservation reassignment"},
534 {2, "Close initiated by CMTS due to lack of DOCSIS MAC-layer responses"},
535 {3, "Close initiated by CMTS due to timer T1 expiration"},
536 {4, "Close initiated by CMTS due to timer T2 expiration"},
537 {5, "Inactivity timer expired due to Service Flow inactivity (timer T3 expiration)"},
538 {6, "Close initiated by CMTS due to lack of Reservation Maintenance"},
539 {7, "Gate state unchanged, but volume limit reached"},
540 {8, "Close initiated by CMTS due to timer T4 expiration"},
541 {9, "Gate state unchanged, but timer T2 expiration caused reservation reduction"},
542 {10, "Gate state unchanged, but time limit reached"},
543 {11, "Close initiated by Policy Server or CMTS, volume limit reached"},
544 {12, "Close initiated by Policy Server or CMTS, time limit reached"},
545 {13, "Close initiated by CMTS, other"},
551 /* End of PacketCable Tables */
554 /* Initialize the protocol and registered fields */
555 static gint proto_cops
= -1;
556 static gint hf_cops_ver_flags
= -1;
557 static gint hf_cops_version
= -1;
558 static gint hf_cops_flags
= -1;
560 static gint hf_cops_response_in
= -1;
561 static gint hf_cops_response_to
= -1;
562 static gint hf_cops_response_time
= -1;
564 static gint hf_cops_op_code
= -1;
565 static gint hf_cops_client_type
= -1;
566 static gint hf_cops_msg_len
= -1;
568 static gint hf_cops_obj_len
= -1;
569 static gint hf_cops_obj_c_num
= -1;
570 static gint hf_cops_obj_c_type
= -1;
572 static gint hf_cops_obj_s_num
= -1;
573 static gint hf_cops_obj_s_type
= -1;
575 static gint hf_cops_handle
= -1;
577 static gint hf_cops_r_type_flags
= -1;
578 static gint hf_cops_m_type_flags
= -1;
580 static gint hf_cops_in_int_ipv4
= -1;
581 static gint hf_cops_in_int_ipv6
= -1;
582 static gint hf_cops_out_int_ipv4
= -1;
583 static gint hf_cops_out_int_ipv6
= -1;
584 static gint hf_cops_int_ifindex
= -1;
586 static gint hf_cops_reason
= -1;
587 static gint hf_cops_reason_sub
= -1;
589 static gint hf_cops_dec_cmd_code
= -1;
590 static gint hf_cops_dec_flags
= -1;
592 static gint hf_cops_error
= -1;
593 static gint hf_cops_error_sub
= -1;
595 static gint hf_cops_gperror
= -1;
596 static gint hf_cops_gperror_sub
= -1;
598 static gint hf_cops_cperror
= -1;
599 static gint hf_cops_cperror_sub
= -1;
601 static gint hf_cops_katimer
= -1;
603 static gint hf_cops_pepid
= -1;
605 static gint hf_cops_report_type
= -1;
607 static gint hf_cops_pdprediraddr_ipv4
= -1;
608 static gint hf_cops_pdprediraddr_ipv6
= -1;
609 static gint hf_cops_lastpdpaddr_ipv4
= -1;
610 static gint hf_cops_lastpdpaddr_ipv6
= -1;
611 static gint hf_cops_pdp_tcp_port
= -1;
613 static gint hf_cops_accttimer
= -1;
615 static gint hf_cops_key_id
= -1;
616 static gint hf_cops_seq_num
= -1;
618 static gint hf_cops_prid_oid
= -1;
619 static gint hf_cops_pprid_oid
= -1;
620 static gint hf_cops_errprid_oid
= -1;
621 static gint hf_cops_epd_null
= -1;
622 static gint hf_cops_epd_int
= -1;
623 static gint hf_cops_epd_octets
= -1;
624 static gint hf_cops_epd_oid
= -1;
625 static gint hf_cops_epd_ipv4
= -1;
626 static gint hf_cops_epd_u32
= -1;
627 static gint hf_cops_epd_ticks
= -1;
628 static gint hf_cops_epd_opaque
= -1;
629 static gint hf_cops_epd_i64
= -1;
630 static gint hf_cops_epd_u64
= -1;
631 static gint hf_cops_epd_unknown
= -1;
632 static gint hf_cops_reserved8
= -1;
633 static gint hf_cops_reserved16
= -1;
634 static gint hf_cops_reserved24
= -1;
637 /* For PacketCable D-QoS */
638 static gint hf_cops_subtree
= -1;
639 static gint hf_cops_pc_activity_count
= -1;
640 static gint hf_cops_pc_algorithm
= -1;
641 static gint hf_cops_pc_close_subcode
= -1;
642 static gint hf_cops_pc_cmts_ip
= -1;
643 static gint hf_cops_pc_cmts_ip_port
= -1;
644 static gint hf_cops_pc_prks_ip
= -1;
645 static gint hf_cops_pc_prks_ip_port
= -1;
646 static gint hf_cops_pc_srks_ip
= -1;
647 static gint hf_cops_pc_srks_ip_port
= -1;
648 static gint hf_cops_pc_delete_subcode
= -1;
649 static gint hf_cops_pc_dest_ip
= -1;
650 static gint hf_cops_pc_dest_port
= -1;
651 static gint hf_cops_pc_direction
= -1;
652 static gint hf_cops_pc_ds_field
= -1;
653 static gint hf_cops_pc_gate_id
= -1;
654 static gint hf_cops_pc_gate_spec_flags
= -1;
655 static gint hf_cops_pc_gate_command_type
= -1;
656 static gint hf_cops_pc_key
= -1;
657 static gint hf_cops_pc_max_packet_size
= -1;
658 static gint hf_cops_pc_min_policed_unit
= -1;
659 static gint hf_cops_pc_packetcable_err_code
= -1;
660 static gint hf_cops_pc_packetcable_sub_code
= -1;
661 static gint hf_cops_pc_peak_data_rate
= -1;
662 static gint hf_cops_pc_protocol_id
= -1;
663 static gint hf_cops_pc_reason_code
= -1;
664 static gint hf_cops_pc_remote_flags
= -1;
665 static gint hf_cops_pc_remote_gate_id
= -1;
666 static gint hf_cops_pc_reserved
= -1;
667 static gint hf_cops_pc_session_class
= -1;
668 static gint hf_cops_pc_slack_term
= -1;
669 static gint hf_cops_pc_spec_rate
= -1;
670 static gint hf_cops_pc_src_ip
= -1;
671 static gint hf_cops_pc_src_port
= -1;
672 static gint hf_cops_pc_subscriber_id_ipv4
= -1;
673 static gint hf_cops_pc_subscriber_id_ipv6
= -1;
674 static gint hf_cops_pc_t1_value
= -1;
675 static gint hf_cops_pc_t7_value
= -1;
676 static gint hf_cops_pc_t8_value
= -1;
677 static gint hf_cops_pc_token_bucket_rate
= -1;
678 static gint hf_cops_pc_token_bucket_size
= -1;
679 static gint hf_cops_pc_transaction_id
= -1;
680 static gint hf_cops_pc_bcid_ts
= -1;
681 /* static gint hf_cops_pc_bcid = -1; */
682 static gint hf_cops_pc_bcid_ev
= -1;
683 static gint hf_cops_pc_dfcdc_ip
= -1;
684 static gint hf_cops_pc_dfccc_ip
= -1;
685 static gint hf_cops_pc_dfcdc_ip_port
= -1;
686 static gint hf_cops_pc_dfccc_ip_port
= -1;
687 static gint hf_cops_pc_dfccc_id
= -1;
689 /* PacketCable Multimedia */
690 static gint hf_cops_pcmm_amid_app_type
= -1;
691 static gint hf_cops_pcmm_amid_am_tag
= -1;
692 static gint hf_cops_pcmm_gate_spec_flags
= -1;
693 static gint hf_cops_pcmm_gate_spec_flags_gate
= -1;
694 static gint hf_cops_pcmm_gate_spec_flags_dscp_overwrite
= -1;
695 static gint hf_cops_pcmm_gate_spec_dscp_tos_field
= -1;
696 static gint hf_cops_pcmm_gate_spec_dscp_tos_mask
= -1;
697 static gint hf_cops_pcmm_gate_spec_session_class_id
= -1;
698 static gint hf_cops_pcmm_gate_spec_session_class_id_priority
= -1;
699 static gint hf_cops_pcmm_gate_spec_session_class_id_preemption
= -1;
700 static gint hf_cops_pcmm_gate_spec_session_class_id_configurable
= -1;
701 static gint hf_cops_pcmm_gate_spec_timer_t1
= -1;
702 static gint hf_cops_pcmm_gate_spec_timer_t2
= -1;
703 static gint hf_cops_pcmm_gate_spec_timer_t3
= -1;
704 static gint hf_cops_pcmm_gate_spec_timer_t4
= -1;
705 static gint hf_cops_pcmm_classifier_protocol_id
= -1;
706 static gint hf_cops_pcmm_classifier_dscp_tos_field
= -1;
707 static gint hf_cops_pcmm_classifier_dscp_tos_mask
= -1;
708 static gint hf_cops_pcmm_classifier_src_addr
= -1;
709 static gint hf_cops_pcmm_classifier_src_mask
= -1;
710 static gint hf_cops_pcmm_classifier_dst_addr
= -1;
711 static gint hf_cops_pcmm_classifier_dst_mask
= -1;
712 static gint hf_cops_pcmm_classifier_src_port
= -1;
713 static gint hf_cops_pcmm_classifier_src_port_end
= -1;
714 static gint hf_cops_pcmm_classifier_dst_port
= -1;
715 static gint hf_cops_pcmm_classifier_dst_port_end
= -1;
716 static gint hf_cops_pcmm_classifier_priority
= -1;
717 static gint hf_cops_pcmm_classifier_classifier_id
= -1;
718 static gint hf_cops_pcmm_classifier_activation_state
= -1;
719 static gint hf_cops_pcmm_classifier_action
= -1;
720 static gint hf_cops_pcmm_classifier_flags
= -1;
721 static gint hf_cops_pcmm_classifier_tc_low
= -1;
722 static gint hf_cops_pcmm_classifier_tc_high
= -1;
723 static gint hf_cops_pcmm_classifier_tc_mask
= -1;
724 static gint hf_cops_pcmm_classifier_flow_label
= -1;
725 static gint hf_cops_pcmm_classifier_next_header_type
= -1;
726 static gint hf_cops_pcmm_classifier_source_prefix_length
= -1;
727 static gint hf_cops_pcmm_classifier_destination_prefix_length
= -1;
728 static gint hf_cops_pcmm_classifier_src_addr_v6
= -1;
729 static gint hf_cops_pcmm_classifier_dst_addr_v6
= -1;
730 static gint hf_cops_pcmm_flow_spec_envelope
= -1;
731 static gint hf_cops_pcmm_flow_spec_service_number
= -1;
732 static gint hf_cops_pcmm_docsis_scn
= -1;
733 static gint hf_cops_pcmm_envelope
= -1;
734 static gint hf_cops_pcmm_traffic_priority
= -1;
735 static gint hf_cops_pcmm_request_transmission_policy
= -1;
736 static gint hf_cops_pcmm_max_sustained_traffic_rate
= -1;
737 static gint hf_cops_pcmm_max_traffic_burst
= -1;
738 static gint hf_cops_pcmm_min_reserved_traffic_rate
= -1;
739 static gint hf_cops_pcmm_ass_min_rtr_packet_size
= -1;
740 static gint hf_cops_pcmm_max_concat_burst
= -1;
741 static gint hf_cops_pcmm_req_att_mask
= -1;
742 static gint hf_cops_pcmm_forbid_att_mask
= -1;
743 static gint hf_cops_pcmm_att_aggr_rule_mask
= -1;
744 static gint hf_cops_pcmm_nominal_polling_interval
= -1;
745 static gint hf_cops_pcmm_tolerated_poll_jitter
= -1;
746 static gint hf_cops_pcmm_unsolicited_grant_size
= -1;
747 static gint hf_cops_pcmm_grants_per_interval
= -1;
748 static gint hf_cops_pcmm_nominal_grant_interval
= -1;
749 static gint hf_cops_pcmm_tolerated_grant_jitter
= -1;
750 static gint hf_cops_pcmm_down_resequencing
= -1;
751 static gint hf_cops_pcmm_down_peak_traffic_rate
= -1;
752 static gint hf_cops_pcmm_max_downstream_latency
= -1;
753 static gint hf_cops_pcmm_volume_based_usage_limit
= -1;
754 static gint hf_cops_pcmm_time_based_usage_limit
= -1;
755 static gint hf_cops_pcmm_gate_time_info
= -1;
756 static gint hf_cops_pcmm_gate_usage_info
= -1;
757 static gint hf_cops_pcmm_packetcable_error_code
= -1;
758 static gint hf_cops_pcmm_packetcable_error_subcode
= -1;
759 static gint hf_cops_pcmm_packetcable_gate_state
= -1;
760 static gint hf_cops_pcmm_packetcable_gate_state_reason
= -1;
761 static gint hf_cops_pcmm_packetcable_version_info_major
= -1;
762 static gint hf_cops_pcmm_packetcable_version_info_minor
= -1;
763 static gint hf_cops_pcmm_psid
= -1;
764 static gint hf_cops_pcmm_synch_options_report_type
= -1;
765 static gint hf_cops_pcmm_synch_options_synch_type
= -1;
766 static gint hf_cops_pcmm_msg_receipt_key
= -1;
767 static gint hf_cops_pcmm_userid
= -1;
768 static gint hf_cops_pcmm_sharedresourceid
= -1;
771 /* Initialize the subtree pointers */
772 static gint ett_cops
= -1;
773 static gint ett_cops_ver_flags
= -1;
774 static gint ett_cops_obj
= -1;
775 static gint ett_cops_pr_obj
= -1;
776 static gint ett_cops_obj_data
= -1;
777 static gint ett_cops_r_type_flags
= -1;
778 static gint ett_cops_itf
= -1;
779 static gint ett_cops_reason
= -1;
780 static gint ett_cops_decision
= -1;
781 static gint ett_cops_error
= -1;
782 static gint ett_cops_clientsi
= -1;
783 static gint ett_cops_asn1
= -1;
784 static gint ett_cops_gperror
= -1;
785 static gint ett_cops_cperror
= -1;
786 static gint ett_cops_pdp
= -1;
788 static expert_field ei_cops_pepid_not_null
= EI_INIT
;
789 static expert_field ei_cops_trailing_garbage
= EI_INIT
;
790 static expert_field ei_cops_bad_cops_object_length
= EI_INIT
;
791 static expert_field ei_cops_bad_cops_pr_object_length
= EI_INIT
;
792 static expert_field ei_cops_unknown_c_num
= EI_INIT
;
793 static expert_field ei_cops_unknown_s_num
= EI_INIT
;
795 /* For PacketCable */
796 static gint ett_cops_subtree
= -1;
798 static gint ett_docsis_request_transmission_policy
= -1;
800 /* For request/response matching */
801 typedef struct _cops_conv_info_t
{
802 wmem_tree_t
*pdus_tree
;
805 typedef struct _cops_call_t
814 void proto_reg_handoff_cops(void);
815 static int dissect_cops_object(tvbuff_t
*tvb
, packet_info
*pinfo
, guint8 op_code
, guint32 offset
, proto_tree
*tree
, guint16 client_type
, guint32
* handle_value
);
816 static void dissect_cops_object_data(tvbuff_t
*tvb
, packet_info
*pinfo
, guint32 offset
, proto_tree
*tree
,
817 guint8 op_code
, guint16 client_type
, guint8 c_num
, guint8 c_type
, int len
, guint32
* handle_value
);
819 static void dissect_cops_pr_objects(tvbuff_t
*tvb
, packet_info
*pinfo
, guint32 offset
, proto_tree
*tree
, int pr_len
,
820 oid_info_t
** oid_info_p
, guint32
** pprid_subids_p
, guint
* pprid_subids_len_p
);
821 static int dissect_cops_pr_object_data(tvbuff_t
*tvb
, packet_info
*pinfo
, guint32 offset
, proto_tree
*tree
,
822 guint8 s_num
, guint8 s_type
, int len
,
823 oid_info_t
** oid_info_p
, guint32
** pprid_subids
, guint
* pprid_subids_len
);
825 /* Added for PacketCable */
826 static proto_tree
*info_to_cops_subtree(tvbuff_t
*, proto_tree
*, int, int, const char *);
827 static proto_item
*info_to_display(tvbuff_t
*, proto_item
*, int, int, const char *, const value_string
*, int, gint
*);
829 static void cops_transaction_id(tvbuff_t
*, packet_info
*, proto_tree
*, guint8
, guint
, guint32
);
830 static void cops_subscriber_id_v4(tvbuff_t
*, proto_tree
*, guint
, guint32
);
831 static void cops_subscriber_id_v6(tvbuff_t
*, proto_tree
*, guint
, guint32
);
832 static void cops_gate_id(tvbuff_t
*, proto_tree
*, guint
, guint32
);
833 static void cops_activity_count(tvbuff_t
*, proto_tree
*, guint
, guint32
);
834 static void cops_gate_specs(tvbuff_t
*, proto_tree
*, guint
, guint32
);
835 static void cops_remote_gate_info(tvbuff_t
*, proto_tree
*, guint
, guint32
);
836 static void cops_packetcable_reason(tvbuff_t
*, proto_tree
*, guint
, guint32
);
837 static void cops_packetcable_error(tvbuff_t
*, proto_tree
*, guint
, guint32
);
838 static void cops_event_generation_info(tvbuff_t
*, proto_tree
*, guint
, guint32
);
839 static void cops_surveillance_parameters(tvbuff_t
*, proto_tree
*, guint
, guint32
);
841 static void cops_amid(tvbuff_t
*, proto_tree
*, guint
, guint32
);
843 static void decode_docsis_request_transmission_policy(tvbuff_t
*tvb
, guint32 offset
, proto_tree
*tree
, gint hf
);
845 static void cops_analyze_packetcable_dqos_obj(tvbuff_t
*, packet_info
*, proto_tree
*, guint8
, guint32
);
846 static void cops_analyze_packetcable_mm_obj(tvbuff_t
*, packet_info
*, proto_tree
*, guint8
, guint32
);
848 static gboolean cops_packetcable
= TRUE
;
850 /* End of addition for PacketCable */
854 #define COPS_IPA 0 /* IP Address */
855 #define COPS_U32 2 /* Unsigned 32*/
856 #define COPS_TIT 3 /* TimeTicks */
857 #define COPS_OPQ 4 /* Opaque */
858 #define COPS_I64 10 /* Integer64 */
859 #define COPS_U64 11 /* Uinteger64 */
864 #define COPS_INTEGER 1 /* l */
865 #define COPS_OCTETSTR 2 /* c */
866 #define COPS_OBJECTID 3 /* ul */
867 #define COPS_IPADDR 4 /* uc */
868 #define COPS_UNSIGNED32 5 /* ul */
869 #define COPS_TIMETICKS 7 /* ul */
870 #define COPS_OPAQUE 8 /* c */
871 #define COPS_INTEGER64 10 /* ll */
872 #define COPS_UNSIGNED64 11 /* ull */
874 typedef struct _COPS_CNV COPS_CNV
;
885 static const true_false_string tfs_upstream_downstream
= { "Upstream", "Downstream" };
887 static COPS_CNV CopsCnv
[] =
889 {BER_CLASS_UNI
, BER_UNI_TAG_NULL
, COPS_NULL
, "NULL" , &hf_cops_epd_null
},
890 {BER_CLASS_UNI
, BER_UNI_TAG_INTEGER
, COPS_INTEGER
, "INTEGER", &hf_cops_epd_int
},
891 {BER_CLASS_UNI
, BER_UNI_TAG_OCTETSTRING
, COPS_OCTETSTR
, "OCTET STRING", &hf_cops_epd_octets
},
892 {BER_CLASS_UNI
, BER_UNI_TAG_OID
, COPS_OBJECTID
, "OBJECTID", &hf_cops_epd_oid
},
893 {BER_CLASS_APP
, COPS_IPA
, COPS_IPADDR
, "IPADDR", &hf_cops_epd_ipv4
},
894 {BER_CLASS_APP
, COPS_U32
, COPS_UNSIGNED32
,"UNSIGNED32", &hf_cops_epd_u32
},
895 {BER_CLASS_APP
, COPS_TIT
, COPS_TIMETICKS
, "TIMETICKS", &hf_cops_epd_ticks
},
896 {BER_CLASS_APP
, COPS_OPQ
, COPS_OPAQUE
, "OPAQUE", &hf_cops_epd_opaque
},
897 {BER_CLASS_APP
, COPS_I64
, COPS_INTEGER64
, "INTEGER64", &hf_cops_epd_i64
},
898 {BER_CLASS_APP
, COPS_U64
, COPS_UNSIGNED64
, "UNSIGNED64", &hf_cops_epd_u64
},
899 {BER_CLASS_ANY
, 0, -1, NULL
, NULL
}
902 static int cops_tag_cls2syntax ( guint tag
, guint cls
) {
907 while (cnv
->syntax
!= -1)
909 if (cnv
->tag
== tag
&& cnv
->ber_class
== cls
)
911 return *(cnv
->hfidp
);
915 return hf_cops_epd_unknown
;
919 get_cops_pdu_len(packet_info
*pinfo _U_
, tvbuff_t
*tvb
, int offset
)
922 * Get the length of the COPS message.
924 return tvb_get_ntohl(tvb
, offset
+ 4);
928 dissect_cops_pdu(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, void* data _U_
)
934 proto_tree
*cops_tree
, *ver_flags_tree
;
939 guint32 handle_value
= 0;
941 /* variables for Request/Response tracking */
943 gboolean is_solicited
, is_request
, is_response
;
944 conversation_t
*conversation
;
945 cops_conv_info_t
*cops_conv_info
;
946 cops_call_t
*cops_call
;
947 GPtrArray
* pdus_array
;
950 col_set_str(pinfo
->cinfo
, COL_PROTOCOL
, "COPS");
951 col_clear(pinfo
->cinfo
, COL_INFO
);
953 op_code
= tvb_get_guint8(tvb
, 1);
954 col_add_fstr(pinfo
->cinfo
, COL_INFO
, "COPS %s",
955 val_to_str_const(op_code
, cops_op_code_vals
, "Unknown Op Code"));
957 /* Currently used by PacketCable */
958 client_type
= tvb_get_ntohs(tvb
, 2);
960 ti
= proto_tree_add_item(tree
, proto_cops
, tvb
, offset
, -1, ENC_NA
);
961 cops_tree
= proto_item_add_subtree(ti
, ett_cops
);
963 /* Version and flags share the same byte, put them in a subtree */
964 ver_flags
= tvb_get_guint8(tvb
, offset
);
965 is_solicited
= (lo_nibble(ver_flags
) == 0x01);
966 tv
= proto_tree_add_uint_format(cops_tree
, hf_cops_ver_flags
, tvb
, offset
, 1,
967 ver_flags
, "Version: %u, Flags: %s",
968 hi_nibble(ver_flags
),
969 val_to_str_const(lo_nibble(ver_flags
), cops_flags_vals
, "Unknown"));
970 ver_flags_tree
= proto_item_add_subtree(tv
, ett_cops_ver_flags
);
971 proto_tree_add_uint(ver_flags_tree
, hf_cops_version
, tvb
, offset
, 1, ver_flags
);
972 proto_tree_add_uint(ver_flags_tree
, hf_cops_flags
, tvb
, offset
, 1, ver_flags
);
975 proto_tree_add_item(cops_tree
, hf_cops_op_code
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
977 proto_tree_add_item(cops_tree
, hf_cops_client_type
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
980 msg_len
= tvb_get_ntohl(tvb
, offset
);
981 proto_tree_add_uint(cops_tree
, hf_cops_msg_len
, tvb
, offset
, 4, msg_len
);
984 while (tvb_reported_length_remaining(tvb
, offset
) >= COPS_OBJECT_HDR_SIZE
) {
985 object_len
= dissect_cops_object(tvb
, pinfo
, op_code
, offset
, cops_tree
, client_type
, &handle_value
);
988 offset
+= object_len
;
991 garbage
= tvb_length_remaining(tvb
, offset
);
993 proto_tree_add_expert_format(tree
, pinfo
, &ei_cops_trailing_garbage
, tvb
, offset
, garbage
, "Trailing garbage: %d byte%s", garbage
, plurality(garbage
, "", "s"));
996 /* Start request/response matching */
998 /* handle is 0(or not present), and op_code doesn't allow null handle, return */
999 /* TODO, add expert info for this abnormal */
1000 if (handle_value
== 0 &&
1001 ( op_code
!= COPS_MSG_SSQ
&&
1002 op_code
!= COPS_MSG_OPN
&&
1003 op_code
!= COPS_MSG_CAT
&&
1004 op_code
!= COPS_MSG_CC
&&
1005 op_code
!= COPS_MSG_KA
&&
1006 op_code
!= COPS_MSG_SSC
) ) {
1012 op_code
== COPS_MSG_REQ
|| /* expects DEC */
1013 (op_code
== COPS_MSG_DEC
&& !is_solicited
) || /* expects RPT|DRQ */
1014 /* COPS_MSG_RPT doesn't expect response */
1015 /* COPS_MSG_DRQ doesn't expect response */
1016 op_code
== COPS_MSG_SSQ
|| /* expects RPT|DRQ|SSC */
1017 op_code
== COPS_MSG_OPN
|| /* expects CAT|CC */
1018 /* COPS_MSG_CAT doesn't expect response */
1019 /* COPS_MSG_CC doesn't expect response */
1020 (op_code
== COPS_MSG_KA
&& !is_solicited
); /* expects KA from PDP, always initialized by PEP */
1021 /* COPS_MSG_SSC doesn't expect response */
1024 /* COPS_MSG_REQ request only */
1025 (op_code
== COPS_MSG_DEC
&& is_solicited
) || /* response only if reply REQ */
1026 (op_code
== COPS_MSG_RPT
&& is_solicited
) || /* response only if reply DEC/SSQ */
1027 (op_code
== COPS_MSG_DRQ
&& is_solicited
) || /* response only if reply DEC/SSQ */
1028 /* COPS_MSG_SSQ request only */
1029 /* COPS_MSG_OPN request only */
1030 op_code
== COPS_MSG_CAT
|| /* response for OPN */
1031 (op_code
== COPS_MSG_CC
&& is_solicited
) || /* response for OPN */
1032 (op_code
== COPS_MSG_KA
&& is_solicited
) || /* response for KA from PEP */
1033 op_code
== COPS_MSG_SSC
; /* response for SSQ */
1035 conversation
= find_or_create_conversation(pinfo
);
1036 cops_conv_info
= (cops_conv_info_t
*)conversation_get_proto_data(conversation
, proto_cops
);
1037 if (!cops_conv_info
) {
1038 cops_conv_info
= (cops_conv_info_t
*)wmem_alloc(wmem_file_scope(), sizeof(cops_conv_info_t
));
1040 cops_conv_info
->pdus_tree
= wmem_tree_new(wmem_file_scope());
1041 conversation_add_proto_data(conversation
, proto_cops
, cops_conv_info
);
1045 (op_code
== COPS_MSG_DEC
&& is_solicited
) ) { /* DEC as response for REQ is considered as request, because it expects RPT|DRQ */
1047 pdus_array
= (GPtrArray
*)wmem_tree_lookup32(cops_conv_info
->pdus_tree
, handle_value
);
1048 if (pdus_array
== NULL
) { /* This is the first request we've seen with this handle_value */
1049 pdus_array
= g_ptr_array_new();
1050 wmem_tree_insert32(cops_conv_info
->pdus_tree
, handle_value
, pdus_array
);
1053 if (!pinfo
->fd
->flags
.visited
) {
1054 cops_call
= wmem_new(wmem_file_scope(), cops_call_t
);
1055 cops_call
->op_code
= op_code
;
1056 cops_call
->solicited
= is_solicited
;
1057 cops_call
->req_num
= PINFO_FD_NUM(pinfo
);
1058 cops_call
->rsp_num
= 0;
1059 cops_call
->req_time
= pinfo
->fd
->abs_ts
;
1060 g_ptr_array_add(pdus_array
, cops_call
);
1063 for (i
=0; i
< pdus_array
->len
; i
++) {
1064 cops_call
= (cops_call_t
*)g_ptr_array_index(pdus_array
, i
);
1065 if ( cops_call
->req_num
== PINFO_FD_NUM(pinfo
)
1066 && cops_call
->rsp_num
!= 0) {
1067 ti
= proto_tree_add_uint_format(cops_tree
, hf_cops_response_in
, tvb
, 0, 0, cops_call
->rsp_num
,
1068 "Response to this request is in frame %u", cops_call
->rsp_num
);
1069 PROTO_ITEM_SET_GENERATED(ti
);
1076 pdus_array
= (GPtrArray
*)wmem_tree_lookup32(cops_conv_info
->pdus_tree
, handle_value
);
1078 if (pdus_array
== NULL
) /* There's no request with this handle value */
1081 if (!pinfo
->fd
->flags
.visited
) {
1082 for (i
=0; i
< pdus_array
->len
; i
++) {
1083 cops_call
= (cops_call_t
*)g_ptr_array_index(pdus_array
, i
);
1085 if (nstime_cmp(&pinfo
->fd
->abs_ts
, &cops_call
->req_time
) <= 0 || cops_call
->rsp_num
!= 0)
1089 ( (cops_call
->op_code
== COPS_MSG_REQ
) &&
1090 (op_code
== COPS_MSG_DEC
&& is_solicited
) ) ||
1091 ( (cops_call
->op_code
== COPS_MSG_DEC
) &&
1092 ( (op_code
== COPS_MSG_RPT
&& is_solicited
) ||
1093 (op_code
== COPS_MSG_DRQ
&& is_solicited
) ) ) ||
1094 ( (cops_call
->op_code
== COPS_MSG_SSQ
) &&
1095 ( (op_code
== COPS_MSG_RPT
&& is_solicited
) ||
1096 (op_code
== COPS_MSG_DRQ
&& is_solicited
) ||
1097 (op_code
== COPS_MSG_SSC
) ) ) ||
1098 ( (cops_call
->op_code
== COPS_MSG_OPN
) &&
1099 (op_code
== COPS_MSG_CAT
||
1100 op_code
== COPS_MSG_CC
) ) ||
1101 ( (cops_call
->op_code
== COPS_MSG_KA
&& !(cops_call
->solicited
)) &&
1102 (op_code
== COPS_MSG_KA
&& is_solicited
) ) ) {
1103 cops_call
->rsp_num
= PINFO_FD_NUM(pinfo
);
1109 for (i
=0; i
< pdus_array
->len
; i
++) {
1110 cops_call
= (cops_call_t
*)g_ptr_array_index(pdus_array
, i
);
1111 if ( cops_call
->rsp_num
== PINFO_FD_NUM(pinfo
) ) {
1112 ti
= proto_tree_add_uint_format(cops_tree
, hf_cops_response_to
, tvb
, 0, 0, cops_call
->req_num
,
1113 "Response to a request in frame %u", cops_call
->req_num
);
1114 PROTO_ITEM_SET_GENERATED(ti
);
1116 nstime_delta(&delta
, &pinfo
->fd
->abs_ts
, &cops_call
->req_time
);
1117 ti
= proto_tree_add_time(cops_tree
, hf_cops_response_time
, tvb
, 0, 0, &delta
);
1118 PROTO_ITEM_SET_GENERATED(ti
);
1126 return tvb_length(tvb
);
1129 /* Code to actually dissect the packets */
1131 dissect_cops(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, void* data
)
1133 tcp_dissect_pdus(tvb
, pinfo
, tree
, cops_desegment
, 8,
1134 get_cops_pdu_len
, dissect_cops_pdu
, data
);
1135 return tvb_length(tvb
);
1138 static const char *cops_c_type_to_str(guint8 c_num
, guint8 c_type
)
1141 case COPS_OBJ_HANDLE
:
1143 return "Client Handle";
1145 case COPS_OBJ_IN_INT
:
1146 case COPS_OBJ_OUT_INT
:
1148 return "IPv4 Address + Interface";
1149 else if (c_type
== 2)
1150 return "IPv6 Address + Interface";
1152 case COPS_OBJ_DECISION
:
1153 case COPS_OBJ_LPDPDECISION
:
1155 return "Decision Flags (Mandatory)";
1156 else if (c_type
== 2)
1157 return "Stateless Data";
1158 else if (c_type
== 3)
1159 return "Replacement Data";
1160 else if (c_type
== 4)
1161 return "Client Specific Decision Data";
1162 else if (c_type
== 5)
1163 return "Named Decision Data";
1165 case COPS_OBJ_CLIENTSI
:
1167 return "Signaled ClientSI";
1168 else if (c_type
== 2)
1169 return "Named ClientSI";
1171 case COPS_OBJ_KATIMER
:
1173 return "Keep-alive timer value";
1175 case COPS_OBJ_PDPREDIRADDR
:
1176 case COPS_OBJ_LASTPDPADDR
:
1178 return "IPv4 Address + TCP Port";
1179 else if (c_type
== 2)
1180 return "IPv6 Address + TCP Port";
1182 case COPS_OBJ_ACCTTIMER
:
1184 return "Accounting timer value";
1186 case COPS_OBJ_INTEGRITY
:
1188 return "HMAC digest";
1195 static int dissect_cops_object(tvbuff_t
*tvb
, packet_info
*pinfo
, guint8 op_code
, guint32 offset
, proto_tree
*tree
, guint16 client_type
, guint32
* handle_value
)
1197 int object_len
, contents_len
;
1198 guint8 c_num
, c_type
;
1200 proto_tree
*obj_tree
;
1201 const char *type_str
;
1203 object_len
= tvb_get_ntohs(tvb
, offset
);
1204 if (object_len
< COPS_OBJECT_HDR_SIZE
) {
1206 ti
= proto_tree_add_uint(tree
, hf_cops_obj_len
, tvb
, offset
, 2, object_len
);
1207 expert_add_info_format(pinfo
, ti
, &ei_cops_bad_cops_object_length
,
1208 "Bad COPS object length: %u, should be at least %u",
1209 object_len
, COPS_OBJECT_HDR_SIZE
);
1212 c_num
= tvb_get_guint8(tvb
, offset
+ 2);
1213 c_type
= tvb_get_guint8(tvb
, offset
+ 3);
1215 ti
= proto_tree_add_uint_format(tree
, hf_cops_obj_c_num
, tvb
, offset
, object_len
, c_num
,
1216 "%s: %s", val_to_str_const(c_num
, cops_c_num_vals
, "Unknown"),
1217 cops_c_type_to_str(c_num
, c_type
));
1218 obj_tree
= proto_item_add_subtree(ti
, ett_cops_obj
);
1220 proto_tree_add_uint(obj_tree
, hf_cops_obj_len
, tvb
, offset
, 2, object_len
);
1223 proto_tree_add_uint(obj_tree
, hf_cops_obj_c_num
, tvb
, offset
, 1, c_num
);
1226 type_str
= cops_c_type_to_str(c_num
, c_type
);
1227 proto_tree_add_uint_format_value(obj_tree
, hf_cops_obj_c_type
, tvb
, offset
, 1, c_type
,
1230 strlen(type_str
) ? " (" : "",
1232 strlen(type_str
) ? ")" : "");
1235 contents_len
= object_len
- COPS_OBJECT_HDR_SIZE
;
1236 dissect_cops_object_data(tvb
, pinfo
, offset
, obj_tree
, op_code
, client_type
, c_num
, c_type
, contents_len
, handle_value
);
1238 /* Pad to 32bit boundary */
1239 if (object_len
% sizeof (guint32
))
1240 object_len
+= ((int)sizeof (guint32
) - object_len
% (int)sizeof (guint32
));
1245 static void dissect_cops_pr_objects(tvbuff_t
*tvb
, packet_info
*pinfo
, guint32 offset
, proto_tree
*tree
, int pr_len
,
1246 oid_info_t
** oid_info_p
, guint32
** pprid_subids_p
, guint
* pprid_subids_len_p
)
1248 int object_len
, contents_len
;
1249 guint8 s_num
, s_type
;
1250 const char *type_str
;
1252 proto_tree
*cops_pr_tree
, *obj_tree
;
1255 cops_pr_tree
= proto_item_add_subtree(tree
, ett_cops_pr_obj
);
1257 while (pr_len
>= COPS_OBJECT_HDR_SIZE
) {
1258 object_len
= tvb_get_ntohs(tvb
, offset
);
1259 if (object_len
< COPS_OBJECT_HDR_SIZE
) {
1261 ti
= proto_tree_add_uint(cops_pr_tree
, hf_cops_obj_len
, tvb
, offset
, 2, object_len
);
1262 expert_add_info_format(pinfo
, ti
, &ei_cops_bad_cops_pr_object_length
,
1263 "Bad COPS-PR object length: %u, should be at least %u",
1264 object_len
, COPS_OBJECT_HDR_SIZE
);
1267 s_num
= tvb_get_guint8(tvb
, offset
+ 2);
1269 ti
= proto_tree_add_uint_format(cops_pr_tree
, hf_cops_obj_s_num
, tvb
, offset
, object_len
, s_num
,
1270 "%s", val_to_str_const(s_num
, cops_s_num_vals
, "Unknown"));
1271 obj_tree
= proto_item_add_subtree(ti
, ett_cops_pr_obj
);
1273 proto_tree_add_uint(obj_tree
, hf_cops_obj_len
, tvb
, offset
, 2, object_len
);
1277 proto_tree_add_uint(obj_tree
, hf_cops_obj_s_num
, tvb
, offset
, 1, s_num
);
1281 s_type
= tvb_get_guint8(tvb
, offset
);
1282 type_str
= val_to_str_const(s_type
, cops_s_type_vals
, "Unknown");
1283 proto_tree_add_uint_format_value(obj_tree
, hf_cops_obj_s_type
, tvb
, offset
, 1, s_type
,
1286 strlen(type_str
) ? " (" : "",
1288 strlen(type_str
) ? ")" : "");
1292 contents_len
= object_len
- COPS_OBJECT_HDR_SIZE
;
1293 ret
= dissect_cops_pr_object_data(tvb
, pinfo
, offset
, obj_tree
, s_num
, s_type
, contents_len
,
1294 oid_info_p
, pprid_subids_p
, pprid_subids_len_p
);
1298 /* Pad to 32bit boundary */
1299 if (object_len
% sizeof (guint32
))
1300 object_len
+= ((int)sizeof (guint32
) - object_len
% (int)sizeof (guint32
));
1302 pr_len
-= object_len
- COPS_OBJECT_HDR_SIZE
;
1303 offset
+= object_len
- COPS_OBJECT_HDR_SIZE
;
1307 static void dissect_cops_object_data(tvbuff_t
*tvb
, packet_info
*pinfo
, guint32 offset
, proto_tree
*tree
,
1308 guint8 op_code
, guint16 client_type
, guint8 c_num
, guint8 c_type
, int len
, guint32
* handle_value
)
1311 proto_tree
*r_type_tree
, *itf_tree
, *reason_tree
, *dec_tree
, *error_tree
, *clientsi_tree
, *pdp_tree
;
1312 guint16 r_type
, m_type
, reason
, reason_sub
, cmd_code
, cmd_flags
, error
, error_sub
,
1313 tcp_port
, katimer
, accttimer
;
1314 guint32 ipv4addr
, ifindex
;
1315 struct e_in6_addr ipv6addr
;
1316 oid_info_t
* oid_info
= NULL
;
1317 guint32
* pprid_subids
= NULL
;
1318 guint pprid_subids_len
= 0;
1321 case COPS_OBJ_HANDLE
: /* handle is a variable-length field, however 32bit seems enough for most of the applications */
1323 offset
+= (len
-4); /* for handle longer than 32bit, only take lowest 32 bits as handle */
1324 *handle_value
= tvb_get_ntohl(tvb
, offset
);
1325 proto_tree_add_item(tree
, hf_cops_handle
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
1328 case COPS_OBJ_CONTEXT
:
1329 r_type
= tvb_get_ntohs(tvb
, offset
);
1330 m_type
= tvb_get_ntohs(tvb
, offset
+ 2);
1331 ti
= proto_tree_add_text(tree
, tvb
, offset
, 4, "Contents: R-Type: %s, M-Type: %u",
1332 val_to_str_const(r_type
, cops_r_type_vals
, "Unknown"),
1335 r_type_tree
= proto_item_add_subtree(ti
, ett_cops_r_type_flags
);
1336 proto_tree_add_uint(r_type_tree
, hf_cops_r_type_flags
, tvb
, offset
, 2, r_type
);
1338 proto_tree_add_uint(r_type_tree
, hf_cops_m_type_flags
, tvb
, offset
, 2, m_type
);
1341 case COPS_OBJ_IN_INT
:
1342 case COPS_OBJ_OUT_INT
:
1343 if (c_type
== 1) { /* IPv4 */
1344 ipv4addr
= tvb_get_ipv4(tvb
, offset
);
1345 ifindex
= tvb_get_ntohl(tvb
, offset
+ 4);
1346 ti
= proto_tree_add_text(tree
, tvb
, offset
, 8, "Contents: IPv4 address %s, ifIndex: %u",
1347 ip_to_str((guint8
*)&ipv4addr
), ifindex
);
1348 itf_tree
= proto_item_add_subtree(ti
, ett_cops_itf
);
1349 proto_tree_add_ipv4(itf_tree
,
1350 (c_num
== COPS_OBJ_IN_INT
) ? hf_cops_in_int_ipv4
: hf_cops_out_int_ipv4
,
1351 tvb
, offset
, 4, ipv4addr
);
1353 } else if (c_type
== 2) { /* IPv6 */
1354 tvb_get_ipv6(tvb
, offset
, &ipv6addr
);
1355 ifindex
= tvb_get_ntohl(tvb
, offset
+ (int)sizeof ipv6addr
);
1356 ti
= proto_tree_add_text(tree
, tvb
, offset
, 20, "Contents: IPv6 address %s, ifIndex: %u",
1357 ip6_to_str(&ipv6addr
), ifindex
);
1358 itf_tree
= proto_item_add_subtree(ti
, ett_cops_itf
);
1359 proto_tree_add_ipv6(itf_tree
,
1360 (c_num
== COPS_OBJ_IN_INT
) ? hf_cops_in_int_ipv6
: hf_cops_out_int_ipv6
,
1361 tvb
, offset
, 16, (guint8
*)&ipv6addr
);
1366 proto_tree_add_uint(itf_tree
, hf_cops_int_ifindex
, tvb
, offset
, 4, ifindex
);
1369 case COPS_OBJ_REASON
:
1370 reason
= tvb_get_ntohs(tvb
, offset
);
1371 reason_sub
= tvb_get_ntohs(tvb
, offset
+ 2);
1372 ti
= proto_tree_add_text(tree
, tvb
, offset
, 4, "Contents: Reason-Code: %s, Reason Sub-code: 0x%04x",
1373 val_to_str_const(reason
, cops_reason_vals
, "<Unknown value>"), reason_sub
);
1374 reason_tree
= proto_item_add_subtree(ti
, ett_cops_reason
);
1375 proto_tree_add_uint(reason_tree
, hf_cops_reason
, tvb
, offset
, 2, reason
);
1377 if (reason
== 13) { /* RFC 2748 2.2.5 */
1378 proto_tree_add_text(reason_tree
, tvb
, offset
, 2, "Reason Sub-code: "
1379 "Unknown object's C-Num %u, C-Type %u",
1380 tvb_get_guint8(tvb
, offset
), tvb_get_guint8(tvb
, offset
+ 1));
1382 proto_tree_add_uint(reason_tree
, hf_cops_reason_sub
, tvb
, offset
, 2, reason_sub
);
1385 case COPS_OBJ_DECISION
:
1386 case COPS_OBJ_LPDPDECISION
:
1388 cmd_code
= tvb_get_ntohs(tvb
, offset
);
1389 cmd_flags
= tvb_get_ntohs(tvb
, offset
+ 2);
1390 ti
= proto_tree_add_text(tree
, tvb
, offset
, 4, "Contents: Command-Code: %s, Flags: %s",
1391 val_to_str_const(cmd_code
, cops_dec_cmd_code_vals
, "<Unknown value>"),
1392 val_to_str_const(cmd_flags
, cops_dec_cmd_flag_vals
, "<Unknown flag>"));
1393 dec_tree
= proto_item_add_subtree(ti
, ett_cops_decision
);
1394 proto_tree_add_uint(dec_tree
, hf_cops_dec_cmd_code
, tvb
, offset
, 2, cmd_code
);
1396 proto_tree_add_uint(dec_tree
, hf_cops_dec_flags
, tvb
, offset
, 2, cmd_flags
);
1397 } else if (c_type
== 5) { /*COPS-PR Data*/
1398 ti
= proto_tree_add_text(tree
, tvb
, offset
, len
, "Contents: %d bytes", len
);
1399 dec_tree
= proto_item_add_subtree(ti
, ett_cops_decision
);
1400 dissect_cops_pr_objects(tvb
, pinfo
, offset
, dec_tree
, len
, &oid_info
, &pprid_subids
, &pprid_subids_len
);
1403 /* PacketCable : Analyze the remaining data if available */
1404 if (client_type
== COPS_CLIENT_PC_DQOS
&& c_type
== 4) {
1405 cops_analyze_packetcable_dqos_obj(tvb
, pinfo
, tree
, op_code
, offset
);
1406 } else if (client_type
== COPS_CLIENT_PC_MM
&& c_type
== 4) {
1407 cops_analyze_packetcable_mm_obj(tvb
, pinfo
, tree
, op_code
, offset
);
1411 case COPS_OBJ_ERROR
:
1415 error
= tvb_get_ntohs(tvb
, offset
);
1416 error_sub
= tvb_get_ntohs(tvb
, offset
+ 2);
1417 ti
= proto_tree_add_text(tree
, tvb
, offset
, 4, "Contents: Error-Code: %s, Error Sub-code: 0x%04x",
1418 val_to_str_const(error
, cops_error_vals
, "<Unknown value>"), error_sub
);
1419 error_tree
= proto_item_add_subtree(ti
, ett_cops_error
);
1420 proto_tree_add_uint(error_tree
, hf_cops_error
, tvb
, offset
, 2, error
);
1422 if (error
== 13) { /* RFC 2748 2.2.8 */
1423 proto_tree_add_text(error_tree
, tvb
, offset
, 2, "Error Sub-code: "
1424 "Unknown object's C-Num %u, C-Type %u",
1425 tvb_get_guint8(tvb
, offset
), tvb_get_guint8(tvb
, offset
+ 1));
1427 proto_tree_add_uint(error_tree
, hf_cops_error_sub
, tvb
, offset
, 2, error_sub
);
1430 case COPS_OBJ_CLIENTSI
:
1432 /* For PacketCable */
1433 if (client_type
== COPS_CLIENT_PC_DQOS
&& c_type
== 1) {
1434 cops_analyze_packetcable_dqos_obj(tvb
, pinfo
, tree
, op_code
, offset
);
1436 } else if (client_type
== COPS_CLIENT_PC_MM
&& c_type
== 1) {
1437 cops_analyze_packetcable_mm_obj(tvb
, pinfo
, tree
, op_code
, offset
);
1441 if (c_type
!= 2) /*Not COPS-PR data*/
1444 ti
= proto_tree_add_text(tree
, tvb
, offset
, 4, "Contents: %d bytes", len
);
1445 clientsi_tree
= proto_item_add_subtree(ti
, ett_cops_clientsi
);
1447 dissect_cops_pr_objects(tvb
, pinfo
, offset
, clientsi_tree
, len
, &oid_info
, &pprid_subids
, &pprid_subids_len
);
1450 case COPS_OBJ_KATIMER
:
1454 katimer
= tvb_get_ntohs(tvb
, offset
+ 2);
1456 proto_tree_add_uint_format_value(tree
, hf_cops_katimer
, tvb
, offset
+ 2, 2, katimer
, "0 (infinity)");
1458 proto_tree_add_item(tree
, hf_cops_katimer
, tvb
, offset
+ 2, 2, ENC_BIG_ENDIAN
);
1461 case COPS_OBJ_PEPID
:
1465 if (tvb_strnlen(tvb
, offset
, len
) == -1) {
1466 ti
= proto_tree_add_item(tree
, hf_cops_pepid
, tvb
, offset
, len
, ENC_ASCII
|ENC_NA
);
1467 expert_add_info(pinfo
, ti
, &ei_cops_pepid_not_null
);
1470 proto_tree_add_item(tree
, hf_cops_pepid
, tvb
, offset
,
1471 tvb_strnlen(tvb
, offset
, len
) + 1, ENC_ASCII
|ENC_NA
);
1474 case COPS_OBJ_REPORT_TYPE
:
1478 proto_tree_add_item(tree
, hf_cops_report_type
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
1481 case COPS_OBJ_PDPREDIRADDR
:
1482 case COPS_OBJ_LASTPDPADDR
:
1483 if (c_type
== 1) { /* IPv4 */
1484 ipv4addr
= tvb_get_ipv4(tvb
, offset
);
1485 tcp_port
= tvb_get_ntohs(tvb
, offset
+ 4 + 2);
1486 ti
= proto_tree_add_text(tree
, tvb
, offset
, 8, "Contents: IPv4 address %s, TCP Port Number: %u",
1487 ip_to_str((guint8
*)&ipv4addr
), tcp_port
);
1488 pdp_tree
= proto_item_add_subtree(ti
, ett_cops_pdp
);
1489 proto_tree_add_ipv4(pdp_tree
,
1490 (c_num
== COPS_OBJ_PDPREDIRADDR
) ? hf_cops_pdprediraddr_ipv4
: hf_cops_lastpdpaddr_ipv4
,
1491 tvb
, offset
, 4, ipv4addr
);
1493 } else if (c_type
== 2) { /* IPv6 */
1494 tvb_get_ipv6(tvb
, offset
, &ipv6addr
);
1495 tcp_port
= tvb_get_ntohs(tvb
, offset
+ (int)sizeof ipv6addr
+ 2);
1496 ti
= proto_tree_add_text(tree
, tvb
, offset
, 20, "Contents: IPv6 address %s, TCP Port Number: %u",
1497 ip6_to_str(&ipv6addr
), tcp_port
);
1498 pdp_tree
= proto_item_add_subtree(ti
, ett_cops_pdp
);
1499 proto_tree_add_ipv6(pdp_tree
,
1500 (c_num
== COPS_OBJ_PDPREDIRADDR
) ? hf_cops_pdprediraddr_ipv6
: hf_cops_lastpdpaddr_ipv6
,
1501 tvb
, offset
, 16, (guint8
*)&ipv6addr
);
1507 proto_tree_add_uint(pdp_tree
, hf_cops_pdp_tcp_port
, tvb
, offset
, 2, tcp_port
);
1510 case COPS_OBJ_ACCTTIMER
:
1514 accttimer
= tvb_get_ntohs(tvb
, offset
+ 2);
1515 if (accttimer
== 0) {
1516 proto_tree_add_uint_format_value(tree
, hf_cops_accttimer
, tvb
, offset
+ 2, 2, accttimer
,
1517 "0 (there SHOULD be no unsolicited accounting updates)");
1519 proto_tree_add_item(tree
, hf_cops_accttimer
, tvb
, offset
+ 2, 2, ENC_BIG_ENDIAN
);
1522 case COPS_OBJ_INTEGRITY
:
1524 break; /* Not HMAC digest */
1526 proto_tree_add_item(tree
, hf_cops_key_id
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
1527 proto_tree_add_item(tree
, hf_cops_seq_num
, tvb
, offset
+ 4, 4, ENC_BIG_ENDIAN
);
1528 proto_tree_add_text(tree
, tvb
, offset
+ 8 , len
- 8, "Contents: Keyed Message Digest");
1532 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
);
1537 static guint
redecode_oid(guint32
* pprid_subids
, guint pprid_subids_len
, guint8
* encoded_subids
, guint encoded_len
, guint32
** subids_p
) {
1542 guint32
* subid_overflow
;
1544 for (i
=0; i
<encoded_len
; i
++) { if (! (encoded_subids
[i
] & 0x80 )) n
++; }
1546 *subids_p
= subids
= (guint32
*)wmem_alloc(wmem_packet_scope(), sizeof(guint32
)*(n
+pprid_subids_len
));
1547 subid_overflow
= subids
+n
+pprid_subids_len
;
1548 for (i
=0;i
<pprid_subids_len
;i
++) subids
[i
] = pprid_subids
[i
];
1550 subids
+= pprid_subids_len
;
1553 for (i
=0; i
<encoded_len
; i
++){
1554 guint8 byte
= encoded_subids
[i
];
1557 subid
|= byte
& 0x7F;
1563 DISSECTOR_ASSERT(subids
< subid_overflow
);
1568 return pprid_subids_len
+n
;
1572 static int dissect_cops_pr_object_data(tvbuff_t
*tvb
, packet_info
*pinfo
, guint32 offset
, proto_tree
*tree
,
1573 guint8 s_num
, guint8 s_type
, int len
,
1574 oid_info_t
** oid_info_p
, guint32
** pprid_subids
, guint
* pprid_subids_len
) {
1576 proto_tree
*asn_tree
, *gperror_tree
, *cperror_tree
;
1577 guint16 gperror
=0, gperror_sub
=0, cperror
=0, cperror_sub
=0;
1580 memset(&actx
,0,sizeof(actx
));
1584 case COPS_OBJ_PPRID
: {
1585 tvbuff_t
* oid_tvb
= NULL
;
1587 if (s_type
!= 1) /* Not Prefix Provisioning Instance Identifier (PPRID) */
1589 /* Never tested this branch */
1590 ti
= proto_tree_add_text(tree
, tvb
, offset
, len
, "Contents:");
1591 asn_tree
= proto_item_add_subtree(ti
, ett_cops_asn1
);
1593 dissect_ber_object_identifier(FALSE
, &actx
, asn_tree
, tvb
, offset
, hf_cops_pprid_oid
, &oid_tvb
);
1599 encoid_len
= tvb_length_remaining(oid_tvb
,0);
1600 if (encoid_len
> 0) {
1601 encoid
= (guint8
*)tvb_memdup(wmem_packet_scope(),oid_tvb
,0,encoid_len
);
1602 (*pprid_subids_len
) = oid_encoded2subid(encoid
, encoid_len
, pprid_subids
);
1607 case COPS_OBJ_PRID
: {
1617 oid_info_t
* oid_info
;
1619 if (s_type
!= 1) break; /* Not Provisioning Instance Identifier (PRID) */
1621 ti
=proto_tree_add_text(tree
, tvb
, offset
, len
, "Contents:");
1622 asn_tree
= proto_item_add_subtree(ti
, ett_cops_asn1
);
1624 offset
= get_ber_identifier(tvb
, offset
, &ber_class
, &ber_pc
, &ber_tag
);
1625 offset
= get_ber_length(tvb
, offset
, &encoid_len
, NULL
);
1627 /* TODO: check pc, class and tag */
1629 encoid
= (guint8
*)tvb_memdup(wmem_packet_scope(),tvb
,offset
,encoid_len
);
1631 if (*pprid_subids
) {
1632 /* Never tested this branch */
1633 subids_len
= redecode_oid(*pprid_subids
, *pprid_subids_len
, encoid
, encoid_len
, &subids
);
1634 encoid_len
= oid_subid2encoded(subids_len
, subids
, &encoid
);
1636 subids_len
= oid_encoded2subid(encoid
, encoid_len
, &subids
);
1639 proto_tree_add_oid(asn_tree
,hf_cops_prid_oid
,tvb
,offset
,encoid_len
,encoid
);
1641 oid_info
= oid_get(subids_len
, subids
, &matched
, &left
);
1644 TODO: from RFC 3159 find-out how the values are mapped;
1645 when instead of an oid for an xxEntry
1646 we have one describing a scalar or something else;
1647 what's below works in most cases but is not complete.
1649 if (left
<= 1 && oid_info
->kind
== OID_KIND_ROW
) {
1650 *oid_info_p
= oid_info
;
1657 case COPS_OBJ_EPD
: {
1658 oid_info_t
* oid_info
;
1659 guint end_offset
= offset
+ len
;
1661 if (s_type
!= 1) break;/* Not Encoded Provisioning Instance Data (EPD) */
1663 ti
= proto_tree_add_text(tree
, tvb
, offset
, len
, "Contents:");
1664 asn_tree
= proto_item_add_subtree(ti
, ett_cops_asn1
);
1667 * XXX: LAZYNESS WARNING:
1668 * We are assuming that for the first element in the sequence
1669 * that describes an entry subid==1, and, that the subsequent elements
1670 * use ++subid; This is true for all IETF's PIBs (and good sense
1671 * indicates it should be this way) but AFAIK there's nothing in
1672 * SMIv2 that imposes this restriction. -- a lazy lego
1676 if ((*oid_info_p
)->kind
== OID_KIND_ROW
) {
1677 oid_info
= (oid_info_t
*)wmem_tree_lookup32((*oid_info_p
)->children
,1);
1686 while(offset
< end_offset
) {
1694 offset
= get_ber_identifier(tvb
, offset
, &ber_class
, &ber_pc
, &ber_tag
);
1695 offset
= get_ber_length(tvb
, offset
, &ber_length
, &ber_ind
);
1699 * XXX: LAZYNESS WARNING:
1700 * We are assuming that the value of the sequenced item is of
1701 * the right class, the right type and the right length.
1702 * We should check that to avoid throwing a Malformed packet and
1704 * We should verify the class and the tag match what we expect as well,
1705 * but COPS and SNMP use different tags (&#@$!) so the typedata in oid_info_t
1706 * does not work here.
1709 hfid
= oid_info
->value_hfid
;
1710 oid_info
= (oid_info_t
*)wmem_tree_lookup32((*oid_info_p
)->children
,oid_info
->subid
+1);
1712 hfid
= cops_tag_cls2syntax( ber_tag
, ber_class
);
1713 switch (proto_registrar_get_ftype(hfid
)) {
1729 proto_tree_add_item(asn_tree
,hfid
,tvb
,offset
,ber_length
,ENC_BIG_ENDIAN
);
1733 proto_tree_add_item(asn_tree
,hfid
,tvb
,offset
,ber_length
,ENC_ASCII
|ENC_NA
);
1737 proto_tree_add_item(asn_tree
,hfid
,tvb
,offset
,ber_length
,ENC_NA
);
1741 offset
+= ber_length
;
1744 (*oid_info_p
) = NULL
;
1747 case COPS_OBJ_ERRPRID
: {
1748 if (s_type
!= 1) break; /*Not Error Provisioning Instance Identifier (ErrorPRID)*/
1750 ti
= proto_tree_add_text(tree
, tvb
, offset
, len
, "Contents:");
1751 asn_tree
= proto_item_add_subtree(ti
, ett_cops_asn1
);
1753 dissect_ber_object_identifier(FALSE
, &actx
, asn_tree
, tvb
, offset
, hf_cops_errprid_oid
, NULL
);
1757 case COPS_OBJ_GPERR
:
1758 if (s_type
!= 1) /* Not Global Provisioning Error Object (GPERR) */
1761 gperror
= tvb_get_ntohs(tvb
, offset
);
1762 gperror_sub
= tvb_get_ntohs(tvb
, offset
+ 2);
1763 ti
= proto_tree_add_text(tree
, tvb
, offset
, 4, "Contents: Error-Code: %s, Error Sub-code: 0x%04x",
1764 val_to_str_const(gperror
, cops_gperror_vals
, "<Unknown value>"), gperror_sub
);
1765 gperror_tree
= proto_item_add_subtree(ti
, ett_cops_gperror
);
1766 proto_tree_add_uint(gperror_tree
, hf_cops_gperror
, tvb
, offset
, 2, gperror
);
1768 if (gperror
== 13) { /* RFC 3084 4.4 */
1769 proto_tree_add_text(gperror_tree
, tvb
, offset
, 2, "Error Sub-code: "
1770 "Unknown object's C-Num %u, C-Type %u",
1771 tvb_get_guint8(tvb
, offset
), tvb_get_guint8(tvb
, offset
+ 1));
1773 proto_tree_add_uint(gperror_tree
, hf_cops_gperror_sub
, tvb
, offset
, 2, gperror_sub
);
1776 case COPS_OBJ_CPERR
:
1777 if (s_type
!= 1) /*Not PRC Class Provisioning Error Object (CPERR) */
1780 cperror
= tvb_get_ntohs(tvb
, offset
);
1781 cperror_sub
= tvb_get_ntohs(tvb
, offset
+ 2);
1782 ti
= proto_tree_add_text(tree
, tvb
, offset
, 4, "Contents: Error-Code: %s, Error Sub-code: 0x%04x",
1783 val_to_str_const(cperror
, cops_cperror_vals
, "<Unknown value>"), cperror_sub
);
1784 cperror_tree
= proto_item_add_subtree(ti
, ett_cops_cperror
);
1785 proto_tree_add_uint(cperror_tree
, hf_cops_cperror
, tvb
, offset
, 2, cperror
);
1787 if (cperror
== 13) { /* RFC 3084 4.5 */
1788 proto_tree_add_text(cperror_tree
, tvb
, offset
, 2, "Error Sub-code: "
1789 "Unknown object's S-Num %u, C-Type %u",
1790 tvb_get_guint8(tvb
, offset
), tvb_get_guint8(tvb
, offset
+ 1));
1792 proto_tree_add_uint(cperror_tree
, hf_cops_cperror_sub
, tvb
, offset
, 2, cperror_sub
);
1796 proto_tree_add_text(tree
, tvb
, offset
, len
, "Contents: %d bytes", len
);
1804 /* Register the protocol with Wireshark */
1805 void proto_register_cops(void)
1807 /* Setup list of header fields */
1808 static hf_register_info hf
[] = {
1809 { &hf_cops_ver_flags
,
1810 { "Version and Flags", "cops.ver_flags",
1811 FT_UINT8
, BASE_HEX
, NULL
, 0x0,
1812 "Version and Flags in COPS Common Header", HFILL
}
1815 { "Version", "cops.version",
1816 FT_UINT8
, BASE_DEC
, NULL
, 0xF0,
1817 "Version in COPS Common Header", HFILL
}
1820 { "Flags", "cops.flags",
1821 FT_UINT8
, BASE_HEX
, VALS(cops_flags_vals
), 0x0F,
1822 "Flags in COPS Common Header", HFILL
}
1824 { &hf_cops_response_in
,
1825 { "Response In", "cops.response_in",
1826 FT_FRAMENUM
, BASE_NONE
, NULL
, 0x0,
1827 "The response to this COPS request is in this frame", HFILL
}
1829 { &hf_cops_response_to
,
1830 { "Request In", "cops.response_to",
1831 FT_FRAMENUM
, BASE_NONE
, NULL
, 0x0,
1832 "This is a response to the COPS request in this frame", HFILL
}
1834 { &hf_cops_response_time
,
1835 { "Response Time", "cops.response_time",
1836 FT_RELATIVE_TIME
, BASE_NONE
, NULL
, 0x0,
1837 "The time between the Call and the Reply", HFILL
}
1840 { "Op Code", "cops.op_code",
1841 FT_UINT8
, BASE_DEC
, VALS(cops_op_code_vals
), 0x0,
1842 "Op Code in COPS Common Header", HFILL
}
1844 { &hf_cops_client_type
,
1845 { "Client Type", "cops.client_type",
1846 FT_UINT16
, BASE_DEC
, VALS(cops_client_type_vals
), 0x0,
1847 "Client Type in COPS Common Header", HFILL
}
1850 { "Message Length", "cops.msg_len",
1851 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1852 "Message Length in COPS Common Header", HFILL
}
1855 { "Object Length", "cops.obj.len",
1856 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1857 "Object Length in COPS Object Header", HFILL
}
1859 { &hf_cops_obj_c_num
,
1860 { "C-Num", "cops.c_num",
1861 FT_UINT8
, BASE_DEC
, VALS(cops_c_num_vals
), 0x0,
1862 "C-Num in COPS Object Header", HFILL
}
1864 { &hf_cops_obj_c_type
,
1865 { "C-Type", "cops.c_type",
1866 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
1867 "C-Type in COPS Object Header", HFILL
}
1870 { &hf_cops_obj_s_num
,
1871 { "S-Num", "cops.s_num",
1872 FT_UINT8
, BASE_DEC
, VALS(cops_s_num_vals
), 0x0,
1873 "S-Num in COPS-PR Object Header", HFILL
}
1875 { &hf_cops_obj_s_type
,
1876 { "S-Type", "cops.s_type",
1877 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
1878 "S-Type in COPS-PR Object Header", HFILL
}
1881 { "Handle", "cops.handle",
1882 FT_UINT32
, BASE_HEX
, NULL
, 0x0,
1883 "Handle in COPS Handle Object", HFILL
}
1885 { &hf_cops_r_type_flags
,
1886 { "R-Type", "cops.context.r_type",
1887 FT_UINT16
, BASE_HEX
, VALS(cops_r_type_vals
), 0xFFFF,
1888 "R-Type in COPS Context Object", HFILL
}
1890 { &hf_cops_m_type_flags
,
1891 { "M-Type", "cops.context.m_type",
1892 FT_UINT16
, BASE_HEX
, NULL
, 0xFFFF,
1893 "M-Type in COPS Context Object", HFILL
}
1895 { &hf_cops_in_int_ipv4
,
1896 { "IPv4 address", "cops.in-int.ipv4",
1897 FT_IPv4
, BASE_NONE
, NULL
, 0,
1898 "IPv4 address in COPS IN-Int object", HFILL
}
1900 { &hf_cops_in_int_ipv6
,
1901 { "IPv6 address", "cops.in-int.ipv6",
1902 FT_IPv6
, BASE_NONE
, NULL
, 0,
1903 "IPv6 address in COPS IN-Int object", HFILL
}
1905 { &hf_cops_out_int_ipv4
,
1906 { "IPv4 address", "cops.out-int.ipv4",
1907 FT_IPv4
, BASE_NONE
, NULL
, 0,
1908 "IPv4 address in COPS OUT-Int object", HFILL
}
1910 { &hf_cops_out_int_ipv6
,
1911 { "IPv6 address", "cops.out-int.ipv6",
1912 FT_IPv6
, BASE_NONE
, NULL
, 0,
1913 "IPv6 address in COPS OUT-Int", HFILL
}
1915 { &hf_cops_int_ifindex
,
1916 { "ifIndex", "cops.in-out-int.ifindex",
1917 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1918 "If SNMP is supported, corresponds to MIB-II ifIndex", HFILL
}
1921 { "Reason", "cops.reason",
1922 FT_UINT16
, BASE_DEC
, VALS(cops_reason_vals
), 0,
1923 "Reason in Reason object", HFILL
}
1925 { &hf_cops_reason_sub
,
1926 { "Reason Sub-code", "cops.reason_sub",
1927 FT_UINT16
, BASE_HEX
, NULL
, 0,
1928 "Reason Sub-code in Reason object", HFILL
}
1930 { &hf_cops_dec_cmd_code
,
1931 { "Command-Code", "cops.decision.cmd",
1932 FT_UINT16
, BASE_DEC
, VALS(cops_dec_cmd_code_vals
), 0,
1933 "Command-Code in Decision/LPDP Decision object", HFILL
}
1935 { &hf_cops_dec_flags
,
1936 { "Flags", "cops.decision.flags",
1937 FT_UINT16
, BASE_HEX
, VALS(cops_dec_cmd_flag_vals
), 0xffff,
1938 "Flags in Decision/LPDP Decision object", HFILL
}
1941 { "Error", "cops.error",
1942 FT_UINT16
, BASE_DEC
, VALS(cops_error_vals
), 0,
1943 "Error in Error object", HFILL
}
1945 { &hf_cops_error_sub
,
1946 { "Error Sub-code", "cops.error_sub",
1947 FT_UINT16
, BASE_HEX
, NULL
, 0,
1948 "Error Sub-code in Error object", HFILL
}
1951 { "Contents: KA Timer Value", "cops.katimer.value",
1952 FT_UINT16
, BASE_DEC
, NULL
, 0,
1953 "Keep-Alive Timer Value in KATimer object", HFILL
}
1956 { "Contents: PEP Id", "cops.pepid.id",
1957 FT_STRING
, BASE_NONE
, NULL
, 0,
1958 "PEP Id in PEPID object", HFILL
}
1960 { &hf_cops_report_type
,
1961 { "Contents: Report-Type", "cops.report_type",
1962 FT_UINT16
, BASE_DEC
, VALS(cops_report_type_vals
), 0,
1963 "Report-Type in Report-Type object", HFILL
}
1965 { &hf_cops_pdprediraddr_ipv4
,
1966 { "IPv4 address", "cops.pdprediraddr.ipv4",
1967 FT_IPv4
, BASE_NONE
, NULL
, 0,
1968 "IPv4 address in COPS PDPRedirAddr object", HFILL
}
1970 { &hf_cops_pdprediraddr_ipv6
,
1971 { "IPv6 address", "cops.pdprediraddr.ipv6",
1972 FT_IPv6
, BASE_NONE
, NULL
, 0,
1973 "IPv6 address in COPS PDPRedirAddr object", HFILL
}
1975 { &hf_cops_lastpdpaddr_ipv4
,
1976 { "IPv4 address", "cops.lastpdpaddr.ipv4",
1977 FT_IPv4
, BASE_NONE
, NULL
, 0,
1978 "IPv4 address in COPS LastPDPAddr object", HFILL
}
1980 { &hf_cops_lastpdpaddr_ipv6
,
1981 { "IPv6 address", "cops.lastpdpaddr.ipv6",
1982 FT_IPv6
, BASE_NONE
, NULL
, 0,
1983 "IPv6 address in COPS LastPDPAddr object", HFILL
}
1985 { &hf_cops_pdp_tcp_port
,
1986 { "TCP Port Number", "cops.pdp.tcp_port",
1987 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1988 "TCP Port Number of PDP in PDPRedirAddr/LastPDPAddr object", HFILL
}
1990 { &hf_cops_accttimer
,
1991 { "Contents: ACCT Timer Value", "cops.accttimer.value",
1992 FT_UINT16
, BASE_DEC
, NULL
, 0,
1993 "Accounting Timer Value in AcctTimer object", HFILL
}
1996 { "Contents: Key ID", "cops.integrity.key_id",
1997 FT_UINT32
, BASE_DEC
, NULL
, 0,
1998 "Key ID in Integrity object", HFILL
}
2001 { "Contents: Sequence Number", "cops.integrity.seq_num",
2002 FT_UINT32
, BASE_DEC
, NULL
, 0,
2003 "Sequence Number in Integrity object", HFILL
}
2006 { "Error", "cops.gperror",
2007 FT_UINT16
, BASE_DEC
, VALS(cops_gperror_vals
), 0,
2008 "Error in Error object", HFILL
}
2010 { &hf_cops_gperror_sub
,
2011 { "Error Sub-code", "cops.gperror_sub",
2012 FT_UINT16
, BASE_HEX
, NULL
, 0,
2013 "Error Sub-code in Error object", HFILL
}
2016 { "Error", "cops.cperror",
2017 FT_UINT16
, BASE_DEC
, VALS(cops_cperror_vals
), 0,
2018 "Error in Error object", HFILL
}
2020 { &hf_cops_cperror_sub
,
2021 { "Error Sub-code", "cops.cperror_sub",
2022 FT_UINT16
, BASE_HEX
, NULL
, 0,
2023 "Error Sub-code in Error object", HFILL
}
2026 { &hf_cops_reserved8
, { "Reserved", "cops.reserved", FT_UINT8
, BASE_HEX
, NULL
, 0, NULL
, HFILL
} },
2027 { &hf_cops_reserved16
, { "Reserved", "cops.reserved", FT_UINT16
, BASE_HEX
, NULL
, 0, NULL
, HFILL
} },
2028 { &hf_cops_reserved24
, { "Reserved", "cops.reserved", FT_UINT24
, BASE_HEX
, NULL
, 0, NULL
, HFILL
} },
2030 { &hf_cops_prid_oid
, { "PRID Instance Identifier", "cops.prid.instance_id", FT_OID
, BASE_NONE
, NULL
, 0, NULL
, HFILL
} },
2031 { &hf_cops_pprid_oid
, { "Prefix Identifier", "cops.pprid.prefix_id", FT_OID
, BASE_NONE
, NULL
, 0, NULL
, HFILL
} },
2032 { &hf_cops_errprid_oid
, { "ErrorPRID Instance Identifier", "cops.errprid.instance_id", FT_OID
, BASE_NONE
, NULL
, 0, NULL
, HFILL
} },
2033 { &hf_cops_epd_unknown
, { "EPD Unknown Data", "cops.epd.unknown", FT_BYTES
, BASE_NONE
, NULL
, 0, NULL
, HFILL
} },
2034 { &hf_cops_epd_null
, { "EPD Null Data", "cops.epd.null", FT_BYTES
, BASE_NONE
, NULL
, 0, NULL
, HFILL
} },
2035 { &hf_cops_epd_int
, { "EPD Integer Data", "cops.epd.int", FT_INT64
, BASE_DEC
, NULL
, 0, NULL
, HFILL
} },
2036 { &hf_cops_epd_octets
, { "EPD Octet String Data", "cops.epd.octets", FT_BYTES
, BASE_NONE
, NULL
, 0, NULL
, HFILL
} },
2037 { &hf_cops_epd_oid
, { "EPD OID Data", "cops.epd.oid", FT_OID
, BASE_NONE
, NULL
, 0, NULL
, HFILL
} },
2038 { &hf_cops_epd_ipv4
, { "EPD IPAddress Data", "cops.epd.ipv4", FT_IPv4
, BASE_NONE
, NULL
, 0, NULL
, HFILL
} },
2039 { &hf_cops_epd_u32
, { "EPD Unsigned32 Data", "cops.epd.unsigned32", FT_UINT64
, BASE_DEC
, NULL
, 0, NULL
, HFILL
} },
2040 { &hf_cops_epd_ticks
, { "EPD TimeTicks Data", "cops.epd.timeticks", FT_UINT64
, BASE_DEC
, NULL
, 0, NULL
, HFILL
} },
2041 { &hf_cops_epd_opaque
, { "EPD Opaque Data", "cops.epd.opaque", FT_BYTES
, BASE_NONE
, NULL
, 0, NULL
, HFILL
} },
2042 { &hf_cops_epd_i64
, { "EPD Inetger64 Data", "cops.epd.integer64", FT_INT64
, BASE_DEC
, NULL
, 0, NULL
, HFILL
} },
2043 { &hf_cops_epd_u64
, { "EPD Unsigned64 Data", "cops.epd.unsigned64", FT_UINT64
, BASE_DEC
, NULL
, 0, NULL
, HFILL
} },
2045 /* Added for PacketCable */
2048 { "Object Subtree", "cops.pc_subtree",
2049 FT_NONE
, BASE_NONE
, NULL
, 0,
2052 { &hf_cops_pc_ds_field
,
2053 { "DS Field (DSCP or TOS)", "cops.pc_ds_field",
2054 FT_UINT8
, BASE_HEX
, NULL
, 0x00,
2057 { &hf_cops_pc_direction
,
2058 { "Direction", "cops.pc_direction",
2059 FT_UINT8
, BASE_HEX
, NULL
, 0x00,
2062 { &hf_cops_pc_gate_spec_flags
,
2063 { "Flags", "cops.pc_gate_spec_flags",
2064 FT_UINT8
, BASE_HEX
, NULL
, 0x00,
2067 { &hf_cops_pc_protocol_id
,
2068 { "Protocol ID", "cops.pc_protocol_id",
2069 FT_UINT8
, BASE_HEX
, NULL
, 0x00,
2072 { &hf_cops_pc_session_class
,
2073 { "Session Class", "cops.pc_session_class",
2074 FT_UINT8
, BASE_HEX
, NULL
, 0x00,
2077 { &hf_cops_pc_algorithm
,
2078 { "Algorithm", "cops.pc_algorithm",
2079 FT_UINT16
, BASE_HEX
, NULL
, 0x00,
2082 { &hf_cops_pc_cmts_ip_port
,
2083 { "CMTS IP Port", "cops.pc_cmts_ip_port",
2084 FT_UINT16
, BASE_HEX
, NULL
, 0x00,
2087 { &hf_cops_pc_prks_ip_port
,
2088 { "PRKS IP Port", "cops.pc_prks_ip_port",
2089 FT_UINT16
, BASE_HEX
, NULL
, 0x00,
2092 { &hf_cops_pc_srks_ip_port
,
2093 { "SRKS IP Port", "cops.pc_srks_ip_port",
2094 FT_UINT16
, BASE_HEX
, NULL
, 0x00,
2097 { &hf_cops_pc_dest_port
,
2098 { "Destination IP Port", "cops.pc_dest_port",
2099 FT_UINT16
, BASE_HEX
, NULL
, 0x00,
2102 { &hf_cops_pc_packetcable_err_code
,
2103 { "Error Code", "cops.pc_packetcable_err_code",
2104 FT_UINT16
, BASE_HEX
, NULL
, 0x00,
2107 { &hf_cops_pc_packetcable_sub_code
,
2108 { "Error Sub Code", "cops.pc_packetcable_sub_code",
2109 FT_UINT16
, BASE_HEX
, NULL
, 0x00,
2112 { &hf_cops_pc_remote_flags
,
2113 { "Flags", "cops.pc_remote_flags",
2114 FT_UINT16
, BASE_HEX
, NULL
, 0x00,
2117 { &hf_cops_pc_close_subcode
,
2118 { "Reason Sub Code", "cops.pc_close_subcode",
2119 FT_UINT16
, BASE_HEX
, NULL
, 0x00,
2122 { &hf_cops_pc_gate_command_type
,
2123 { "Gate Command Type", "cops.pc_gate_command_type",
2124 FT_UINT16
, BASE_HEX
, NULL
, 0x00,
2127 { &hf_cops_pc_reason_code
,
2128 { "Reason Code", "cops.pc_reason_code",
2129 FT_UINT16
, BASE_HEX
, NULL
, 0x00,
2132 { &hf_cops_pc_delete_subcode
,
2133 { "Reason Sub Code", "cops.pc_delete_subcode",
2134 FT_UINT16
, BASE_HEX
, NULL
, 0x00,
2137 { &hf_cops_pc_src_port
,
2138 { "Source IP Port", "cops.pc_src_port",
2139 FT_UINT16
, BASE_HEX
, NULL
, 0x00,
2142 { &hf_cops_pc_t1_value
,
2143 { "Timer T1 Value (sec)", "cops.pc_t1_value",
2144 FT_UINT16
, BASE_HEX
, NULL
, 0x00,
2147 { &hf_cops_pc_t7_value
,
2148 { "Timer T7 Value (sec)", "cops.pc_t7_value",
2149 FT_UINT16
, BASE_HEX
, NULL
, 0x00,
2152 { &hf_cops_pc_t8_value
,
2153 { "Timer T8 Value (sec)", "cops.pc_t8_value",
2154 FT_UINT16
, BASE_HEX
, NULL
, 0x00,
2157 { &hf_cops_pc_transaction_id
,
2158 { "Transaction Identifier", "cops.pc_transaction_id",
2159 FT_UINT16
, BASE_HEX
, NULL
, 0x00,
2162 { &hf_cops_pc_cmts_ip
,
2163 { "CMTS IP Address", "cops.pc_cmts_ip",
2164 FT_IPv4
, BASE_NONE
, NULL
, 0x00,
2167 { &hf_cops_pc_prks_ip
,
2168 { "PRKS IP Address", "cops.pc_prks_ip",
2169 FT_IPv4
, BASE_NONE
, NULL
, 0x00,
2172 { &hf_cops_pc_srks_ip
,
2173 { "SRKS IP Address", "cops.pc_srks_ip",
2174 FT_IPv4
, BASE_NONE
, NULL
, 0x00,
2177 { &hf_cops_pc_dfcdc_ip
,
2178 { "DF IP Address CDC", "cops.pc_dfcdc_ip",
2179 FT_IPv4
, BASE_NONE
, NULL
, 0x00,
2182 { &hf_cops_pc_dfccc_ip
,
2183 { "DF IP Address CCC", "cops.pc_dfccc_ip",
2184 FT_IPv4
, BASE_NONE
, NULL
, 0x00,
2187 { &hf_cops_pc_dfcdc_ip_port
,
2188 { "DF IP Port CDC", "cops.pc_dfcdc_ip_port",
2189 FT_UINT16
, BASE_HEX
, NULL
, 0x00,
2192 { &hf_cops_pc_dfccc_ip_port
,
2193 { "DF IP Port CCC", "cops.pc_dfccc_ip_port",
2194 FT_UINT16
, BASE_HEX
, NULL
, 0x00,
2197 { &hf_cops_pc_dfccc_id
,
2198 { "CCC ID", "cops.pc_dfccc_id",
2199 FT_UINT32
, BASE_DEC
, NULL
, 0x00,
2202 { &hf_cops_pc_activity_count
,
2203 { "Count", "cops.pc_activity_count",
2204 FT_UINT32
, BASE_HEX
, NULL
, 0x00,
2207 { &hf_cops_pc_dest_ip
,
2208 { "Destination IP Address", "cops.pc_dest_ip",
2209 FT_IPv4
, BASE_NONE
, NULL
, 0x00,
2212 { &hf_cops_pc_gate_id
,
2213 { "Gate Identifier", "cops.pc_gate_id",
2214 FT_UINT32
, BASE_HEX
, NULL
, 0x00,
2217 { &hf_cops_pc_max_packet_size
,
2218 { "Maximum Packet Size", "cops.pc_max_packet_size",
2219 FT_UINT32
, BASE_HEX
, NULL
, 0x00,
2222 { &hf_cops_pc_min_policed_unit
,
2223 { "Minimum Policed Unit", "cops.pc_min_policed_unit",
2224 FT_UINT32
, BASE_HEX
, NULL
, 0x00,
2227 { &hf_cops_pc_peak_data_rate
,
2228 { "Peak Data Rate", "cops.pc_peak_data_rate",
2229 FT_FLOAT
, BASE_NONE
, NULL
, 0x00,
2232 { &hf_cops_pc_spec_rate
,
2233 { "Rate", "cops.pc_spec_rate",
2234 FT_FLOAT
, BASE_NONE
, NULL
, 0x00,
2237 { &hf_cops_pc_remote_gate_id
,
2238 { "Remote Gate ID", "cops.pc_remote_gate_id",
2239 FT_UINT32
, BASE_HEX
, NULL
, 0x00,
2242 { &hf_cops_pc_reserved
,
2243 { "Reserved", "cops.pc_reserved",
2244 FT_UINT32
, BASE_HEX
, NULL
, 0x00,
2248 { "Security Key", "cops.pc_key",
2249 FT_UINT32
, BASE_HEX
, NULL
, 0x00,
2252 { &hf_cops_pc_slack_term
,
2253 { "Slack Term", "cops.pc_slack_term",
2254 FT_UINT32
, BASE_HEX
, NULL
, 0x00,
2257 { &hf_cops_pc_src_ip
,
2258 { "Source IP Address", "cops.pc_src_ip",
2259 FT_IPv4
, BASE_NONE
, NULL
, 0x00,
2262 { &hf_cops_pc_subscriber_id_ipv4
,
2263 { "Subscriber Identifier (IPv4)", "cops.pc_subscriber_id4",
2264 FT_IPv4
, BASE_NONE
, NULL
, 0x00,
2267 { &hf_cops_pc_subscriber_id_ipv6
,
2268 { "Subscriber Identifier (IPv6)", "cops.pc_subscriber_id6",
2269 FT_IPv6
, BASE_NONE
, NULL
, 0x00,
2272 { &hf_cops_pc_token_bucket_rate
,
2273 { "Token Bucket Rate", "cops.pc_token_bucket_rate",
2274 FT_FLOAT
, BASE_NONE
, NULL
, 0x00,
2277 { &hf_cops_pc_token_bucket_size
,
2278 { "Token Bucket Size", "cops.pc_token_bucket_size",
2279 FT_FLOAT
, BASE_NONE
, NULL
, 0x00,
2284 { "Billing Correlation ID", "cops.pc_bcid",
2285 FT_UINT32
, BASE_HEX
, NULL
, 0x00,
2289 { &hf_cops_pc_bcid_ts
,
2290 { "BDID Timestamp", "cops.pc_bcid_ts",
2291 FT_UINT32
, BASE_HEX
, NULL
, 0x00,
2292 "BCID Timestamp", HFILL
}
2294 { &hf_cops_pc_bcid_ev
,
2295 { "BDID Event Counter", "cops.pc_bcid_ev",
2296 FT_UINT32
, BASE_HEX
, NULL
, 0x00,
2297 "BCID Event Counter", HFILL
}
2300 { &hf_cops_pcmm_amid_app_type
,
2301 { "AMID Application Type", "cops.pc_mm_amid_application_type",
2302 FT_UINT32
, BASE_DEC
, NULL
, 0,
2303 "PacketCable Multimedia AMID Application Type", HFILL
}
2305 { &hf_cops_pcmm_amid_am_tag
,
2306 { "AMID Application Manager Tag", "cops.pc_mm_amid_am_tag",
2307 FT_UINT32
, BASE_DEC
, NULL
, 0,
2308 "PacketCable Multimedia AMID Application Manager Tag", HFILL
}
2311 { &hf_cops_pcmm_gate_spec_flags
,
2312 { "Flags", "cops.pc_mm_gs_flags",
2313 FT_UINT8
, BASE_HEX
, NULL
, 0,
2314 "PacketCable Multimedia GateSpec Flags", HFILL
}
2317 { &hf_cops_pcmm_gate_spec_flags_gate
,
2318 { "Gate", "cops.pc_mm_gs_flags.gate",
2319 FT_BOOLEAN
, 8, TFS(&tfs_upstream_downstream
), 0x1,
2323 { &hf_cops_pcmm_gate_spec_flags_dscp_overwrite
,
2324 { "DSCP/TOS overwrite", "cops.pc_mm_gs_flags.dscp_overwrite",
2325 FT_BOOLEAN
, 8, TFS(&tfs_enabled_disabled
), 0x2,
2329 { &hf_cops_pcmm_gate_spec_dscp_tos_field
,
2330 { "DSCP/TOS Field", "cops.pc_mm_gs_dscp",
2331 FT_UINT8
, BASE_HEX
, NULL
, 0,
2332 "PacketCable Multimedia GateSpec DSCP/TOS Field", HFILL
}
2334 { &hf_cops_pcmm_gate_spec_dscp_tos_mask
,
2335 { "DSCP/TOS Mask", "cops.pc_mm_gs_dscp_mask",
2336 FT_UINT8
, BASE_HEX
, NULL
, 0,
2337 "PacketCable Multimedia GateSpec DSCP/TOS Mask", HFILL
}
2339 { &hf_cops_pcmm_gate_spec_session_class_id
,
2340 { "SessionClassID", "cops.pc_mm_gs_scid",
2341 FT_UINT8
, BASE_DEC
, NULL
, 0,
2342 "PacketCable Multimedia GateSpec SessionClassID", HFILL
}
2344 { &hf_cops_pcmm_gate_spec_session_class_id_priority
,
2345 { "SessionClassID Priority", "cops.pc_mm_gs_scid_prio",
2346 FT_UINT8
, BASE_DEC
, NULL
, 0x07,
2347 "PacketCable Multimedia GateSpec SessionClassID Priority", HFILL
}
2349 { &hf_cops_pcmm_gate_spec_session_class_id_preemption
,
2350 { "SessionClassID Preemption", "cops.pc_mm_gs_scid_preempt",
2351 FT_UINT8
, BASE_DEC
, NULL
, 0x08,
2352 "PacketCable Multimedia GateSpec SessionClassID Preemption", HFILL
}
2354 { &hf_cops_pcmm_gate_spec_session_class_id_configurable
,
2355 { "SessionClassID Configurable", "cops.pc_mm_gs_scid_conf",
2356 FT_UINT8
, BASE_DEC
, NULL
, 0xf0,
2357 "PacketCable Multimedia GateSpec SessionClassID Configurable", HFILL
}
2359 { &hf_cops_pcmm_gate_spec_timer_t1
,
2360 { "Timer T1", "cops.pc_mm_gs_timer_t1",
2361 FT_UINT16
, BASE_DEC
, NULL
, 0,
2362 "PacketCable Multimedia GateSpec Timer T1", HFILL
}
2364 { &hf_cops_pcmm_gate_spec_timer_t2
,
2365 { "Timer T2", "cops.pc_mm_gs_timer_t2",
2366 FT_UINT16
, BASE_DEC
, NULL
, 0,
2367 "PacketCable Multimedia GateSpec Timer T2", HFILL
}
2369 { &hf_cops_pcmm_gate_spec_timer_t3
,
2370 { "Timer T3", "cops.pc_mm_gs_timer_t3",
2371 FT_UINT16
, BASE_DEC
, NULL
, 0,
2372 "PacketCable Multimedia GateSpec Timer T3", HFILL
}
2374 { &hf_cops_pcmm_gate_spec_timer_t4
,
2375 { "Timer T4", "cops.pc_mm_gs_timer_t4",
2376 FT_UINT16
, BASE_DEC
, NULL
, 0,
2377 "PacketCable Multimedia GateSpec Timer T4", HFILL
}
2380 { &hf_cops_pcmm_classifier_protocol_id
,
2381 { "Protocol ID", "cops.pc_mm_classifier_proto_id",
2382 FT_UINT16
, BASE_HEX
, NULL
, 0,
2383 "PacketCable Multimedia Classifier Protocol ID", HFILL
}
2385 { &hf_cops_pcmm_classifier_dscp_tos_field
,
2386 { "DSCP/TOS Field", "cops.pc_mm_classifier_dscp",
2387 FT_UINT8
, BASE_HEX
, NULL
, 0,
2388 "PacketCable Multimedia Classifier DSCP/TOS Field", HFILL
}
2390 { &hf_cops_pcmm_classifier_dscp_tos_mask
,
2391 { "DSCP/TOS Mask", "cops.pc_mm_classifier_dscp_mask",
2392 FT_UINT8
, BASE_HEX
, NULL
, 0,
2393 "PacketCable Multimedia Classifier DSCP/TOS Mask", HFILL
}
2395 { &hf_cops_pcmm_classifier_src_addr
,
2396 { "Source address", "cops.pc_mm_classifier_src_addr",
2397 FT_IPv4
, BASE_NONE
, NULL
, 0,
2398 "PacketCable Multimedia Classifier Source IP Address", HFILL
}
2400 { &hf_cops_pcmm_classifier_src_mask
,
2401 { "Source mask", "cops.pc_mm_classifier_src_mask",
2402 FT_IPv4
, BASE_NONE
, NULL
, 0,
2403 "PacketCable Multimedia Classifier Source Mask", HFILL
}
2405 { &hf_cops_pcmm_classifier_dst_addr
,
2406 { "Destination address", "cops.pc_mm_classifier_dst_addr",
2407 FT_IPv4
, BASE_NONE
, NULL
, 0,
2408 "PacketCable Multimedia Classifier Destination IP Address", HFILL
}
2410 { &hf_cops_pcmm_classifier_dst_mask
,
2411 { "Destination mask", "cops.pc_mm_classifier_dst_mask",
2412 FT_IPv4
, BASE_NONE
, NULL
, 0,
2413 "PacketCable Multimedia Classifier Destination Mask", HFILL
}
2415 { &hf_cops_pcmm_classifier_src_port
,
2416 { "Source Port", "cops.pc_mm_classifier_src_port",
2417 FT_UINT16
, BASE_DEC
, NULL
, 0,
2418 "PacketCable Multimedia Classifier Source Port", HFILL
}
2420 { &hf_cops_pcmm_classifier_src_port_end
,
2421 { "Source Port End", "cops.pc_mm_classifier_src_port_end",
2422 FT_UINT16
, BASE_DEC
, NULL
, 0,
2423 "PacketCable Multimedia Classifier Source Port End", HFILL
}
2425 { &hf_cops_pcmm_classifier_dst_port
,
2426 { "Destination Port", "cops.pc_mm_classifier_dst_port",
2427 FT_UINT16
, BASE_DEC
, NULL
, 0,
2428 "PacketCable Multimedia Classifier Source Port", HFILL
}
2430 { &hf_cops_pcmm_classifier_dst_port_end
,
2431 { "Destination Port End", "cops.pc_mm_classifier_dst_port_end",
2432 FT_UINT16
, BASE_DEC
, NULL
, 0,
2433 "PacketCable Multimedia Classifier Source Port End", HFILL
}
2435 { &hf_cops_pcmm_classifier_priority
,
2436 { "Priority", "cops.pc_mm_classifier_priority",
2437 FT_UINT8
, BASE_HEX
, NULL
, 0,
2438 "PacketCable Multimedia Classifier Priority", HFILL
}
2440 { &hf_cops_pcmm_classifier_classifier_id
,
2441 { "Classifier Id", "cops.pc_mm_classifier_id",
2442 FT_UINT16
, BASE_HEX
, NULL
, 0,
2443 "PacketCable Multimedia Classifier ID", HFILL
}
2445 { &hf_cops_pcmm_classifier_activation_state
,
2446 { "Activation State", "cops.pc_mm_classifier_activation_state",
2447 FT_UINT8
, BASE_HEX
, pcmm_activation_state_vals
, 0,
2448 "PacketCable Multimedia Classifier Activation State", HFILL
}
2450 { &hf_cops_pcmm_classifier_action
,
2451 { "Action", "cops.pc_mm_classifier_action",
2452 FT_UINT8
, BASE_HEX
, pcmm_action_vals
, 0,
2453 "PacketCable Multimedia Classifier Action", HFILL
}
2455 { &hf_cops_pcmm_classifier_flags
,
2456 { "Flags", "cops.pc_mm_classifier_flags",
2457 FT_UINT8
, BASE_HEX
, NULL
, 0,
2458 "PacketCable Multimedia Classifier Flags", HFILL
}
2460 { &hf_cops_pcmm_classifier_tc_low
,
2461 { "tc-low", "cops.pc_mm_classifier_tc_low",
2462 FT_UINT8
, BASE_HEX
, NULL
, 0,
2463 "PacketCable Multimedia Classifier tc-low", HFILL
}
2465 { &hf_cops_pcmm_classifier_tc_high
,
2466 { "tc-high", "cops.pc_mm_classifier_tc_high",
2467 FT_UINT8
, BASE_HEX
, NULL
, 0,
2468 "PacketCable Multimedia Classifier tc-high", HFILL
}
2470 { &hf_cops_pcmm_classifier_tc_mask
,
2471 { "tc-mask", "cops.pc_mm_classifier_tc_mask",
2472 FT_UINT8
, BASE_HEX
, NULL
, 0,
2473 "PacketCable Multimedia Classifier tc-mask", HFILL
}
2475 { &hf_cops_pcmm_classifier_flow_label
,
2476 { "Flow Label", "cops.pc_mm_classifier_flow_label",
2477 FT_UINT32
, BASE_HEX
, NULL
, 0,
2478 "PacketCable Multimedia Classifier Flow Label", HFILL
}
2480 { &hf_cops_pcmm_classifier_next_header_type
,
2481 { "Next Header Type", "cops.pc_mm_classifier_next_header_type",
2482 FT_UINT16
, BASE_HEX
, NULL
, 0,
2483 "PacketCable Multimedia Classifier Next Header Type", HFILL
}
2485 { &hf_cops_pcmm_classifier_source_prefix_length
,
2486 { "Source Prefix Length", "cops.pc_mm_classifier_source_prefix_length",
2487 FT_UINT8
, BASE_HEX
, NULL
, 0,
2488 "PacketCable Multimedia Classifier Source Prefix Length", HFILL
}
2490 { &hf_cops_pcmm_classifier_destination_prefix_length
,
2491 { "Destination Prefix Length", "cops.pc_mm_classifier_destination_prefix_length",
2492 FT_UINT8
, BASE_HEX
, NULL
, 0,
2493 "PacketCable Multimedia Classifier Destination Prefix Length", HFILL
}
2495 { &hf_cops_pcmm_classifier_src_addr_v6
,
2496 { "IPv6 Source Address", "cops.pc_mm_classifier_src_addr_v6",
2497 FT_IPv6
, BASE_NONE
, NULL
, 0,
2498 "PacketCable Multimedia Classifier IPv6 Source Address", HFILL
}
2500 { &hf_cops_pcmm_classifier_dst_addr_v6
,
2501 { "IPv6 Destination Address", "cops.pc_mm_classifier_dst_addr_v6",
2502 FT_IPv6
, BASE_NONE
, NULL
, 0,
2503 "PacketCable Multimedia Classifier IPv6 Destination Address", HFILL
}
2506 { &hf_cops_pcmm_flow_spec_envelope
,
2507 { "Envelope", "cops.pc_mm_fs_envelope",
2508 FT_UINT8
, BASE_DEC
, NULL
, 0,
2509 "PacketCable Multimedia Flow Spec Envelope", HFILL
}
2511 { &hf_cops_pcmm_flow_spec_service_number
,
2512 { "Service Number", "cops.pc_mm_fs_svc_num",
2513 FT_UINT8
, BASE_DEC
, pcmm_flow_spec_service_vals
, 0,
2514 "PacketCable Multimedia Flow Spec Service Number", HFILL
}
2517 { &hf_cops_pcmm_docsis_scn
,
2518 { "Service Class Name", "cops.pc_mm_docsis_scn",
2519 FT_STRINGZ
, BASE_NONE
, NULL
, 0,
2520 "PacketCable Multimedia DOCSIS Service Class Name", HFILL
}
2523 { &hf_cops_pcmm_envelope
,
2524 { "Envelope", "cops.pc_mm_envelope",
2525 FT_UINT8
, BASE_DEC
, NULL
, 0,
2526 "PacketCable Multimedia Envelope", HFILL
}
2529 { &hf_cops_pcmm_traffic_priority
,
2530 { "Traffic Priority", "cops.pc_mm_tp",
2531 FT_UINT8
, BASE_DEC
, NULL
, 0,
2532 "PacketCable Multimedia Committed Envelope Traffic Priority", HFILL
}
2534 { &hf_cops_pcmm_request_transmission_policy
,
2535 { "Request Transmission Policy", "cops.pc_mm_rtp",
2536 FT_UINT32
, BASE_HEX
, NULL
, 0,
2537 "PacketCable Multimedia Committed Envelope Traffic Priority", HFILL
}
2539 { &hf_cops_pcmm_max_sustained_traffic_rate
,
2540 { "Maximum Sustained Traffic Rate", "cops.pc_mm_mstr",
2541 FT_UINT32
, BASE_DEC
, NULL
, 0,
2542 "PacketCable Multimedia Committed Envelope Maximum Sustained Traffic Rate", HFILL
}
2544 { &hf_cops_pcmm_max_traffic_burst
,
2545 { "Maximum Traffic Burst", "cops.pc_mm_mtb",
2546 FT_UINT32
, BASE_DEC
, NULL
, 0,
2547 "PacketCable Multimedia Committed Envelope Maximum Traffic Burst", HFILL
}
2549 { &hf_cops_pcmm_min_reserved_traffic_rate
,
2550 { "Minimum Reserved Traffic Rate", "cops.pc_mm_mrtr",
2551 FT_UINT32
, BASE_DEC
, NULL
, 0,
2552 "PacketCable Multimedia Committed Envelope Minimum Reserved Traffic Rate", HFILL
}
2554 { &hf_cops_pcmm_ass_min_rtr_packet_size
,
2555 { "Assumed Minimum Reserved Traffic Rate Packet Size", "cops.pc_mm_amrtrps",
2556 FT_UINT16
, BASE_DEC
, NULL
, 0,
2557 "PacketCable Multimedia Committed Envelope Assumed Minimum Reserved Traffic Rate Packet Size", HFILL
}
2559 { &hf_cops_pcmm_max_concat_burst
,
2560 { "Maximum Concatenated Burst", "cops.pc_mm_mcburst",
2561 FT_UINT16
, BASE_DEC
, NULL
, 0,
2562 "PacketCable Multimedia Committed Envelope Maximum Concatenated Burst", HFILL
}
2564 { &hf_cops_pcmm_req_att_mask
,
2565 { "Required Attribute Mask", "cops.pc_mm_ramask",
2566 FT_UINT16
, BASE_DEC
, NULL
, 0,
2567 "PacketCable Multimedia Committed Envelope Required Attribute Mask", HFILL
}
2569 { &hf_cops_pcmm_forbid_att_mask
,
2570 { "Forbidden Attribute Mask", "cops.pc_mm_famask",
2571 FT_UINT16
, BASE_DEC
, NULL
, 0,
2572 "PacketCable Multimedia Committed Envelope Forbidden Attribute Mask", HFILL
}
2574 { &hf_cops_pcmm_att_aggr_rule_mask
,
2575 { "Attribute Aggregation Rule Mask", "cops.pc_mm_aarmask",
2576 FT_UINT16
, BASE_DEC
, NULL
, 0,
2577 "PacketCable Multimedia Committed Envelope Attribute Aggregation Rule Mask", HFILL
}
2580 { &hf_cops_pcmm_nominal_polling_interval
,
2581 { "Nominal Polling Interval", "cops.pc_mm_npi",
2582 FT_UINT32
, BASE_DEC
, NULL
, 0,
2583 "PacketCable Multimedia Nominal Polling Interval", HFILL
}
2586 { &hf_cops_pcmm_tolerated_poll_jitter
,
2587 { "Tolerated Poll Jitter", "cops.pc_mm_tpj",
2588 FT_UINT32
, BASE_DEC
, NULL
, 0,
2589 "PacketCable Multimedia Tolerated Poll Jitter", HFILL
}
2592 { &hf_cops_pcmm_unsolicited_grant_size
,
2593 { "Unsolicited Grant Size", "cops.pc_mm_ugs",
2594 FT_UINT16
, BASE_DEC
, NULL
, 0,
2595 "PacketCable Multimedia Unsolicited Grant Size", HFILL
}
2597 { &hf_cops_pcmm_grants_per_interval
,
2598 { "Grants Per Interval", "cops.pc_mm_gpi",
2599 FT_UINT8
, BASE_DEC
, NULL
, 0,
2600 "PacketCable Multimedia Grants Per Interval", HFILL
}
2602 { &hf_cops_pcmm_nominal_grant_interval
,
2603 { "Nominal Grant Interval", "cops.pc_mm_ngi",
2604 FT_UINT32
, BASE_DEC
, NULL
, 0,
2605 "PacketCable Multimedia Nominal Grant Interval", HFILL
}
2607 { &hf_cops_pcmm_tolerated_grant_jitter
,
2608 { "Tolerated Grant Jitter", "cops.pc_mm_tgj",
2609 FT_UINT32
, BASE_DEC
, NULL
, 0,
2610 "PacketCable Multimedia Tolerated Grant Jitter", HFILL
}
2613 { &hf_cops_pcmm_down_resequencing
,
2614 { "Downstream Resequencing", "cops.pc_mm_downres",
2615 FT_UINT32
, BASE_DEC
, NULL
, 0,
2616 "PacketCable Multimedia Downstream Resequencing", HFILL
}
2619 { &hf_cops_pcmm_down_peak_traffic_rate
,
2620 { "Downstream Peak Traffic Rate", "cops.pc_mm_downpeak",
2621 FT_UINT32
, BASE_DEC
, NULL
, 0,
2622 "PacketCable Multimedia Downstream Peak Traffic Rate", HFILL
}
2625 { &hf_cops_pcmm_max_downstream_latency
,
2626 { "Maximum Downstream Latency", "cops.pc_mm_mdl",
2627 FT_UINT32
, BASE_DEC
, NULL
, 0,
2628 "PacketCable Multimedia Maximum Downstream Latency", HFILL
}
2631 { &hf_cops_pcmm_volume_based_usage_limit
,
2632 { "Usage Limit", "cops.pc_mm_vbul_ul",
2633 FT_UINT64
, BASE_DEC
, NULL
, 0,
2634 "PacketCable Multimedia Volume-Based Usage Limit", HFILL
}
2637 { &hf_cops_pcmm_time_based_usage_limit
,
2638 { "Usage Limit", "cops.pc_mm_tbul_ul",
2639 FT_UINT32
, BASE_DEC
, NULL
, 0,
2640 "PacketCable Multimedia Time-Based Usage Limit", HFILL
}
2643 { &hf_cops_pcmm_gate_time_info
,
2644 { "Gate Time Info", "cops.pc_mm_gti",
2645 FT_UINT32
, BASE_DEC
, NULL
, 0,
2646 "PacketCable Multimedia Gate Time Info", HFILL
}
2649 { &hf_cops_pcmm_gate_usage_info
,
2650 { "Gate Usage Info", "cops.pc_mm_gui",
2651 FT_UINT64
, BASE_DEC
, NULL
, 0,
2652 "PacketCable Multimedia Gate Usage Info", HFILL
}
2655 { &hf_cops_pcmm_packetcable_error_code
,
2656 { "Error-Code", "cops.pc_mm_error_ec",
2657 FT_UINT16
, BASE_DEC
, NULL
, 0,
2658 "PacketCable Multimedia PacketCable-Error Error-Code", HFILL
}
2660 { &hf_cops_pcmm_packetcable_error_subcode
,
2661 { "Error-code", "cops.pc_mm_error_esc",
2662 FT_UINT16
, BASE_HEX
, NULL
, 0,
2663 "PacketCable Multimedia PacketCable-Error Error Sub-code", HFILL
}
2666 { &hf_cops_pcmm_packetcable_gate_state
,
2667 { "State", "cops.pc_mm_gs_state",
2668 FT_UINT16
, BASE_DEC
, NULL
, 0,
2669 "PacketCable Multimedia Gate State", HFILL
}
2671 { &hf_cops_pcmm_packetcable_gate_state_reason
,
2672 { "Reason", "cops.pc_mm_gs_reason",
2673 FT_UINT16
, BASE_HEX
, NULL
, 0,
2674 "PacketCable Multimedia Gate State Reason", HFILL
}
2676 { &hf_cops_pcmm_packetcable_version_info_major
,
2677 { "Major Version Number", "cops.pc_mm_vi_major",
2678 FT_UINT16
, BASE_DEC
, NULL
, 0,
2679 "PacketCable Multimedia Major Version Number", HFILL
}
2681 { &hf_cops_pcmm_packetcable_version_info_minor
,
2682 { "Minor Version Number", "cops.pc_mm_vi_minor",
2683 FT_UINT16
, BASE_DEC
, NULL
, 0,
2684 "PacketCable Multimedia Minor Version Number", HFILL
}
2687 { &hf_cops_pcmm_psid
,
2688 { "PSID", "cops.pc_mm_psid",
2689 FT_UINT32
, BASE_DEC
, NULL
, 0,
2690 "PacketCable Multimedia PSID", HFILL
}
2693 { &hf_cops_pcmm_synch_options_report_type
,
2694 { "Report Type", "cops.pc_mm_synch_options_report_type",
2695 FT_UINT8
, BASE_DEC
, pcmm_report_type_vals
, 0,
2696 "PacketCable Multimedia Synch Options Report Type", HFILL
}
2698 { &hf_cops_pcmm_synch_options_synch_type
,
2699 { "Synch Type", "cops.pc_mm_synch_options_synch_type",
2700 FT_UINT8
, BASE_DEC
, pcmm_synch_type_vals
, 0,
2701 "PacketCable Multimedia Synch Options Synch Type", HFILL
}
2704 { &hf_cops_pcmm_msg_receipt_key
,
2705 { "Msg Receipt Key", "cops.pc_mm_msg_receipt_key",
2706 FT_UINT32
, BASE_HEX
, NULL
, 0,
2707 "PacketCable Multimedia Msg Receipt Key", HFILL
}
2710 { &hf_cops_pcmm_userid
,
2711 { "UserID", "cops.pc_mm_userid",
2712 FT_STRING
, BASE_NONE
, NULL
, 0,
2713 "PacketCable Multimedia UserID", HFILL
}
2716 { &hf_cops_pcmm_sharedresourceid
,
2717 { "SharedResourceID", "cops.pc_mm_sharedresourceid",
2718 FT_UINT32
, BASE_HEX
, NULL
, 0,
2719 "PacketCable Multimedia SharedResourceID", HFILL
}
2722 /* End of addition for PacketCable */
2726 /* Setup protocol subtree array */
2727 static gint
*ett
[] = {
2729 &ett_cops_ver_flags
,
2733 &ett_cops_r_type_flags
,
2744 &ett_docsis_request_transmission_policy
,
2747 static ei_register_info ei
[] = {
2748 { &ei_cops_pepid_not_null
, { "cops.pepid.not_null", PI_MALFORMED
, PI_NOTE
, "PEP Id is not a NULL terminated ASCII string", EXPFILL
}},
2749 { &ei_cops_trailing_garbage
, { "cops.trailing_garbage", PI_UNDECODED
, PI_NOTE
, "Trailing garbage", EXPFILL
}},
2750 { &ei_cops_bad_cops_object_length
, { "cops.bad_cops_object_length", PI_MALFORMED
, PI_ERROR
, "COPS object length is too short", EXPFILL
}},
2751 { &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
}},
2752 { &ei_cops_unknown_c_num
, { "cops.unknown_c_num", PI_UNDECODED
, PI_NOTE
, "Unknown C-Num value", EXPFILL
}},
2753 { &ei_cops_unknown_s_num
, { "cops.unknown_s_num", PI_UNDECODED
, PI_NOTE
, "Unknown S-Num value", EXPFILL
}},
2757 module_t
* cops_module
;
2758 expert_module_t
* expert_cops
;
2760 /* Register the protocol name and description */
2761 proto_cops
= proto_register_protocol("Common Open Policy Service",
2764 /* Required function calls to register the header fields and subtrees used */
2765 proto_register_field_array(proto_cops
, hf
, array_length(hf
));
2766 proto_register_subtree_array(ett
, array_length(ett
));
2767 expert_cops
= expert_register_protocol(proto_cops
);
2768 expert_register_field_array(expert_cops
, ei
, array_length(ei
));
2770 /* Make dissector findable by name */
2771 new_register_dissector("cops", dissect_cops
, proto_cops
);
2773 /* Register our configuration options for cops */
2774 cops_module
= prefs_register_protocol(proto_cops
, proto_reg_handoff_cops
);
2775 prefs_register_uint_preference(cops_module
,"tcp.cops_port",
2777 "Set the TCP port for COPS messages",
2778 10,&global_cops_tcp_port
);
2779 prefs_register_bool_preference(cops_module
, "desegment",
2780 "Reassemble COPS messages spanning multiple TCP segments",
2781 "Whether the COPS dissector should reassemble messages spanning multiple TCP segments."
2782 " To use this option, you must also enable \"Allow subdissectors to reassemble TCP streams\" in the TCP protocol settings.",
2785 /* For PacketCable */
2786 prefs_register_bool_preference(cops_module
, "packetcable",
2787 "Decode for PacketCable clients",
2788 "Decode the COPS messages using PacketCable clients. (Select port 2126)",
2791 prefs_register_static_text_preference(cops_module
, "info_pibs",
2792 "PIB settings can be changed in the Name Resolution preferences",
2793 "PIB settings can be changed in the Name Resolution preferences");
2795 prefs_register_obsolete_preference(cops_module
, "typefrommib");
2798 void proto_reg_handoff_cops(void)
2800 static gboolean cops_prefs_initialized
= FALSE
;
2801 static dissector_handle_t cops_handle
;
2802 static guint cops_tcp_port
;
2804 if (!cops_prefs_initialized
) {
2805 cops_handle
= find_dissector("cops");
2806 dissector_add_uint("tcp.port", TCP_PORT_PKTCABLE_COPS
, cops_handle
);
2807 dissector_add_uint("tcp.port", TCP_PORT_PKTCABLE_MM_COPS
, cops_handle
);
2808 cops_prefs_initialized
= TRUE
;
2810 dissector_delete_uint("tcp.port",cops_tcp_port
,cops_handle
);
2812 cops_tcp_port
= global_cops_tcp_port
;
2814 dissector_add_uint("tcp.port", cops_tcp_port
, cops_handle
);
2818 /* Additions for PacketCable ( Added by Dick Gooris, Lucent Technologies ) */
2820 /* Definitions for print formatting */
2821 /* XXX - Why don't we just use ftenum types here? */
2829 /* Print the translated information in the display gui in a formatted way
2831 * octets = The number of octets to obtain from the buffer
2833 * vsp = If not a NULL pointer, it points to an array with text
2835 * mode = 0 -> print decimal value
2836 * 1 -> print hexadecimal vaue
2837 * 2 -> print value as an IPv4 address
2838 * 3 -> print value as an IPv6 address
2839 * 4 -> print value as an IEEE float
2840 * 5 -> print value as a string
2842 * This function in combination with the separate function info_to_cops_subtree() for subtrees.
2847 info_to_display(tvbuff_t
*tvb
, proto_item
*stt
, int offset
, int octets
, const char *str
, const value_string
*vsp
, int mode
,gint
*hf_proto_parameter
)
2849 proto_item
*pi
= NULL
;
2853 guint32 codeipv4
= 0;
2856 float codefl
= 0.0f
;
2858 /* Special section for printing strings */
2859 if (mode
==FMT_STR
) {
2860 codestr
= tvb_get_string(wmem_packet_scope(), tvb
, offset
, octets
);
2861 pi
= proto_tree_add_string_format(stt
, *hf_proto_parameter
, tvb
,
2862 offset
, octets
, codestr
, "%-28s : %s", str
, codestr
);
2866 /* Print information elements in the specified way */
2871 code8
= tvb_get_guint8( tvb
, offset
);
2873 /* Hexadecimal format */
2875 pi
= proto_tree_add_uint_format(stt
, *hf_proto_parameter
,tvb
,
2876 offset
, octets
, code8
,"%-28s : 0x%02x",str
,code8
);
2878 /* Print an 8 bits integer */
2879 pi
= proto_tree_add_uint_format(stt
, *hf_proto_parameter
,tvb
,
2880 offset
, octets
, code8
,"%-28s : %u",str
,code8
);
2883 /* Hexadecimal format */
2884 pi
= proto_tree_add_uint_format(
2885 stt
, *hf_proto_parameter
,tvb
, offset
, octets
, code8
,
2886 "%-28s : %s (0x%02x)",str
,val_to_str_const(code8
, vsp
, "Unknown"),code8
);
2888 /* String table indexed */
2889 pi
= proto_tree_add_uint_format(
2890 stt
, *hf_proto_parameter
,tvb
, offset
, octets
, code8
,
2891 "%-28s : %s (%u)",str
,val_to_str_const(code8
, vsp
, "Unknown"),code8
);
2897 /* Get the next two octets */
2898 code16
= tvb_get_ntohs(tvb
,offset
);
2900 /* Hexadecimal format */
2902 pi
= proto_tree_add_uint_format(stt
, *hf_proto_parameter
,tvb
,
2903 offset
, octets
, code16
,"%-28s : 0x%04x",str
,code16
);
2905 /* Print a 16 bits integer */
2906 pi
= proto_tree_add_uint_format(stt
, *hf_proto_parameter
,tvb
,
2907 offset
, octets
, code16
,"%-28s : %u",str
,code16
);
2910 /* Hexadecimal format */
2911 pi
= proto_tree_add_uint_format(stt
, *hf_proto_parameter
,tvb
,
2912 offset
, octets
, code16
,"%-28s : %s (0x%04x)", str
,
2913 val_to_str(code16
, vsp
, "Unknown (0x%04x)"),code16
);
2915 /* Print a 16 bits integer */
2916 pi
= proto_tree_add_uint_format(
2917 stt
, *hf_proto_parameter
,tvb
, offset
, octets
, code16
,
2918 "%-28s : %s (%u)",str
,val_to_str(code16
, vsp
, "Unknown (0x%04x)"),code16
);
2924 /* Get the next four octets */
2926 case FMT_FLT
: codefl
= tvb_get_ntohieee_float(tvb
,offset
);
2928 case FMT_IPv4
: codeipv4
= tvb_get_ipv4(tvb
, offset
);
2930 default: code32
= tvb_get_ntohl(tvb
,offset
);
2934 /* Hexadecimal format */
2935 if (mode
==FMT_HEX
) {
2936 pi
= proto_tree_add_uint_format(stt
, *hf_proto_parameter
,tvb
,
2937 offset
, octets
, code32
,"%-28s : 0x%08x",str
,code32
);
2940 /* Ip address format*/
2941 if (mode
==FMT_IPv4
) {
2942 pi
= proto_tree_add_ipv4(stt
, *hf_proto_parameter
,tvb
, offset
, octets
, codeipv4
);
2945 /* Ieee float format */
2946 if (mode
==FMT_FLT
) {
2947 pi
= proto_tree_add_float_format(stt
, *hf_proto_parameter
,tvb
, offset
, octets
,
2948 codefl
,"%-28s : %.10g",str
,codefl
);
2951 /* Print a 32 bits integer */
2952 pi
= proto_tree_add_uint_format(stt
, *hf_proto_parameter
,tvb
, offset
, octets
,
2953 code32
,"%-28s : %u",str
,code32
);
2955 /* Hexadecimal format */
2957 pi
= proto_tree_add_uint_format(stt
, *hf_proto_parameter
,tvb
, offset
, octets
,
2958 code32
,"%-28s : %s (0x%08x)",str
,val_to_str_const(code32
, vsp
, "Unknown"),code32
);
2960 /* String table indexed */
2961 pi
= proto_tree_add_uint_format(stt
, *hf_proto_parameter
,tvb
, offset
, octets
,
2962 code32
,"%-28s : %s (%u)",str
,val_to_str_const(code32
, vsp
, "Unknown"),code32
);
2966 /* In case of more than 4 octets.... */
2969 if (mode
==FMT_HEX
) {
2970 pi
= proto_tree_add_item(stt
, *hf_proto_parameter
,
2971 tvb
, offset
, octets
, ENC_NA
);
2972 } else if (mode
==FMT_IPv6
&& octets
==16) {
2973 pi
= proto_tree_add_item(stt
, *hf_proto_parameter
, tvb
, offset
, octets
,
2975 } else if (mode
==FMT_DEC
&& octets
==8) {
2976 code64
= tvb_get_ntoh64(tvb
, offset
);
2977 pi
= proto_tree_add_uint64_format(stt
, *hf_proto_parameter
, tvb
, offset
, octets
,
2978 code64
, "%-28s : %" G_GINT64_MODIFIER
"u", str
, code64
);
2980 pi
= proto_tree_add_uint_format(stt
, *hf_proto_parameter
,
2981 tvb
, offset
, octets
, code32
,"%s",str
);
2989 /* Print the subtree information for cops */
2991 info_to_cops_subtree(tvbuff_t
*tvb
, proto_tree
*st
, int n
, int offset
, const char *str
) {
2994 tv
= proto_tree_add_none_format( st
, hf_cops_subtree
, tvb
, offset
, n
, "%s", str
);
2995 return( proto_item_add_subtree( tv
, ett_cops_subtree
) );
2998 /* Cops - Section : D-QoS Transaction ID */
3000 cops_transaction_id(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*st
, guint8 op_code
, guint n
, guint32 offset
) {
3006 /* Create a subtree */
3007 stt
= info_to_cops_subtree(tvb
,st
,n
,offset
,"D-QoS Transaction ID");
3010 /* Transaction Identifier */
3011 info_to_display(tvb
,stt
,offset
,2,"D-QoS Transaction Identifier", NULL
,FMT_DEC
,&hf_cops_pc_transaction_id
);
3014 /* Gate Command Type */
3015 code16
= tvb_get_ntohs(tvb
,offset
);
3016 proto_tree_add_uint_format(stt
, hf_cops_pc_gate_command_type
,tvb
, offset
, 2,
3017 code16
,"%-28s : %s (%u)", "Gate Command Type",
3018 val_to_str(code16
,table_cops_dqos_transaction_id
, "Unknown (0x%04x)"),code16
);
3020 /* Write the right data into the 'info field' on the Gui */
3021 g_snprintf(info
,sizeof(info
),"COPS %-20s - %s",val_to_str_const(op_code
,cops_op_code_vals
, "Unknown"),
3022 val_to_str_const(code16
,table_cops_dqos_transaction_id
, "Unknown"));
3024 col_add_str(pinfo
->cinfo
, COL_INFO
,info
);
3027 /* Cops - Section : Subscriber IDv4 */
3029 cops_subscriber_id_v4(tvbuff_t
*tvb
, proto_tree
*st
, guint n
, guint32 offset
) {
3033 /* Create a subtree */
3034 tv
= info_to_cops_subtree(tvb
,st
,n
,offset
,"Subscriber ID (IPv4)");
3037 /* Subscriber Identifier */
3038 info_to_display(tvb
,tv
,offset
,4,"Subscriber Identifier (IPv4)", NULL
,FMT_IPv4
,&hf_cops_pc_subscriber_id_ipv4
);
3041 /* Cops - Section : Subscriber IDv6 */
3043 cops_subscriber_id_v6(tvbuff_t
*tvb
, proto_tree
*st
, guint n
, guint32 offset
) {
3047 /* Create a subtree */
3048 tv
= info_to_cops_subtree(tvb
,st
,n
,offset
,"Subscriber ID (IPv6)");
3051 /* Subscriber Identifier */
3052 info_to_display(tvb
,tv
,offset
,16,"Subscriber Identifier (IPv6)", NULL
,FMT_IPv6
,&hf_cops_pc_subscriber_id_ipv6
);
3055 /* Cops - Section : Gate ID */
3057 cops_gate_id(tvbuff_t
*tvb
, proto_tree
*st
, guint n
, guint32 offset
) {
3061 /* Create a subtree */
3062 stt
= info_to_cops_subtree(tvb
,st
,n
,offset
,"Gate ID");
3065 /* Gate Identifier */
3066 info_to_display(tvb
,stt
,offset
,4,"Gate Identifier", NULL
,FMT_HEX
,&hf_cops_pc_gate_id
);
3069 /* Cops - Section : Activity Count */
3071 cops_activity_count(tvbuff_t
*tvb
, proto_tree
*st
, guint n
, guint32 offset
) {
3075 /* Create a subtree */
3076 stt
= info_to_cops_subtree(tvb
,st
,n
,offset
,"Activity Count");
3079 /* Activity Count */
3080 info_to_display(tvb
,stt
,offset
,4,"Count", NULL
,FMT_DEC
,&hf_cops_pc_activity_count
);
3083 /* Cops - Section : Gate Specifications */
3085 cops_gate_specs(tvbuff_t
*tvb
, proto_tree
*st
, guint n
, guint32 offset
) {
3089 /* Create a subtree */
3090 stt
= info_to_cops_subtree(tvb
,st
,n
,offset
,"Gate Specifications");
3094 info_to_display(tvb
,stt
,offset
,1,"Direction",table_cops_direction
,FMT_DEC
,&hf_cops_pc_direction
);
3098 info_to_display(tvb
,stt
,offset
,1,"Protocol ID",NULL
,FMT_DEC
,&hf_cops_pc_protocol_id
);
3102 info_to_display(tvb
,stt
,offset
,1,"Flags",NULL
,FMT_DEC
,&hf_cops_pc_gate_spec_flags
);
3106 info_to_display(tvb
,stt
,offset
,1,"Session Class",table_cops_session_class
,FMT_DEC
,&hf_cops_pc_session_class
);
3109 /* Source IP Address */
3110 info_to_display(tvb
,stt
,offset
,4,"Source IP Address",NULL
,FMT_IPv4
,&hf_cops_pc_src_ip
);
3113 /* Destination IP Address */
3114 info_to_display(tvb
,stt
,offset
,4,"Destination IP Address",NULL
,FMT_IPv4
,&hf_cops_pc_dest_ip
);
3117 /* Source IP Port */
3118 info_to_display(tvb
,stt
,offset
,2,"Source IP Port",NULL
,FMT_DEC
,&hf_cops_pc_src_port
);
3121 /* Destination IP Port */
3122 info_to_display(tvb
,stt
,offset
,2,"Destination IP Port",NULL
,FMT_DEC
,&hf_cops_pc_dest_port
);
3125 /* DiffServ Code Point */
3126 info_to_display(tvb
,stt
,offset
,1,"DS Field (DSCP or TOS)",NULL
,FMT_HEX
,&hf_cops_pc_ds_field
);
3129 /* 3 octets Not specified */
3132 /* Timer T1 Value */
3133 info_to_display(tvb
,stt
,offset
,2,"Timer T1 Value (sec)",NULL
,FMT_DEC
,&hf_cops_pc_t1_value
);
3137 info_to_display(tvb
,stt
,offset
,2,"Reserved",NULL
,FMT_DEC
,&hf_cops_pc_reserved
);
3140 /* Timer T7 Value */
3141 info_to_display(tvb
,stt
,offset
,2,"Timer T7 Value (sec)",NULL
,FMT_DEC
,&hf_cops_pc_t7_value
);
3144 /* Timer T8 Value */
3145 info_to_display(tvb
,stt
,offset
,2,"Timer T8 Value (sec)",NULL
,FMT_DEC
,&hf_cops_pc_t8_value
);
3148 /* Token Bucket Rate */
3149 info_to_display(tvb
,stt
,offset
,4,"Token Bucket Rate",NULL
,FMT_FLT
,&hf_cops_pc_token_bucket_rate
);
3152 /* Token Bucket Size */
3153 info_to_display(tvb
,stt
,offset
,4,"Token Bucket Size",NULL
,FMT_FLT
,&hf_cops_pc_token_bucket_size
);
3156 /* Peak Data Rate */
3157 info_to_display(tvb
,stt
,offset
,4,"Peak Data Rate",NULL
,FMT_FLT
,&hf_cops_pc_peak_data_rate
);
3160 /* Minimum Policed Unit */
3161 info_to_display(tvb
,stt
,offset
,4,"Minimum Policed Unit",NULL
,FMT_DEC
,&hf_cops_pc_min_policed_unit
);
3164 /* Maximum Packet Size */
3165 info_to_display(tvb
,stt
,offset
,4,"Maximum Packet Size",NULL
,FMT_DEC
,&hf_cops_pc_max_packet_size
);
3169 info_to_display(tvb
,stt
,offset
,4,"Rate",NULL
,FMT_FLT
,&hf_cops_pc_spec_rate
);
3173 info_to_display(tvb
,stt
,offset
,4,"Slack Term",NULL
,FMT_DEC
,&hf_cops_pc_slack_term
);
3176 /* Cops - Section : Electronic Surveillance Parameters */
3178 cops_surveillance_parameters(tvbuff_t
*tvb
, proto_tree
*st
, guint n
, guint32 offset
) {
3183 /* Create a subtree */
3184 stt
= info_to_cops_subtree(tvb
,st
,n
,offset
,"Electronic Surveillance Parameters");
3187 /* DF IP Address for CDC */
3188 info_to_display(tvb
,stt
,offset
,4,"DF IP Address for CDC", NULL
,FMT_IPv4
,&hf_cops_pc_dfcdc_ip
);
3191 /* DF IP Port for CDC */
3192 info_to_display(tvb
,stt
,offset
,2,"DF IP Port for CDC",NULL
,FMT_DEC
,&hf_cops_pc_dfcdc_ip_port
);
3196 info_to_display(tvb
,stt
,offset
,2,"Flags",NULL
,FMT_HEX
,&hf_cops_pc_gate_spec_flags
);
3199 /* DF IP Address for CCC */
3200 info_to_display(tvb
,stt
,offset
,4,"DF IP Address for CCC", NULL
,FMT_IPv4
,&hf_cops_pc_dfccc_ip
);
3203 /* DF IP Port for CCC */
3204 info_to_display(tvb
,stt
,offset
,2,"DF IP Port for CCC",NULL
,FMT_DEC
,&hf_cops_pc_dfccc_ip_port
);
3208 info_to_display(tvb
,stt
,offset
,2,"Reserved",NULL
,FMT_HEX
,&hf_cops_pc_reserved
);
3212 info_to_display(tvb
,stt
,offset
,4,"CCCID", NULL
,FMT_DEC
,&hf_cops_pc_dfccc_id
);
3215 /* BCID Timestamp */
3216 info_to_display(tvb
,stt
,offset
,4,"BCID - Timestamp",NULL
,FMT_HEX
,&hf_cops_pc_bcid_ts
);
3219 /* BCID Element ID */
3220 bcid_str
= (guchar
*)tvb_format_text(tvb
, offset
, 8);
3221 proto_tree_add_text(stt
, tvb
, offset
, 8,"%-28s : '%s'","BCID - Element ID",bcid_str
);
3224 /* BCID Time Zone */
3225 bcid_str
= (guchar
*)tvb_format_text(tvb
, offset
, 8);
3226 proto_tree_add_text(stt
, tvb
, offset
, 8,"%-28s : '%s'","BCID - Time Zone",bcid_str
);
3229 /* BCID Event Counter */
3230 info_to_display(tvb
,stt
,offset
,4,"BCID - Event Counter",NULL
,FMT_DEC
,&hf_cops_pc_bcid_ev
);
3233 /* Cops - Section : Event Gereration-Info */
3235 cops_event_generation_info(tvbuff_t
*tvb
, proto_tree
*st
, guint n
, guint32 offset
) {
3240 /* Create a subtree */
3241 stt
= info_to_cops_subtree(tvb
,st
,n
,offset
,"Event Generation Info");
3244 /* Primary Record Keeping Server IP Address */
3245 info_to_display(tvb
,stt
,offset
,4,"PRKS IP Address", NULL
,FMT_IPv4
,&hf_cops_pc_prks_ip
);
3248 /* Primary Record Keeping Server IP Port */
3249 info_to_display(tvb
,stt
,offset
,2,"PRKS IP Port",NULL
,FMT_DEC
,&hf_cops_pc_prks_ip_port
);
3253 info_to_display(tvb
,stt
,offset
,1,"Flags",NULL
,FMT_HEX
,&hf_cops_pc_gate_spec_flags
);
3257 info_to_display(tvb
,stt
,offset
,1,"Reserved",NULL
,FMT_HEX
,&hf_cops_pc_reserved
);
3260 /* Secondary Record Keeping Server IP Address */
3261 info_to_display(tvb
,stt
,offset
,4,"SRKS IP Address", NULL
,FMT_IPv4
,&hf_cops_pc_srks_ip
);
3264 /* Secondary Record Keeping Server IP Port */
3265 info_to_display(tvb
,stt
,offset
,2,"SRKS IP Port",NULL
,FMT_DEC
,&hf_cops_pc_srks_ip_port
);
3269 info_to_display(tvb
,stt
,offset
,1,"Flags",NULL
,FMT_DEC
,&hf_cops_pc_gate_spec_flags
);
3273 info_to_display(tvb
,stt
,offset
,1,"Reserved",NULL
,FMT_HEX
,&hf_cops_pc_reserved
);
3276 /* BCID Timestamp */
3277 info_to_display(tvb
,stt
,offset
,4,"BCID - Timestamp",NULL
,FMT_HEX
,&hf_cops_pc_bcid_ts
);
3280 /* BCID Element ID */
3281 bcid_str
= (guchar
*)tvb_format_text(tvb
, offset
, 8);
3282 proto_tree_add_text(stt
, tvb
, offset
, 8,"%-28s : '%s'","BCID - Element ID",bcid_str
);
3285 /* BCID Time Zone */
3286 bcid_str
= (guchar
*)tvb_format_text(tvb
, offset
, 8);
3287 proto_tree_add_text(stt
, tvb
, offset
, 8,"%-28s : '%s'","BCID - Time Zone",bcid_str
);
3290 /* BCID Event Counter */
3291 info_to_display(tvb
,stt
,offset
,4,"BCID - Event Counter",NULL
,FMT_DEC
,&hf_cops_pc_bcid_ev
);
3294 /* Cops - Section : Remote Gate */
3296 cops_remote_gate_info(tvbuff_t
*tvb
, proto_tree
*st
, guint n
, guint32 offset
) {
3300 /* Create a subtree */
3301 stt
= info_to_cops_subtree(tvb
,st
,n
,offset
,"Remote Gate Info");
3304 /* CMTS IP Address */
3305 info_to_display(tvb
,stt
,offset
,4,"CMTS IP Address", NULL
,FMT_IPv4
,&hf_cops_pc_cmts_ip
);
3309 info_to_display(tvb
,stt
,offset
,2,"CMTS IP Port",NULL
,FMT_DEC
,&hf_cops_pc_cmts_ip_port
);
3313 info_to_display(tvb
,stt
,offset
,2,"Flags",NULL
,FMT_DEC
,&hf_cops_pc_remote_flags
);
3316 /* Remote Gate ID */
3317 info_to_display(tvb
,stt
,offset
,4,"Remote Gate ID", NULL
,FMT_HEX
,&hf_cops_pc_remote_gate_id
);
3321 info_to_display(tvb
,stt
,offset
,2,"Algorithm", NULL
,FMT_DEC
,&hf_cops_pc_algorithm
);
3325 info_to_display(tvb
,stt
,offset
,4,"Reserved", NULL
,FMT_HEX
,&hf_cops_pc_reserved
);
3329 info_to_display(tvb
,stt
,offset
,4,"Security Key", NULL
,FMT_HEX
,&hf_cops_pc_key
);
3333 info_to_display(tvb
,stt
,offset
,4,"Security Key (cont)", NULL
,FMT_HEX
,&hf_cops_pc_key
);
3337 info_to_display(tvb
,stt
,offset
,4,"Security Key (cont)", NULL
,FMT_HEX
,&hf_cops_pc_key
);
3341 info_to_display(tvb
,stt
,offset
,4,"Security Key (cont)", NULL
,FMT_HEX
,&hf_cops_pc_key
);
3344 /* Cops - Section : PacketCable reason */
3346 cops_packetcable_reason(tvbuff_t
*tvb
, proto_tree
*st
, guint n
, guint32 offset
) {
3351 /* Create a subtree */
3352 stt
= info_to_cops_subtree(tvb
,st
,n
,offset
,"PacketCable Reason");
3356 code16
= tvb_get_ntohs(tvb
,offset
);
3357 proto_tree_add_uint_format(stt
, hf_cops_pc_reason_code
,tvb
, offset
, 2,
3358 code16
, "%-28s : %s (%u)","Reason Code",
3359 val_to_str(code16
, table_cops_reason_code
, "Unknown (0x%04x)"),code16
);
3362 if ( code16
== 0 ) {
3363 /* Reason Sub Code with Delete */
3364 info_to_display(tvb
,stt
,offset
,2,"Reason Sub Code",table_cops_reason_subcode_delete
,FMT_DEC
,&hf_cops_pc_delete_subcode
);
3366 /* Reason Sub Code with Close */
3367 info_to_display(tvb
,stt
,offset
,2,"Reason Sub Code",table_cops_reason_subcode_close
,FMT_DEC
,&hf_cops_pc_close_subcode
);
3371 /* Cops - Section : PacketCable error */
3373 cops_packetcable_error(tvbuff_t
*tvb
, proto_tree
*st
, guint n
, guint32 offset
) {
3377 /* Create a subtree */
3378 stt
= info_to_cops_subtree(tvb
,st
,n
,offset
,"PacketCable Error");
3382 info_to_display(tvb
,stt
,offset
,2,"Error Code",table_cops_packetcable_error
,FMT_DEC
,&hf_cops_pc_packetcable_err_code
);
3385 /* Error Sub Code */
3386 info_to_display(tvb
,stt
,offset
,2,"Error Sub Code",NULL
,FMT_HEX
,&hf_cops_pc_packetcable_sub_code
);
3390 /* Cops - Section : Multimedia Transaction ID */
3392 cops_mm_transaction_id(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*st
, guint8 op_code
, guint n
, guint32 offset
) {
3398 /* Create a subtree */
3399 stt
= info_to_cops_subtree(tvb
,st
,n
,offset
,"MM Transaction ID");
3402 /* Transaction Identifier */
3403 info_to_display(tvb
,stt
,offset
,2,"Multimedia Transaction Identifier", NULL
,FMT_DEC
,&hf_cops_pc_transaction_id
);
3406 /* Gate Command Type */
3407 code16
= tvb_get_ntohs(tvb
,offset
);
3408 proto_tree_add_uint_format(stt
, hf_cops_pc_gate_command_type
,tvb
, offset
, 2,
3409 code16
,"%-28s : %s (%u)", "Gate Command Type",
3410 val_to_str(code16
,table_cops_mm_transaction_id
, "Unknown (0x%04x)"),code16
);
3412 /* Write the right data into the 'info field' on the Gui */
3413 g_snprintf(info
,sizeof(info
),"COPS %-20s - %s",val_to_str_const(op_code
,cops_op_code_vals
, "Unknown"),
3414 val_to_str_const(code16
,table_cops_mm_transaction_id
, "Unknown"));
3416 col_add_str(pinfo
->cinfo
, COL_INFO
,info
);
3419 /* Cops - Section : AMID */
3421 cops_amid(tvbuff_t
*tvb
, proto_tree
*st
, guint n
, guint32 offset
) {
3425 /* Create a subtree */
3426 stt
= info_to_cops_subtree(tvb
,st
,n
,offset
,"AMID");
3429 /* Application Type */
3430 info_to_display(tvb
,stt
,offset
,2,"Application Manager ID Application Type", NULL
,FMT_DEC
,&hf_cops_pcmm_amid_app_type
);
3433 /* Application Manager Tag */
3434 info_to_display(tvb
,stt
,offset
,2,"Application Manager ID Application Manager Tag", NULL
,FMT_DEC
,&hf_cops_pcmm_amid_am_tag
);
3439 /* Cops - Section : Multimedia Gate Specifications */
3441 cops_mm_gate_spec(tvbuff_t
*tvb
, proto_tree
*st
, guint n
, guint32 offset
) {
3443 proto_tree
*stt
, *object_tree
;
3445 /* Create a subtree */
3446 stt
= info_to_cops_subtree(tvb
,st
,n
,offset
,"Gate Spec");
3450 ti
= info_to_display(tvb
,stt
,offset
,1,"Flags",NULL
,FMT_HEX
,&hf_cops_pcmm_gate_spec_flags
);
3451 object_tree
= proto_item_add_subtree(ti
, ett_cops_subtree
);
3452 proto_tree_add_item(object_tree
, hf_cops_pcmm_gate_spec_flags_gate
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
3453 proto_tree_add_item(object_tree
, hf_cops_pcmm_gate_spec_flags_dscp_overwrite
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
3456 /* DiffServ Code Point */
3457 info_to_display(tvb
,stt
,offset
,1,"DS Field (DSCP or TOS)",NULL
,FMT_HEX
,&hf_cops_pcmm_gate_spec_dscp_tos_field
);
3460 /* DiffServ Code Point Mask */
3461 info_to_display(tvb
,stt
,offset
,1,"DS Field (DSCP or TOS) Mask",NULL
,FMT_HEX
,&hf_cops_pcmm_gate_spec_dscp_tos_mask
);
3465 ti
= info_to_display(tvb
,stt
,offset
,1,"Session Class",table_cops_session_class
,FMT_DEC
,&hf_cops_pcmm_gate_spec_session_class_id
);
3466 object_tree
= proto_item_add_subtree(ti
, ett_cops_subtree
);
3467 proto_tree_add_item(object_tree
, hf_cops_pcmm_gate_spec_session_class_id_priority
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
3468 proto_tree_add_item(object_tree
, hf_cops_pcmm_gate_spec_session_class_id_preemption
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
3469 proto_tree_add_item(object_tree
, hf_cops_pcmm_gate_spec_session_class_id_configurable
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
3472 /* Timer T1 Value */
3473 info_to_display(tvb
,stt
,offset
,2,"Timer T1 Value (sec)",NULL
,FMT_DEC
,&hf_cops_pcmm_gate_spec_timer_t1
);
3476 /* Timer T2 Value */
3477 info_to_display(tvb
,stt
,offset
,2,"Timer T2 Value (sec)",NULL
,FMT_DEC
,&hf_cops_pcmm_gate_spec_timer_t2
);
3480 /* Timer T3 Value */
3481 info_to_display(tvb
,stt
,offset
,2,"Timer T3 Value (sec)",NULL
,FMT_DEC
,&hf_cops_pcmm_gate_spec_timer_t3
);
3484 /* Timer T4 Value */
3485 info_to_display(tvb
,stt
,offset
,2,"Timer T4 Value (sec)",NULL
,FMT_DEC
,&hf_cops_pcmm_gate_spec_timer_t4
);
3491 /* Cops - Section : Classifier */
3493 cops_classifier(tvbuff_t
*tvb
, proto_tree
*st
, guint n
, guint32 offset
, gboolean extended
) {
3497 /* Create a subtree */
3498 stt
= info_to_cops_subtree(tvb
,st
,n
,offset
,
3499 extended
? "Extended Classifier" : "Classifier");
3503 info_to_display(tvb
,stt
,offset
,2,"Protocol ID",NULL
,FMT_DEC
,&hf_cops_pcmm_classifier_protocol_id
);
3506 /* DiffServ Code Point */
3507 info_to_display(tvb
,stt
,offset
,1,"DS Field (DSCP or TOS)",NULL
,FMT_HEX
,&hf_cops_pcmm_classifier_dscp_tos_field
);
3510 /* DiffServ Code Point Mask */
3511 info_to_display(tvb
,stt
,offset
,1,"DS Field (DSCP or TOS) Mask",NULL
,FMT_HEX
,&hf_cops_pcmm_classifier_dscp_tos_mask
);
3514 /* Source IP Address */
3515 info_to_display(tvb
,stt
,offset
,4,"Source IP Address",NULL
,FMT_IPv4
,&hf_cops_pcmm_classifier_src_addr
);
3520 info_to_display(tvb
,stt
,offset
,4,"Source Mask",NULL
,FMT_IPv4
,&hf_cops_pcmm_classifier_src_mask
);
3524 /* Destination IP Address */
3525 info_to_display(tvb
,stt
,offset
,4,"Destination IP Address",NULL
,FMT_IPv4
,&hf_cops_pcmm_classifier_dst_addr
);
3529 /* Destination Mask */
3530 info_to_display(tvb
,stt
,offset
,4,"Destination Mask",NULL
,FMT_IPv4
,&hf_cops_pcmm_classifier_dst_mask
);
3534 /* Source IP Port */
3535 info_to_display(tvb
,stt
,offset
,2,"Source IP Port",NULL
,FMT_DEC
,&hf_cops_pcmm_classifier_src_port
);
3539 /* Source Port End */
3540 info_to_display(tvb
,stt
,offset
,2,"Source Port End",NULL
,FMT_DEC
,&hf_cops_pcmm_classifier_src_port_end
);
3544 /* Destination IP Port */
3545 info_to_display(tvb
,stt
,offset
,2,"Destination IP Port",NULL
,FMT_DEC
,&hf_cops_pcmm_classifier_dst_port
);
3549 /* Destination Port End */
3550 info_to_display(tvb
,stt
,offset
,2,"Destination Port End",NULL
,FMT_DEC
,&hf_cops_pcmm_classifier_dst_port_end
);
3556 info_to_display(tvb
,stt
,offset
,2,"ClassifierID",NULL
,FMT_HEX
,&hf_cops_pcmm_classifier_classifier_id
);
3561 info_to_display(tvb
,stt
,offset
,1,"Priority",NULL
,FMT_HEX
,&hf_cops_pcmm_classifier_priority
);
3565 /* Activation State */
3566 info_to_display(tvb
,stt
,offset
,1,"Activation State",NULL
,FMT_HEX
,&hf_cops_pcmm_classifier_activation_state
);
3570 info_to_display(tvb
,stt
,offset
,1,"Action",NULL
,FMT_HEX
,&hf_cops_pcmm_classifier_action
);
3574 /* 3 octets Not specified */
3580 /* Cops - Section : IPv6 Classifier */
3582 cops_ipv6_classifier(tvbuff_t
*tvb
, proto_tree
*st
, guint n
, guint32 offset
) {
3586 /* Create a subtree */
3587 stt
= info_to_cops_subtree(tvb
,st
,n
,offset
, "IPv6 Classifier");
3590 /* Reserved/Flags */
3591 info_to_display(tvb
,stt
,offset
,1,"Flags",NULL
,FMT_HEX
,&hf_cops_pcmm_classifier_flags
);
3595 info_to_display(tvb
,stt
,offset
,1,"tc-low",NULL
,FMT_HEX
,&hf_cops_pcmm_classifier_tc_low
);
3599 info_to_display(tvb
,stt
,offset
,1,"tc-high",NULL
,FMT_HEX
,&hf_cops_pcmm_classifier_tc_high
);
3603 info_to_display(tvb
,stt
,offset
,1,"tc-mask",NULL
,FMT_HEX
,&hf_cops_pcmm_classifier_tc_mask
);
3607 info_to_display(tvb
,stt
,offset
,4,"Flow Label",NULL
,FMT_HEX
,&hf_cops_pcmm_classifier_flow_label
);
3610 /* Next Header Type */
3611 info_to_display(tvb
,stt
,offset
,2,"Next Header Type",NULL
,FMT_DEC
,&hf_cops_pcmm_classifier_next_header_type
);
3614 /* Source Prefix Length */
3615 info_to_display(tvb
,stt
,offset
,1,"Source Prefix Length",NULL
,FMT_DEC
,&hf_cops_pcmm_classifier_source_prefix_length
);
3618 /* Destination Prefix Length */
3619 info_to_display(tvb
,stt
,offset
,1,"Destination Prefix Length",NULL
,FMT_DEC
,&hf_cops_pcmm_classifier_destination_prefix_length
);
3622 /* Source IP Address */
3623 info_to_display(tvb
,stt
,offset
,16,"IPv6 Source Address",NULL
,FMT_IPv6
,&hf_cops_pcmm_classifier_src_addr_v6
);
3626 /* Destination IP Address */
3627 info_to_display(tvb
,stt
,offset
,16,"IPv6 Destination Address",NULL
,FMT_IPv6
,&hf_cops_pcmm_classifier_dst_addr_v6
);
3630 /* Source IP Port */
3631 info_to_display(tvb
,stt
,offset
,2,"Source Port Start",NULL
,FMT_DEC
,&hf_cops_pcmm_classifier_src_port
);
3634 /* Source Port End */
3635 info_to_display(tvb
,stt
,offset
,2,"Source Port End",NULL
,FMT_DEC
,&hf_cops_pcmm_classifier_src_port_end
);
3638 /* Destination IP Port */
3639 info_to_display(tvb
,stt
,offset
,2,"Destination Port Start",NULL
,FMT_DEC
,&hf_cops_pcmm_classifier_dst_port
);
3642 /* Destination Port End */
3643 info_to_display(tvb
,stt
,offset
,2,"Destination Port End",NULL
,FMT_DEC
,&hf_cops_pcmm_classifier_dst_port_end
);
3647 info_to_display(tvb
,stt
,offset
,2,"ClassifierID",NULL
,FMT_HEX
,&hf_cops_pcmm_classifier_classifier_id
);
3651 info_to_display(tvb
,stt
,offset
,1,"Priority",NULL
,FMT_HEX
,&hf_cops_pcmm_classifier_priority
);
3654 /* Activation State */
3655 info_to_display(tvb
,stt
,offset
,1,"Activation State",NULL
,FMT_HEX
,&hf_cops_pcmm_classifier_activation_state
);
3659 info_to_display(tvb
,stt
,offset
,1,"Action",NULL
,FMT_HEX
,&hf_cops_pcmm_classifier_action
);
3662 /* 3 octets Not specified */
3668 /* Cops - Section : Gate Specifications */
3670 cops_flow_spec(tvbuff_t
*tvb
, proto_tree
*st
, guint n
, guint32 offset
) {
3672 proto_tree
*stt
, *object_tree
;
3674 /* Create a subtree */
3675 stt
= info_to_cops_subtree(tvb
,st
,n
,offset
,"Flow Spec");
3679 info_to_display(tvb
,stt
,offset
,1,"Envelope",NULL
,FMT_DEC
,&hf_cops_pcmm_flow_spec_envelope
);
3682 /* Service Number */
3683 info_to_display(tvb
,stt
,offset
,1,"Service Number",NULL
,FMT_DEC
,&hf_cops_pcmm_flow_spec_service_number
);
3687 info_to_display(tvb
,stt
,offset
,2,"Reserved",NULL
,FMT_HEX
,&hf_cops_pc_reserved
);
3690 /* Authorized Envelope */
3691 ti
= proto_tree_add_text(stt
, tvb
, offset
, 28, "Authorized Envelope");
3692 object_tree
= proto_item_add_subtree(ti
, ett_cops_subtree
);
3694 /* Token Bucket Rate */
3695 info_to_display(tvb
,object_tree
,offset
,4,"Token Bucket Rate",NULL
,FMT_FLT
,&hf_cops_pc_token_bucket_rate
);
3698 /* Token Bucket Size */
3699 info_to_display(tvb
,object_tree
,offset
,4,"Token Bucket Size",NULL
,FMT_FLT
,&hf_cops_pc_token_bucket_size
);
3702 /* Peak Data Rate */
3703 info_to_display(tvb
,object_tree
,offset
,4,"Peak Data Rate",NULL
,FMT_FLT
,&hf_cops_pc_peak_data_rate
);
3706 /* Minimum Policed Unit */
3707 info_to_display(tvb
,object_tree
,offset
,4,"Minimum Policed Unit",NULL
,FMT_DEC
,&hf_cops_pc_min_policed_unit
);
3710 /* Maximum Packet Size */
3711 info_to_display(tvb
,object_tree
,offset
,4,"Maximum Packet Size",NULL
,FMT_DEC
,&hf_cops_pc_max_packet_size
);
3715 info_to_display(tvb
,object_tree
,offset
,4,"Rate",NULL
,FMT_FLT
,&hf_cops_pc_spec_rate
);
3719 info_to_display(tvb
,object_tree
,offset
,4,"Slack Term",NULL
,FMT_DEC
,&hf_cops_pc_slack_term
);
3722 if (n
< 64) return offset
;
3724 /* Reserved Envelope */
3725 ti
= proto_tree_add_text(stt
, tvb
, offset
, 28, "Reserved Envelope");
3726 object_tree
= proto_item_add_subtree(ti
, ett_cops_subtree
);
3728 /* Token Bucket Rate */
3729 info_to_display(tvb
,object_tree
,offset
,4,"Token Bucket Rate",NULL
,FMT_FLT
,&hf_cops_pc_token_bucket_rate
);
3732 /* Token Bucket Size */
3733 info_to_display(tvb
,object_tree
,offset
,4,"Token Bucket Size",NULL
,FMT_FLT
,&hf_cops_pc_token_bucket_size
);
3736 /* Peak Data Rate */
3737 info_to_display(tvb
,object_tree
,offset
,4,"Peak Data Rate",NULL
,FMT_FLT
,&hf_cops_pc_peak_data_rate
);
3740 /* Minimum Policed Unit */
3741 info_to_display(tvb
,object_tree
,offset
,4,"Minimum Policed Unit",NULL
,FMT_DEC
,&hf_cops_pc_min_policed_unit
);
3744 /* Maximum Packet Size */
3745 info_to_display(tvb
,object_tree
,offset
,4,"Maximum Packet Size",NULL
,FMT_DEC
,&hf_cops_pc_max_packet_size
);
3749 info_to_display(tvb
,object_tree
,offset
,4,"Rate",NULL
,FMT_FLT
,&hf_cops_pc_spec_rate
);
3753 info_to_display(tvb
,object_tree
,offset
,4,"Slack Term",NULL
,FMT_DEC
,&hf_cops_pc_slack_term
);
3756 if (n
< 92) return offset
;
3758 /* Committed Envelope */
3759 ti
= proto_tree_add_text(stt
, tvb
, offset
, 28, "Committed Envelope");
3760 object_tree
= proto_item_add_subtree(ti
, ett_cops_subtree
);
3762 /* Token Bucket Rate */
3763 info_to_display(tvb
,object_tree
,offset
,4,"Token Bucket Rate",NULL
,FMT_FLT
,&hf_cops_pc_token_bucket_rate
);
3766 /* Token Bucket Size */
3767 info_to_display(tvb
,object_tree
,offset
,4,"Token Bucket Size",NULL
,FMT_FLT
,&hf_cops_pc_token_bucket_size
);
3770 /* Peak Data Rate */
3771 info_to_display(tvb
,object_tree
,offset
,4,"Peak Data Rate",NULL
,FMT_FLT
,&hf_cops_pc_peak_data_rate
);
3774 /* Minimum Policed Unit */
3775 info_to_display(tvb
,object_tree
,offset
,4,"Minimum Policed Unit",NULL
,FMT_DEC
,&hf_cops_pc_min_policed_unit
);
3778 /* Maximum Packet Size */
3779 info_to_display(tvb
,object_tree
,offset
,4,"Maximum Packet Size",NULL
,FMT_DEC
,&hf_cops_pc_max_packet_size
);
3783 info_to_display(tvb
,object_tree
,offset
,4,"Rate",NULL
,FMT_FLT
,&hf_cops_pc_spec_rate
);
3787 info_to_display(tvb
,object_tree
,offset
,4,"Slack Term",NULL
,FMT_DEC
,&hf_cops_pc_slack_term
);
3793 /* Cops - Section : DOCSIS Service Class Name */
3795 cops_docsis_service_class_name(tvbuff_t
*tvb
, proto_tree
*st
, guint object_len
, guint32 offset
) {
3799 /* Create a subtree */
3800 stt
= info_to_cops_subtree(tvb
,st
,object_len
,offset
,"DOCSIS Service Class Name");
3804 info_to_display(tvb
,stt
,offset
,1,"Envelope",NULL
,FMT_DEC
,&hf_cops_pcmm_envelope
);
3807 proto_tree_add_item(stt
, hf_cops_reserved24
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
3810 if (object_len
>= 12) {
3811 proto_tree_add_item(stt
, hf_cops_pcmm_docsis_scn
, tvb
, offset
, object_len
- 8, ENC_ASCII
|ENC_NA
);
3812 offset
+= object_len
- 8;
3814 proto_tree_add_text(stt
, tvb
, offset
- 8, 2, "Invalid object length: %u", object_len
);
3820 /* New functions were made with the i04 suffix to maintain backward compatibility with I03
3826 /* Cops - Section : Best Effort Service */
3828 cops_best_effort_service_i04_i05(tvbuff_t
*tvb
, proto_tree
*st
, guint n
, guint32 offset
, gboolean i05
) {
3830 proto_tree
*stt
, *object_tree
;
3832 /* Create a subtree */
3833 stt
= info_to_cops_subtree(tvb
,st
,n
,offset
,"Best Effort Service");
3837 info_to_display(tvb
,stt
,offset
,1,"Envelope",NULL
,FMT_DEC
,&hf_cops_pcmm_envelope
);
3840 proto_tree_add_item(stt
, hf_cops_reserved24
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
3843 /* Authorized Envelope */
3844 ti
= proto_tree_add_text(stt
, tvb
, offset
, i05
? 36 : 32, "Authorized Envelope");
3845 object_tree
= proto_item_add_subtree(ti
, ett_cops_subtree
);
3847 /* Traffic Priority */
3848 info_to_display(tvb
,object_tree
,offset
,1,"Traffic Priority",NULL
,FMT_HEX
,&hf_cops_pcmm_traffic_priority
);
3851 proto_tree_add_item(object_tree
, hf_cops_reserved24
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
3854 /* Request Transmission Policy */
3855 decode_docsis_request_transmission_policy(tvb
, offset
, object_tree
, hf_cops_pcmm_request_transmission_policy
);
3858 /* Maximum Sustained Traffic Rate */
3859 info_to_display(tvb
,object_tree
,offset
,4,"Maximum Sustained Traffic Rate",NULL
,FMT_DEC
,&hf_cops_pcmm_max_sustained_traffic_rate
);
3862 /* Maximum Traffic Burst */
3863 info_to_display(tvb
,object_tree
,offset
,4,"Maximum Traffic Burst",NULL
,FMT_DEC
,&hf_cops_pcmm_max_traffic_burst
);
3866 /* Minimum Reserved Traffic Rate */
3867 info_to_display(tvb
,object_tree
,offset
,4,"Minimum Reserved Traffic Rate",NULL
,FMT_DEC
,&hf_cops_pcmm_min_reserved_traffic_rate
);
3870 /* Assumed Minimum Reserved Traffic Rate Packet Size */
3871 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
);
3874 /* Maximum Concatenated Burst */
3875 info_to_display(tvb
,object_tree
,offset
,2,"Maximum Concatenated Burst",NULL
,FMT_DEC
,&hf_cops_pcmm_max_concat_burst
);
3878 /* Required Attribute Mask */
3879 info_to_display(tvb
,object_tree
,offset
,4,"Required Attribute Mask",NULL
,FMT_DEC
,&hf_cops_pcmm_req_att_mask
);
3882 /* Forbidden Attribute Mask */
3883 info_to_display(tvb
,object_tree
,offset
,4,"Forbidden Attribute Mask",NULL
,FMT_DEC
,&hf_cops_pcmm_forbid_att_mask
);
3887 /* Attribute Aggregation Rule Mask */
3888 info_to_display(tvb
,object_tree
,offset
,4,"Attribute Aggregation Rule Mask",NULL
,FMT_DEC
,&hf_cops_pcmm_att_aggr_rule_mask
);
3892 if (n
< 56) return offset
;
3894 /* Reserved Envelope */
3895 ti
= proto_tree_add_text(stt
, tvb
, offset
, i05
? 36 : 32, "Reserved Envelope");
3896 object_tree
= proto_item_add_subtree(ti
, ett_cops_subtree
);
3898 /* Traffic Priority */
3899 info_to_display(tvb
,object_tree
,offset
,1,"Traffic Priority",NULL
,FMT_HEX
,&hf_cops_pcmm_traffic_priority
);
3902 proto_tree_add_item(object_tree
, hf_cops_reserved24
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
3905 /* Request Transmission Policy */
3906 decode_docsis_request_transmission_policy(tvb
, offset
, object_tree
, hf_cops_pcmm_request_transmission_policy
);
3909 /* Maximum Sustained Traffic Rate */
3910 info_to_display(tvb
,object_tree
,offset
,4,"Maximum Sustained Traffic Rate",NULL
,FMT_DEC
,&hf_cops_pcmm_max_sustained_traffic_rate
);
3913 /* Maximum Traffic Burst */
3914 info_to_display(tvb
,object_tree
,offset
,4,"Maximum Traffic Burst",NULL
,FMT_DEC
,&hf_cops_pcmm_max_traffic_burst
);
3917 /* Minimum Reserved Traffic Rate */
3918 info_to_display(tvb
,object_tree
,offset
,4,"Minimum Reserved Traffic Rate",NULL
,FMT_DEC
,&hf_cops_pcmm_min_reserved_traffic_rate
);
3921 /* Assumed Minimum Reserved Traffic Rate Packet Size */
3922 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
);
3925 /* Maximum Concatenated Burst */
3926 info_to_display(tvb
,object_tree
,offset
,2,"Maximum Concatenated Burst",NULL
,FMT_DEC
,&hf_cops_pcmm_max_concat_burst
);
3929 /* Required Attribute Mask */
3930 info_to_display(tvb
,object_tree
,offset
,4,"Required Attribute Mask",NULL
,FMT_DEC
,&hf_cops_pcmm_req_att_mask
);
3933 /* Forbidden Attribute Mask */
3934 info_to_display(tvb
,object_tree
,offset
,4,"Forbidden Attribute Mask",NULL
,FMT_DEC
,&hf_cops_pcmm_forbid_att_mask
);
3938 /* Attribute Aggregation Rule Mask */
3939 info_to_display(tvb
,object_tree
,offset
,4,"Attribute Aggregation Rule Mask",NULL
,FMT_DEC
,&hf_cops_pcmm_att_aggr_rule_mask
);
3943 if (n
< 80) return offset
;
3945 /* Committed Envelope */
3946 ti
= proto_tree_add_text(stt
, tvb
, offset
, i05
? 36 : 32, "Committed Envelope");
3947 object_tree
= proto_item_add_subtree(ti
, ett_cops_subtree
);
3949 /* Traffic Priority */
3950 info_to_display(tvb
,object_tree
,offset
,1,"Traffic Priority",NULL
,FMT_HEX
,&hf_cops_pcmm_traffic_priority
);
3953 proto_tree_add_item(object_tree
, hf_cops_reserved24
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
3956 /* Request Transmission Policy */
3957 decode_docsis_request_transmission_policy(tvb
, offset
, object_tree
, hf_cops_pcmm_request_transmission_policy
);
3960 /* Maximum Sustained Traffic Rate */
3961 info_to_display(tvb
,object_tree
,offset
,4,"Maximum Sustained Traffic Rate",NULL
,FMT_DEC
,&hf_cops_pcmm_max_sustained_traffic_rate
);
3964 /* Maximum Traffic Burst */
3965 info_to_display(tvb
,object_tree
,offset
,4,"Maximum Traffic Burst",NULL
,FMT_DEC
,&hf_cops_pcmm_max_traffic_burst
);
3968 /* Minimum Reserved Traffic Rate */
3969 info_to_display(tvb
,object_tree
,offset
,4,"Minimum Reserved Traffic Rate",NULL
,FMT_DEC
,&hf_cops_pcmm_min_reserved_traffic_rate
);
3972 /* Assumed Minimum Reserved Traffic Rate Packet Size */
3973 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
);
3976 /* Maximum Concatenated Burst */
3977 info_to_display(tvb
,object_tree
,offset
,2,"Maximum Concatenated Burst",NULL
,FMT_DEC
,&hf_cops_pcmm_max_concat_burst
);
3980 /* Required Attribute Mask */
3981 info_to_display(tvb
,object_tree
,offset
,4,"Required Attribute Mask",NULL
,FMT_DEC
,&hf_cops_pcmm_req_att_mask
);
3984 /* Forbidden Attribute Mask */
3985 info_to_display(tvb
,object_tree
,offset
,4,"Forbidden Attribute Mask",NULL
,FMT_DEC
,&hf_cops_pcmm_forbid_att_mask
);
3989 /* Attribute Aggregation Rule Mask */
3990 info_to_display(tvb
,object_tree
,offset
,4,"Attribute Aggregation Rule Mask",NULL
,FMT_DEC
,&hf_cops_pcmm_att_aggr_rule_mask
);
3997 /* Cops - Section : Non-Real-Time Polling Service */
3999 cops_non_real_time_polling_service_i04_i05(tvbuff_t
*tvb
, proto_tree
*st
, guint n
, guint32 offset
, gboolean i05
) {
4001 proto_tree
*stt
, *object_tree
;
4003 /* Create a subtree */
4004 stt
= info_to_cops_subtree(tvb
,st
,n
,offset
,"Non-Real-Time Polling Service");
4008 info_to_display(tvb
,stt
,offset
,1,"Envelope",NULL
,FMT_DEC
,&hf_cops_pcmm_envelope
);
4011 proto_tree_add_item(stt
, hf_cops_reserved24
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
4014 /* Authorized Envelope */
4015 ti
= proto_tree_add_text(stt
, tvb
, offset
, i05
? 40 : 36, "Authorized Envelope");
4016 object_tree
= proto_item_add_subtree(ti
, ett_cops_subtree
);
4018 /* Traffic Priority */
4019 info_to_display(tvb
,object_tree
,offset
,1,"Traffic Priority",NULL
,FMT_HEX
,&hf_cops_pcmm_traffic_priority
);
4022 proto_tree_add_item(object_tree
, hf_cops_reserved24
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
4025 /* Request Transmission Policy */
4026 decode_docsis_request_transmission_policy(tvb
, offset
, object_tree
, hf_cops_pcmm_request_transmission_policy
);
4029 /* Maximum Sustained Traffic Rate */
4030 info_to_display(tvb
,object_tree
,offset
,4,"Maximum Sustained Traffic Rate",NULL
,FMT_DEC
,&hf_cops_pcmm_max_sustained_traffic_rate
);
4033 /* Maximum Traffic Burst */
4034 info_to_display(tvb
,object_tree
,offset
,4,"Maximum Traffic Burst",NULL
,FMT_DEC
,&hf_cops_pcmm_max_traffic_burst
);
4037 /* Minimum Reserved Traffic Rate */
4038 info_to_display(tvb
,object_tree
,offset
,4,"Minimum Reserved Traffic Rate",NULL
,FMT_DEC
,&hf_cops_pcmm_min_reserved_traffic_rate
);
4041 /* Assumed Minimum Reserved Traffic Rate Packet Size */
4042 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
);
4045 /* Maximum Concatenated Burst */
4046 info_to_display(tvb
,object_tree
,offset
,2,"Maximum Concatenated Burst",NULL
,FMT_DEC
,&hf_cops_pcmm_max_concat_burst
);
4049 /* Nominal Polling Interval */
4050 info_to_display(tvb
,object_tree
,offset
,4,"Nominal Polling Interval",NULL
,FMT_DEC
,&hf_cops_pcmm_nominal_polling_interval
);
4053 /* Required Attribute Mask */
4054 info_to_display(tvb
,object_tree
,offset
,4,"Required Attribute Mask",NULL
,FMT_DEC
,&hf_cops_pcmm_req_att_mask
);
4057 /* Forbidden Attribute Mask */
4058 info_to_display(tvb
,object_tree
,offset
,4,"Forbidden Attribute Mask",NULL
,FMT_DEC
,&hf_cops_pcmm_forbid_att_mask
);
4062 /* Attribute Aggregation Rule Mask */
4063 info_to_display(tvb
,object_tree
,offset
,4,"Attribute Aggregation Rule Mask",NULL
,FMT_DEC
,&hf_cops_pcmm_att_aggr_rule_mask
);
4067 if (n
< 64) return offset
;
4069 /* Reserved Envelope */
4070 ti
= proto_tree_add_text(stt
, tvb
, offset
, i05
? 40 : 36, "Reserved Envelope");
4071 object_tree
= proto_item_add_subtree(ti
, ett_cops_subtree
);
4073 /* Traffic Priority */
4074 info_to_display(tvb
,object_tree
,offset
,1,"Traffic Priority",NULL
,FMT_HEX
,&hf_cops_pcmm_traffic_priority
);
4077 proto_tree_add_item(object_tree
, hf_cops_reserved24
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
4080 /* Request Transmission Policy */
4081 decode_docsis_request_transmission_policy(tvb
, offset
, object_tree
, hf_cops_pcmm_request_transmission_policy
);
4084 /* Maximum Sustained Traffic Rate */
4085 info_to_display(tvb
,object_tree
,offset
,4,"Maximum Sustained Traffic Rate",NULL
,FMT_DEC
,&hf_cops_pcmm_max_sustained_traffic_rate
);
4088 /* Maximum Traffic Burst */
4089 info_to_display(tvb
,object_tree
,offset
,4,"Maximum Traffic Burst",NULL
,FMT_DEC
,&hf_cops_pcmm_max_traffic_burst
);
4092 /* Minimum Reserved Traffic Rate */
4093 info_to_display(tvb
,object_tree
,offset
,4,"Minimum Reserved Traffic Rate",NULL
,FMT_DEC
,&hf_cops_pcmm_min_reserved_traffic_rate
);
4096 /* Assumed Minimum Reserved Traffic Rate Packet Size */
4097 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
);
4100 /* Maximum Concatenated Burst */
4101 info_to_display(tvb
,object_tree
,offset
,2,"Maximum Concatenated Burst",NULL
,FMT_DEC
,&hf_cops_pcmm_max_concat_burst
);
4104 /* Nominal Polling Interval */
4105 info_to_display(tvb
,object_tree
,offset
,4,"Nominal Polling Interval",NULL
,FMT_DEC
,&hf_cops_pcmm_nominal_polling_interval
);
4108 /* Required Attribute Mask */
4109 info_to_display(tvb
,object_tree
,offset
,4,"Required Attribute Mask",NULL
,FMT_DEC
,&hf_cops_pcmm_req_att_mask
);
4112 /* Forbidden Attribute Mask */
4113 info_to_display(tvb
,object_tree
,offset
,4,"Forbidden Attribute Mask",NULL
,FMT_DEC
,&hf_cops_pcmm_forbid_att_mask
);
4117 /* Attribute Aggregation Rule Mask */
4118 info_to_display(tvb
,object_tree
,offset
,4,"Attribute Aggregation Rule Mask",NULL
,FMT_DEC
,&hf_cops_pcmm_att_aggr_rule_mask
);
4122 if (n
< 92) return offset
;
4124 /* Committed Envelope */
4125 ti
= proto_tree_add_text(stt
, tvb
, offset
, i05
? 40 : 36, "Committed Envelope");
4126 object_tree
= proto_item_add_subtree(ti
, ett_cops_subtree
);
4128 /* Traffic Priority */
4129 info_to_display(tvb
,object_tree
,offset
,1,"Traffic Priority",NULL
,FMT_HEX
,&hf_cops_pcmm_traffic_priority
);
4132 proto_tree_add_item(object_tree
, hf_cops_reserved24
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
4135 /* Request Transmission Policy */
4136 decode_docsis_request_transmission_policy(tvb
, offset
, object_tree
, hf_cops_pcmm_request_transmission_policy
);
4139 /* Maximum Sustained Traffic Rate */
4140 info_to_display(tvb
,object_tree
,offset
,4,"Maximum Sustained Traffic Rate",NULL
,FMT_DEC
,&hf_cops_pcmm_max_sustained_traffic_rate
);
4143 /* Maximum Traffic Burst */
4144 info_to_display(tvb
,object_tree
,offset
,4,"Maximum Traffic Burst",NULL
,FMT_DEC
,&hf_cops_pcmm_max_traffic_burst
);
4147 /* Minimum Reserved Traffic Rate */
4148 info_to_display(tvb
,object_tree
,offset
,4,"Minimum Reserved Traffic Rate",NULL
,FMT_DEC
,&hf_cops_pcmm_min_reserved_traffic_rate
);
4151 /* Assumed Minimum Reserved Traffic Rate Packet Size */
4152 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
);
4155 /* Maximum Concatenated Burst */
4156 info_to_display(tvb
,object_tree
,offset
,2,"Maximum Concatenated Burst",NULL
,FMT_DEC
,&hf_cops_pcmm_max_concat_burst
);
4159 /* Nominal Polling Interval */
4160 info_to_display(tvb
,object_tree
,offset
,4,"Nominal Polling Interval",NULL
,FMT_DEC
,&hf_cops_pcmm_nominal_polling_interval
);
4163 /* Required Attribute Mask */
4164 info_to_display(tvb
,object_tree
,offset
,4,"Required Attribute Mask",NULL
,FMT_DEC
,&hf_cops_pcmm_req_att_mask
);
4167 /* Forbidden Attribute Mask */
4168 info_to_display(tvb
,object_tree
,offset
,4,"Forbidden Attribute Mask",NULL
,FMT_DEC
,&hf_cops_pcmm_forbid_att_mask
);
4172 /* Attribute Aggregation Rule Mask */
4173 info_to_display(tvb
,object_tree
,offset
,4,"Attribute Aggregation Rule Mask",NULL
,FMT_DEC
,&hf_cops_pcmm_att_aggr_rule_mask
);
4180 /* Cops - Section : Real-Time Polling Service */
4182 cops_real_time_polling_service_i04_i05(tvbuff_t
*tvb
, proto_tree
*st
, guint n
, guint32 offset
, gboolean i05
) {
4184 proto_tree
*stt
, *object_tree
;
4186 /* Create a subtree */
4187 stt
= info_to_cops_subtree(tvb
,st
,n
,offset
,"Real-Time Polling Service");
4191 info_to_display(tvb
,stt
,offset
,1,"Envelope",NULL
,FMT_DEC
,&hf_cops_pcmm_envelope
);
4194 proto_tree_add_item(stt
, hf_cops_reserved24
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
4197 /* Authorized Envelope */
4198 ti
= proto_tree_add_text(stt
, tvb
, offset
, i05
? 40 : 36, "Authorized Envelope");
4199 object_tree
= proto_item_add_subtree(ti
, ett_cops_subtree
);
4201 /* Request Transmission Policy */
4202 decode_docsis_request_transmission_policy(tvb
, offset
, object_tree
, hf_cops_pcmm_request_transmission_policy
);
4205 /* Maximum Sustained Traffic Rate */
4206 info_to_display(tvb
,object_tree
,offset
,4,"Maximum Sustained Traffic Rate",NULL
,FMT_DEC
,&hf_cops_pcmm_max_sustained_traffic_rate
);
4209 /* Maximum Traffic Burst */
4210 info_to_display(tvb
,object_tree
,offset
,4,"Maximum Traffic Burst",NULL
,FMT_DEC
,&hf_cops_pcmm_max_traffic_burst
);
4213 /* Minimum Reserved Traffic Rate */
4214 info_to_display(tvb
,object_tree
,offset
,4,"Minimum Reserved Traffic Rate",NULL
,FMT_DEC
,&hf_cops_pcmm_min_reserved_traffic_rate
);
4217 /* Assumed Minimum Reserved Traffic Rate Packet Size */
4218 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
);
4221 /* Maximum Concatenated Burst */
4222 info_to_display(tvb
,object_tree
,offset
,2,"Maximum Concatenated Burst",NULL
,FMT_DEC
,&hf_cops_pcmm_max_concat_burst
);
4225 /* Nominal Polling Interval */
4226 info_to_display(tvb
,object_tree
,offset
,4,"Nominal Polling Interval",NULL
,FMT_DEC
,&hf_cops_pcmm_nominal_polling_interval
);
4229 /* Tolerated Poll Jitter */
4230 info_to_display(tvb
,object_tree
,offset
,4,"Tolerated Poll Jitter",NULL
,FMT_DEC
,&hf_cops_pcmm_tolerated_poll_jitter
);
4233 /* Required Attribute Mask */
4234 info_to_display(tvb
,object_tree
,offset
,4,"Required Attribute Mask",NULL
,FMT_DEC
,&hf_cops_pcmm_req_att_mask
);
4237 /* Forbidden Attribute Mask */
4238 info_to_display(tvb
,object_tree
,offset
,4,"Forbidden Attribute Mask",NULL
,FMT_DEC
,&hf_cops_pcmm_forbid_att_mask
);
4242 /* Attribute Aggregation Rule Mask */
4243 info_to_display(tvb
,object_tree
,offset
,4,"Attribute Aggregation Rule Mask",NULL
,FMT_DEC
,&hf_cops_pcmm_att_aggr_rule_mask
);
4247 if (n
< 64) return offset
;
4249 /* Reserved Envelope */
4250 ti
= proto_tree_add_text(stt
, tvb
, offset
, i05
? 40 : 36, "Reserved Envelope");
4251 object_tree
= proto_item_add_subtree(ti
, ett_cops_subtree
);
4253 /* Request Transmission Policy */
4254 decode_docsis_request_transmission_policy(tvb
, offset
, object_tree
, hf_cops_pcmm_request_transmission_policy
);
4257 /* Maximum Sustained Traffic Rate */
4258 info_to_display(tvb
,object_tree
,offset
,4,"Maximum Sustained Traffic Rate",NULL
,FMT_DEC
,&hf_cops_pcmm_max_sustained_traffic_rate
);
4261 /* Maximum Traffic Burst */
4262 info_to_display(tvb
,object_tree
,offset
,4,"Maximum Traffic Burst",NULL
,FMT_DEC
,&hf_cops_pcmm_max_traffic_burst
);
4265 /* Minimum Reserved Traffic Rate */
4266 info_to_display(tvb
,object_tree
,offset
,4,"Minimum Reserved Traffic Rate",NULL
,FMT_DEC
,&hf_cops_pcmm_min_reserved_traffic_rate
);
4269 /* Assumed Minimum Reserved Traffic Rate Packet Size */
4270 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
);
4273 /* Maximum Concatenated Burst */
4274 info_to_display(tvb
,object_tree
,offset
,2,"Maximum Concatenated Burst",NULL
,FMT_DEC
,&hf_cops_pcmm_max_concat_burst
);
4277 /* Nominal Polling Interval */
4278 info_to_display(tvb
,object_tree
,offset
,4,"Nominal Polling Interval",NULL
,FMT_DEC
,&hf_cops_pcmm_nominal_polling_interval
);
4281 /* Tolerated Poll Jitter */
4282 info_to_display(tvb
,object_tree
,offset
,4,"Tolerated Poll Jitter",NULL
,FMT_DEC
,&hf_cops_pcmm_tolerated_poll_jitter
);
4285 /* Required Attribute Mask */
4286 info_to_display(tvb
,object_tree
,offset
,4,"Required Attribute Mask",NULL
,FMT_DEC
,&hf_cops_pcmm_req_att_mask
);
4289 /* Forbidden Attribute Mask */
4290 info_to_display(tvb
,object_tree
,offset
,4,"Forbidden Attribute Mask",NULL
,FMT_DEC
,&hf_cops_pcmm_forbid_att_mask
);
4294 /* Attribute Aggregation Rule Mask */
4295 info_to_display(tvb
,object_tree
,offset
,4,"Attribute Aggregation Rule Mask",NULL
,FMT_DEC
,&hf_cops_pcmm_att_aggr_rule_mask
);
4299 if (n
< 92) return offset
;
4301 /* Committed Envelope */
4302 ti
= proto_tree_add_text(stt
, tvb
, offset
, i05
? 40 : 36, "Committed Envelope");
4303 object_tree
= proto_item_add_subtree(ti
, ett_cops_subtree
);
4305 /* Request Transmission Policy */
4306 decode_docsis_request_transmission_policy(tvb
, offset
, object_tree
, hf_cops_pcmm_request_transmission_policy
);
4309 /* Maximum Sustained Traffic Rate */
4310 info_to_display(tvb
,object_tree
,offset
,4,"Maximum Sustained Traffic Rate",NULL
,FMT_DEC
,&hf_cops_pcmm_max_sustained_traffic_rate
);
4313 /* Maximum Traffic Burst */
4314 info_to_display(tvb
,object_tree
,offset
,4,"Maximum Traffic Burst",NULL
,FMT_DEC
,&hf_cops_pcmm_max_traffic_burst
);
4317 /* Minimum Reserved Traffic Rate */
4318 info_to_display(tvb
,object_tree
,offset
,4,"Minimum Reserved Traffic Rate",NULL
,FMT_DEC
,&hf_cops_pcmm_min_reserved_traffic_rate
);
4321 /* Assumed Minimum Reserved Traffic Rate Packet Size */
4322 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
);
4325 /* Maximum Concatenated Burst */
4326 info_to_display(tvb
,object_tree
,offset
,2,"Maximum Concatenated Burst",NULL
,FMT_DEC
,&hf_cops_pcmm_max_concat_burst
);
4329 /* Nominal Polling Interval */
4330 info_to_display(tvb
,object_tree
,offset
,4,"Nominal Polling Interval",NULL
,FMT_DEC
,&hf_cops_pcmm_nominal_polling_interval
);
4333 /* Tolerated Poll Jitter */
4334 info_to_display(tvb
,object_tree
,offset
,4,"Tolerated Poll Jitter",NULL
,FMT_DEC
,&hf_cops_pcmm_tolerated_poll_jitter
);
4337 /* Required Attribute Mask */
4338 info_to_display(tvb
,object_tree
,offset
,4,"Required Attribute Mask",NULL
,FMT_DEC
,&hf_cops_pcmm_req_att_mask
);
4341 /* Forbidden Attribute Mask */
4342 info_to_display(tvb
,object_tree
,offset
,4,"Forbidden Attribute Mask",NULL
,FMT_DEC
,&hf_cops_pcmm_forbid_att_mask
);
4346 /* Attribute Aggregation Rule Mask */
4347 info_to_display(tvb
,object_tree
,offset
,4,"Attribute Aggregation Rule Mask",NULL
,FMT_DEC
,&hf_cops_pcmm_att_aggr_rule_mask
);
4354 /* Cops - Section : Unsolicited Grant Service */
4356 cops_unsolicited_grant_service_i04_i05(tvbuff_t
*tvb
, proto_tree
*st
, guint n
, guint32 offset
, gboolean i05
) {
4358 proto_tree
*stt
, *object_tree
;
4360 /* Create a subtree */
4361 stt
= info_to_cops_subtree(tvb
,st
,n
,offset
,"Unsolicited Grant Service");
4365 info_to_display(tvb
,stt
,offset
,1,"Envelope",NULL
,FMT_DEC
,&hf_cops_pcmm_envelope
);
4368 proto_tree_add_item(stt
, hf_cops_reserved24
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
4371 /* Authorized Envelope */
4372 ti
= proto_tree_add_text(stt
, tvb
, offset
, i05
? 28 : 24, "Authorized Envelope");
4373 object_tree
= proto_item_add_subtree(ti
, ett_cops_subtree
);
4375 /* Request Transmission Policy */
4376 decode_docsis_request_transmission_policy(tvb
, offset
, object_tree
, hf_cops_pcmm_request_transmission_policy
);
4379 /* Unsolicited Grant Size */
4380 info_to_display(tvb
,object_tree
,offset
,2,"Unsolicited Grant Size",NULL
,FMT_DEC
,&hf_cops_pcmm_unsolicited_grant_size
);
4383 /* Grants Per Interval */
4384 info_to_display(tvb
,object_tree
,offset
,1,"Grants Per Interval",NULL
,FMT_DEC
,&hf_cops_pcmm_grants_per_interval
);
4387 proto_tree_add_item(object_tree
, hf_cops_reserved8
, tvb
, offset
, 1, ENC_NA
);
4390 /* Nominal Grant Interval */
4391 info_to_display(tvb
,object_tree
,offset
,4,"Nominal Grant Interval",NULL
,FMT_DEC
,&hf_cops_pcmm_nominal_grant_interval
);
4394 /* Tolerated Grant Jitter */
4395 info_to_display(tvb
,object_tree
,offset
,4,"Tolerated Grant Jitter",NULL
,FMT_DEC
,&hf_cops_pcmm_tolerated_grant_jitter
);
4398 /* Required Attribute Mask */
4399 info_to_display(tvb
,object_tree
,offset
,4,"Required Attribute Mask",NULL
,FMT_DEC
,&hf_cops_pcmm_req_att_mask
);
4402 /* Forbidden Attribute Mask */
4403 info_to_display(tvb
,object_tree
,offset
,4,"Forbidden Attribute Mask",NULL
,FMT_DEC
,&hf_cops_pcmm_forbid_att_mask
);
4407 /* Attribute Aggregation Rule Mask */
4408 info_to_display(tvb
,object_tree
,offset
,4,"Attribute Aggregation Rule Mask",NULL
,FMT_DEC
,&hf_cops_pcmm_att_aggr_rule_mask
);
4412 if (n
< 40) return offset
;
4414 /* Reserved Envelope */
4415 ti
= proto_tree_add_text(stt
, tvb
, offset
, i05
? 28 : 24, "Reserved Envelope");
4416 object_tree
= proto_item_add_subtree(ti
, ett_cops_subtree
);
4418 /* Request Transmission Policy */
4419 decode_docsis_request_transmission_policy(tvb
, offset
, object_tree
, hf_cops_pcmm_request_transmission_policy
);
4422 /* Unsolicited Grant Size */
4423 info_to_display(tvb
,object_tree
,offset
,2,"Unsolicited Grant Size",NULL
,FMT_DEC
,&hf_cops_pcmm_unsolicited_grant_size
);
4426 /* Grants Per Interval */
4427 info_to_display(tvb
,object_tree
,offset
,1,"Grants Per Interval",NULL
,FMT_DEC
,&hf_cops_pcmm_grants_per_interval
);
4430 proto_tree_add_item(object_tree
, hf_cops_reserved8
, tvb
, offset
, 1, ENC_NA
);
4433 /* Nominal Grant Interval */
4434 info_to_display(tvb
,object_tree
,offset
,4,"Nominal Grant Interval",NULL
,FMT_DEC
,&hf_cops_pcmm_nominal_grant_interval
);
4437 /* Tolerated Grant Jitter */
4438 info_to_display(tvb
,object_tree
,offset
,4,"Tolerated Grant Jitter",NULL
,FMT_DEC
,&hf_cops_pcmm_tolerated_grant_jitter
);
4441 /* Required Attribute Mask */
4442 info_to_display(tvb
,object_tree
,offset
,4,"Required Attribute Mask",NULL
,FMT_DEC
,&hf_cops_pcmm_req_att_mask
);
4445 /* Forbidden Attribute Mask */
4446 info_to_display(tvb
,object_tree
,offset
,4,"Forbidden Attribute Mask",NULL
,FMT_DEC
,&hf_cops_pcmm_forbid_att_mask
);
4450 /* Attribute Aggregation Rule Mask */
4451 info_to_display(tvb
,object_tree
,offset
,4,"Attribute Aggregation Rule Mask",NULL
,FMT_DEC
,&hf_cops_pcmm_att_aggr_rule_mask
);
4455 if (n
< 56) return offset
;
4457 /* Committed Envelope */
4458 ti
= proto_tree_add_text(stt
, tvb
, offset
, i05
? 28 : 24, "Committed Envelope");
4459 object_tree
= proto_item_add_subtree(ti
, ett_cops_subtree
);
4461 /* Request Transmission Policy */
4462 decode_docsis_request_transmission_policy(tvb
, offset
, object_tree
, hf_cops_pcmm_request_transmission_policy
);
4465 /* Unsolicited Grant Size */
4466 info_to_display(tvb
,object_tree
,offset
,2,"Unsolicited Grant Size",NULL
,FMT_DEC
,&hf_cops_pcmm_unsolicited_grant_size
);
4469 /* Grants Per Interval */
4470 info_to_display(tvb
,object_tree
,offset
,1,"Grants Per Interval",NULL
,FMT_DEC
,&hf_cops_pcmm_grants_per_interval
);
4473 proto_tree_add_item(object_tree
, hf_cops_reserved8
, tvb
, offset
, 1, ENC_NA
);
4476 /* Nominal Grant Interval */
4477 info_to_display(tvb
,object_tree
,offset
,4,"Nominal Grant Interval",NULL
,FMT_DEC
,&hf_cops_pcmm_nominal_grant_interval
);
4480 /* Tolerated Grant Jitter */
4481 info_to_display(tvb
,object_tree
,offset
,4,"Tolerated Grant Jitter",NULL
,FMT_DEC
,&hf_cops_pcmm_tolerated_grant_jitter
);
4484 /* Required Attribute Mask */
4485 info_to_display(tvb
,object_tree
,offset
,4,"Required Attribute Mask",NULL
,FMT_DEC
,&hf_cops_pcmm_req_att_mask
);
4488 /* Forbidden Attribute Mask */
4489 info_to_display(tvb
,object_tree
,offset
,4,"Forbidden Attribute Mask",NULL
,FMT_DEC
,&hf_cops_pcmm_forbid_att_mask
);
4493 /* Attribute Aggregation Rule Mask */
4494 info_to_display(tvb
,object_tree
,offset
,4,"Attribute Aggregation Rule Mask",NULL
,FMT_DEC
,&hf_cops_pcmm_att_aggr_rule_mask
);
4501 /* Cops - Section : Unsolicited Grant Service with Activity Detection */
4503 cops_ugs_with_activity_detection_i04_i05(tvbuff_t
*tvb
, proto_tree
*st
, guint n
, guint32 offset
, gboolean i05
) {
4505 proto_tree
*stt
, *object_tree
;
4507 /* Create a subtree */
4508 stt
= info_to_cops_subtree(tvb
,st
,n
,offset
,"Unsolicited Grant Service with Activity Detection");
4512 info_to_display(tvb
,stt
,offset
,1,"Envelope",NULL
,FMT_DEC
,&hf_cops_pcmm_envelope
);
4515 proto_tree_add_item(stt
, hf_cops_reserved24
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
4518 /* Authorized Envelope */
4519 ti
= proto_tree_add_text(stt
, tvb
, offset
, i05
? 36 : 32, "Authorized Envelope");
4520 object_tree
= proto_item_add_subtree(ti
, ett_cops_subtree
);
4522 /* Request Transmission Policy */
4523 decode_docsis_request_transmission_policy(tvb
, offset
, object_tree
, hf_cops_pcmm_request_transmission_policy
);
4526 /* Unsolicited Grant Size */
4527 info_to_display(tvb
,object_tree
,offset
,2,"Unsolicited Grant Size",NULL
,FMT_DEC
,&hf_cops_pcmm_unsolicited_grant_size
);
4530 /* Grants Per Interval */
4531 info_to_display(tvb
,object_tree
,offset
,1,"Grants Per Interval",NULL
,FMT_DEC
,&hf_cops_pcmm_grants_per_interval
);
4534 proto_tree_add_item(object_tree
, hf_cops_reserved8
, tvb
, offset
, 1, ENC_NA
);
4537 /* Nominal Grant Interval */
4538 info_to_display(tvb
,object_tree
,offset
,4,"Nominal Grant Interval",NULL
,FMT_DEC
,&hf_cops_pcmm_nominal_grant_interval
);
4541 /* Tolerated Grant Jitter */
4542 info_to_display(tvb
,object_tree
,offset
,4,"Tolerated Grant Jitter",NULL
,FMT_DEC
,&hf_cops_pcmm_tolerated_grant_jitter
);
4545 /* Nominal Polling Interval */
4546 info_to_display(tvb
,object_tree
,offset
,4,"Nominal Polling Interval",NULL
,FMT_DEC
,&hf_cops_pcmm_nominal_polling_interval
);
4549 /* Tolerated Poll Jitter */
4550 info_to_display(tvb
,object_tree
,offset
,4,"Tolerated Poll Jitter",NULL
,FMT_DEC
,&hf_cops_pcmm_tolerated_poll_jitter
);
4553 /* Required Attribute Mask */
4554 info_to_display(tvb
,object_tree
,offset
,4,"Required Attribute Mask",NULL
,FMT_DEC
,&hf_cops_pcmm_req_att_mask
);
4557 /* Forbidden Attribute Mask */
4558 info_to_display(tvb
,object_tree
,offset
,4,"Forbidden Attribute Mask",NULL
,FMT_DEC
,&hf_cops_pcmm_forbid_att_mask
);
4562 /* Attribute Aggregation Rule Mask */
4563 info_to_display(tvb
,object_tree
,offset
,4,"Attribute Aggregation Rule Mask",NULL
,FMT_DEC
,&hf_cops_pcmm_att_aggr_rule_mask
);
4567 if (n
< 56) return offset
;
4569 /* Reserved Envelope */
4570 ti
= proto_tree_add_text(stt
, tvb
, offset
, i05
? 36 : 32, "Reserved Envelope");
4571 object_tree
= proto_item_add_subtree(ti
, ett_cops_subtree
);
4573 /* Request Transmission Policy */
4574 decode_docsis_request_transmission_policy(tvb
, offset
, object_tree
, hf_cops_pcmm_request_transmission_policy
);
4577 /* Unsolicited Grant Size */
4578 info_to_display(tvb
,object_tree
,offset
,2,"Unsolicited Grant Size",NULL
,FMT_DEC
,&hf_cops_pcmm_unsolicited_grant_size
);
4581 /* Grants Per Interval */
4582 info_to_display(tvb
,object_tree
,offset
,1,"Grants Per Interval",NULL
,FMT_DEC
,&hf_cops_pcmm_grants_per_interval
);
4585 proto_tree_add_item(object_tree
, hf_cops_reserved8
, tvb
, offset
, 1, ENC_NA
);
4588 /* Nominal Grant Interval */
4589 info_to_display(tvb
,object_tree
,offset
,4,"Nominal Grant Interval",NULL
,FMT_DEC
,&hf_cops_pcmm_nominal_grant_interval
);
4592 /* Tolerated Grant Jitter */
4593 info_to_display(tvb
,object_tree
,offset
,4,"Tolerated Grant Jitter",NULL
,FMT_DEC
,&hf_cops_pcmm_tolerated_grant_jitter
);
4596 /* Nominal Polling Interval */
4597 info_to_display(tvb
,object_tree
,offset
,4,"Nominal Polling Interval",NULL
,FMT_DEC
,&hf_cops_pcmm_nominal_polling_interval
);
4600 /* Tolerated Poll Jitter */
4601 info_to_display(tvb
,object_tree
,offset
,4,"Tolerated Poll Jitter",NULL
,FMT_DEC
,&hf_cops_pcmm_tolerated_poll_jitter
);
4604 /* Required Attribute Mask */
4605 info_to_display(tvb
,object_tree
,offset
,4,"Required Attribute Mask",NULL
,FMT_DEC
,&hf_cops_pcmm_req_att_mask
);
4608 /* Forbidden Attribute Mask */
4609 info_to_display(tvb
,object_tree
,offset
,4,"Forbidden Attribute Mask",NULL
,FMT_DEC
,&hf_cops_pcmm_forbid_att_mask
);
4613 /* Attribute Aggregation Rule Mask */
4614 info_to_display(tvb
,object_tree
,offset
,4,"Attribute Aggregation Rule Mask",NULL
,FMT_DEC
,&hf_cops_pcmm_att_aggr_rule_mask
);
4618 if (n
< 80) return offset
;
4620 /* Committed Envelope */
4621 ti
= proto_tree_add_text(stt
, tvb
, offset
, i05
? 36 : 32, "Committed Envelope");
4622 object_tree
= proto_item_add_subtree(ti
, ett_cops_subtree
);
4624 /* Request Transmission Policy */
4625 decode_docsis_request_transmission_policy(tvb
, offset
, object_tree
, hf_cops_pcmm_request_transmission_policy
);
4628 /* Unsolicited Grant Size */
4629 info_to_display(tvb
,object_tree
,offset
,2,"Unsolicited Grant Size",NULL
,FMT_DEC
,&hf_cops_pcmm_unsolicited_grant_size
);
4632 /* Grants Per Interval */
4633 info_to_display(tvb
,object_tree
,offset
,1,"Grants Per Interval",NULL
,FMT_DEC
,&hf_cops_pcmm_grants_per_interval
);
4636 proto_tree_add_item(object_tree
, hf_cops_reserved8
, tvb
, offset
, 1, ENC_NA
);
4639 /* Nominal Grant Interval */
4640 info_to_display(tvb
,object_tree
,offset
,4,"Nominal Grant Interval",NULL
,FMT_DEC
,&hf_cops_pcmm_nominal_grant_interval
);
4643 /* Tolerated Grant Jitter */
4644 info_to_display(tvb
,object_tree
,offset
,4,"Tolerated Grant Jitter",NULL
,FMT_DEC
,&hf_cops_pcmm_tolerated_grant_jitter
);
4647 /* Nominal Polling Interval */
4648 info_to_display(tvb
,object_tree
,offset
,4,"Nominal Polling Interval",NULL
,FMT_DEC
,&hf_cops_pcmm_nominal_polling_interval
);
4651 /* Tolerated Poll Jitter */
4652 info_to_display(tvb
,object_tree
,offset
,4,"Tolerated Poll Jitter",NULL
,FMT_DEC
,&hf_cops_pcmm_tolerated_poll_jitter
);
4655 /* Required Attribute Mask */
4656 info_to_display(tvb
,object_tree
,offset
,4,"Required Attribute Mask",NULL
,FMT_DEC
,&hf_cops_pcmm_req_att_mask
);
4659 /* Forbidden Attribute Mask */
4660 info_to_display(tvb
,object_tree
,offset
,4,"Forbidden Attribute Mask",NULL
,FMT_DEC
,&hf_cops_pcmm_forbid_att_mask
);
4664 /* Attribute Aggregation Rule Mask */
4665 info_to_display(tvb
,object_tree
,offset
,4,"Attribute Aggregation Rule Mask",NULL
,FMT_DEC
,&hf_cops_pcmm_att_aggr_rule_mask
);
4672 /* Cops - Section : Downstream Service */
4674 cops_downstream_service_i04_i05(tvbuff_t
*tvb
, proto_tree
*st
, guint n
, guint32 offset
, gboolean i05
) {
4676 proto_tree
*stt
, *object_tree
;
4678 /* Create a subtree */
4679 stt
= info_to_cops_subtree(tvb
,st
,n
,offset
,"Downstream Service");
4683 info_to_display(tvb
,stt
,offset
,1,"Envelope",NULL
,FMT_DEC
,&hf_cops_pcmm_envelope
);
4686 proto_tree_add_item(stt
, hf_cops_reserved24
, tvb
, offset
, 3, ENC_NA
);
4689 /* Authorized Envelope */
4690 ti
= proto_tree_add_text(stt
, tvb
, offset
, i05
? 40 : 36, "Authorized Envelope");
4691 object_tree
= proto_item_add_subtree(ti
, ett_cops_subtree
);
4693 /* Traffic Priority */
4694 info_to_display(tvb
,object_tree
,offset
,1,"Traffic Priority",NULL
,FMT_HEX
,&hf_cops_pcmm_traffic_priority
);
4697 /* Downstream Resequencing */
4698 info_to_display(tvb
,object_tree
,offset
,1,"Downstream Resequencing",NULL
,FMT_HEX
,&hf_cops_pcmm_down_resequencing
);
4701 proto_tree_add_item(object_tree
, hf_cops_reserved16
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
4704 /* Maximum Sustained Traffic Rate */
4705 info_to_display(tvb
,object_tree
,offset
,4,"Maximum Sustained Traffic Rate",NULL
,FMT_DEC
,&hf_cops_pcmm_max_sustained_traffic_rate
);
4708 /* Maximum Traffic Burst */
4709 info_to_display(tvb
,object_tree
,offset
,4,"Maximum Traffic Burst",NULL
,FMT_DEC
,&hf_cops_pcmm_max_traffic_burst
);
4712 /* Minimum Reserved Traffic Rate */
4713 info_to_display(tvb
,object_tree
,offset
,4,"Minimum Reserved Traffic Rate",NULL
,FMT_DEC
,&hf_cops_pcmm_min_reserved_traffic_rate
);
4716 /* Assumed Minimum Reserved Traffic Rate Packet Size */
4717 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
);
4721 info_to_display(tvb
,object_tree
,offset
,2,"Reserved",NULL
,FMT_HEX
,&hf_cops_pc_reserved
);
4724 /* Maximum Downstream Latency */
4725 info_to_display(tvb
,object_tree
,offset
,4,"Maximum Downstream Latency",NULL
,FMT_DEC
,&hf_cops_pcmm_max_downstream_latency
);
4728 /* Downstream Peak Traffic Rate */
4729 info_to_display(tvb
,object_tree
,offset
,4,"Downstream Peak Traffic Rate",NULL
,FMT_DEC
,&hf_cops_pcmm_down_peak_traffic_rate
);
4732 /* Required Attribute Mask */
4733 info_to_display(tvb
,object_tree
,offset
,4,"Required Attribute Mask",NULL
,FMT_DEC
,&hf_cops_pcmm_req_att_mask
);
4736 /* Forbidden Attribute Mask */
4737 info_to_display(tvb
,object_tree
,offset
,4,"Forbidden Attribute Mask",NULL
,FMT_DEC
,&hf_cops_pcmm_forbid_att_mask
);
4741 /* Attribute Aggregation Rule Mask */
4742 info_to_display(tvb
,object_tree
,offset
,4,"Attribute Aggregation Rule Mask",NULL
,FMT_DEC
,&hf_cops_pcmm_att_aggr_rule_mask
);
4746 if (n
< 56) return offset
;
4748 /* Reserved Envelope */
4749 ti
= proto_tree_add_text(stt
, tvb
, offset
, i05
? 40 : 36, "Reserved Envelope");
4750 object_tree
= proto_item_add_subtree(ti
, ett_cops_subtree
);
4752 /* Traffic Priority */
4753 info_to_display(tvb
,object_tree
,offset
,1,"Traffic Priority",NULL
,FMT_HEX
,&hf_cops_pcmm_traffic_priority
);
4756 /* Downstream Resequencing */
4757 info_to_display(tvb
,object_tree
,offset
,1,"Downstream Resequencing",NULL
,FMT_HEX
,&hf_cops_pcmm_down_resequencing
);
4760 proto_tree_add_item(object_tree
, hf_cops_reserved16
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
4763 /* Maximum Sustained Traffic Rate */
4764 info_to_display(tvb
,object_tree
,offset
,4,"Maximum Sustained Traffic Rate",NULL
,FMT_DEC
,&hf_cops_pcmm_max_sustained_traffic_rate
);
4767 /* Maximum Traffic Burst */
4768 info_to_display(tvb
,object_tree
,offset
,4,"Maximum Traffic Burst",NULL
,FMT_DEC
,&hf_cops_pcmm_max_traffic_burst
);
4771 /* Minimum Reserved Traffic Rate */
4772 info_to_display(tvb
,object_tree
,offset
,4,"Minimum Reserved Traffic Rate",NULL
,FMT_DEC
,&hf_cops_pcmm_min_reserved_traffic_rate
);
4775 /* Assumed Minimum Reserved Traffic Rate Packet Size */
4776 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
);
4780 info_to_display(tvb
,object_tree
,offset
,2,"Reserved",NULL
,FMT_HEX
,&hf_cops_pc_reserved
);
4783 /* Maximum Downstream Latency */
4784 info_to_display(tvb
,object_tree
,offset
,4,"Maximum Downstream Latency",NULL
,FMT_DEC
,&hf_cops_pcmm_max_downstream_latency
);
4787 /* Downstream Peak Traffic Rate */
4788 info_to_display(tvb
,object_tree
,offset
,4,"Downstream Peak Traffic Rate",NULL
,FMT_DEC
,&hf_cops_pcmm_down_peak_traffic_rate
);
4791 /* Required Attribute Mask */
4792 info_to_display(tvb
,object_tree
,offset
,4,"Required Attribute Mask",NULL
,FMT_DEC
,&hf_cops_pcmm_req_att_mask
);
4795 /* Forbidden Attribute Mask */
4796 info_to_display(tvb
,object_tree
,offset
,4,"Forbidden Attribute Mask",NULL
,FMT_DEC
,&hf_cops_pcmm_forbid_att_mask
);
4800 /* Attribute Aggregation Rule Mask */
4801 info_to_display(tvb
,object_tree
,offset
,4,"Attribute Aggregation Rule Mask",NULL
,FMT_DEC
,&hf_cops_pcmm_att_aggr_rule_mask
);
4805 if (n
< 80) return offset
;
4807 /* Committed Envelope */
4808 ti
= proto_tree_add_text(stt
, tvb
, offset
, i05
? 40 : 36, "Committed Envelope");
4809 object_tree
= proto_item_add_subtree(ti
, ett_cops_subtree
);
4811 /* Traffic Priority */
4812 info_to_display(tvb
,object_tree
,offset
,1,"Traffic Priority",NULL
,FMT_HEX
,&hf_cops_pcmm_traffic_priority
);
4815 /* Downstream Resequencing */
4816 info_to_display(tvb
,object_tree
,offset
,1,"Downstream Resequencing",NULL
,FMT_HEX
,&hf_cops_pcmm_down_resequencing
);
4819 proto_tree_add_item(object_tree
, hf_cops_reserved16
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
4822 /* Maximum Sustained Traffic Rate */
4823 info_to_display(tvb
,object_tree
,offset
,4,"Maximum Sustained Traffic Rate",NULL
,FMT_DEC
,&hf_cops_pcmm_max_sustained_traffic_rate
);
4826 /* Maximum Traffic Burst */
4827 info_to_display(tvb
,object_tree
,offset
,4,"Maximum Traffic Burst",NULL
,FMT_DEC
,&hf_cops_pcmm_max_traffic_burst
);
4830 /* Minimum Reserved Traffic Rate */
4831 info_to_display(tvb
,object_tree
,offset
,4,"Minimum Reserved Traffic Rate",NULL
,FMT_DEC
,&hf_cops_pcmm_min_reserved_traffic_rate
);
4834 /* Assumed Minimum Reserved Traffic Rate Packet Size */
4835 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
);
4839 info_to_display(tvb
,object_tree
,offset
,2,"Reserved",NULL
,FMT_HEX
,&hf_cops_pc_reserved
);
4842 /* Maximum Downstream Latency */
4843 info_to_display(tvb
,object_tree
,offset
,4,"Maximum Downstream Latency",NULL
,FMT_DEC
,&hf_cops_pcmm_max_downstream_latency
);
4846 /* Downstream Peak Traffic Rate */
4847 info_to_display(tvb
,object_tree
,offset
,4,"Downstream Peak Traffic Rate",NULL
,FMT_DEC
,&hf_cops_pcmm_down_peak_traffic_rate
);
4850 /* Required Attribute Mask */
4851 info_to_display(tvb
,object_tree
,offset
,4,"Required Attribute Mask",NULL
,FMT_DEC
,&hf_cops_pcmm_req_att_mask
);
4854 /* Forbidden Attribute Mask */
4855 info_to_display(tvb
,object_tree
,offset
,4,"Forbidden Attribute Mask",NULL
,FMT_DEC
,&hf_cops_pcmm_forbid_att_mask
);
4859 /* Attribute Aggregation Rule Mask */
4860 info_to_display(tvb
,object_tree
,offset
,4,"Attribute Aggregation Rule Mask",NULL
,FMT_DEC
,&hf_cops_pcmm_att_aggr_rule_mask
);
4867 /* Cops - Section : Upstream Drop */
4869 cops_upstream_drop_i04(tvbuff_t
*tvb
, proto_tree
*st
, guint n
, guint32 offset
) {
4872 /* Create a subtree */
4873 stt
= info_to_cops_subtree(tvb
,st
,n
,offset
,"Upstream Drop");
4877 info_to_display(tvb
,stt
,offset
,1,"Envelope",NULL
,FMT_DEC
,&hf_cops_pcmm_envelope
);
4880 proto_tree_add_item(stt
, hf_cops_reserved24
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
4888 /* Cops - Section : Best Effort Service */
4890 cops_best_effort_service(tvbuff_t
*tvb
, proto_tree
*st
, guint n
, guint32 offset
) {
4892 proto_tree
*stt
, *object_tree
;
4894 /* Create a subtree */
4895 stt
= info_to_cops_subtree(tvb
,st
,n
,offset
,"Best Effort Service");
4899 info_to_display(tvb
,stt
,offset
,1,"Envelope",NULL
,FMT_DEC
,&hf_cops_pcmm_envelope
);
4902 proto_tree_add_item(stt
, hf_cops_reserved24
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
4905 /* Authorized Envelope */
4906 ti
= proto_tree_add_text(stt
, tvb
, offset
, 24, "Authorized Envelope");
4907 object_tree
= proto_item_add_subtree(ti
, ett_cops_subtree
);
4909 /* Traffic Priority */
4910 info_to_display(tvb
,object_tree
,offset
,1,"Traffic Priority",NULL
,FMT_HEX
,&hf_cops_pcmm_traffic_priority
);
4913 proto_tree_add_item(object_tree
, hf_cops_reserved24
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
4916 /* Request Transmission Policy */
4917 decode_docsis_request_transmission_policy(tvb
, offset
, object_tree
, hf_cops_pcmm_request_transmission_policy
);
4920 /* Maximum Sustained Traffic Rate */
4921 info_to_display(tvb
,object_tree
,offset
,4,"Maximum Sustained Traffic Rate",NULL
,FMT_DEC
,&hf_cops_pcmm_max_sustained_traffic_rate
);
4924 /* Maximum Traffic Burst */
4925 info_to_display(tvb
,object_tree
,offset
,4,"Maximum Traffic Burst",NULL
,FMT_DEC
,&hf_cops_pcmm_max_traffic_burst
);
4928 /* Minimum Reserved Traffic Rate */
4929 info_to_display(tvb
,object_tree
,offset
,4,"Minimum Reserved Traffic Rate",NULL
,FMT_DEC
,&hf_cops_pcmm_min_reserved_traffic_rate
);
4932 /* Assumed Minimum Reserved Traffic Rate Packet Size */
4933 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
);
4937 info_to_display(tvb
,object_tree
,offset
,2,"Reserved",NULL
,FMT_HEX
,&hf_cops_pc_reserved
);
4940 if (n
< 56) return offset
;
4942 /* Reserved Envelope */
4943 ti
= proto_tree_add_text(stt
, tvb
, offset
, 24, "Reserved Envelope");
4944 object_tree
= proto_item_add_subtree(ti
, ett_cops_subtree
);
4946 /* Traffic Priority */
4947 info_to_display(tvb
,object_tree
,offset
,1,"Traffic Priority",NULL
,FMT_HEX
,&hf_cops_pcmm_traffic_priority
);
4950 proto_tree_add_item(object_tree
, hf_cops_reserved24
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
4953 /* Request Transmission Policy */
4954 decode_docsis_request_transmission_policy(tvb
, offset
, object_tree
, hf_cops_pcmm_request_transmission_policy
);
4957 /* Maximum Sustained Traffic Rate */
4958 info_to_display(tvb
,object_tree
,offset
,4,"Maximum Sustained Traffic Rate",NULL
,FMT_DEC
,&hf_cops_pcmm_max_sustained_traffic_rate
);
4961 /* Maximum Traffic Burst */
4962 info_to_display(tvb
,object_tree
,offset
,4,"Maximum Traffic Burst",NULL
,FMT_DEC
,&hf_cops_pcmm_max_traffic_burst
);
4965 /* Minimum Reserved Traffic Rate */
4966 info_to_display(tvb
,object_tree
,offset
,4,"Minimum Reserved Traffic Rate",NULL
,FMT_DEC
,&hf_cops_pcmm_min_reserved_traffic_rate
);
4969 /* Assumed Minimum Reserved Traffic Rate Packet Size */
4970 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
);
4974 info_to_display(tvb
,object_tree
,offset
,2,"Reserved",NULL
,FMT_HEX
,&hf_cops_pc_reserved
);
4977 if (n
< 80) return offset
;
4979 /* Committed Envelope */
4980 ti
= proto_tree_add_text(stt
, tvb
, offset
, 24, "Committed Envelope");
4981 object_tree
= proto_item_add_subtree(ti
, ett_cops_subtree
);
4983 /* Traffic Priority */
4984 info_to_display(tvb
,object_tree
,offset
,1,"Traffic Priority",NULL
,FMT_HEX
,&hf_cops_pcmm_traffic_priority
);
4987 proto_tree_add_item(object_tree
, hf_cops_reserved24
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
4990 /* Request Transmission Policy */
4991 decode_docsis_request_transmission_policy(tvb
, offset
, object_tree
, hf_cops_pcmm_request_transmission_policy
);
4994 /* Maximum Sustained Traffic Rate */
4995 info_to_display(tvb
,object_tree
,offset
,4,"Maximum Sustained Traffic Rate",NULL
,FMT_DEC
,&hf_cops_pcmm_max_sustained_traffic_rate
);
4998 /* Maximum Traffic Burst */
4999 info_to_display(tvb
,object_tree
,offset
,4,"Maximum Traffic Burst",NULL
,FMT_DEC
,&hf_cops_pcmm_max_traffic_burst
);
5002 /* Minimum Reserved Traffic Rate */
5003 info_to_display(tvb
,object_tree
,offset
,4,"Minimum Reserved Traffic Rate",NULL
,FMT_DEC
,&hf_cops_pcmm_min_reserved_traffic_rate
);
5006 /* Assumed Minimum Reserved Traffic Rate Packet Size */
5007 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
);
5011 info_to_display(tvb
,object_tree
,offset
,2,"Reserved",NULL
,FMT_HEX
,&hf_cops_pc_reserved
);
5017 /* Cops - Section : Non-Real-Time Polling Service */
5019 cops_non_real_time_polling_service(tvbuff_t
*tvb
, proto_tree
*st
, guint n
, guint32 offset
) {
5021 proto_tree
*stt
, *object_tree
;
5023 /* Create a subtree */
5024 stt
= info_to_cops_subtree(tvb
,st
,n
,offset
,"Non-Real-Time Polling Service");
5028 info_to_display(tvb
,stt
,offset
,1,"Envelope",NULL
,FMT_DEC
,&hf_cops_pcmm_envelope
);
5031 proto_tree_add_item(stt
, hf_cops_reserved24
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
5034 /* Authorized Envelope */
5035 ti
= proto_tree_add_text(stt
, tvb
, offset
, 28, "Authorized Envelope");
5036 object_tree
= proto_item_add_subtree(ti
, ett_cops_subtree
);
5038 /* Traffic Priority */
5039 info_to_display(tvb
,object_tree
,offset
,1,"Traffic Priority",NULL
,FMT_HEX
,&hf_cops_pcmm_traffic_priority
);
5042 proto_tree_add_item(object_tree
, hf_cops_reserved24
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
5045 /* Request Transmission Policy */
5046 decode_docsis_request_transmission_policy(tvb
, offset
, object_tree
, hf_cops_pcmm_request_transmission_policy
);
5049 /* Maximum Sustained Traffic Rate */
5050 info_to_display(tvb
,object_tree
,offset
,4,"Maximum Sustained Traffic Rate",NULL
,FMT_DEC
,&hf_cops_pcmm_max_sustained_traffic_rate
);
5053 /* Maximum Traffic Burst */
5054 info_to_display(tvb
,object_tree
,offset
,4,"Maximum Traffic Burst",NULL
,FMT_DEC
,&hf_cops_pcmm_max_traffic_burst
);
5057 /* Minimum Reserved Traffic Rate */
5058 info_to_display(tvb
,object_tree
,offset
,4,"Minimum Reserved Traffic Rate",NULL
,FMT_DEC
,&hf_cops_pcmm_min_reserved_traffic_rate
);
5061 /* Assumed Minimum Reserved Traffic Rate Packet Size */
5062 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
);
5066 info_to_display(tvb
,object_tree
,offset
,2,"Reserved",NULL
,FMT_HEX
,&hf_cops_pc_reserved
);
5069 /* Nominal Polling Interval */
5070 info_to_display(tvb
,object_tree
,offset
,4,"Nominal Polling Interval",NULL
,FMT_DEC
,&hf_cops_pcmm_nominal_polling_interval
);
5073 if (n
< 64) return offset
;
5075 /* Reserved Envelope */
5076 ti
= proto_tree_add_text(stt
, tvb
, offset
, 24, "Reserved Envelope");
5077 object_tree
= proto_item_add_subtree(ti
, ett_cops_subtree
);
5079 /* Traffic Priority */
5080 info_to_display(tvb
,object_tree
,offset
,1,"Traffic Priority",NULL
,FMT_HEX
,&hf_cops_pcmm_traffic_priority
);
5083 proto_tree_add_item(object_tree
, hf_cops_reserved24
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
5086 /* Request Transmission Policy */
5087 decode_docsis_request_transmission_policy(tvb
, offset
, object_tree
, hf_cops_pcmm_request_transmission_policy
);
5090 /* Maximum Sustained Traffic Rate */
5091 info_to_display(tvb
,object_tree
,offset
,4,"Maximum Sustained Traffic Rate",NULL
,FMT_DEC
,&hf_cops_pcmm_max_sustained_traffic_rate
);
5094 /* Maximum Traffic Burst */
5095 info_to_display(tvb
,object_tree
,offset
,4,"Maximum Traffic Burst",NULL
,FMT_DEC
,&hf_cops_pcmm_max_traffic_burst
);
5098 /* Minimum Reserved Traffic Rate */
5099 info_to_display(tvb
,object_tree
,offset
,4,"Minimum Reserved Traffic Rate",NULL
,FMT_DEC
,&hf_cops_pcmm_min_reserved_traffic_rate
);
5102 /* Assumed Minimum Reserved Traffic Rate Packet Size */
5103 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
);
5107 info_to_display(tvb
,object_tree
,offset
,2,"Reserved",NULL
,FMT_HEX
,&hf_cops_pc_reserved
);
5110 /* Nominal Polling Interval */
5111 info_to_display(tvb
,object_tree
,offset
,4,"Nominal Polling Interval",NULL
,FMT_DEC
,&hf_cops_pcmm_nominal_polling_interval
);
5114 if (n
< 92) return offset
;
5116 /* Committed Envelope */
5117 ti
= proto_tree_add_text(stt
, tvb
, offset
, 24, "Committed Envelope");
5118 object_tree
= proto_item_add_subtree(ti
, ett_cops_subtree
);
5120 /* Traffic Priority */
5121 info_to_display(tvb
,object_tree
,offset
,1,"Traffic Priority",NULL
,FMT_HEX
,&hf_cops_pcmm_traffic_priority
);
5124 proto_tree_add_item(object_tree
, hf_cops_reserved24
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
5127 /* Request Transmission Policy */
5128 decode_docsis_request_transmission_policy(tvb
, offset
, object_tree
, hf_cops_pcmm_request_transmission_policy
);
5131 /* Maximum Sustained Traffic Rate */
5132 info_to_display(tvb
,object_tree
,offset
,4,"Maximum Sustained Traffic Rate",NULL
,FMT_DEC
,&hf_cops_pcmm_max_sustained_traffic_rate
);
5135 /* Maximum Traffic Burst */
5136 info_to_display(tvb
,object_tree
,offset
,4,"Maximum Traffic Burst",NULL
,FMT_DEC
,&hf_cops_pcmm_max_traffic_burst
);
5139 /* Minimum Reserved Traffic Rate */
5140 info_to_display(tvb
,object_tree
,offset
,4,"Minimum Reserved Traffic Rate",NULL
,FMT_DEC
,&hf_cops_pcmm_min_reserved_traffic_rate
);
5143 /* Assumed Minimum Reserved Traffic Rate Packet Size */
5144 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
);
5148 info_to_display(tvb
,object_tree
,offset
,2,"Reserved",NULL
,FMT_HEX
,&hf_cops_pc_reserved
);
5151 /* Nominal Polling Interval */
5152 info_to_display(tvb
,object_tree
,offset
,4,"Nominal Polling Interval",NULL
,FMT_DEC
,&hf_cops_pcmm_nominal_polling_interval
);
5158 /* Cops - Section : Real-Time Polling Service */
5160 cops_real_time_polling_service(tvbuff_t
*tvb
, proto_tree
*st
, guint n
, guint32 offset
) {
5162 proto_tree
*stt
, *object_tree
;
5164 /* Create a subtree */
5165 stt
= info_to_cops_subtree(tvb
,st
,n
,offset
,"Real-Time Polling Service");
5169 info_to_display(tvb
,stt
,offset
,1,"Envelope",NULL
,FMT_DEC
,&hf_cops_pcmm_envelope
);
5172 proto_tree_add_item(stt
, hf_cops_reserved24
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
5175 /* Authorized Envelope */
5176 ti
= proto_tree_add_text(stt
, tvb
, offset
, 28, "Authorized Envelope");
5177 object_tree
= proto_item_add_subtree(ti
, ett_cops_subtree
);
5179 /* Request Transmission Policy */
5180 decode_docsis_request_transmission_policy(tvb
, offset
, object_tree
, hf_cops_pcmm_request_transmission_policy
);
5183 /* Maximum Sustained Traffic Rate */
5184 info_to_display(tvb
,object_tree
,offset
,4,"Maximum Sustained Traffic Rate",NULL
,FMT_DEC
,&hf_cops_pcmm_max_sustained_traffic_rate
);
5187 /* Maximum Traffic Burst */
5188 info_to_display(tvb
,object_tree
,offset
,4,"Maximum Traffic Burst",NULL
,FMT_DEC
,&hf_cops_pcmm_max_traffic_burst
);
5191 /* Minimum Reserved Traffic Rate */
5192 info_to_display(tvb
,object_tree
,offset
,4,"Minimum Reserved Traffic Rate",NULL
,FMT_DEC
,&hf_cops_pcmm_min_reserved_traffic_rate
);
5195 /* Assumed Minimum Reserved Traffic Rate Packet Size */
5196 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
);
5200 info_to_display(tvb
,object_tree
,offset
,2,"Reserved",NULL
,FMT_HEX
,&hf_cops_pc_reserved
);
5203 /* Nominal Polling Interval */
5204 info_to_display(tvb
,object_tree
,offset
,4,"Nominal Polling Interval",NULL
,FMT_DEC
,&hf_cops_pcmm_nominal_polling_interval
);
5207 /* Tolerated Poll Jitter */
5208 info_to_display(tvb
,object_tree
,offset
,4,"Tolerated Poll Jitter",NULL
,FMT_DEC
,&hf_cops_pcmm_tolerated_poll_jitter
);
5211 if (n
< 64) return offset
;
5213 /* Reserved Envelope */
5214 ti
= proto_tree_add_text(stt
, tvb
, offset
, 24, "Reserved Envelope");
5215 object_tree
= proto_item_add_subtree(ti
, ett_cops_subtree
);
5217 /* Request Transmission Policy */
5218 decode_docsis_request_transmission_policy(tvb
, offset
, object_tree
, hf_cops_pcmm_request_transmission_policy
);
5221 /* Maximum Sustained Traffic Rate */
5222 info_to_display(tvb
,object_tree
,offset
,4,"Maximum Sustained Traffic Rate",NULL
,FMT_DEC
,&hf_cops_pcmm_max_sustained_traffic_rate
);
5225 /* Maximum Traffic Burst */
5226 info_to_display(tvb
,object_tree
,offset
,4,"Maximum Traffic Burst",NULL
,FMT_DEC
,&hf_cops_pcmm_max_traffic_burst
);
5229 /* Minimum Reserved Traffic Rate */
5230 info_to_display(tvb
,object_tree
,offset
,4,"Minimum Reserved Traffic Rate",NULL
,FMT_DEC
,&hf_cops_pcmm_min_reserved_traffic_rate
);
5233 /* Assumed Minimum Reserved Traffic Rate Packet Size */
5234 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
);
5238 info_to_display(tvb
,object_tree
,offset
,2,"Reserved",NULL
,FMT_HEX
,&hf_cops_pc_reserved
);
5241 /* Nominal Polling Interval */
5242 info_to_display(tvb
,object_tree
,offset
,4,"Nominal Polling Interval",NULL
,FMT_DEC
,&hf_cops_pcmm_nominal_polling_interval
);
5245 /* Tolerated Poll Jitter */
5246 info_to_display(tvb
,object_tree
,offset
,4,"Tolerated Poll Jitter",NULL
,FMT_DEC
,&hf_cops_pcmm_tolerated_poll_jitter
);
5249 if (n
< 92) return offset
;
5251 /* Committed Envelope */
5252 ti
= proto_tree_add_text(stt
, tvb
, offset
, 24, "Committed Envelope");
5253 object_tree
= proto_item_add_subtree(ti
, ett_cops_subtree
);
5255 /* Request Transmission Policy */
5256 decode_docsis_request_transmission_policy(tvb
, offset
, object_tree
, hf_cops_pcmm_request_transmission_policy
);
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
, guint n
, guint32 offset
) {
5294 proto_tree
*stt
, *object_tree
;
5296 /* Create a subtree */
5297 stt
= info_to_cops_subtree(tvb
,st
,n
,offset
,"Unsolicited Grant Service");
5301 info_to_display(tvb
,stt
,offset
,1,"Envelope",NULL
,FMT_DEC
,&hf_cops_pcmm_envelope
);
5304 proto_tree_add_item(stt
, hf_cops_reserved24
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
5307 /* Authorized Envelope */
5308 ti
= proto_tree_add_text(stt
, tvb
, offset
, 16, "Authorized Envelope");
5309 object_tree
= proto_item_add_subtree(ti
, ett_cops_subtree
);
5311 /* Request Transmission Policy */
5312 decode_docsis_request_transmission_policy(tvb
, offset
, object_tree
, hf_cops_pcmm_request_transmission_policy
);
5315 /* Unsolicited Grant Size */
5316 info_to_display(tvb
,object_tree
,offset
,2,"Unsolicited Grant Size",NULL
,FMT_DEC
,&hf_cops_pcmm_unsolicited_grant_size
);
5319 /* Grants Per Interval */
5320 info_to_display(tvb
,object_tree
,offset
,1,"Grants Per Interval",NULL
,FMT_DEC
,&hf_cops_pcmm_grants_per_interval
);
5323 proto_tree_add_item(object_tree
, hf_cops_reserved8
, tvb
, offset
, 1, ENC_NA
);
5326 /* Nominal Grant Interval */
5327 info_to_display(tvb
,object_tree
,offset
,4,"Nominal Grant Interval",NULL
,FMT_DEC
,&hf_cops_pcmm_nominal_grant_interval
);
5330 /* Tolerated Grant Jitter */
5331 info_to_display(tvb
,object_tree
,offset
,4,"Tolerated Grant Jitter",NULL
,FMT_DEC
,&hf_cops_pcmm_tolerated_grant_jitter
);
5334 if (n
< 40) return offset
;
5336 /* Reserved Envelope */
5337 ti
= proto_tree_add_text(stt
, tvb
, offset
, 16, "Reserved Envelope");
5338 object_tree
= proto_item_add_subtree(ti
, ett_cops_subtree
);
5340 /* Request Transmission Policy */
5341 decode_docsis_request_transmission_policy(tvb
, offset
, object_tree
, hf_cops_pcmm_request_transmission_policy
);
5344 /* Unsolicited Grant Size */
5345 info_to_display(tvb
,object_tree
,offset
,2,"Unsolicited Grant Size",NULL
,FMT_DEC
,&hf_cops_pcmm_unsolicited_grant_size
);
5348 /* Grants Per Interval */
5349 info_to_display(tvb
,object_tree
,offset
,1,"Grants Per Interval",NULL
,FMT_DEC
,&hf_cops_pcmm_grants_per_interval
);
5352 proto_tree_add_item(object_tree
, hf_cops_reserved8
, tvb
, offset
, 1, ENC_NA
);
5355 /* Nominal Grant Interval */
5356 info_to_display(tvb
,object_tree
,offset
,4,"Nominal Grant Interval",NULL
,FMT_DEC
,&hf_cops_pcmm_nominal_grant_interval
);
5359 /* Tolerated Grant Jitter */
5360 info_to_display(tvb
,object_tree
,offset
,4,"Tolerated Grant Jitter",NULL
,FMT_DEC
,&hf_cops_pcmm_tolerated_grant_jitter
);
5363 if (n
< 56) return offset
;
5365 /* Committed Envelope */
5366 ti
= proto_tree_add_text(stt
, tvb
, offset
, 16, "Committed Envelope");
5367 object_tree
= proto_item_add_subtree(ti
, ett_cops_subtree
);
5369 /* Request Transmission Policy */
5370 decode_docsis_request_transmission_policy(tvb
, offset
, object_tree
, hf_cops_pcmm_request_transmission_policy
);
5373 /* Unsolicited Grant Size */
5374 info_to_display(tvb
,object_tree
,offset
,2,"Unsolicited Grant Size",NULL
,FMT_DEC
,&hf_cops_pcmm_unsolicited_grant_size
);
5377 /* Grants Per Interval */
5378 info_to_display(tvb
,object_tree
,offset
,1,"Grants Per Interval",NULL
,FMT_DEC
,&hf_cops_pcmm_grants_per_interval
);
5381 proto_tree_add_item(object_tree
, hf_cops_reserved8
, tvb
, offset
, 1, ENC_NA
);
5384 /* Nominal Grant Interval */
5385 info_to_display(tvb
,object_tree
,offset
,4,"Nominal Grant Interval",NULL
,FMT_DEC
,&hf_cops_pcmm_nominal_grant_interval
);
5388 /* Tolerated Grant Jitter */
5389 info_to_display(tvb
,object_tree
,offset
,4,"Tolerated Grant Jitter",NULL
,FMT_DEC
,&hf_cops_pcmm_tolerated_grant_jitter
);
5395 /* Cops - Section : Unsolicited Grant Service with Activity Detection */
5397 cops_ugs_with_activity_detection(tvbuff_t
*tvb
, proto_tree
*st
, guint n
, guint32 offset
) {
5399 proto_tree
*stt
, *object_tree
;
5401 /* Create a subtree */
5402 stt
= info_to_cops_subtree(tvb
,st
,n
,offset
,"Unsolicited Grant Service with Activity Detection");
5406 info_to_display(tvb
,stt
,offset
,1,"Envelope",NULL
,FMT_DEC
,&hf_cops_pcmm_envelope
);
5409 proto_tree_add_item(stt
, hf_cops_reserved24
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
5412 /* Authorized Envelope */
5413 ti
= proto_tree_add_text(stt
, tvb
, offset
, 24, "Authorized Envelope");
5414 object_tree
= proto_item_add_subtree(ti
, ett_cops_subtree
);
5416 /* Request Transmission Policy */
5417 decode_docsis_request_transmission_policy(tvb
, offset
, object_tree
, hf_cops_pcmm_request_transmission_policy
);
5420 /* Unsolicited Grant Size */
5421 info_to_display(tvb
,object_tree
,offset
,2,"Unsolicited Grant Size",NULL
,FMT_DEC
,&hf_cops_pcmm_unsolicited_grant_size
);
5424 /* Grants Per Interval */
5425 info_to_display(tvb
,object_tree
,offset
,1,"Grants Per Interval",NULL
,FMT_DEC
,&hf_cops_pcmm_grants_per_interval
);
5428 proto_tree_add_item(object_tree
, hf_cops_reserved8
, tvb
, offset
, 1, ENC_NA
);
5431 /* Nominal Grant Interval */
5432 info_to_display(tvb
,object_tree
,offset
,4,"Nominal Grant Interval",NULL
,FMT_DEC
,&hf_cops_pcmm_nominal_grant_interval
);
5435 /* Tolerated Grant Jitter */
5436 info_to_display(tvb
,object_tree
,offset
,4,"Tolerated Grant Jitter",NULL
,FMT_DEC
,&hf_cops_pcmm_tolerated_grant_jitter
);
5439 /* Nominal Polling Interval */
5440 info_to_display(tvb
,object_tree
,offset
,4,"Nominal Polling Interval",NULL
,FMT_DEC
,&hf_cops_pcmm_nominal_polling_interval
);
5443 /* Tolerated Poll Jitter */
5444 info_to_display(tvb
,object_tree
,offset
,4,"Tolerated Poll Jitter",NULL
,FMT_DEC
,&hf_cops_pcmm_tolerated_poll_jitter
);
5447 if (n
< 56) return offset
;
5449 /* Reserved Envelope */
5450 ti
= proto_tree_add_text(stt
, tvb
, offset
, 24, "Reserved Envelope");
5451 object_tree
= proto_item_add_subtree(ti
, ett_cops_subtree
);
5453 /* Request Transmission Policy */
5454 decode_docsis_request_transmission_policy(tvb
, offset
, object_tree
, hf_cops_pcmm_request_transmission_policy
);
5457 /* Unsolicited Grant Size */
5458 info_to_display(tvb
,object_tree
,offset
,2,"Unsolicited Grant Size",NULL
,FMT_DEC
,&hf_cops_pcmm_unsolicited_grant_size
);
5461 /* Grants Per Interval */
5462 info_to_display(tvb
,object_tree
,offset
,1,"Grants Per Interval",NULL
,FMT_DEC
,&hf_cops_pcmm_grants_per_interval
);
5465 proto_tree_add_item(object_tree
, hf_cops_reserved8
, tvb
, offset
, 1, ENC_NA
);
5468 /* Nominal Grant Interval */
5469 info_to_display(tvb
,object_tree
,offset
,4,"Nominal Grant Interval",NULL
,FMT_DEC
,&hf_cops_pcmm_nominal_grant_interval
);
5472 /* Tolerated Grant Jitter */
5473 info_to_display(tvb
,object_tree
,offset
,4,"Tolerated Grant Jitter",NULL
,FMT_DEC
,&hf_cops_pcmm_tolerated_grant_jitter
);
5476 /* Nominal Polling Interval */
5477 info_to_display(tvb
,object_tree
,offset
,4,"Nominal Polling Interval",NULL
,FMT_DEC
,&hf_cops_pcmm_nominal_polling_interval
);
5480 /* Tolerated Poll Jitter */
5481 info_to_display(tvb
,object_tree
,offset
,4,"Tolerated Poll Jitter",NULL
,FMT_DEC
,&hf_cops_pcmm_tolerated_poll_jitter
);
5484 if (n
< 80) return offset
;
5486 /* Committed Envelope */
5487 ti
= proto_tree_add_text(stt
, tvb
, offset
, 24, "Committed Envelope");
5488 object_tree
= proto_item_add_subtree(ti
, ett_cops_subtree
);
5490 /* Request Transmission Policy */
5491 decode_docsis_request_transmission_policy(tvb
, offset
, object_tree
, hf_cops_pcmm_request_transmission_policy
);
5494 /* Unsolicited Grant Size */
5495 info_to_display(tvb
,object_tree
,offset
,2,"Unsolicited Grant Size",NULL
,FMT_DEC
,&hf_cops_pcmm_unsolicited_grant_size
);
5498 /* Grants Per Interval */
5499 info_to_display(tvb
,object_tree
,offset
,1,"Grants Per Interval",NULL
,FMT_DEC
,&hf_cops_pcmm_grants_per_interval
);
5502 proto_tree_add_item(object_tree
, hf_cops_reserved8
, tvb
, offset
, 1, ENC_NA
);
5505 /* Nominal Grant Interval */
5506 info_to_display(tvb
,object_tree
,offset
,4,"Nominal Grant Interval",NULL
,FMT_DEC
,&hf_cops_pcmm_nominal_grant_interval
);
5509 /* Tolerated Grant Jitter */
5510 info_to_display(tvb
,object_tree
,offset
,4,"Tolerated Grant Jitter",NULL
,FMT_DEC
,&hf_cops_pcmm_tolerated_grant_jitter
);
5513 /* Nominal Polling Interval */
5514 info_to_display(tvb
,object_tree
,offset
,4,"Nominal Polling Interval",NULL
,FMT_DEC
,&hf_cops_pcmm_nominal_polling_interval
);
5517 /* Tolerated Poll Jitter */
5518 info_to_display(tvb
,object_tree
,offset
,4,"Tolerated Poll Jitter",NULL
,FMT_DEC
,&hf_cops_pcmm_tolerated_poll_jitter
);
5524 /* Cops - Section : Downstream Service */
5526 cops_downstream_service(tvbuff_t
*tvb
, proto_tree
*st
, guint n
, guint32 offset
) {
5528 proto_tree
*stt
, *object_tree
;
5530 /* Create a subtree */
5531 stt
= info_to_cops_subtree(tvb
,st
,n
,offset
,"Downstream Service");
5535 info_to_display(tvb
,stt
,offset
,1,"Envelope",NULL
,FMT_DEC
,&hf_cops_pcmm_envelope
);
5538 proto_tree_add_item(stt
, hf_cops_reserved24
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
5541 /* Authorized Envelope */
5542 ti
= proto_tree_add_text(stt
, tvb
, offset
, 24, "Authorized Envelope");
5543 object_tree
= proto_item_add_subtree(ti
, ett_cops_subtree
);
5545 /* Traffic Priority */
5546 info_to_display(tvb
,object_tree
,offset
,1,"Traffic Priority",NULL
,FMT_HEX
,&hf_cops_pcmm_traffic_priority
);
5549 proto_tree_add_item(object_tree
, hf_cops_reserved24
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
5552 /* Maximum Sustained Traffic Rate */
5553 info_to_display(tvb
,object_tree
,offset
,4,"Maximum Sustained Traffic Rate",NULL
,FMT_DEC
,&hf_cops_pcmm_max_sustained_traffic_rate
);
5556 /* Maximum Traffic Burst */
5557 info_to_display(tvb
,object_tree
,offset
,4,"Maximum Traffic Burst",NULL
,FMT_DEC
,&hf_cops_pcmm_max_traffic_burst
);
5560 /* Minimum Reserved Traffic Rate */
5561 info_to_display(tvb
,object_tree
,offset
,4,"Minimum Reserved Traffic Rate",NULL
,FMT_DEC
,&hf_cops_pcmm_min_reserved_traffic_rate
);
5564 /* Assumed Minimum Reserved Traffic Rate Packet Size */
5565 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
);
5569 info_to_display(tvb
,object_tree
,offset
,2,"Reserved",NULL
,FMT_HEX
,&hf_cops_pc_reserved
);
5572 /* Maximum Downstream Latency */
5573 info_to_display(tvb
,object_tree
,offset
,4,"Maximum Downstream Latency",NULL
,FMT_DEC
,&hf_cops_pcmm_max_downstream_latency
);
5576 if (n
< 56) return offset
;
5578 /* Reserved Envelope */
5579 ti
= proto_tree_add_text(stt
, tvb
, offset
, 24, "Reserved Envelope");
5580 object_tree
= proto_item_add_subtree(ti
, ett_cops_subtree
);
5582 /* Traffic Priority */
5583 info_to_display(tvb
,object_tree
,offset
,1,"Traffic Priority",NULL
,FMT_HEX
,&hf_cops_pcmm_traffic_priority
);
5586 proto_tree_add_item(object_tree
, hf_cops_reserved24
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
5589 /* Maximum Sustained Traffic Rate */
5590 info_to_display(tvb
,object_tree
,offset
,4,"Maximum Sustained Traffic Rate",NULL
,FMT_DEC
,&hf_cops_pcmm_max_sustained_traffic_rate
);
5593 /* Maximum Traffic Burst */
5594 info_to_display(tvb
,object_tree
,offset
,4,"Maximum Traffic Burst",NULL
,FMT_DEC
,&hf_cops_pcmm_max_traffic_burst
);
5597 /* Minimum Reserved Traffic Rate */
5598 info_to_display(tvb
,object_tree
,offset
,4,"Minimum Reserved Traffic Rate",NULL
,FMT_DEC
,&hf_cops_pcmm_min_reserved_traffic_rate
);
5601 /* Assumed Minimum Reserved Traffic Rate Packet Size */
5602 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
);
5606 info_to_display(tvb
,object_tree
,offset
,2,"Reserved",NULL
,FMT_HEX
,&hf_cops_pc_reserved
);
5609 /* Maximum Downstream Latency */
5610 info_to_display(tvb
,object_tree
,offset
,4,"Maximum Downstream Latency",NULL
,FMT_DEC
,&hf_cops_pcmm_max_downstream_latency
);
5613 if (n
< 80) return offset
;
5615 /* Committed Envelope */
5616 ti
= proto_tree_add_text(stt
, tvb
, offset
, 24, "Committed Envelope");
5617 object_tree
= proto_item_add_subtree(ti
, ett_cops_subtree
);
5619 /* Traffic Priority */
5620 info_to_display(tvb
,object_tree
,offset
,1,"Traffic Priority",NULL
,FMT_HEX
,&hf_cops_pcmm_traffic_priority
);
5623 proto_tree_add_item(object_tree
, hf_cops_reserved24
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
5626 /* Maximum Sustained Traffic Rate */
5627 info_to_display(tvb
,object_tree
,offset
,4,"Maximum Sustained Traffic Rate",NULL
,FMT_DEC
,&hf_cops_pcmm_max_sustained_traffic_rate
);
5630 /* Maximum Traffic Burst */
5631 info_to_display(tvb
,object_tree
,offset
,4,"Maximum Traffic Burst",NULL
,FMT_DEC
,&hf_cops_pcmm_max_traffic_burst
);
5634 /* Minimum Reserved Traffic Rate */
5635 info_to_display(tvb
,object_tree
,offset
,4,"Minimum Reserved Traffic Rate",NULL
,FMT_DEC
,&hf_cops_pcmm_min_reserved_traffic_rate
);
5638 /* Assumed Minimum Reserved Traffic Rate Packet Size */
5639 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
);
5643 info_to_display(tvb
,object_tree
,offset
,2,"Reserved",NULL
,FMT_HEX
,&hf_cops_pc_reserved
);
5646 /* Maximum Downstream Latency */
5647 info_to_display(tvb
,object_tree
,offset
,4,"Maximum Downstream Latency",NULL
,FMT_DEC
,&hf_cops_pcmm_max_downstream_latency
);
5653 /* Cops - Section : PacketCable Multimedia Event Gereration-Info */
5655 cops_mm_event_generation_info(tvbuff_t
*tvb
, proto_tree
*st
, guint n
, guint32 offset
) {
5660 /* Create a subtree */
5661 stt
= info_to_cops_subtree(tvb
,st
,n
,offset
,"Event Generation Info");
5664 /* Primary Record Keeping Server IP Address */
5665 info_to_display(tvb
,stt
,offset
,4,"PRKS IP Address", NULL
,FMT_IPv4
,&hf_cops_pc_prks_ip
);
5668 /* Primary Record Keeping Server IP Port */
5669 info_to_display(tvb
,stt
,offset
,2,"PRKS IP Port",NULL
,FMT_DEC
,&hf_cops_pc_prks_ip_port
);
5673 info_to_display(tvb
,stt
,offset
,2,"Reserved",NULL
,FMT_HEX
,&hf_cops_pc_reserved
);
5676 /* Secondary Record Keeping Server IP Address */
5677 info_to_display(tvb
,stt
,offset
,4,"SRKS IP Address", NULL
,FMT_IPv4
,&hf_cops_pc_srks_ip
);
5680 /* Secondary Record Keeping Server IP Port */
5681 info_to_display(tvb
,stt
,offset
,2,"SRKS IP Port",NULL
,FMT_DEC
,&hf_cops_pc_srks_ip_port
);
5685 info_to_display(tvb
,stt
,offset
,2,"Reserved",NULL
,FMT_HEX
,&hf_cops_pc_reserved
);
5688 /* BCID Timestamp */
5689 info_to_display(tvb
,stt
,offset
,4,"BCID - Timestamp",NULL
,FMT_HEX
,&hf_cops_pc_bcid_ts
);
5692 /* BCID Element ID */
5693 bcid_str
= (guchar
*)tvb_format_text(tvb
, offset
, 8);
5694 proto_tree_add_text(stt
, tvb
, offset
, 8,"%-28s : '%s'","BCID - Element ID",bcid_str
);
5697 /* BCID Time Zone */
5698 bcid_str
= (guchar
*)tvb_format_text(tvb
, offset
, 8);
5699 proto_tree_add_text(stt
, tvb
, offset
, 8,"%-28s : '%s'","BCID - Time Zone",bcid_str
);
5702 /* BCID Event Counter */
5703 info_to_display(tvb
,stt
,offset
,4,"BCID - Event Counter",NULL
,FMT_DEC
,&hf_cops_pc_bcid_ev
);
5706 /* Cops - Section : Volume-Based Usage Limit */
5708 cops_volume_based_usage_limit(tvbuff_t
*tvb
, proto_tree
*st
, guint object_len
, guint32 offset
) {
5712 /* Create a subtree */
5713 stt
= info_to_cops_subtree(tvb
,st
,object_len
,offset
,"Volume-Based Usage Limit");
5717 proto_tree_add_item(stt
, hf_cops_pcmm_volume_based_usage_limit
, tvb
, offset
, 8,
5724 /* Cops - Section : Time-Based Usage Limit */
5726 cops_time_based_usage_limit(tvbuff_t
*tvb
, proto_tree
*st
, guint n
, guint32 offset
) {
5730 /* Create a subtree */
5731 stt
= info_to_cops_subtree(tvb
,st
,n
,offset
,"Time-Based Usage Limit");
5735 info_to_display(tvb
,stt
,offset
,4,"Time Limit", NULL
,FMT_DEC
,&hf_cops_pcmm_time_based_usage_limit
);
5741 /* Cops - Section : Opaque Data */
5743 cops_opaque_data(tvbuff_t
*tvb
, proto_tree
*st
, guint object_len
, guint32 offset
) {
5747 /* Create a subtree */
5748 stt
= info_to_cops_subtree(tvb
,st
,object_len
,offset
,"Opaque Data");
5752 proto_tree_add_text(stt
, tvb
, offset
, 8,"Opaque Data");
5755 /* Cops - Section : Gate Time Info */
5757 cops_gate_time_info(tvbuff_t
*tvb
, proto_tree
*st
, guint n
, guint32 offset
) {
5761 /* Create a subtree */
5762 stt
= info_to_cops_subtree(tvb
,st
,n
,offset
,"Gate Time Info");
5765 /* Gate Time Info */
5766 info_to_display(tvb
,stt
,offset
,4,"Time Committed", NULL
,FMT_DEC
,&hf_cops_pcmm_gate_time_info
);
5772 /* Cops - Section : Gate Usage Info */
5774 cops_gate_usage_info(tvbuff_t
*tvb
, proto_tree
*st
, guint n
, guint32 offset
) {
5778 /* Create a subtree */
5779 stt
= info_to_cops_subtree(tvb
,st
,n
,offset
,"Gate Usage Info");
5782 /* Gate Usage Info */
5783 info_to_display(tvb
,stt
,offset
,8,"Octet Count", NULL
,FMT_DEC
,&hf_cops_pcmm_gate_usage_info
);
5786 /* Cops - Section : PacketCable error */
5788 cops_packetcable_mm_error(tvbuff_t
*tvb
, proto_tree
*st
, guint n
, guint32 offset
) {
5791 guint16 code
, subcode
;
5793 /* Create a subtree */
5794 stt
= info_to_cops_subtree(tvb
,st
,n
,offset
,"PacketCable Error");
5797 code
= tvb_get_ntohs(tvb
, offset
);
5798 proto_tree_add_uint_format(stt
, hf_cops_pcmm_packetcable_error_code
, tvb
, offset
, 2, code
,
5799 "Error Code: %s (%u)", val_to_str_const(code
, pcmm_packetcable_error_code
, "Unknown"),
5803 subcode
= tvb_get_ntohs(tvb
, offset
);
5804 if (code
== 6 || code
== 7)
5805 proto_tree_add_uint_format(stt
, hf_cops_pcmm_packetcable_error_subcode
,
5806 tvb
, offset
, 2, code
, "Error-Subcode: 0x%02x, S-Num: 0x%02x, S-Type: 0x%02x",
5807 subcode
, subcode
>> 8, subcode
& 0xf);
5809 proto_tree_add_uint_format(stt
, hf_cops_pcmm_packetcable_error_subcode
,
5810 tvb
, offset
, 2, code
, "Error-Subcode: 0x%04x", subcode
);
5816 /* Cops - Section : Gate State */
5818 cops_gate_state(tvbuff_t
*tvb
, proto_tree
*st
, guint n
, guint32 offset
) {
5822 /* Create a subtree */
5823 stt
= info_to_cops_subtree(tvb
,st
,n
,offset
,"Gate State");
5827 info_to_display(tvb
,stt
,offset
,2,"State",pcmm_gate_state
,FMT_DEC
,&hf_cops_pcmm_packetcable_gate_state
);
5831 info_to_display(tvb
,stt
,offset
,2,"Reason",pcmm_gate_state_reason
,FMT_DEC
,&hf_cops_pcmm_packetcable_gate_state_reason
);
5837 /* Cops - Section : Version Info */
5839 cops_version_info(tvbuff_t
*tvb
, proto_tree
*st
, guint n
, guint32 offset
) {
5843 /* Create a subtree */
5844 stt
= info_to_cops_subtree(tvb
,st
,n
,offset
,"Version Info");
5848 info_to_display(tvb
,stt
,offset
,2,"Major Version Number",NULL
,FMT_DEC
,&hf_cops_pcmm_packetcable_version_info_major
);
5852 info_to_display(tvb
,stt
,offset
,2,"Minor Version Number",NULL
,FMT_DEC
,&hf_cops_pcmm_packetcable_version_info_minor
);
5858 /* Cops - Section : PSID */
5860 cops_psid(tvbuff_t
*tvb
, proto_tree
*st
, guint n
, guint32 offset
) {
5864 /* Create a subtree */
5865 stt
= info_to_cops_subtree(tvb
,st
,n
,offset
,"PSID");
5869 info_to_display(tvb
,stt
,offset
,4,"PSID", NULL
,FMT_DEC
,&hf_cops_pcmm_psid
);
5872 /* Cops - Section : Synch Options */
5874 cops_synch_options(tvbuff_t
*tvb
, proto_tree
*st
, guint n
, guint32 offset
) {
5878 /* Create a subtree */
5879 stt
= info_to_cops_subtree(tvb
,st
,n
,offset
,"Synch Options");
5882 proto_tree_add_item(stt
, hf_cops_reserved16
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
5886 info_to_display(tvb
,stt
,offset
,1,"Report Type", pcmm_report_type_vals
,FMT_DEC
,&hf_cops_pcmm_synch_options_report_type
);
5890 info_to_display(tvb
,stt
,offset
,1,"Synch Type", pcmm_synch_type_vals
,FMT_DEC
,&hf_cops_pcmm_synch_options_synch_type
);
5896 /* Cops - Section : Msg Receipt Key */
5898 cops_msg_receipt_key(tvbuff_t
*tvb
, proto_tree
*st
, guint n
, guint32 offset
) {
5902 /* Create a subtree */
5903 stt
= info_to_cops_subtree(tvb
,st
,n
,offset
,"Msg Receipt Key");
5906 /* Msg Receipt Key */
5907 info_to_display(tvb
,stt
,offset
,4,"Msg Receipt Key", NULL
,FMT_HEX
,&hf_cops_pcmm_msg_receipt_key
);
5910 /* Cops - Section : UserID */
5912 cops_userid(tvbuff_t
*tvb
, proto_tree
*st
, guint n
, guint32 offset
) {
5916 /* Create a subtree */
5917 stt
= info_to_cops_subtree(tvb
, st
, n
, offset
, "UserID");
5921 info_to_display(tvb
, stt
, offset
, n
-4, "UserID", NULL
, FMT_STR
, &hf_cops_pcmm_userid
);
5924 /* Cops - Section : SharedResourceID */
5926 cops_sharedresourceid(tvbuff_t
*tvb
, proto_tree
*st
, guint n
, guint32 offset
) {
5930 /* Create a subtree */
5931 stt
= info_to_cops_subtree(tvb
,st
,n
,offset
,"SharedResourceID");
5934 /* SharedResourceID */
5935 info_to_display(tvb
,stt
,offset
,4,"SharedResourceID", NULL
,FMT_HEX
,&hf_cops_pcmm_sharedresourceid
);
5938 /* PacketCable D-QoS S-Num/S-Type globs */
5939 #define PCDQ_TRANSACTION_ID 0x0101
5940 #define PCDQ_SUBSCRIBER_IDv4 0x0201
5941 #define PCDQ_SUBSCRIBER_IDv6 0x0202
5942 #define PCDQ_GATE_ID 0x0301
5943 #define PCDQ_ACTIVITY_COUNT 0x0401
5944 #define PCDQ_GATE_SPEC 0x0501
5945 #define PCDQ_REMOTE_GATE_INFO 0x0601
5946 #define PCDQ_EVENT_GENERATION_INFO 0x0701
5947 #define PCDQ_MEDIA_CONNECTION_EVENT_INFO 0x0801
5948 #define PCDQ_PACKETCABLE_ERROR 0x0901
5949 #define PCDQ_PACKETCABLE_REASON 0x0d01
5950 #define PCDQ_ELECTRONIC_SURVEILLANCE 0x0a01
5951 #define PCDQ_SESSION_DESCRIPTION 0x0b01
5953 /* Analyze the PacketCable objects */
5955 cops_analyze_packetcable_dqos_obj(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, guint8 op_code
, guint32 offset
) {
5959 guint8 s_num
, s_type
;
5960 guint16 num_type_glob
;
5962 /* Only if this option is enabled by the Gui */
5963 if ( cops_packetcable
== FALSE
) {
5967 /* Do the remaining client specific objects */
5968 remdata
= tvb_length_remaining(tvb
, offset
);
5969 while (remdata
> 4) {
5971 /* In case we have remaining data, then lets try to get this analyzed */
5972 object_len
= tvb_get_ntohs(tvb
, offset
);
5973 if (object_len
< 4) {
5974 proto_tree_add_text(tree
, tvb
, offset
, 2,
5975 "Incorrect PacketCable object length %u < 4", object_len
);
5979 s_num
= tvb_get_guint8(tvb
, offset
+ 2);
5980 s_type
= tvb_get_guint8(tvb
, offset
+ 3);
5982 /* Glom the s_num and s_type together to make switching easier */
5983 num_type_glob
= s_num
<< 8 | s_type
;
5985 /* Perform the appropriate functions */
5986 switch (num_type_glob
){
5987 case PCDQ_TRANSACTION_ID
:
5988 cops_transaction_id(tvb
, pinfo
, tree
, op_code
, object_len
, offset
);
5990 case PCDQ_SUBSCRIBER_IDv4
:
5991 cops_subscriber_id_v4(tvb
, tree
, object_len
, offset
);
5993 case PCDQ_SUBSCRIBER_IDv6
:
5994 cops_subscriber_id_v6(tvb
, tree
, object_len
, offset
);
5997 cops_gate_id(tvb
, tree
, object_len
, offset
);
5999 case PCDQ_ACTIVITY_COUNT
:
6000 cops_activity_count(tvb
, tree
, object_len
, offset
);
6002 case PCDQ_GATE_SPEC
:
6003 cops_gate_specs(tvb
, tree
, object_len
, offset
);
6005 case PCDQ_REMOTE_GATE_INFO
:
6006 cops_remote_gate_info(tvb
, tree
, object_len
, offset
);
6008 case PCDQ_EVENT_GENERATION_INFO
:
6009 cops_event_generation_info(tvb
, tree
, object_len
, offset
);
6011 case PCDQ_PACKETCABLE_ERROR
:
6012 cops_packetcable_error(tvb
, tree
, object_len
, offset
);
6014 case PCDQ_ELECTRONIC_SURVEILLANCE
:
6015 cops_surveillance_parameters(tvb
, tree
, object_len
, offset
);
6017 case PCDQ_PACKETCABLE_REASON
:
6018 cops_packetcable_reason(tvb
, tree
, object_len
, offset
);
6023 offset
+= object_len
;
6025 /* See what we can still get from the buffer */
6026 remdata
= tvb_length_remaining(tvb
, offset
);
6030 /* XXX - This duplicates code in the DOCSIS dissector. */
6032 decode_docsis_request_transmission_policy(tvbuff_t
*tvb
, guint32 offset
, proto_tree
*tree
, gint hf
) {
6033 proto_tree
*drtp_tree
;
6035 guint32 policy
= tvb_get_ntohl(tvb
, offset
);
6038 static const value_string drtp_vals
[] = {
6039 { 1 << 0, "The Service Flow MUST NOT use \"all CMs\" broadcast request opportunities" },
6040 { 1 << 1, "The Service Flow MUST NOT use Priority Request multicast request opportunities" },
6041 { 1 << 2, "The Service Flow MUST NOT use Request/Data opportunities for Requests" },
6042 { 1 << 3, "The Service Flow MUST NOT use Request/Data opportunities for Data" },
6043 { 1 << 4, "The Service Flow MUST NOT piggyback requests with data" },
6044 { 1 << 5, "The Service Flow MUST NOT concatenate data" },
6045 { 1 << 6, "The Service Flow MUST NOT fragment data" },
6046 { 1 << 7, "The Service Flow MUST NOT suppress payload headers" },
6047 { 1 << 8, "The Service Flow MUST drop packets that do not fit in the Unsolicited Grant Size" },
6051 item
= proto_tree_add_item (tree
, hf
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
6052 drtp_tree
= proto_item_add_subtree(item
, ett_docsis_request_transmission_policy
);
6053 for (i
= 0 ; i
<= 8; i
++) {
6054 if (policy
& drtp_vals
[i
].value
) {
6055 decode_bitfield_value(bit_fld
, policy
, drtp_vals
[i
].value
, 32);
6056 proto_tree_add_text(drtp_tree
, tvb
, offset
, 4, "%s%s",
6057 bit_fld
, drtp_vals
[i
].strptr
);
6063 #define PCMM_TRANSACTION_ID 0x0101
6064 #define PCMM_AMID 0x0201
6065 #define PCMM_SUBSCRIBER_ID 0x0301
6066 #define PCMM_SUBSCRIBER_ID_V6 0x0302
6067 #define PCMM_GATE_ID 0x0401
6068 #define PCMM_GATE_SPEC 0x0501
6069 #define PCMM_CLASSIFIER 0x0601
6070 #define PCMM_EXTENDED_CLASSIFIER 0x0602
6071 #define PCMM_IPV6_CLASSIFIER 0x0603
6072 #define PCMM_FLOW_SPEC 0x0701
6073 #define PCMM_DOCSIS_SERVICE_CLASS_NAME 0x0702
6074 #define PCMM_BEST_EFFORT_SERVICE 0x0703
6075 #define PCMM_NON_REAL_TIME_POLLING_SERVICE 0x0704
6076 #define PCMM_REAL_TIME_POLLING_SERVICE 0x0705
6077 #define PCMM_UNSOLICITED_GRANT_SERVICE 0x0706
6078 #define PCMM_UGS_WITH_ACTIVITY_DETECTION 0x0707
6079 #define PCMM_DOWNSTREAM_SERVICE 0x0708
6080 #define PCMM_UPSTREAM_DROP 0x0709
6081 #define PCMM_EVENT_GENERATION_INFO 0x0801
6082 #define PCMM_VOLUME_BASED_USAGE_LIMIT 0x0901
6083 #define PCMM_TIME_BASED_USAGE_LIMIT 0x0a01
6084 #define PCMM_OPAQUE_DATA 0x0b01
6085 #define PCMM_GATE_TIME_INFO 0x0c01
6086 #define PCMM_GATE_USAGE_INFO 0x0d01
6087 #define PCMM_PACKETCABLE_ERROR 0x0e01
6088 #define PCMM_GATE_STATE 0x0f01
6089 #define PCMM_VERSION_INFO 0x1001
6090 #define PCMM_PSID 0x1101
6091 #define PCMM_SYNCH_OPTIONS 0x1201
6092 #define PCMM_MSG_RECEIPT_KEY 0x1301
6093 #define PCMM_USERID 0x1501
6094 #define PCMM_SHAREDRESOURCEID 0x1601
6098 cops_analyze_packetcable_mm_obj(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, guint8 op_code
, guint32 offset
) {
6101 guint8 s_num
, s_type
;
6102 guint16 num_type_glob
;
6104 /* Only if this option is enabled by the Gui */
6105 if ( cops_packetcable
== FALSE
) {
6109 /* Do the remaining client specific objects */
6110 while (tvb_reported_length_remaining(tvb
, offset
) > 4) {
6112 /* In case we have remaining data, then lets try to get this analyzed */
6113 object_len
= tvb_get_ntohs(tvb
, offset
);
6114 if (object_len
< 4) {
6115 proto_tree_add_text(tree
, tvb
, offset
, 2,
6116 "Incorrect PacketCable object length %u < 4", object_len
);
6120 s_num
= tvb_get_guint8(tvb
, offset
+ 2);
6121 s_type
= tvb_get_guint8(tvb
, offset
+ 3);
6123 /* Glom the s_num and s_type together to make switching easier */
6124 num_type_glob
= s_num
<< 8 | s_type
;
6126 /* Perform the appropriate functions */
6127 switch (num_type_glob
){
6128 case PCMM_TRANSACTION_ID
:
6129 cops_mm_transaction_id(tvb
, pinfo
, tree
, op_code
, object_len
, offset
);
6132 cops_amid(tvb
, tree
, object_len
, offset
);
6134 case PCMM_SUBSCRIBER_ID
:
6135 cops_subscriber_id_v4(tvb
, tree
, object_len
, offset
);
6137 case PCMM_SUBSCRIBER_ID_V6
:
6138 cops_subscriber_id_v6(tvb
, tree
, object_len
, offset
);
6141 cops_gate_id(tvb
, tree
, object_len
, offset
);
6143 case PCMM_GATE_SPEC
:
6144 cops_mm_gate_spec(tvb
, tree
, object_len
, offset
);
6146 case PCMM_CLASSIFIER
:
6147 cops_classifier(tvb
, tree
, object_len
, offset
, FALSE
);
6149 case PCMM_EXTENDED_CLASSIFIER
:
6150 cops_classifier(tvb
, tree
, object_len
, offset
, TRUE
);
6152 case PCMM_IPV6_CLASSIFIER
:
6153 cops_ipv6_classifier(tvb
, tree
, object_len
, offset
);
6155 case PCMM_FLOW_SPEC
:
6156 cops_flow_spec(tvb
, tree
, object_len
, offset
);
6158 case PCMM_DOCSIS_SERVICE_CLASS_NAME
:
6159 cops_docsis_service_class_name(tvb
, tree
, object_len
, offset
);
6161 case PCMM_BEST_EFFORT_SERVICE
:
6162 if (object_len
== 44 || object_len
== 80 || object_len
== 116)
6163 cops_best_effort_service_i04_i05(tvb
, tree
, object_len
, offset
, TRUE
);
6164 else if (object_len
== 40 || object_len
== 72 || object_len
== 104)
6165 cops_best_effort_service_i04_i05(tvb
, tree
, object_len
, offset
, FALSE
);
6167 cops_best_effort_service(tvb
, tree
, object_len
, offset
);
6169 case PCMM_NON_REAL_TIME_POLLING_SERVICE
:
6170 if (object_len
== 48 || object_len
== 88 || object_len
== 128)
6171 cops_non_real_time_polling_service_i04_i05(tvb
, tree
, object_len
, offset
, TRUE
);
6172 else if (object_len
== 44 || object_len
== 80 || object_len
== 116)
6173 cops_non_real_time_polling_service_i04_i05(tvb
, tree
, object_len
, offset
, FALSE
);
6175 cops_non_real_time_polling_service(tvb
, tree
, object_len
, offset
);
6177 case PCMM_REAL_TIME_POLLING_SERVICE
:
6178 if (object_len
== 48 || object_len
== 88 || object_len
== 128)
6179 cops_real_time_polling_service_i04_i05(tvb
, tree
, object_len
, offset
, TRUE
);
6180 else if (object_len
== 44 || object_len
== 80 || object_len
== 116)
6181 cops_real_time_polling_service_i04_i05(tvb
, tree
, object_len
, offset
, FALSE
);
6183 cops_real_time_polling_service(tvb
, tree
, object_len
, offset
);
6185 case PCMM_UNSOLICITED_GRANT_SERVICE
:
6186 if (object_len
== 36 || object_len
== 64 || object_len
== 92)
6187 cops_unsolicited_grant_service_i04_i05(tvb
, tree
, object_len
, offset
, TRUE
);
6188 else if (object_len
== 32 || object_len
== 56 || object_len
== 80)
6189 cops_unsolicited_grant_service_i04_i05(tvb
, tree
, object_len
, offset
, FALSE
);
6191 cops_unsolicited_grant_service(tvb
, tree
, object_len
, offset
);
6193 case PCMM_UGS_WITH_ACTIVITY_DETECTION
:
6194 if (object_len
== 44 || object_len
== 80 || object_len
== 116)
6195 cops_ugs_with_activity_detection_i04_i05(tvb
, tree
, object_len
, offset
, TRUE
);
6196 else if (object_len
== 40 || object_len
== 72 || object_len
== 104)
6197 cops_ugs_with_activity_detection_i04_i05(tvb
, tree
, object_len
, offset
, FALSE
);
6199 cops_ugs_with_activity_detection(tvb
, tree
, object_len
, offset
);
6201 case PCMM_DOWNSTREAM_SERVICE
:
6202 if (object_len
== 48 || object_len
== 88 || object_len
== 128)
6203 cops_downstream_service_i04_i05(tvb
, tree
, object_len
, offset
, TRUE
);
6204 else if (object_len
== 40 || object_len
== 72 || object_len
== 104)
6205 cops_downstream_service_i04_i05(tvb
, tree
, object_len
, offset
, FALSE
);
6207 cops_downstream_service(tvb
, tree
, object_len
, offset
);
6209 case PCMM_UPSTREAM_DROP
:
6210 cops_upstream_drop_i04(tvb
, tree
, object_len
, offset
);
6212 case PCMM_EVENT_GENERATION_INFO
:
6213 cops_mm_event_generation_info(tvb
, tree
, object_len
, offset
);
6215 case PCMM_VOLUME_BASED_USAGE_LIMIT
:
6216 cops_volume_based_usage_limit(tvb
, tree
, object_len
, offset
);
6218 case PCMM_TIME_BASED_USAGE_LIMIT
:
6219 cops_time_based_usage_limit(tvb
, tree
, object_len
, offset
);
6221 case PCMM_OPAQUE_DATA
:
6222 cops_opaque_data(tvb
, tree
, object_len
, offset
);
6224 case PCMM_GATE_TIME_INFO
:
6225 cops_gate_time_info(tvb
, tree
, object_len
, offset
);
6227 case PCMM_GATE_USAGE_INFO
:
6228 cops_gate_usage_info(tvb
, tree
, object_len
, offset
);
6230 case PCMM_PACKETCABLE_ERROR
:
6231 cops_packetcable_mm_error(tvb
, tree
, object_len
, offset
);
6233 case PCMM_GATE_STATE
:
6234 cops_gate_state(tvb
, tree
, object_len
, offset
);
6236 case PCMM_VERSION_INFO
:
6237 cops_version_info(tvb
, tree
, object_len
, offset
);
6240 cops_psid(tvb
, tree
, object_len
, offset
);
6242 case PCMM_SYNCH_OPTIONS
:
6243 cops_synch_options(tvb
, tree
, object_len
, offset
);
6245 case PCMM_MSG_RECEIPT_KEY
:
6246 cops_msg_receipt_key(tvb
, tree
, object_len
, offset
);
6249 cops_userid(tvb
, tree
, object_len
, offset
);
6251 case PCMM_SHAREDRESOURCEID
:
6252 cops_sharedresourceid(tvb
, tree
, object_len
, offset
);
6258 offset
+= object_len
;
6263 /* End of PacketCable Addition */