1 /* Do not modify this file. Changes will be overwritten */
2 /* Generated Automatically                              */
3 /* packet-skinny.c                                      */
4 
5 /* packet-skinny.c
6  * Dissector for the Skinny Client Control Protocol
7  *   (The "D-Channel"-Protocol for Cisco Systems' IP-Phones)
8  *
9  * Author: Diederik de Groot <ddegroot@user.sf.net>, Copyright 2014
10  * Rewritten to support newer skinny protocolversions (V0-V22)
11  * Based on previous versions/contributions:
12  *  - Joerg Mayer <jmayer@loplof.de>, Copyright 2001
13  *  - Paul E. Erkkila (pee@erkkila.org) - fleshed out the decode
14  *    skeleton to report values for most message/message fields.
15  *    Much help from Guy Harris on figuring out the wireshark api.
16  *  - packet-aim.c by Ralf Hoelzer <ralf@well.com>, Copyright 2000
17  *  - Wireshark - Network traffic analyzer,
18  *    By Gerald Combs <gerald@wireshark.org>, Copyright 1998
19  *
20  * SPDX-License-Identifier: GPL-2.0-or-later
21  */
22 
23 /*
24  * Generated Automatically Using (from wireshark base directory):
25  *   cog.py -D xmlfile=tools/SkinnyProtocolOptimized.xml -d -c -o epan/dissectors/packet-skinny.c epan/dissectors/packet-skinny.c.in
26  */
27 
28 /* c-basic-offset: 2; tab-width: 8; indent-tabs-mode: nil
29  * vi: set shiftwidth=2 tabstop=8 expandtab:
30  * :indentSize=2:tabSize=8:noTabs=true:
31  */
32 
33 
34 #include "config.h"
35 
36 #include <epan/packet.h>
37 #include <epan/prefs.h>
38 #include <epan/conversation.h>
39 #include <epan/wmem_scopes.h>
40 #include <epan/to_str.h>
41 #include <epan/reassemble.h>
42 #include <epan/tap.h>
43 #include <epan/ptvcursor.h>
44 
45 #include "packet-rtp.h"
46 #include "packet-tcp.h"
47 #include "packet-tls.h"
48 #include "packet-skinny.h"
49 
50 /* un-comment the following as well as this line in conversation.c, to enable debug printing */
51 /* #define DEBUG_CONVERSATION */
52 #include "conversation_debug.h"
53 
54 void proto_register_skinny(void);
55 void proto_reg_handoff_skinny(void);
56 
57 #define TCP_PORT_SKINNY 2000 /* Not IANA registered */
58 #define SSL_PORT_SKINNY 2443 /* IANA assigned to PowerClient Central Storage Facility */
59 
60 #define BASIC_MSG_TYPE 0x00
61 #define V10_MSG_TYPE 0x0A
62 #define V11_MSG_TYPE 0x0B
63 #define V15_MSG_TYPE 0x0F
64 #define V16_MSG_TYPE 0x10
65 #define V17_MSG_TYPE 0x11
66 #define V18_MSG_TYPE 0x12
67 #define V19_MSG_TYPE 0x13
68 #define V20_MSG_TYPE 0x14
69 #define V21_MSG_TYPE 0x15
70 #define V22_MSG_TYPE 0x16
71 
72 static const value_string header_version[] = {
73   { BASIC_MSG_TYPE, "Basic" },
74   { V10_MSG_TYPE,   "V10" },
75   { V11_MSG_TYPE,   "V11" },
76   { V15_MSG_TYPE,   "V15" },
77   { V16_MSG_TYPE,   "V16" },
78   { V17_MSG_TYPE,   "V17" },
79   { V18_MSG_TYPE,   "V18" },
80   { V19_MSG_TYPE,   "V19" },
81   { V20_MSG_TYPE,   "V20" },
82   { V21_MSG_TYPE,   "V21" },
83   { V22_MSG_TYPE,   "V22" },
84   { 0             , NULL }
85 };
86 
87 /* Declare MessageId */
88 static const value_string message_id[] = {
89   { 0x0000, "KeepAliveReq" },
90   { 0x0001, "RegisterReq" },
91   { 0x0002, "IpPort" },
92   { 0x0003, "KeypadButton" },
93   { 0x0004, "EnblocCall" },
94   { 0x0005, "Stimulus" },
95   { 0x0006, "OffHook" },
96   { 0x0007, "OnHook" },
97   { 0x0008, "HookFlash" },
98   { 0x0009, "ForwardStatReq" },
99   { 0x000a, "SpeedDialStatReq" },
100   { 0x000b, "LineStatReq" },
101   { 0x000c, "ConfigStatReq" },
102   { 0x000d, "TimeDateReq" },
103   { 0x000e, "ButtonTemplateReq" },
104   { 0x000f, "VersionReq" },
105   { 0x0010, "CapabilitiesRes" },
106   { 0x0012, "ServerReq" },
107   { 0x0020, "Alarm" },
108   { 0x0021, "MulticastMediaReceptionAck" },
109   { 0x0022, "OpenReceiveChannelAck" },
110   { 0x0023, "ConnectionStatisticsRes" },
111   { 0x0024, "OffHookWithCallingPartyNumber" },
112   { 0x0025, "SoftKeySetReq" },
113   { 0x0026, "SoftKeyEvent" },
114   { 0x0027, "UnregisterReq" },
115   { 0x0028, "SoftKeyTemplateReq" },
116   { 0x0029, "RegisterTokenReq" },
117   { 0x002a, "MediaTransmissionFailure" },
118   { 0x002b, "HeadsetStatus" },
119   { 0x002c, "MediaResourceNotification" },
120   { 0x002d, "RegisterAvailableLines" },
121   { 0x002e, "DeviceToUserData" },
122   { 0x002f, "DeviceToUserDataResponse" },
123   { 0x0030, "UpdateCapabilities" },
124   { 0x0031, "OpenMultiMediaReceiveChannelAck" },
125   { 0x0032, "ClearConference" },
126   { 0x0033, "ServiceURLStatReq" },
127   { 0x0034, "FeatureStatReq" },
128   { 0x0035, "CreateConferenceRes" },
129   { 0x0036, "DeleteConferenceRes" },
130   { 0x0037, "ModifyConferenceRes" },
131   { 0x0038, "AddParticipantRes" },
132   { 0x0039, "AuditConferenceRes" },
133   { 0x0040, "AuditParticipantRes" },
134   { 0x0041, "DeviceToUserDataVersion1" },
135   { 0x0042, "DeviceToUserDataResponseVersion1" },
136   { 0x0043, "CapabilitiesV2Res" },
137   { 0x0044, "CapabilitiesV3Res" },
138   { 0x0045, "PortRes" },
139   { 0x0046, "QoSResvNotify" },
140   { 0x0047, "QoSErrorNotify" },
141   { 0x0048, "SubscriptionStatReq" },
142   { 0x0049, "MediaPathEvent" },
143   { 0x004a, "MediaPathCapability" },
144   { 0x004c, "MwiNotification" },
145   { 0x0081, "RegisterAck" },
146   { 0x0082, "StartTone" },
147   { 0x0083, "StopTone" },
148   { 0x0085, "SetRinger" },
149   { 0x0086, "SetLamp" },
150   { 0x0087, "SetHookFlashDetect" },
151   { 0x0088, "SetSpeakerMode" },
152   { 0x0089, "SetMicroMode" },
153   { 0x008a, "StartMediaTransmission" },
154   { 0x008b, "StopMediaTransmission" },
155   { 0x008f, "CallInfo" },
156   { 0x0090, "ForwardStatRes" },
157   { 0x0091, "SpeedDialStatRes" },
158   { 0x0092, "LineStatRes" },
159   { 0x0093, "ConfigStatRes" },
160   { 0x0094, "TimeDateRes" },
161   { 0x0095, "StartSessionTransmission" },
162   { 0x0096, "StopSessionTransmission" },
163   { 0x0097, "ButtonTemplateRes" },
164   { 0x0098, "VersionRes" },
165   { 0x0099, "DisplayText" },
166   { 0x009a, "ClearDisplay" },
167   { 0x009b, "CapabilitiesReq" },
168   { 0x009d, "RegisterReject" },
169   { 0x009e, "ServerRes" },
170   { 0x009f, "Reset" },
171   { 0x0100, "KeepAliveAck" },
172   { 0x0101, "StartMulticastMediaReception" },
173   { 0x0102, "StartMulticastMediaTransmission" },
174   { 0x0103, "StopMulticastMediaReception" },
175   { 0x0104, "StopMulticastMediaTransmission" },
176   { 0x0105, "OpenReceiveChannel" },
177   { 0x0106, "CloseReceiveChannel" },
178   { 0x0107, "ConnectionStatisticsReq" },
179   { 0x0108, "SoftKeyTemplateRes" },
180   { 0x0109, "SoftKeySetRes" },
181   { 0x0110, "SelectSoftKeys" },
182   { 0x0111, "CallState" },
183   { 0x0112, "DisplayPromptStatus" },
184   { 0x0113, "ClearPromptStatus" },
185   { 0x0114, "DisplayNotify" },
186   { 0x0115, "ClearNotify" },
187   { 0x0116, "ActivateCallPlane" },
188   { 0x0117, "DeactivateCallPlane" },
189   { 0x0118, "UnregisterAck" },
190   { 0x0119, "BackSpaceRes" },
191   { 0x011a, "RegisterTokenAck" },
192   { 0x011b, "RegisterTokenReject" },
193   { 0x011c, "StartMediaFailureDetection" },
194   { 0x011d, "DialedNumber" },
195   { 0x011e, "UserToDeviceData" },
196   { 0x011f, "FeatureStatRes" },
197   { 0x0120, "DisplayPriNotify" },
198   { 0x0121, "ClearPriNotify" },
199   { 0x0122, "StartAnnouncement" },
200   { 0x0123, "StopAnnouncement" },
201   { 0x0124, "AnnouncementFinish" },
202   { 0x0127, "NotifyDtmfTone" },
203   { 0x0128, "SendDtmfTone" },
204   { 0x0129, "SubscribeDtmfPayloadReq" },
205   { 0x012a, "SubscribeDtmfPayloadRes" },
206   { 0x012b, "SubscribeDtmfPayloadErr" },
207   { 0x012c, "UnSubscribeDtmfPayloadReq" },
208   { 0x012d, "UnSubscribeDtmfPayloadRes" },
209   { 0x012e, "UnSubscribeDtmfPayloadErr" },
210   { 0x012f, "ServiceURLStatRes" },
211   { 0x0130, "CallSelectStatRes" },
212   { 0x0131, "OpenMultiMediaReceiveChannel" },
213   { 0x0132, "StartMultiMediaTransmission" },
214   { 0x0133, "StopMultiMediaTransmission" },
215   { 0x0134, "MiscellaneousCommand" },
216   { 0x0135, "FlowControlCommand" },
217   { 0x0136, "CloseMultiMediaReceiveChannel" },
218   { 0x0137, "CreateConferenceReq" },
219   { 0x0138, "DeleteConferenceReq" },
220   { 0x0139, "ModifyConferenceReq" },
221   { 0x013a, "AddParticipantReq" },
222   { 0x013b, "DropParticipantReq" },
223   { 0x013c, "AuditConferenceReq" },
224   { 0x013d, "AuditParticipantReq" },
225   { 0x013e, "ChangeParticipantReq" },
226   { 0x013f, "UserToDeviceDataVersion1" },
227   { 0x0140, "VideoDisplayCommand" },
228   { 0x0141, "FlowControlNotify" },
229   { 0x0142, "ConfigStatV2Res" },
230   { 0x0143, "DisplayNotifyV2" },
231   { 0x0144, "DisplayPriNotifyV2" },
232   { 0x0145, "DisplayPromptStatusV2" },
233   { 0x0146, "FeatureStatV2Res" },
234   { 0x0147, "LineStatV2Res" },
235   { 0x0148, "ServiceURLStatV2Res" },
236   { 0x0149, "SpeedDialStatV2Res" },
237   { 0x014a, "CallInfoV2" },
238   { 0x014b, "PortReq" },
239   { 0x014c, "PortClose" },
240   { 0x014d, "QoSListen" },
241   { 0x014e, "QoSPath" },
242   { 0x014f, "QoSTeardown" },
243   { 0x0150, "UpdateDSCP" },
244   { 0x0151, "QoSModify" },
245   { 0x0152, "SubscriptionStatRes" },
246   { 0x0153, "Notification" },
247   { 0x0154, "StartMediaTransmissionAck" },
248   { 0x0155, "StartMultiMediaTransmissionAck" },
249   { 0x0156, "CallHistoryInfo" },
250   { 0x0157, "LocationInfo" },
251   { 0x0158, "MwiRes" },
252   { 0x0159, "AddOnDeviceCapabilities" },
253   { 0x015a, "EnhancedAlarm" },
254   { 0x015e, "CallCountReq" },
255   { 0x015f, "CallCountResp" },
256   { 0x0160, "RecordingStatus" },
257   { 0x8000, "SPCPRegisterTokenReq" },
258   { 0x8100, "SPCPRegisterTokenAck" },
259   { 0x8101, "SPCPRegisterTokenReject" },
260   {0     , NULL}
261 };
262 static value_string_ext message_id_ext = VALUE_STRING_EXT_INIT(message_id);
263 
264 /* Declare Enums and Defines */
265 static const value_string DisplayLabels_36[] = {
266   { 0x00000, "Empty" },
267   { 0x00002, "Acct" },
268   { 0x00003, "Flash" },
269   { 0x00004, "Login" },
270   { 0x00005, "Device In Home Location" },
271   { 0x00006, "Device In Roaming Location" },
272   { 0x00007, "Enter Authorization Code" },
273   { 0x00008, "Enter Client Matter Code" },
274   { 0x00009, "Calls Available For Pickup" },
275   { 0x0000a, "Cm Fallback Service Operating" },
276   { 0x0000b, "Max Phones Exceeded" },
277   { 0x0000c, "Waiting To Rehome" },
278   { 0x0000d, "Please End Call" },
279   { 0x0000e, "Paging" },
280   { 0x0000f, "Select Line" },
281   { 0x00010, "Transfer Destination Is Busy" },
282   { 0x00011, "Select A Service" },
283   { 0x00012, "Local Services" },
284   { 0x00013, "Enter Search Criteria" },
285   { 0x00014, "Night Service" },
286   { 0x00015, "Night Service Active" },
287   { 0x00016, "Night Service Disabled" },
288   { 0x00017, "Login Successful" },
289   { 0x00018, "Wrong Pin" },
290   { 0x00019, "Please Enter Pin" },
291   { 0x0001a, "Of" },
292   { 0x0001b, "Records 1 To" },
293   { 0x0001c, "No Record Found" },
294   { 0x0001d, "Search Results" },
295   { 0x0001e, "Calls In Queue" },
296   { 0x0001f, "Join To Hunt Group" },
297   { 0x00020, "Ready" },
298   { 0x00021, "Notready" },
299   { 0x00022, "Call On Hold" },
300   { 0x00023, "Hold Reversion" },
301   { 0x00024, "Setup Failed" },
302   { 0x00025, "No Resources" },
303   { 0x00026, "Device Not Authorized" },
304   { 0x00027, "Monitoring" },
305   { 0x00028, "Recording Awaiting Call To Be Active" },
306   { 0x00029, "Recording Already In Progress" },
307   { 0x0002a, "Inactive Recording Session" },
308   { 0x0002b, "Mobility" },
309   { 0x0002c, "Whisper" },
310   { 0x0002d, "Forward All" },
311   { 0x0002e, "Malicious Call Id" },
312   { 0x0002f, "Group Pickup" },
313   { 0x00030, "Remove Last Participant" },
314   { 0x00031, "Other Pickup" },
315   { 0x00032, "Video" },
316   { 0x00033, "End Call" },
317   { 0x00034, "Conference List" },
318   { 0x00035, "Quality Reporting Tool" },
319   { 0x00036, "Hunt Group" },
320   { 0x00037, "Use Line Or Join To Complete" },
321   { 0x00038, "Do Not Disturb" },
322   { 0x00039, "Do Not Disturb Is Active" },
323   { 0x0003a, "Cfwdall Loop Detected" },
324   { 0x0003b, "Cfwdall Hops Exceeded" },
325   { 0x0003c, "Abbrdial" },
326   { 0x0003d, "Pickup Is Unavailable" },
327   { 0x0003e, "Conference Is Unavailable" },
328   { 0x0003f, "Meetme Is Unavailable" },
329   { 0x00040, "Cannot Retrieve Parked Call" },
330   { 0x00041, "Cannot Send Call To Mobile" },
331   { 0x00043, "Record" },
332   { 0x00044, "Cannot Move Conversation" },
333   { 0x00045, "Cw Off" },
334   { 0x00046, "Coaching" },
335   { 0x0004f, "Recording" },
336   { 0x00050, "Recording Failed" },
337   { 0x00051, "Connecting" },
338   { 0x00000, NULL }
339 };
340 static value_string_ext DisplayLabels_36_ext = VALUE_STRING_EXT_INIT(DisplayLabels_36);
341 
342 static const value_string DisplayLabels_200[] = {
343   { 0x00001, "Redial" },
344   { 0x00002, "Newcall" },
345   { 0x00003, "Hold" },
346   { 0x00004, "Transfer" },
347   { 0x00005, "Cfwdall" },
348   { 0x00006, "Cfwdbusy" },
349   { 0x00007, "Cfwdnoanswer" },
350   { 0x00008, "Backspace" },
351   { 0x00009, "Endcall" },
352   { 0x0000a, "Resume" },
353   { 0x0000b, "Answer" },
354   { 0x0000c, "Info" },
355   { 0x0000d, "Confrn" },
356   { 0x0000e, "Park" },
357   { 0x0000f, "Join" },
358   { 0x00010, "Meetme" },
359   { 0x00011, "Pickup" },
360   { 0x00012, "Gpickup" },
361   { 0x00013, "Your Current Options" },
362   { 0x00014, "Off Hook" },
363   { 0x00015, "On Hook" },
364   { 0x00016, "Ring Out" },
365   { 0x00017, "From " },
366   { 0x00018, "Connected" },
367   { 0x00019, "Busy" },
368   { 0x0001a, "Line In Use" },
369   { 0x0001b, "Call Waiting" },
370   { 0x0001c, "Call Transfer" },
371   { 0x0001d, "Call Park" },
372   { 0x0001e, "Call Proceed" },
373   { 0x0001f, "In Use Remote" },
374   { 0x00020, "Enter Number" },
375   { 0x00021, "Call Park At" },
376   { 0x00022, "Primary Only" },
377   { 0x00023, "Temp Fail" },
378   { 0x00024, "You Have Voicemail" },
379   { 0x00025, "Forwarded To" },
380   { 0x00026, "Can Not Complete Conference" },
381   { 0x00027, "No Conference Bridge" },
382   { 0x00028, "Can Not Hold Primary Control" },
383   { 0x00029, "Invalid Conference Participant" },
384   { 0x0002a, "In Conference Already" },
385   { 0x0002b, "No Participant Info" },
386   { 0x0002c, "Exceed Maximum Parties" },
387   { 0x0002d, "Key Is Not Active" },
388   { 0x0002e, "Error No License" },
389   { 0x0002f, "Error Dbconfig" },
390   { 0x00030, "Error Database" },
391   { 0x00031, "Error Pass Limit" },
392   { 0x00032, "Error Unknown" },
393   { 0x00033, "Error Mismatch" },
394   { 0x00034, "Conference" },
395   { 0x00035, "Park Number" },
396   { 0x00036, "Private" },
397   { 0x00037, "Not Enough Bandwidth" },
398   { 0x00038, "Unknown Number" },
399   { 0x00039, "Rmlstc" },
400   { 0x0003a, "Voicemail" },
401   { 0x0003b, "Immdiv" },
402   { 0x0003c, "Intrcpt" },
403   { 0x0003d, "Setwtch" },
404   { 0x0003e, "Trnsfvm" },
405   { 0x0003f, "Dnd" },
406   { 0x00040, "Divall" },
407   { 0x00041, "Callback" },
408   { 0x00042, "Network Congestion Rerouting" },
409   { 0x00043, "Barge" },
410   { 0x00044, "Failed To Setup Barge" },
411   { 0x00045, "Another Barge Exists" },
412   { 0x00046, "Incompatible Device Type" },
413   { 0x00047, "No Park Number Available" },
414   { 0x00048, "Callpark Reversion" },
415   { 0x00049, "Service Is Not Active" },
416   { 0x0004a, "High Traffic Try Again Later" },
417   { 0x0004b, "Qrt" },
418   { 0x0004c, "Mcid" },
419   { 0x0004d, "Dirtrfr" },
420   { 0x0004e, "Select" },
421   { 0x0004f, "Conflist" },
422   { 0x00050, "Idivert" },
423   { 0x00051, "Cbarge" },
424   { 0x00052, "Can Not Complete Transfer" },
425   { 0x00053, "Can Not Join Calls" },
426   { 0x00054, "Mcid Successful" },
427   { 0x00055, "Number Not Configured" },
428   { 0x00056, "Security Error" },
429   { 0x00057, "Video Bandwidth Unavailable" },
430   { 0x00058, "Vidmode" },
431   { 0x00059, "Max Call Duration Timeout" },
432   { 0x0005a, "Max Hold Duration Timeout" },
433   { 0x0005b, "Opickup" },
434   { 0x0005c, "Hlog" },
435   { 0x0005d, "Logged Out Of Hunt Group" },
436   { 0x0005e, "Park Slot Unavailable" },
437   { 0x0005f, "No Call Available For Pickup" },
438   { 0x00061, "External Transfer Restricted" },
439   { 0x00062, "No Line Available For Pickup" },
440   { 0x00063, "Path Replacement In Progress" },
441   { 0x00064, "Unknown 2" },
442   { 0x00065, "Mac Address" },
443   { 0x00066, "Host Name" },
444   { 0x00067, "Domain Name" },
445   { 0x00068, "Ip Address" },
446   { 0x00069, "Subnet Mask" },
447   { 0x0006a, "Tftp Server 1" },
448   { 0x0006b, "Default Router 1" },
449   { 0x0006c, "Default Router 2" },
450   { 0x0006d, "Default Router 3" },
451   { 0x0006e, "Default Router 4" },
452   { 0x0006f, "Default Router 5" },
453   { 0x00070, "Dns Server 1" },
454   { 0x00071, "Dns Server 2" },
455   { 0x00072, "Dns Server 3" },
456   { 0x00073, "Dns Server 4" },
457   { 0x00074, "Dns Server 5" },
458   { 0x00075, "Operational Vlan Id" },
459   { 0x00076, "Admin Vlan Id" },
460   { 0x00077, "Call Manager 1" },
461   { 0x00078, "Call Manager 2" },
462   { 0x00079, "Call Manager 3" },
463   { 0x0007a, "Call Manager 4" },
464   { 0x0007b, "Call Manager 5" },
465   { 0x0007c, "Information Url" },
466   { 0x0007d, "Directories Url" },
467   { 0x0007e, "Messages Url" },
468   { 0x0007f, "Services Url" },
469   { 0x00000, NULL }
470 };
471 static value_string_ext DisplayLabels_200_ext = VALUE_STRING_EXT_INIT(DisplayLabels_200);
472 
473 static const value_string DeviceType[] = {
474   { 0x00001, "Station30SPplus" },
475   { 0x00002, "Station12SPplus" },
476   { 0x00003, "Station12SP" },
477   { 0x00004, "Station12" },
478   { 0x00005, "Station30VIP" },
479   { 0x00006, "Cisco 7910" },
480   { 0x00007, "StationTelecasterMgr" },
481   { 0x00008, "Cisco 7940" },
482   { 0x00009, "Cisco 7935" },
483   { 0x0000a, "StationVGC" },
484   { 0x0000b, "VGCVirtualPhone" },
485   { 0x0000c, "StationATA186" },
486   { 0x0000d, "StationATA188" },
487   { 0x0000f, "EmccBase" },
488   { 0x00014, "Virtual30SPplus" },
489   { 0x00015, "StationPhoneApplication" },
490   { 0x0001e, "AnalogAccess" },
491   { 0x00028, "DigitalAccessTitan1" },
492   { 0x00029, "Digital Access T1" },
493   { 0x0002a, "DigitalAccessTitan2" },
494   { 0x0002b, "DigitalAccessLennon" },
495   { 0x0002f, "AnalogAccessElvis" },
496   { 0x00030, "VGCGateway" },
497   { 0x00032, "ConferenceBridge" },
498   { 0x00033, "ConferenceBridgeYoko" },
499   { 0x00034, "ConferenceBridgeDixieLand" },
500   { 0x00035, "ConferenceBridgeSummit" },
501   { 0x0003c, "H225" },
502   { 0x0003d, "H323Phone" },
503   { 0x0003e, "H323Gateway" },
504   { 0x00046, "MusicOnHold" },
505   { 0x00047, "Pilot" },
506   { 0x00048, "TapiPort" },
507   { 0x00049, "TapiRoutePoint" },
508   { 0x00050, "VoiceInBox" },
509   { 0x00051, "VoiceInboxAdmin" },
510   { 0x00052, "LineAnnunciator" },
511   { 0x00053, "SoftwareMtpDixieLand" },
512   { 0x00054, "CiscoMediaServer" },
513   { 0x00055, "ConferenceBridgeFlint" },
514   { 0x00056, "ConferenceBridgeHetroGen" },
515   { 0x00057, "ConferenceBridgeAudVid" },
516   { 0x00058, "ConferenceHVideoBridge" },
517   { 0x0005a, "RouteList" },
518   { 0x00064, "LoadSimulator" },
519   { 0x0006e, "MediaTerminationPoint" },
520   { 0x0006f, "MediaTerminationPointYoko" },
521   { 0x00070, "MediaTerminationPointDixieLand" },
522   { 0x00071, "MediaTerminationPointSummit" },
523   { 0x00073, "7941G" },
524   { 0x00077, "7971" },
525   { 0x00078, "MGCPStation" },
526   { 0x00079, "MGCPTrunk" },
527   { 0x0007a, "RASProxy" },
528   { 0x0007c, "Cisco 7914 AddOn" },
529   { 0x0007d, "Trunk" },
530   { 0x0007e, "Annunciator" },
531   { 0x0007f, "MonitorBridge" },
532   { 0x00080, "Recorder" },
533   { 0x00081, "MonitorBridgeYoko" },
534   { 0x00083, "SipTrunk" },
535   { 0x00084, "SipGateway" },
536   { 0x00085, "WsmTrunk" },
537   { 0x00086, "RemoteDestination" },
538   { 0x000e3, "Cisco 7915 AddOn" },
539   { 0x000e4, "Cisco 7915 AddOn 24" },
540   { 0x000e5, "Cisco 7916 AddOn" },
541   { 0x000e6, "Cisco 7916 AddOn 24" },
542   { 0x000fd, "GenericDevice" },
543   { 0x000fe, "UnknownMGCPGateway" },
544   { 0x000ff, "NotDefined" },
545   { 0x00113, "Nokia E Series" },
546   { 0x0012e, "Cisco 7985" },
547   { 0x00133, "7911" },
548   { 0x00134, "Cisco 7961 GE" },
549   { 0x00135, "7961G_GE" },
550   { 0x0014f, "MotorolaCN622" },
551   { 0x00150, "3rdPartySipBasic" },
552   { 0x0015c, "Cisco 7931" },
553   { 0x00166, "UnifiedCommunicator" },
554   { 0x0016d, "7921" },
555   { 0x00171, "7906" },
556   { 0x00176, "3rdPartySipAdv" },
557   { 0x00177, "Telepresence" },
558   { 0x00178, "Nokia ICC client" },
559   { 0x00194, "7962" },
560   { 0x0019c, "3951" },
561   { 0x001af, "7937" },
562   { 0x001b2, "7942" },
563   { 0x001b3, "7945" },
564   { 0x001b4, "7965" },
565   { 0x001b5, "7975" },
566   { 0x001d4, "UnifiedMobileCommunicator" },
567   { 0x001e4, "Cisco 7925" },
568   { 0x001ed, "9971_CE" },
569   { 0x001ef, "Cisco 6921" },
570   { 0x001f0, "Cisco 6941" },
571   { 0x001f1, "Cisco 6961" },
572   { 0x001f7, "CSF" },
573   { 0x00223, "Cisco 6901" },
574   { 0x00224, "Cisco 6911" },
575   { 0x00234, "Cisco 6945" },
576   { 0x00249, "Cisco 8945" },
577   { 0x0024a, "Cisco 8941" },
578   { 0x00255, "CiscoTelepresenceMcu" },
579   { 0x00257, "CiscoTelePresenceExchange" },
580   { 0x00258, "CiscoTelePresenceSoftwareConferenceBridge" },
581   { 0x00277, "ASSip" },
582   { 0x0027b, "CtiRemoteDevice" },
583   { 0x04e20, "7905" },
584   { 0x07532, "7920" },
585   { 0x07536, "7970" },
586   { 0x07537, "7912" },
587   { 0x07538, "7902" },
588   { 0x07540, "Cisco IP Communicator" },
589   { 0x07542, "7961G" },
590   { 0x07543, "7936" },
591   { 0x0754b, "AnalogPhone" },
592   { 0x0754c, "ISDNBRIPhone" },
593   { 0x07550, "SCCPGwVirtualPhone" },
594   { 0x07553, "IP_STE" },
595   { 0x08cc9, "CiscoTelePresenceConductor" },
596   { 0x08d7b, "InteractiveVoiceResponse" },
597   { 0x13880, "Cisco SPA 521S" },
598   { 0x13883, "Cisco SPA 502G" },
599   { 0x13884, "Cisco SPA 504G" },
600   { 0x13885, "Cisco SPA 525G" },
601   { 0x13887, "Cisco SPA 509G" },
602   { 0x13889, "Cisco SPA 525G2" },
603   { 0x1388b, "Cisco SPA 303G" },
604   { 0x00000, NULL }
605 };
606 static value_string_ext DeviceType_ext = VALUE_STRING_EXT_INIT(DeviceType);
607 
608 static const value_string KeyPadButton[] = {
609   { 0x00000, "Zero" },
610   { 0x00001, "One" },
611   { 0x00002, "Two" },
612   { 0x00003, "Three" },
613   { 0x00004, "Four" },
614   { 0x00005, "Five" },
615   { 0x00006, "Six" },
616   { 0x00007, "Seven" },
617   { 0x00008, "Eight" },
618   { 0x00009, "Nine" },
619   { 0x0000a, "A" },
620   { 0x0000b, "B" },
621   { 0x0000c, "C" },
622   { 0x0000d, "D" },
623   { 0x0000e, "Star" },
624   { 0x0000f, "Pound" },
625   { 0x00010, "Plus" },
626   { 0x00000, NULL }
627 };
628 static value_string_ext KeyPadButton_ext = VALUE_STRING_EXT_INIT(KeyPadButton);
629 
630 static const value_string KeyPadButton_short[] = {
631   { 0x00000, "0" },
632   { 0x00001, "1" },
633   { 0x00002, "2" },
634   { 0x00003, "3" },
635   { 0x00004, "4" },
636   { 0x00005, "5" },
637   { 0x00006, "6" },
638   { 0x00007, "7" },
639   { 0x00008, "8" },
640   { 0x00009, "9" },
641   { 0x0000a, "A" },
642   { 0x0000b, "B" },
643   { 0x0000c, "C" },
644   { 0x0000d, "D" },
645   { 0x0000e, "*" },
646   { 0x0000f, "#" },
647   { 0x00010, "+" },
648   { 0x00000, NULL }
649 };
650 static value_string_ext KeyPadButton_short_ext = VALUE_STRING_EXT_INIT(KeyPadButton_short);
651 
652 static const value_string DeviceStimulus[] = {
653   { 0x00001, "LastNumberRedial" },
654   { 0x00002, "SpeedDial" },
655   { 0x00003, "Hold" },
656   { 0x00004, "Transfer" },
657   { 0x00005, "ForwardAll" },
658   { 0x00006, "ForwardBusy" },
659   { 0x00007, "ForwardNoAnswer" },
660   { 0x00008, "Display" },
661   { 0x00009, "Line" },
662   { 0x0000a, "T120Chat" },
663   { 0x0000b, "T120Whiteboard" },
664   { 0x0000c, "T120ApplicationSharing" },
665   { 0x0000d, "T120FileTransfer" },
666   { 0x0000e, "Video" },
667   { 0x0000f, "VoiceMail" },
668   { 0x00010, "AnswerRelease" },
669   { 0x00011, "AutoAnswer" },
670   { 0x00012, "Select" },
671   { 0x00013, "Privacy" },
672   { 0x00014, "ServiceURL" },
673   { 0x00015, "BLFSpeedDial" },
674   { 0x00016, "DPark" },
675   { 0x00017, "Intercom" },
676   { 0x0001b, "MaliciousCall" },
677   { 0x00021, "GenericAppB1" },
678   { 0x00022, "GenericAppB2" },
679   { 0x00023, "GenericAppB3" },
680   { 0x00024, "GenericAppB4" },
681   { 0x00025, "GenericAppB5" },
682   { 0x0007b, "MeetMeConference" },
683   { 0x0007d, "Conference" },
684   { 0x0007e, "CallPark" },
685   { 0x0007f, "CallPickUp" },
686   { 0x00080, "GroupCallPickUp" },
687   { 0x00081, "Mobility" },
688   { 0x00082, "DoNotDisturb" },
689   { 0x00083, "ConfList" },
690   { 0x00084, "RemoveLastParticipant" },
691   { 0x00085, "QRT" },
692   { 0x00086, "CallBack" },
693   { 0x00087, "OtherPickup" },
694   { 0x00088, "VideoMode" },
695   { 0x00089, "NewCall" },
696   { 0x0008a, "EndCall" },
697   { 0x0008b, "HLog" },
698   { 0x0008f, "Queuing" },
699   { 0x000ff, "MaxStimulusValue" },
700   { 0x00000, NULL }
701 };
702 static value_string_ext DeviceStimulus_ext = VALUE_STRING_EXT_INIT(DeviceStimulus);
703 
704 #define MEDIA_PAYLOAD_G711ALAW64K              0x00002 /* audio */
705 #define MEDIA_PAYLOAD_G711ALAW56K              0x00003 /* audio */
706 #define MEDIA_PAYLOAD_G711ULAW64K              0x00004 /* audio */
707 #define MEDIA_PAYLOAD_G711ULAW56K              0x00005 /* audio */
708 #define MEDIA_PAYLOAD_G722_64K                 0x00006 /* audio */
709 #define MEDIA_PAYLOAD_G722_56K                 0x00007 /* audio */
710 #define MEDIA_PAYLOAD_G722_48K                 0x00008 /* audio */
711 #define MEDIA_PAYLOAD_G7231                    0x00009 /* audio */
712 #define MEDIA_PAYLOAD_G728                     0x0000a /* audio */
713 #define MEDIA_PAYLOAD_G729                     0x0000b /* audio */
714 #define MEDIA_PAYLOAD_G729ANNEXA               0x0000c /* audio */
715 #define MEDIA_PAYLOAD_G729ANNEXB               0x0000f /* audio */
716 #define MEDIA_PAYLOAD_G729ANNEXAWANNEXB        0x00010 /* audio */
717 #define MEDIA_PAYLOAD_GSM_FULL_RATE            0x00012 /* audio */
718 #define MEDIA_PAYLOAD_GSM_HALF_RATE            0x00013 /* audio */
719 #define MEDIA_PAYLOAD_GSM_ENHANCED_FULL_RATE   0x00014 /* audio */
720 #define MEDIA_PAYLOAD_WIDE_BAND_256K           0x00019 /* audio */
721 #define MEDIA_PAYLOAD_DATA64                   0x00020 /* audio */
722 #define MEDIA_PAYLOAD_DATA56                   0x00021 /* audio */
723 #define MEDIA_PAYLOAD_G7221_32K                0x00028 /* audio */
724 #define MEDIA_PAYLOAD_G7221_24K                0x00029 /* audio */
725 #define MEDIA_PAYLOAD_AAC                      0x0002a /* audio */
726 #define MEDIA_PAYLOAD_MP4ALATM_128             0x0002b /* audio */
727 #define MEDIA_PAYLOAD_MP4ALATM_64              0x0002c /* audio */
728 #define MEDIA_PAYLOAD_MP4ALATM_56              0x0002d /* audio */
729 #define MEDIA_PAYLOAD_MP4ALATM_48              0x0002e /* audio */
730 #define MEDIA_PAYLOAD_MP4ALATM_32              0x0002f /* audio */
731 #define MEDIA_PAYLOAD_MP4ALATM_24              0x00030 /* audio */
732 #define MEDIA_PAYLOAD_MP4ALATM_NA              0x00031 /* audio */
733 #define MEDIA_PAYLOAD_GSM                      0x00050 /* audio */
734 #define MEDIA_PAYLOAD_G726_32K                 0x00052 /* audio */
735 #define MEDIA_PAYLOAD_G726_24K                 0x00053 /* audio */
736 #define MEDIA_PAYLOAD_G726_16K                 0x00054 /* audio */
737 #define MEDIA_PAYLOAD_ILBC                     0x00056 /* audio */
738 #define MEDIA_PAYLOAD_ISAC                     0x00059 /* audio */
739 #define MEDIA_PAYLOAD_OPUS                     0x0005a /* audio */
740 #define MEDIA_PAYLOAD_AMR                      0x00061 /* audio */
741 #define MEDIA_PAYLOAD_AMR_WB                   0x00062 /* audio */
742 #define MEDIA_PAYLOAD_H261                     0x00064 /* video */
743 #define MEDIA_PAYLOAD_H263                     0x00065 /* video */
744 #define MEDIA_PAYLOAD_VIEO                     0x00066 /* video */
745 #define MEDIA_PAYLOAD_H264                     0x00067 /* video */
746 #define MEDIA_PAYLOAD_H264_SVC                 0x00068 /* video */
747 #define MEDIA_PAYLOAD_T120                     0x00069 /* video */
748 #define MEDIA_PAYLOAD_H224                     0x0006a /* video */
749 #define MEDIA_PAYLOAD_T38FAX                   0x0006b /* video */
750 #define MEDIA_PAYLOAD_TOTE                     0x0006c /* video */
751 #define MEDIA_PAYLOAD_H265                     0x0006d /* video */
752 #define MEDIA_PAYLOAD_H264_UC                  0x0006e /* video */
753 #define MEDIA_PAYLOAD_XV150_MR_711U            0x0006f /* video */
754 #define MEDIA_PAYLOAD_NSE_VBD_711U             0x00070 /* video */
755 #define MEDIA_PAYLOAD_XV150_MR_729A            0x00071 /* video */
756 #define MEDIA_PAYLOAD_NSE_VBD_729A             0x00072 /* video */
757 #define MEDIA_PAYLOAD_H264_FEC                 0x00073 /* video */
758 #define MEDIA_PAYLOAD_CLEAR_CHAN               0x00078 /* data */
759 #define MEDIA_PAYLOAD_UNIVERSAL_XCODER         0x000de /* data */
760 #define MEDIA_PAYLOAD_RFC2833_DYNPAYLOAD       0x00101 /* data */
761 #define MEDIA_PAYLOAD_PASSTHROUGH              0x00102 /* data */
762 #define MEDIA_PAYLOAD_DYNAMIC_PAYLOAD_PASSTHRU 0x00103 /* data */
763 #define MEDIA_PAYLOAD_DTMF_OOB                 0x00104 /* data */
764 #define MEDIA_PAYLOAD_INBAND_DTMF_RFC2833      0x00105 /* data */
765 #define MEDIA_PAYLOAD_CFB_TONES                0x00106 /* data */
766 #define MEDIA_PAYLOAD_NOAUDIO                  0x0012b /* data */
767 #define MEDIA_PAYLOAD_V150_LC_MODEMRELAY       0x0012c /* data */
768 #define MEDIA_PAYLOAD_V150_LC_SPRT             0x0012d /* data */
769 #define MEDIA_PAYLOAD_V150_LC_SSE              0x0012e /* data */
770 #define MEDIA_PAYLOAD_MAX                      0x0012f /* data */
771 
772 static const value_string Media_PayloadType[] = {
773   { MEDIA_PAYLOAD_G711ALAW64K, "Media_Payload_G711Alaw64k" },
774   { MEDIA_PAYLOAD_G711ALAW56K, "Media_Payload_G711Alaw56k" },
775   { MEDIA_PAYLOAD_G711ULAW64K, "Media_Payload_G711Ulaw64k" },
776   { MEDIA_PAYLOAD_G711ULAW56K, "Media_Payload_G711Ulaw56k" },
777   { MEDIA_PAYLOAD_G722_64K, "Media_Payload_G722_64k" },
778   { MEDIA_PAYLOAD_G722_56K, "Media_Payload_G722_56k" },
779   { MEDIA_PAYLOAD_G722_48K, "Media_Payload_G722_48k" },
780   { MEDIA_PAYLOAD_G7231, "Media_Payload_G7231" },
781   { MEDIA_PAYLOAD_G728, "Media_Payload_G728" },
782   { MEDIA_PAYLOAD_G729, "Media_Payload_G729" },
783   { MEDIA_PAYLOAD_G729ANNEXA, "Media_Payload_G729AnnexA" },
784   { MEDIA_PAYLOAD_G729ANNEXB, "Media_Payload_G729AnnexB" },
785   { MEDIA_PAYLOAD_G729ANNEXAWANNEXB, "Media_Payload_G729AnnexAwAnnexB" },
786   { MEDIA_PAYLOAD_GSM_FULL_RATE, "Media_Payload_GSM_Full_Rate" },
787   { MEDIA_PAYLOAD_GSM_HALF_RATE, "Media_Payload_GSM_Half_Rate" },
788   { MEDIA_PAYLOAD_GSM_ENHANCED_FULL_RATE, "Media_Payload_GSM_Enhanced_Full_Rate" },
789   { MEDIA_PAYLOAD_WIDE_BAND_256K, "Media_Payload_Wide_Band_256k" },
790   { MEDIA_PAYLOAD_DATA64, "Media_Payload_Data64" },
791   { MEDIA_PAYLOAD_DATA56, "Media_Payload_Data56" },
792   { MEDIA_PAYLOAD_G7221_32K, "Media_Payload_G7221_32K" },
793   { MEDIA_PAYLOAD_G7221_24K, "Media_Payload_G7221_24K" },
794   { MEDIA_PAYLOAD_AAC, "Media_Payload_AAC" },
795   { MEDIA_PAYLOAD_MP4ALATM_128, "Media_Payload_MP4ALATM_128" },
796   { MEDIA_PAYLOAD_MP4ALATM_64, "Media_Payload_MP4ALATM_64" },
797   { MEDIA_PAYLOAD_MP4ALATM_56, "Media_Payload_MP4ALATM_56" },
798   { MEDIA_PAYLOAD_MP4ALATM_48, "Media_Payload_MP4ALATM_48" },
799   { MEDIA_PAYLOAD_MP4ALATM_32, "Media_Payload_MP4ALATM_32" },
800   { MEDIA_PAYLOAD_MP4ALATM_24, "Media_Payload_MP4ALATM_24" },
801   { MEDIA_PAYLOAD_MP4ALATM_NA, "Media_Payload_MP4ALATM_NA" },
802   { MEDIA_PAYLOAD_GSM, "Media_Payload_GSM" },
803   { MEDIA_PAYLOAD_G726_32K, "Media_Payload_G726_32K" },
804   { MEDIA_PAYLOAD_G726_24K, "Media_Payload_G726_24K" },
805   { MEDIA_PAYLOAD_G726_16K, "Media_Payload_G726_16K" },
806   { MEDIA_PAYLOAD_ILBC, "Media_Payload_ILBC" },
807   { MEDIA_PAYLOAD_ISAC, "Media_Payload_ISAC" },
808   { MEDIA_PAYLOAD_OPUS, "Media_Payload_OPUS" },
809   { MEDIA_PAYLOAD_AMR, "Media_Payload_AMR" },
810   { MEDIA_PAYLOAD_AMR_WB, "Media_Payload_AMR_WB" },
811   { MEDIA_PAYLOAD_H261, "Media_Payload_H261" },
812   { MEDIA_PAYLOAD_H263, "Media_Payload_H263" },
813   { MEDIA_PAYLOAD_VIEO, "Media_Payload_Vieo" },
814   { MEDIA_PAYLOAD_H264, "Media_Payload_H264" },
815   { MEDIA_PAYLOAD_H264_SVC, "Media_Payload_H264_SVC" },
816   { MEDIA_PAYLOAD_T120, "Media_Payload_T120" },
817   { MEDIA_PAYLOAD_H224, "Media_Payload_H224" },
818   { MEDIA_PAYLOAD_T38FAX, "Media_Payload_T38Fax" },
819   { MEDIA_PAYLOAD_TOTE, "Media_Payload_TOTE" },
820   { MEDIA_PAYLOAD_H265, "Media_Payload_H265" },
821   { MEDIA_PAYLOAD_H264_UC, "Media_Payload_H264_UC" },
822   { MEDIA_PAYLOAD_XV150_MR_711U, "Media_Payload_XV150_MR_711U" },
823   { MEDIA_PAYLOAD_NSE_VBD_711U, "Media_Payload_NSE_VBD_711U" },
824   { MEDIA_PAYLOAD_XV150_MR_729A, "Media_Payload_XV150_MR_729A" },
825   { MEDIA_PAYLOAD_NSE_VBD_729A, "Media_Payload_NSE_VBD_729A" },
826   { MEDIA_PAYLOAD_H264_FEC, "Media_Payload_H264_FEC" },
827   { MEDIA_PAYLOAD_CLEAR_CHAN, "Media_Payload_Clear_Chan" },
828   { MEDIA_PAYLOAD_UNIVERSAL_XCODER, "Media_Payload_Universal_Xcoder" },
829   { MEDIA_PAYLOAD_RFC2833_DYNPAYLOAD, "Media_Payload_RFC2833_DynPayload" },
830   { MEDIA_PAYLOAD_PASSTHROUGH, "Media_Payload_PassThrough" },
831   { MEDIA_PAYLOAD_DYNAMIC_PAYLOAD_PASSTHRU, "Media_Payload_Dynamic_Payload_PassThru" },
832   { MEDIA_PAYLOAD_DTMF_OOB, "Media_Payload_DTMF_OOB" },
833   { MEDIA_PAYLOAD_INBAND_DTMF_RFC2833, "Media_Payload_Inband_DTMF_RFC2833" },
834   { MEDIA_PAYLOAD_CFB_TONES, "Media_Payload_CFB_Tones" },
835   { MEDIA_PAYLOAD_NOAUDIO, "Media_Payload_NoAudio" },
836   { MEDIA_PAYLOAD_V150_LC_MODEMRELAY, "Media_Payload_v150_LC_ModemRelay" },
837   { MEDIA_PAYLOAD_V150_LC_SPRT, "Media_Payload_v150_LC_SPRT" },
838   { MEDIA_PAYLOAD_V150_LC_SSE, "Media_Payload_v150_LC_SSE" },
839   { MEDIA_PAYLOAD_MAX, "Media_Payload_Max" },
840   { 0x00000, NULL }
841 };
842 static value_string_ext Media_PayloadType_ext = VALUE_STRING_EXT_INIT(Media_PayloadType);
843 
844 static const value_string Media_G723BitRate[] = {
845   { 0x00001, "Media_G723BRate_5_3" },
846   { 0x00002, "Media_G723BRate_6_3" },
847   { 0x00000, NULL }
848 };
849 static value_string_ext Media_G723BitRate_ext = VALUE_STRING_EXT_INIT(Media_G723BitRate);
850 
851 static const value_string DeviceAlarmSeverity[] = {
852   { 0x00000, "Critical" },
853   { 0x00001, "Warning" },
854   { 0x00002, "Informational" },
855   { 0x00004, "Unknown" },
856   { 0x00007, "Major" },
857   { 0x00008, "Minor" },
858   { 0x0000a, "Marginal" },
859   { 0x00014, "TraceInfo" },
860   { 0x00000, NULL }
861 };
862 static value_string_ext DeviceAlarmSeverity_ext = VALUE_STRING_EXT_INIT(DeviceAlarmSeverity);
863 
864 static const value_string MulticastMediaReceptionStatus[] = {
865   { 0x00000, "Ok" },
866   { 0x00001, "Error" },
867   { 0x00000, NULL }
868 };
869 static value_string_ext MulticastMediaReceptionStatus_ext = VALUE_STRING_EXT_INIT(MulticastMediaReceptionStatus);
870 
871 static const value_string MediaStatus[] = {
872   { 0x00000, "Ok" },
873   { 0x00001, "Unknown" },
874   { 0x00002, "NotEnoughChannels" },
875   { 0x00003, "CodecTooComplex" },
876   { 0x00004, "InvalidPartyID" },
877   { 0x00005, "InvalidCallRef" },
878   { 0x00006, "InvalidCodec" },
879   { 0x00007, "InvalidPacketSize" },
880   { 0x00008, "OutOfSockets" },
881   { 0x00009, "EncoderOrDecoderFailed" },
882   { 0x0000a, "InvalidDynamicPayloadType" },
883   { 0x0000b, "RequestedIpAddrTypeUnAvailable" },
884   { 0x000ff, "DeviceOnHook" },
885   { 0x00000, NULL }
886 };
887 static value_string_ext MediaStatus_ext = VALUE_STRING_EXT_INIT(MediaStatus);
888 
889 #define IPADDRTYPE_IPV4                        0x00000
890 #define IPADDRTYPE_IPV6                        0x00001
891 #define IPADDRTYPE_IPV4_V6                     0x00002
892 #define IPADDRTYPE_IP_INVALID                  0x00003
893 
894 static const value_string IpAddrType[] = {
895   { IPADDRTYPE_IPV4, "v4" },
896   { IPADDRTYPE_IPV6, "v6" },
897   { IPADDRTYPE_IPV4_V6, "v4_v6" },
898   { IPADDRTYPE_IP_INVALID, "_Invalid" },
899   { 0x00000, NULL }
900 };
901 static value_string_ext IpAddrType_ext = VALUE_STRING_EXT_INIT(IpAddrType);
902 
903 static const value_string StatsProcessingType[] = {
904   { 0x00000, "clearStats" },
905   { 0x00001, "doNotClearStats" },
906   { 0x00000, NULL }
907 };
908 static value_string_ext StatsProcessingType_ext = VALUE_STRING_EXT_INIT(StatsProcessingType);
909 
910 static const value_string SoftKeySet[] = {
911   { 0x00000, "On Hook" },
912   { 0x00001, "Connected" },
913   { 0x00002, "On Hold" },
914   { 0x00003, "Ring In" },
915   { 0x00004, "Off Hook" },
916   { 0x00005, "Connected Transferable" },
917   { 0x00006, "Digits Following" },
918   { 0x00007, "Connected Conference" },
919   { 0x00008, "Ring Out" },
920   { 0x00009, "OffHook with Features" },
921   { 0x0000a, "In Use Hint" },
922   { 0x0000b, "On Hook with Stealable Call" },
923   { 0x00000, NULL }
924 };
925 static value_string_ext SoftKeySet_ext = VALUE_STRING_EXT_INIT(SoftKeySet);
926 
927 static const value_string SoftKeyEvent[] = {
928   { 0x00001, "Redial" },
929   { 0x00002, "NewCall" },
930   { 0x00003, "Hold" },
931   { 0x00004, "Transfer" },
932   { 0x00005, "CfwdAll" },
933   { 0x00006, "CfwdBusy" },
934   { 0x00007, "CfwdNoAnswer" },
935   { 0x00008, "BackSpace" },
936   { 0x00009, "EndCall" },
937   { 0x0000a, "Resume" },
938   { 0x0000b, "Answer" },
939   { 0x0000c, "Info" },
940   { 0x0000d, "Confrn" },
941   { 0x0000e, "Park" },
942   { 0x0000f, "Join" },
943   { 0x00010, "MeetMe" },
944   { 0x00011, "PickUp" },
945   { 0x00012, "GrpPickup" },
946   { 0x00013, "Your current options" },
947   { 0x00014, "Off Hook" },
948   { 0x00015, "On Hook" },
949   { 0x00016, "Ring out" },
950   { 0x00017, "From " },
951   { 0x00018, "Connected" },
952   { 0x00019, "Busy" },
953   { 0x0001a, "Line In Use" },
954   { 0x0001b, "Call Waiting" },
955   { 0x0001c, "Call Transfer" },
956   { 0x0001d, "Call Park" },
957   { 0x0001e, "Call Proceed" },
958   { 0x0001f, "In Use Remote" },
959   { 0x00020, "Enter number" },
960   { 0x00021, "Call park At" },
961   { 0x00022, "Primary Only" },
962   { 0x00023, "Temp Fail" },
963   { 0x00024, "You Have a VoiceMail" },
964   { 0x00025, "Forwarded to" },
965   { 0x00026, "Can Not Complete Conference" },
966   { 0x00027, "No Conference Bridge" },
967   { 0x00028, "Can Not Hold Primary Control" },
968   { 0x00029, "Invalid Conference Participant" },
969   { 0x0002a, "In Conference Already" },
970   { 0x0002b, "No Participant Info" },
971   { 0x0002c, "Exceed Maximum Parties" },
972   { 0x0002d, "Key Is Not Active" },
973   { 0x0002e, "Error No License" },
974   { 0x0002f, "Error DBConfig" },
975   { 0x00030, "Error Database" },
976   { 0x00031, "Error Pass Limit" },
977   { 0x00032, "Error Unknown" },
978   { 0x00033, "Error Mismatch" },
979   { 0x00034, "Conference" },
980   { 0x00035, "Park Number" },
981   { 0x00036, "Private" },
982   { 0x00037, "Not Enough Bandwidth" },
983   { 0x00038, "Unknown Number" },
984   { 0x00039, "RmLstC" },
985   { 0x0003a, "Voicemail" },
986   { 0x0003b, "ImmDiv" },
987   { 0x0003c, "Intrcpt" },
988   { 0x0003d, "SetWtch" },
989   { 0x0003e, "TrnsfVM" },
990   { 0x0003f, "DND" },
991   { 0x00040, "DivAll" },
992   { 0x00041, "CallBack" },
993   { 0x00042, "Network congestion,rerouting" },
994   { 0x00043, "Barge" },
995   { 0x00044, "Failed to setup Barge" },
996   { 0x00045, "Another Barge exists" },
997   { 0x00046, "Incompatible device type" },
998   { 0x00047, "No Park Number Available" },
999   { 0x00048, "CallPark Reversion" },
1000   { 0x00049, "Service is not Active" },
1001   { 0x0004a, "High Traffic Try Again Later" },
1002   { 0x0004b, "QRT" },
1003   { 0x0004c, "MCID" },
1004   { 0x0004d, "DirTrfr" },
1005   { 0x0004e, "Select" },
1006   { 0x0004f, "ConfList" },
1007   { 0x00050, "iDivert" },
1008   { 0x00051, "cBarge" },
1009   { 0x00052, "Can Not Complete Transfer" },
1010   { 0x00053, "Can Not Join Calls" },
1011   { 0x00054, "Mcid Successful" },
1012   { 0x00055, "Number Not Configured" },
1013   { 0x00056, "Security Error" },
1014   { 0x00057, "Video Bandwidth Unavailable" },
1015   { 0x00058, "Video Mode" },
1016   { 0x000c9, "Dial" },
1017   { 0x000ca, "Record" },
1018   { 0x00000, NULL }
1019 };
1020 static value_string_ext SoftKeyEvent_ext = VALUE_STRING_EXT_INIT(SoftKeyEvent);
1021 
1022 static const value_string UnRegReasonCode[] = {
1023   { 0x00000, "Unknown" },
1024   { 0x00001, "PowerSaveMode" },
1025   { 0x00000, NULL }
1026 };
1027 static value_string_ext UnRegReasonCode_ext = VALUE_STRING_EXT_INIT(UnRegReasonCode);
1028 
1029 static const value_string HeadsetMode[] = {
1030   { 0x00001, "On" },
1031   { 0x00002, "Off" },
1032   { 0x00000, NULL }
1033 };
1034 static value_string_ext HeadsetMode_ext = VALUE_STRING_EXT_INIT(HeadsetMode);
1035 
1036 static const value_string SequenceFlag[] = {
1037   { 0x00000, "First" },
1038   { 0x00001, "More" },
1039   { 0x00002, "Last" },
1040   { 0x00000, NULL }
1041 };
1042 static value_string_ext SequenceFlag_ext = VALUE_STRING_EXT_INIT(SequenceFlag);
1043 
1044 static const value_string Layout[] = {
1045   { 0x00000, "NoLayout" },
1046   { 0x00001, "OneByOne" },
1047   { 0x00002, "OneByTwo" },
1048   { 0x00003, "TwoByTwo" },
1049   { 0x00004, "TwoByTwo3Alt1" },
1050   { 0x00005, "TwoByTwo3Alt2" },
1051   { 0x00006, "ThreeByThree" },
1052   { 0x00007, "ThreeByThree6Alt1" },
1053   { 0x00008, "ThreeByThree6Alt2" },
1054   { 0x00009, "ThreeByThree4Alt1" },
1055   { 0x0000a, "ThreeByThree4Alt2" },
1056   { 0x00000, NULL }
1057 };
1058 static value_string_ext Layout_ext = VALUE_STRING_EXT_INIT(Layout);
1059 
1060 static const value_string TransmitOrReceive[] = {
1061   { 0x00000, "None" },
1062   { 0x00001, "ReceiveOnly" },
1063   { 0x00002, "TransmitOnly" },
1064   { 0x00003, "Both" },
1065   { 0x00000, NULL }
1066 };
1067 static value_string_ext TransmitOrReceive_ext = VALUE_STRING_EXT_INIT(TransmitOrReceive);
1068 
1069 static const value_string OpenReceiveChanStatus[] = {
1070   { 0x00000, "Ok" },
1071   { 0x00001, "Error" },
1072   { 0x00000, NULL }
1073 };
1074 static value_string_ext OpenReceiveChanStatus_ext = VALUE_STRING_EXT_INIT(OpenReceiveChanStatus);
1075 
1076 static const value_string CreateConfResult[] = {
1077   { 0x00000, "OK" },
1078   { 0x00001, "ResourceNotAvailable" },
1079   { 0x00002, "ConferenceAlreadyExist" },
1080   { 0x00003, "SystemErr" },
1081   { 0x00000, NULL }
1082 };
1083 static value_string_ext CreateConfResult_ext = VALUE_STRING_EXT_INIT(CreateConfResult);
1084 
1085 static const value_string DeleteConfResult[] = {
1086   { 0x00000, "OK" },
1087   { 0x00001, "ConferenceNotExist" },
1088   { 0x00002, "SystemErr" },
1089   { 0x00000, NULL }
1090 };
1091 static value_string_ext DeleteConfResult_ext = VALUE_STRING_EXT_INIT(DeleteConfResult);
1092 
1093 static const value_string ModifyConfResult[] = {
1094   { 0x00000, "OK" },
1095   { 0x00001, "ResourceNotAvailable" },
1096   { 0x00002, "ConferenceNotExist" },
1097   { 0x00003, "InvalidParameter" },
1098   { 0x00004, "MoreActiveCallsThanReserved" },
1099   { 0x00005, "InvalidResourceType" },
1100   { 0x00006, "SystemErr" },
1101   { 0x00000, NULL }
1102 };
1103 static value_string_ext ModifyConfResult_ext = VALUE_STRING_EXT_INIT(ModifyConfResult);
1104 
1105 static const value_string AddParticipantResult[] = {
1106   { 0x00000, "OK" },
1107   { 0x00001, "ResourceNotAvailable" },
1108   { 0x00002, "ConferenceNotExist" },
1109   { 0x00003, "DuplicateCallRef" },
1110   { 0x00004, "SystemErr" },
1111   { 0x00000, NULL }
1112 };
1113 static value_string_ext AddParticipantResult_ext = VALUE_STRING_EXT_INIT(AddParticipantResult);
1114 
1115 static const value_string ResourceType[] = {
1116   { 0x00000, "Conference" },
1117   { 0x00001, "IVR" },
1118   { 0x00000, NULL }
1119 };
1120 static value_string_ext ResourceType_ext = VALUE_STRING_EXT_INIT(ResourceType);
1121 
1122 static const value_string AuditParticipantResult[] = {
1123   { 0x00000, "OK" },
1124   { 0x00001, "ConferenceNotExist" },
1125   { 0x00000, NULL }
1126 };
1127 static value_string_ext AuditParticipantResult_ext = VALUE_STRING_EXT_INIT(AuditParticipantResult);
1128 
1129 static const value_string Media_Encryption_Capability[] = {
1130   { 0x00000, "NotEncryptionCapable" },
1131   { 0x00001, "EncryptionCapable" },
1132   { 0x00000, NULL }
1133 };
1134 static value_string_ext Media_Encryption_Capability_ext = VALUE_STRING_EXT_INIT(Media_Encryption_Capability);
1135 
1136 static const value_string IpAddrMode[] = {
1137   { 0x00000, "ModeIpv4" },
1138   { 0x00001, "ModeIpv6" },
1139   { 0x00002, "ModeIpv4AndIpv6" },
1140   { 0x00000, NULL }
1141 };
1142 static value_string_ext IpAddrMode_ext = VALUE_STRING_EXT_INIT(IpAddrMode);
1143 
1144 static const value_string MediaType[] = {
1145   { 0x00000, "MediaType_Invalid" },
1146   { 0x00001, "MediaType_Audio" },
1147   { 0x00002, "MediaType_Main_Video" },
1148   { 0x00003, "MediaType_FECC" },
1149   { 0x00004, "MediaType_Presentation_Video" },
1150   { 0x00005, "MediaType_DataApp_BFCP" },
1151   { 0x00006, "MediaType_DataApp_IXChannel" },
1152   { 0x00007, "MediaType_T38" },
1153   { 0x00008, "MediaType_Max" },
1154   { 0x00000, NULL }
1155 };
1156 static value_string_ext MediaType_ext = VALUE_STRING_EXT_INIT(MediaType);
1157 
1158 static const value_string RSVPDirection[] = {
1159   { 0x00001, "SEND" },
1160   { 0x00002, "RECV" },
1161   { 0x00003, "SENDRECV" },
1162   { 0x00000, NULL }
1163 };
1164 static value_string_ext RSVPDirection_ext = VALUE_STRING_EXT_INIT(RSVPDirection);
1165 
1166 static const value_string QoSErrorCode[] = {
1167   { 0x00000, "QOS_CAUSE_RESERVATION_TIMEOUT" },
1168   { 0x00001, "QOS_CAUSE_PATH_FAIL" },
1169   { 0x00002, "QOS_CAUSE_RESV_FAIL" },
1170   { 0x00003, "QOS_CAUSE_LISTEN_FAIL" },
1171   { 0x00004, "QOS_CAUSE_RESOURCE_UNAVAILABLE" },
1172   { 0x00005, "QOS_CAUSE_LISTEN_TIMEOUT" },
1173   { 0x00006, "QOS_CAUSE_RESV_RETRIES_FAIL" },
1174   { 0x00007, "QOS_CAUSE_PATH_RETRIES_FAIL" },
1175   { 0x00008, "QOS_CAUSE_RESV_PREEMPTION" },
1176   { 0x00009, "QOS_CAUSE_PATH_PREEMPTION" },
1177   { 0x0000a, "QOS_CAUSE_RESV_MODIFY_FAIL" },
1178   { 0x0000b, "QOS_CAUSE_PATH_MODIFY_FAIL" },
1179   { 0x0000c, "QOS_CAUSE_RESV_TEAR" },
1180   { 0x00000, NULL }
1181 };
1182 static value_string_ext QoSErrorCode_ext = VALUE_STRING_EXT_INIT(QoSErrorCode);
1183 
1184 static const value_string RSVPErrorCode[] = {
1185   { 0x00000, "CONFIRM" },
1186   { 0x00001, "ADMISSION" },
1187   { 0x00002, "ADMINISTRATIVE" },
1188   { 0x00003, "NO_PATH_INFORMATION" },
1189   { 0x00004, "NO_SENDER_INFORMATION" },
1190   { 0x00005, "CONFLICTING_STYLE" },
1191   { 0x00006, "UNKNOWN_STYLE" },
1192   { 0x00007, "CONFLICTING_DST_PORTS" },
1193   { 0x00008, "CONFLICTING_SRC_PORTS" },
1194   { 0x0000c, "SERVICE_PREEMPTED" },
1195   { 0x0000d, "UNKNOWN_OBJECT_CLASS" },
1196   { 0x0000e, "UNKNOWN_CLASS_TYPE" },
1197   { 0x00014, "API" },
1198   { 0x00015, "TRAFFIC" },
1199   { 0x00016, "TRAFFIC_SYSTEM" },
1200   { 0x00017, "SYSTEM" },
1201   { 0x00018, "ROUTING_PROBLEM" },
1202   { 0x00000, NULL }
1203 };
1204 static value_string_ext RSVPErrorCode_ext = VALUE_STRING_EXT_INIT(RSVPErrorCode);
1205 
1206 static const value_string SubscriptionFeatureID[] = {
1207   { 0x00001, "BLF" },
1208   { 0x00000, NULL }
1209 };
1210 static value_string_ext SubscriptionFeatureID_ext = VALUE_STRING_EXT_INIT(SubscriptionFeatureID);
1211 
1212 static const value_string MediaPathID[] = {
1213   { 0x00001, "Headset" },
1214   { 0x00002, "Handset" },
1215   { 0x00003, "Speaker" },
1216   { 0x00000, NULL }
1217 };
1218 static value_string_ext MediaPathID_ext = VALUE_STRING_EXT_INIT(MediaPathID);
1219 
1220 static const value_string MediaPathEvent[] = {
1221   { 0x00001, "On" },
1222   { 0x00002, "Off" },
1223   { 0x00000, NULL }
1224 };
1225 static value_string_ext MediaPathEvent_ext = VALUE_STRING_EXT_INIT(MediaPathEvent);
1226 
1227 static const value_string MediaPathCapabilities[] = {
1228   { 0x00001, "Enable" },
1229   { 0x00002, "Disable" },
1230   { 0x00003, "Monitor" },
1231   { 0x00000, NULL }
1232 };
1233 static value_string_ext MediaPathCapabilities_ext = VALUE_STRING_EXT_INIT(MediaPathCapabilities);
1234 
1235 static const value_string DeviceTone[] = {
1236   { 0x00000, "Silence" },
1237   { 0x00001, "Dtmf1" },
1238   { 0x00002, "Dtmf2" },
1239   { 0x00003, "Dtmf3" },
1240   { 0x00004, "Dtmf4" },
1241   { 0x00005, "Dtmf5" },
1242   { 0x00006, "Dtmf6" },
1243   { 0x00007, "Dtmf7" },
1244   { 0x00008, "Dtmf8" },
1245   { 0x00009, "Dtmf9" },
1246   { 0x0000a, "Dtmf0" },
1247   { 0x0000e, "DtmfStar" },
1248   { 0x0000f, "DtmfPound" },
1249   { 0x00010, "DtmfA" },
1250   { 0x00011, "DtmfB" },
1251   { 0x00012, "DtmfC" },
1252   { 0x00013, "DtmfD" },
1253   { 0x00021, "InsideDialTone" },
1254   { 0x00022, "OutsideDialTone" },
1255   { 0x00023, "LineBusyTone" },
1256   { 0x00024, "AlertingTone" },
1257   { 0x00025, "ReorderTone" },
1258   { 0x00026, "RecorderWarningTone" },
1259   { 0x00027, "RecorderDetectedTone" },
1260   { 0x00028, "RevertingTone" },
1261   { 0x00029, "ReceiverOffHookTone" },
1262   { 0x0002a, "MessageWaitingIndicatorTone" },
1263   { 0x0002b, "NoSuchNumberTone" },
1264   { 0x0002c, "BusyVerificationTone" },
1265   { 0x0002d, "CallWaitingTone" },
1266   { 0x0002e, "ConfirmationTone" },
1267   { 0x0002f, "CampOnIndicationTone" },
1268   { 0x00030, "RecallDialTone" },
1269   { 0x00031, "ZipZip" },
1270   { 0x00032, "Zip" },
1271   { 0x00033, "BeepBonk" },
1272   { 0x00034, "MusicTone" },
1273   { 0x00035, "HoldTone" },
1274   { 0x00036, "TestTone" },
1275   { 0x00038, "MonitorWarningTone" },
1276   { 0x00039, "SecureWarningTone" },
1277   { 0x00040, "AddCallWaiting" },
1278   { 0x00041, "PriorityCallWait" },
1279   { 0x00042, "RecallDial" },
1280   { 0x00043, "BargIn" },
1281   { 0x00044, "DistinctAlert" },
1282   { 0x00045, "PriorityAlert" },
1283   { 0x00046, "ReminderRing" },
1284   { 0x00047, "PrecedenceRingBack" },
1285   { 0x00048, "PreemptionTone" },
1286   { 0x00049, "NonSecureWarningTone" },
1287   { 0x00050, "MF1" },
1288   { 0x00051, "MF2" },
1289   { 0x00052, "MF3" },
1290   { 0x00053, "MF4" },
1291   { 0x00054, "MF5" },
1292   { 0x00055, "MF6" },
1293   { 0x00056, "MF7" },
1294   { 0x00057, "MF8" },
1295   { 0x00058, "MF9" },
1296   { 0x00059, "MF0" },
1297   { 0x0005a, "MFKP1" },
1298   { 0x0005b, "MFST" },
1299   { 0x0005c, "MFKP2" },
1300   { 0x0005d, "MFSTP" },
1301   { 0x0005e, "MFST3P" },
1302   { 0x0005f, "MILLIWATT" },
1303   { 0x00060, "MILLIWATTTEST" },
1304   { 0x00061, "HIGHTONE" },
1305   { 0x00062, "FLASHOVERRIDE" },
1306   { 0x00063, "FLASH" },
1307   { 0x00064, "PRIORITY" },
1308   { 0x00065, "IMMEDIATE" },
1309   { 0x00066, "PREAMPWARN" },
1310   { 0x00067, "2105HZ" },
1311   { 0x00068, "2600HZ" },
1312   { 0x00069, "440HZ" },
1313   { 0x0006a, "300HZ" },
1314   { 0x0006b, "Mobility_WP" },
1315   { 0x0006c, "Mobility_UAC" },
1316   { 0x0006d, "Mobility_WTDN" },
1317   { 0x0006e, "Mobility_MON" },
1318   { 0x0006f, "Mobility_MOFF" },
1319   { 0x00070, "Mobility_UKC" },
1320   { 0x00071, "Mobility_VMA" },
1321   { 0x00072, "Mobility_FAC" },
1322   { 0x00073, "Mobility_CMC" },
1323   { 0x00077, "MLPP_PALA" },
1324   { 0x00078, "MLPP_ICA" },
1325   { 0x00079, "MLPP_VCA" },
1326   { 0x0007a, "MLPP_BPA" },
1327   { 0x0007b, "MLPP_BNEA" },
1328   { 0x0007c, "MLPP_UPA" },
1329   { 0x0007d, "TUA" },
1330   { 0x0007e, "GONE" },
1331   { 0x0007f, "NoTone" },
1332   { 0x00080, "MeetMe_Greeting" },
1333   { 0x00081, "MeetMe_NumberInvalid" },
1334   { 0x00082, "MeetMe_NumberFailed" },
1335   { 0x00083, "MeetMe_EnterPIN" },
1336   { 0x00084, "MeetMe_InvalidPIN" },
1337   { 0x00085, "MeetMe_FailedPIN" },
1338   { 0x00086, "MeetMe_CFB_Failed" },
1339   { 0x00087, "MeetMe_EnterAccessCode" },
1340   { 0x00088, "MeetMe_AccessCodeInvalid" },
1341   { 0x00089, "MeetMe_AccessCodeFailed" },
1342   { 0x0008a, "MAX" },
1343   { 0x00000, NULL }
1344 };
1345 static value_string_ext DeviceTone_ext = VALUE_STRING_EXT_INIT(DeviceTone);
1346 
1347 static const value_string ToneOutputDirection[] = {
1348   { 0x00000, "User" },
1349   { 0x00001, "Network" },
1350   { 0x00002, "All" },
1351   { 0x00000, NULL }
1352 };
1353 static value_string_ext ToneOutputDirection_ext = VALUE_STRING_EXT_INIT(ToneOutputDirection);
1354 
1355 static const value_string RingMode[] = {
1356   { 0x00001, "RingOff" },
1357   { 0x00002, "InsideRing" },
1358   { 0x00003, "OutsideRing" },
1359   { 0x00004, "FeatureRing" },
1360   { 0x00005, "FlashOnly" },
1361   { 0x00006, "PrecedenceRing" },
1362   { 0x00000, NULL }
1363 };
1364 static value_string_ext RingMode_ext = VALUE_STRING_EXT_INIT(RingMode);
1365 
1366 static const value_string RingDuration[] = {
1367   { 0x00001, "NormalRing" },
1368   { 0x00002, "SingleRing" },
1369   { 0x00000, NULL }
1370 };
1371 static value_string_ext RingDuration_ext = VALUE_STRING_EXT_INIT(RingDuration);
1372 
1373 static const value_string LampMode[] = {
1374   { 0x00001, "Off" },
1375   { 0x00002, "On" },
1376   { 0x00003, "Wink" },
1377   { 0x00004, "Flash" },
1378   { 0x00005, "Blink" },
1379   { 0x00000, NULL }
1380 };
1381 static value_string_ext LampMode_ext = VALUE_STRING_EXT_INIT(LampMode);
1382 
1383 static const value_string SpeakerMode[] = {
1384   { 0x00001, "On" },
1385   { 0x00002, "Off" },
1386   { 0x00000, NULL }
1387 };
1388 static value_string_ext SpeakerMode_ext = VALUE_STRING_EXT_INIT(SpeakerMode);
1389 
1390 static const value_string MicrophoneMode[] = {
1391   { 0x00001, "On" },
1392   { 0x00002, "Off" },
1393   { 0x00000, NULL }
1394 };
1395 static value_string_ext MicrophoneMode_ext = VALUE_STRING_EXT_INIT(MicrophoneMode);
1396 
1397 static const value_string Media_SilenceSuppression[] = {
1398   { 0x00000, "Media_SilenceSuppression_Off" },
1399   { 0x00001, "Media_SilenceSuppression_On" },
1400   { 0x00000, NULL }
1401 };
1402 static value_string_ext Media_SilenceSuppression_ext = VALUE_STRING_EXT_INIT(Media_SilenceSuppression);
1403 
1404 static const value_string MediaEncryptionAlgorithmType[] = {
1405   { 0x00000, "NO_ENCRYPTION" },
1406   { 0x00001, "CCM_AES_CM_128_HMAC_SHA1_32" },
1407   { 0x00002, "CCM_AES_CM_128_HMAC_SHA1_80" },
1408   { 0x00003, "CCM_F8_128_HMAC_SHA1_32" },
1409   { 0x00004, "CCM_F8_128_HMAC_SHA1_80" },
1410   { 0x00005, "CCM_AEAD_AES_128_GCM" },
1411   { 0x00006, "CCM_AEAD_AES_256_GCM" },
1412   { 0x00000, NULL }
1413 };
1414 static value_string_ext MediaEncryptionAlgorithmType_ext = VALUE_STRING_EXT_INIT(MediaEncryptionAlgorithmType);
1415 
1416 static const value_string PortHandling[] = {
1417   { 0x00000, "CLOSE_PORT" },
1418   { 0x00001, "KEEP_PORT" },
1419   { 0x00000, NULL }
1420 };
1421 static value_string_ext PortHandling_ext = VALUE_STRING_EXT_INIT(PortHandling);
1422 
1423 static const value_string CallType[] = {
1424   { 0x00001, "InBoundCall" },
1425   { 0x00002, "OutBoundCall" },
1426   { 0x00003, "ForwardCall" },
1427   { 0x00000, NULL }
1428 };
1429 static value_string_ext CallType_ext = VALUE_STRING_EXT_INIT(CallType);
1430 
1431 static const value_string CallSecurityStatusType[] = {
1432   { 0x00000, "Unknown" },
1433   { 0x00001, "NotAuthenticated" },
1434   { 0x00002, "Authenticated" },
1435   { 0x00003, "Encrypted" },
1436   { 0x00004, "Max" },
1437   { 0x00000, NULL }
1438 };
1439 static value_string_ext CallSecurityStatusType_ext = VALUE_STRING_EXT_INIT(CallSecurityStatusType);
1440 
1441 static const value_string SessionType[] = {
1442   { 0x00001, "Chat" },
1443   { 0x00002, "Whiteboard" },
1444   { 0x00004, "ApplicationSharing" },
1445   { 0x00008, "FileTransfer" },
1446   { 0x00010, "Video" },
1447   { 0x00000, NULL }
1448 };
1449 static value_string_ext SessionType_ext = VALUE_STRING_EXT_INIT(SessionType);
1450 
1451 static const value_string ButtonType[] = {
1452   { 0x00000, "Unused" },
1453   { 0x00001, "Last Number Redial" },
1454   { 0x00002, "SpeedDial" },
1455   { 0x00003, "Hold" },
1456   { 0x00004, "Transfer" },
1457   { 0x00005, "Forward All" },
1458   { 0x00006, "Forward Busy" },
1459   { 0x00007, "Forward No Answer" },
1460   { 0x00008, "Display" },
1461   { 0x00009, "Line" },
1462   { 0x0000a, "T120 Chat" },
1463   { 0x0000b, "T120 Whiteboard" },
1464   { 0x0000c, "T120 Application Sharing" },
1465   { 0x0000d, "T120 File Transfer" },
1466   { 0x0000e, "Video" },
1467   { 0x0000f, "Voicemail" },
1468   { 0x00010, "Answer Release" },
1469   { 0x00011, "Auto Answer" },
1470   { 0x00012, "Select" },
1471   { 0x00013, "Feature" },
1472   { 0x00014, "ServiceURL" },
1473   { 0x00015, "BusyLampField Speeddial" },
1474   { 0x0001b, "Malicious Call" },
1475   { 0x00021, "Generic App B1" },
1476   { 0x00022, "Generic App B2" },
1477   { 0x00023, "Generic App B3" },
1478   { 0x00024, "Generic App B4" },
1479   { 0x00025, "Generic App B5" },
1480   { 0x00026, "Monitor/Multiblink" },
1481   { 0x0007b, "Meet Me Conference" },
1482   { 0x0007d, "Conference" },
1483   { 0x0007e, "Call Park" },
1484   { 0x0007f, "Call Pickup" },
1485   { 0x00080, "Group Call Pickup" },
1486   { 0x00081, "Mobility" },
1487   { 0x00082, "DoNotDisturb" },
1488   { 0x00083, "ConfList" },
1489   { 0x00084, "RemoveLastParticipant" },
1490   { 0x00085, "QRT" },
1491   { 0x00086, "CallBack" },
1492   { 0x00087, "OtherPickup" },
1493   { 0x00088, "VideoMode" },
1494   { 0x00089, "NewCall" },
1495   { 0x0008a, "EndCall" },
1496   { 0x0008b, "HLog" },
1497   { 0x0008f, "Queuing" },
1498   { 0x000c0, "Test E" },
1499   { 0x000c1, "Test F" },
1500   { 0x000c2, "Messages" },
1501   { 0x000c3, "Directory" },
1502   { 0x000c4, "Test I" },
1503   { 0x000c5, "Application" },
1504   { 0x000c6, "Headset" },
1505   { 0x000f0, "Keypad" },
1506   { 0x000fd, "Aec" },
1507   { 0x000ff, "Undefined" },
1508   { 0x00000, NULL }
1509 };
1510 static value_string_ext ButtonType_ext = VALUE_STRING_EXT_INIT(ButtonType);
1511 
1512 static const value_string DeviceResetType[] = {
1513   { 0x00001, "RESET" },
1514   { 0x00002, "RESTART" },
1515   { 0x00003, "APPLY_CONFIG" },
1516   { 0x00000, NULL }
1517 };
1518 static value_string_ext DeviceResetType_ext = VALUE_STRING_EXT_INIT(DeviceResetType);
1519 
1520 static const value_string Media_EchoCancellation[] = {
1521   { 0x00000, "Media_EchoCancellation_Off" },
1522   { 0x00001, "Media_EchoCancellation_On" },
1523   { 0x00000, NULL }
1524 };
1525 static value_string_ext Media_EchoCancellation_ext = VALUE_STRING_EXT_INIT(Media_EchoCancellation);
1526 
1527 static const value_string SoftKeyTemplateIndex[] = {
1528   { 0x00001, "Redial" },
1529   { 0x00002, "NewCall" },
1530   { 0x00003, "Hold" },
1531   { 0x00004, "Transfer" },
1532   { 0x00005, "CfwdAll" },
1533   { 0x00006, "CfwdBusy" },
1534   { 0x00007, "CfwdNoAnswer" },
1535   { 0x00008, "BackSpace" },
1536   { 0x00009, "EndCall" },
1537   { 0x0000a, "Resume" },
1538   { 0x0000b, "Answer" },
1539   { 0x0000c, "Info" },
1540   { 0x0000d, "Confrn" },
1541   { 0x0000e, "Park" },
1542   { 0x0000f, "Join" },
1543   { 0x00010, "MeetMe" },
1544   { 0x00011, "PickUp" },
1545   { 0x00012, "GrpPickup" },
1546   { 0x00013, "Monitor" },
1547   { 0x00014, "CallBack" },
1548   { 0x00015, "Barge" },
1549   { 0x00016, "DND" },
1550   { 0x00017, "ConfList" },
1551   { 0x00018, "Select" },
1552   { 0x00019, "Private" },
1553   { 0x0001a, "Transfer Voicemail" },
1554   { 0x0001b, "Direct Transfer" },
1555   { 0x0001c, "Immediate Divert" },
1556   { 0x0001d, "Video Mode" },
1557   { 0x0001e, "Intercept" },
1558   { 0x0001f, "Empty" },
1559   { 0x00020, "Dial" },
1560   { 0x00021, "Conference Barge" },
1561   { 0x00000, NULL }
1562 };
1563 static value_string_ext SoftKeyTemplateIndex_ext = VALUE_STRING_EXT_INIT(SoftKeyTemplateIndex);
1564 
1565 static const value_string SoftKeyInfoIndex[] = {
1566   { 0x0012d, "Redial" },
1567   { 0x0012e, "NewCall" },
1568   { 0x0012f, "Hold" },
1569   { 0x00130, "Transfer" },
1570   { 0x00131, "CfwdAll" },
1571   { 0x00132, "CfwdBusy" },
1572   { 0x00133, "CfwdNoAnswer" },
1573   { 0x00134, "BackSpace" },
1574   { 0x00135, "EndCall" },
1575   { 0x00136, "Resume" },
1576   { 0x00137, "Answer" },
1577   { 0x00138, "Info" },
1578   { 0x00139, "Confrn" },
1579   { 0x0013a, "Park" },
1580   { 0x0013b, "Join" },
1581   { 0x0013c, "MeetMe" },
1582   { 0x0013d, "PickUp" },
1583   { 0x0013e, "GrpPickup" },
1584   { 0x0013f, "Monitor" },
1585   { 0x00140, "CallBack" },
1586   { 0x00141, "Barge" },
1587   { 0x00142, "DND" },
1588   { 0x00143, "ConfList" },
1589   { 0x00144, "Select" },
1590   { 0x00145, "Private" },
1591   { 0x00146, "Transfer Voicemail" },
1592   { 0x00147, "Direct Transfer" },
1593   { 0x00148, "Immediate Divert" },
1594   { 0x00149, "Video Mode" },
1595   { 0x0014a, "Intercept" },
1596   { 0x0014b, "Empty" },
1597   { 0x0014c, "Dial" },
1598   { 0x0014d, "Conference Barge" },
1599   { 0x00000, NULL }
1600 };
1601 static value_string_ext SoftKeyInfoIndex_ext = VALUE_STRING_EXT_INIT(SoftKeyInfoIndex);
1602 
1603 static const value_string DCallState[] = {
1604   { 0x00000, "Idle" },
1605   { 0x00001, "OffHook" },
1606   { 0x00002, "OnHook" },
1607   { 0x00003, "RingOut" },
1608   { 0x00004, "RingIn" },
1609   { 0x00005, "Connected" },
1610   { 0x00006, "Busy" },
1611   { 0x00007, "Congestion" },
1612   { 0x00008, "Hold" },
1613   { 0x00009, "CallWaiting" },
1614   { 0x0000a, "CallTransfer" },
1615   { 0x0000b, "CallPark" },
1616   { 0x0000c, "Proceed" },
1617   { 0x0000d, "CallRemoteMultiline" },
1618   { 0x0000e, "InvalidNumber" },
1619   { 0x0000f, "HoldRevert" },
1620   { 0x00010, "Whisper" },
1621   { 0x00011, "RemoteHold" },
1622   { 0x00012, "MaxState" },
1623   { 0x00000, NULL }
1624 };
1625 static value_string_ext DCallState_ext = VALUE_STRING_EXT_INIT(DCallState);
1626 
1627 static const value_string CallPrivacy[] = {
1628   { 0x00000, "None" },
1629   { 0x00001, "Limited" },
1630   { 0x00002, "Full" },
1631   { 0x00000, NULL }
1632 };
1633 static value_string_ext CallPrivacy_ext = VALUE_STRING_EXT_INIT(CallPrivacy);
1634 
1635 static const value_string DeviceUnregisterStatus[] = {
1636   { 0x00000, "Ok" },
1637   { 0x00001, "Error" },
1638   { 0x00002, "NAK" },
1639   { 0x00000, NULL }
1640 };
1641 static value_string_ext DeviceUnregisterStatus_ext = VALUE_STRING_EXT_INIT(DeviceUnregisterStatus);
1642 
1643 static const value_string EndOfAnnAck[] = {
1644   { 0x00000, "NoAnnAckRequired" },
1645   { 0x00001, "AnnAckRequired" },
1646   { 0x00000, NULL }
1647 };
1648 static value_string_ext EndOfAnnAck_ext = VALUE_STRING_EXT_INIT(EndOfAnnAck);
1649 
1650 static const value_string AnnPlayMode[] = {
1651   { 0x00000, "XmlConfigMode" },
1652   { 0x00001, "OneShotMode" },
1653   { 0x00002, "ContinuousMode" },
1654   { 0x00000, NULL }
1655 };
1656 static value_string_ext AnnPlayMode_ext = VALUE_STRING_EXT_INIT(AnnPlayMode);
1657 
1658 static const value_string PlayAnnStatus[] = {
1659   { 0x00000, "OK" },
1660   { 0x00001, "Err" },
1661   { 0x00000, NULL }
1662 };
1663 static value_string_ext PlayAnnStatus_ext = VALUE_STRING_EXT_INIT(PlayAnnStatus);
1664 
1665 #define MISCCOMMANDTYPE_VIDEOFREEZEPICTURE     0x00000
1666 #define MISCCOMMANDTYPE_VIDEOFASTUPDATEPICTURE 0x00001
1667 #define MISCCOMMANDTYPE_VIDEOFASTUPDATEGOB     0x00002
1668 #define MISCCOMMANDTYPE_VIDEOFASTUPDATEMB      0x00003
1669 #define MISCCOMMANDTYPE_LOSTPICTURE            0x00004
1670 #define MISCCOMMANDTYPE_LOSTPARTIALPICTURE     0x00005
1671 #define MISCCOMMANDTYPE_RECOVERYREFERENCEPICTURE 0x00006
1672 #define MISCCOMMANDTYPE_TEMPORALSPATIALTRADEOFF 0x00007
1673 
1674 static const value_string MiscCommandType[] = {
1675   { MISCCOMMANDTYPE_VIDEOFREEZEPICTURE, "videoFreezePicture" },
1676   { MISCCOMMANDTYPE_VIDEOFASTUPDATEPICTURE, "videoFastUpdatePicture" },
1677   { MISCCOMMANDTYPE_VIDEOFASTUPDATEGOB, "videoFastUpdateGOB" },
1678   { MISCCOMMANDTYPE_VIDEOFASTUPDATEMB, "videoFastUpdateMB" },
1679   { MISCCOMMANDTYPE_LOSTPICTURE, "lostPicture" },
1680   { MISCCOMMANDTYPE_LOSTPARTIALPICTURE, "lostPartialPicture" },
1681   { MISCCOMMANDTYPE_RECOVERYREFERENCEPICTURE, "recoveryReferencePicture" },
1682   { MISCCOMMANDTYPE_TEMPORALSPATIALTRADEOFF, "temporalSpatialTradeOff" },
1683   { 0x00000, NULL }
1684 };
1685 static value_string_ext MiscCommandType_ext = VALUE_STRING_EXT_INIT(MiscCommandType);
1686 
1687 static const value_string MediaTransportType[] = {
1688   { 0x00001, "RTP" },
1689   { 0x00002, "UDP" },
1690   { 0x00003, "TCP" },
1691   { 0x00000, NULL }
1692 };
1693 static value_string_ext MediaTransportType_ext = VALUE_STRING_EXT_INIT(MediaTransportType);
1694 
1695 static const value_string ResvStyle[] = {
1696   { 0x00001, "FF" },
1697   { 0x00002, "SE" },
1698   { 0x00003, "WF" },
1699   { 0x00000, NULL }
1700 };
1701 static value_string_ext ResvStyle_ext = VALUE_STRING_EXT_INIT(ResvStyle);
1702 
1703 static const value_string SubscribeCause[] = {
1704   { 0x00000, "OK" },
1705   { 0x00001, "RouteFail" },
1706   { 0x00002, "AuthFail" },
1707   { 0x00003, "Timeout" },
1708   { 0x00004, "TrunkTerm" },
1709   { 0x00005, "TrunkForbidden" },
1710   { 0x00006, "Throttle" },
1711   { 0x00000, NULL }
1712 };
1713 static value_string_ext SubscribeCause_ext = VALUE_STRING_EXT_INIT(SubscribeCause);
1714 
1715 static const value_string CallHistoryDisposition[] = {
1716   { 0x00000, "Ignore" },
1717   { 0x00001, "PlacedCalls" },
1718   { 0x00002, "ReceivedCalls" },
1719   { 0x00003, "MissedCalls" },
1720   { 0x0ffff, "UnknownDisp" },
1721   { 0x00000, NULL }
1722 };
1723 static value_string_ext CallHistoryDisposition_ext = VALUE_STRING_EXT_INIT(CallHistoryDisposition);
1724 
1725 static const value_string MwiNotificationResult[] = {
1726   { 0x00000, "Ok" },
1727   { 0x00001, "GeneralError" },
1728   { 0x00002, "RequestRejected" },
1729   { 0x00003, "VmCountOutOfBounds" },
1730   { 0x00004, "FaxCountOutOfBounds" },
1731   { 0x00005, "InvalidPriorityVmCount" },
1732   { 0x00006, "InvalidPriorityFaxCount" },
1733   { 0x00000, NULL }
1734 };
1735 static value_string_ext MwiNotificationResult_ext = VALUE_STRING_EXT_INIT(MwiNotificationResult);
1736 
1737 static const value_string RecordingStatus[] = {
1738   { 0x00000, "_OFF" },
1739   { 0x00001, "_ON" },
1740   { 0x00000, NULL }
1741 };
1742 static value_string_ext RecordingStatus_ext = VALUE_STRING_EXT_INIT(RecordingStatus);
1743 
1744 
1745 /* Staticly Declared Variables */
1746 static int proto_skinny                 = -1;
1747 static int hf_skinny_messageId          = -1;
1748 static int hf_skinny_data_length        = -1;
1749 static int hf_skinny_hdr_version        = -1;
1750 static int hf_skinny_xmlData            = -1;
1751 static int hf_skinny_ipv4or6            = -1;
1752 static int hf_skinny_response_in        = -1;
1753 static int hf_skinny_response_to        = -1;
1754 static int hf_skinny_response_time      = -1;
1755 
1756 static int hf_skinny_AlternateCallingParty = -1;
1757 static int hf_skinny_CallingPartyName = -1;
1758 static int hf_skinny_CallingPartyNumber = -1;
1759 static int hf_skinny_DSCPValue = -1;
1760 static int hf_skinny_DeviceName = -1;
1761 static int hf_skinny_FutureUse1 = -1;
1762 static int hf_skinny_FutureUse2 = -1;
1763 static int hf_skinny_FutureUse3 = -1;
1764 static int hf_skinny_Generic_Bitfield_Bit1 = -1;
1765 static int hf_skinny_Generic_Bitfield_Bit10 = -1;
1766 static int hf_skinny_Generic_Bitfield_Bit11 = -1;
1767 static int hf_skinny_Generic_Bitfield_Bit12 = -1;
1768 static int hf_skinny_Generic_Bitfield_Bit13 = -1;
1769 static int hf_skinny_Generic_Bitfield_Bit14 = -1;
1770 static int hf_skinny_Generic_Bitfield_Bit15 = -1;
1771 static int hf_skinny_Generic_Bitfield_Bit16 = -1;
1772 static int hf_skinny_Generic_Bitfield_Bit17 = -1;
1773 static int hf_skinny_Generic_Bitfield_Bit18 = -1;
1774 static int hf_skinny_Generic_Bitfield_Bit19 = -1;
1775 static int hf_skinny_Generic_Bitfield_Bit2 = -1;
1776 static int hf_skinny_Generic_Bitfield_Bit20 = -1;
1777 static int hf_skinny_Generic_Bitfield_Bit21 = -1;
1778 static int hf_skinny_Generic_Bitfield_Bit22 = -1;
1779 static int hf_skinny_Generic_Bitfield_Bit23 = -1;
1780 static int hf_skinny_Generic_Bitfield_Bit24 = -1;
1781 static int hf_skinny_Generic_Bitfield_Bit25 = -1;
1782 static int hf_skinny_Generic_Bitfield_Bit26 = -1;
1783 static int hf_skinny_Generic_Bitfield_Bit27 = -1;
1784 static int hf_skinny_Generic_Bitfield_Bit28 = -1;
1785 static int hf_skinny_Generic_Bitfield_Bit29 = -1;
1786 static int hf_skinny_Generic_Bitfield_Bit3 = -1;
1787 static int hf_skinny_Generic_Bitfield_Bit30 = -1;
1788 static int hf_skinny_Generic_Bitfield_Bit31 = -1;
1789 static int hf_skinny_Generic_Bitfield_Bit32 = -1;
1790 static int hf_skinny_Generic_Bitfield_Bit4 = -1;
1791 static int hf_skinny_Generic_Bitfield_Bit5 = -1;
1792 static int hf_skinny_Generic_Bitfield_Bit6 = -1;
1793 static int hf_skinny_Generic_Bitfield_Bit7 = -1;
1794 static int hf_skinny_Generic_Bitfield_Bit8 = -1;
1795 static int hf_skinny_Generic_Bitfield_Bit9 = -1;
1796 static int hf_skinny_HuntPilotName = -1;
1797 static int hf_skinny_HuntPilotNumber = -1;
1798 static int hf_skinny_MPI = -1;
1799 static int hf_skinny_OrigDialed = -1;
1800 static int hf_skinny_PhoneFeatures_Abbreviated_Dial = -1;
1801 static int hf_skinny_PhoneFeatures_Bit1 = -1;
1802 static int hf_skinny_PhoneFeatures_Bit11 = -1;
1803 static int hf_skinny_PhoneFeatures_Bit12 = -1;
1804 static int hf_skinny_PhoneFeatures_Bit13 = -1;
1805 static int hf_skinny_PhoneFeatures_Bit14 = -1;
1806 static int hf_skinny_PhoneFeatures_Bit15 = -1;
1807 static int hf_skinny_PhoneFeatures_Bit2 = -1;
1808 static int hf_skinny_PhoneFeatures_Bit3 = -1;
1809 static int hf_skinny_PhoneFeatures_Bit4 = -1;
1810 static int hf_skinny_PhoneFeatures_Bit6 = -1;
1811 static int hf_skinny_PhoneFeatures_Bit7 = -1;
1812 static int hf_skinny_PhoneFeatures_Bit9 = -1;
1813 static int hf_skinny_PhoneFeatures_DynamicMessages = -1;
1814 static int hf_skinny_PhoneFeatures_RFC2833 = -1;
1815 static int hf_skinny_PhoneFeatures_UTF8 = -1;
1816 static int hf_skinny_RFC2833PayloadType = -1;
1817 static int hf_skinny_RTCPPortNumber = -1;
1818 static int hf_skinny_RedirDialed = -1;
1819 static int hf_skinny_RestrictInformationType_BitsReserved = -1;
1820 static int hf_skinny_RestrictInformationType_CalledParty = -1;
1821 static int hf_skinny_RestrictInformationType_CalledPartyName = -1;
1822 static int hf_skinny_RestrictInformationType_CalledPartyNumber = -1;
1823 static int hf_skinny_RestrictInformationType_CallingParty = -1;
1824 static int hf_skinny_RestrictInformationType_CallingPartyName = -1;
1825 static int hf_skinny_RestrictInformationType_CallingPartyNumber = -1;
1826 static int hf_skinny_RestrictInformationType_LastRedirectParty = -1;
1827 static int hf_skinny_RestrictInformationType_LastRedirectPartyName = -1;
1828 static int hf_skinny_RestrictInformationType_LastRedirectPartyNumber = -1;
1829 static int hf_skinny_RestrictInformationType_OriginalCalledParty = -1;
1830 static int hf_skinny_RestrictInformationType_OriginalCalledPartyName = -1;
1831 static int hf_skinny_RestrictInformationType_OriginalCalledPartyNumber = -1;
1832 static int hf_skinny_ServerName = -1;
1833 static int hf_skinny_SoftKeyMask_SoftKey1 = -1;
1834 static int hf_skinny_SoftKeyMask_SoftKey10 = -1;
1835 static int hf_skinny_SoftKeyMask_SoftKey11 = -1;
1836 static int hf_skinny_SoftKeyMask_SoftKey12 = -1;
1837 static int hf_skinny_SoftKeyMask_SoftKey13 = -1;
1838 static int hf_skinny_SoftKeyMask_SoftKey14 = -1;
1839 static int hf_skinny_SoftKeyMask_SoftKey15 = -1;
1840 static int hf_skinny_SoftKeyMask_SoftKey16 = -1;
1841 static int hf_skinny_SoftKeyMask_SoftKey2 = -1;
1842 static int hf_skinny_SoftKeyMask_SoftKey3 = -1;
1843 static int hf_skinny_SoftKeyMask_SoftKey4 = -1;
1844 static int hf_skinny_SoftKeyMask_SoftKey5 = -1;
1845 static int hf_skinny_SoftKeyMask_SoftKey6 = -1;
1846 static int hf_skinny_SoftKeyMask_SoftKey7 = -1;
1847 static int hf_skinny_SoftKeyMask_SoftKey8 = -1;
1848 static int hf_skinny_SoftKeyMask_SoftKey9 = -1;
1849 static int hf_skinny_active = -1;
1850 static int hf_skinny_activeConferenceOnRegistration = -1;
1851 static int hf_skinny_activeConferences = -1;
1852 static int hf_skinny_activeForward = -1;
1853 static int hf_skinny_activeStreams = -1;
1854 static int hf_skinny_activeStreamsOnRegistration = -1;
1855 static int hf_skinny_add_participant_result = -1;
1856 static int hf_skinny_alarmInfo = -1;
1857 static int hf_skinny_alarmSeverity = -1;
1858 static int hf_skinny_algorithmID = -1;
1859 static int hf_skinny_alignmentPadding = -1;
1860 static int hf_skinny_annAckReq = -1;
1861 static int hf_skinny_annPlayMode = -1;
1862 static int hf_skinny_annStatus = -1;
1863 static int hf_skinny_annexNandWFutureUse = -1;
1864 static int hf_skinny_appConfID = -1;
1865 static int hf_skinny_appData = -1;
1866 static int hf_skinny_appInstanceID = -1;
1867 static int hf_skinny_appName = -1;
1868 static int hf_skinny_applicationId = -1;
1869 static int hf_skinny_areMessagesWaiting = -1;
1870 static int hf_skinny_associatedStreamId = -1;
1871 static int hf_skinny_audioCapCount = -1;
1872 static int hf_skinny_audioLevelAdjustment = -1;
1873 static int hf_skinny_audit_participant_result = -1;
1874 static int hf_skinny_averageBitRate = -1;
1875 static int hf_skinny_bandwidth = -1;
1876 static int hf_skinny_bitRate = -1;
1877 static int hf_skinny_bridgeParticipantId = -1;
1878 static int hf_skinny_burstSize = -1;
1879 static int hf_skinny_busyTrigger = -1;
1880 static int hf_skinny_buttonCount = -1;
1881 static int hf_skinny_buttonDefinition = -1;
1882 static int hf_skinny_buttonOffset = -1;
1883 static int hf_skinny_callHistoryDisposition = -1;
1884 static int hf_skinny_callInstance = -1;
1885 static int hf_skinny_callReference = -1;
1886 static int hf_skinny_callSecurityStatus = -1;
1887 static int hf_skinny_callSelectStat = -1;
1888 static int hf_skinny_callState = -1;
1889 static int hf_skinny_callType = -1;
1890 static int hf_skinny_calledParty = -1;
1891 static int hf_skinny_calledPartyName = -1;
1892 static int hf_skinny_callingParty = -1;
1893 static int hf_skinny_callingPartyName = -1;
1894 static int hf_skinny_callingPartyNumber = -1;
1895 static int hf_skinny_capAndVer = -1;
1896 static int hf_skinny_capCount = -1;
1897 static int hf_skinny_cause = -1;
1898 static int hf_skinny_cdpnVoiceMailbox = -1;
1899 static int hf_skinny_cgpnVoiceMailbox = -1;
1900 static int hf_skinny_chan0MaxPayload = -1;
1901 static int hf_skinny_chan2MaxPayload = -1;
1902 static int hf_skinny_chan2MaxWindow = -1;
1903 static int hf_skinny_chan3MaxPayload = -1;
1904 static int hf_skinny_clockConversionCode = -1;
1905 static int hf_skinny_clockDivisor = -1;
1906 static int hf_skinny_codecMode = -1;
1907 static int hf_skinny_codecParam1 = -1;
1908 static int hf_skinny_codecParam2 = -1;
1909 static int hf_skinny_command = -1;
1910 static int hf_skinny_compressionType = -1;
1911 static int hf_skinny_confServiceNum = -1;
1912 static int hf_skinny_conferenceId = -1;
1913 static int hf_skinny_conferenceName = -1;
1914 static int hf_skinny_configVersionStamp = -1;
1915 static int hf_skinny_confirmRequired = -1;
1916 static int hf_skinny_country = -1;
1917 static int hf_skinny_customMaxBRandCPB = -1;
1918 static int hf_skinny_customMaxDPB = -1;
1919 static int hf_skinny_customMaxFS = -1;
1920 static int hf_skinny_customMaxMBPS = -1;
1921 static int hf_skinny_customPictureFormatCount = -1;
1922 static int hf_skinny_data = -1;
1923 static int hf_skinny_dataCapCount = -1;
1924 static int hf_skinny_dataCapabilityDirection = -1;
1925 static int hf_skinny_dataLength = -1;
1926 static int hf_skinny_dataSize = -1;
1927 static int hf_skinny_dateTemplate = -1;
1928 static int hf_skinny_defendingPriority = -1;
1929 static int hf_skinny_delete_conf_result = -1;
1930 static int hf_skinny_deviceType = -1;
1931 static int hf_skinny_dialedNumber = -1;
1932 static int hf_skinny_direction = -1;
1933 static int hf_skinny_directoryNum = -1;
1934 static int hf_skinny_displayPriority = -1;
1935 static int hf_skinny_dtmfType = -1;
1936 static int hf_skinny_dynamicPayload = -1;
1937 static int hf_skinny_ecValue = -1;
1938 static int hf_skinny_encryptionCapability = -1;
1939 static int hf_skinny_errorCode = -1;
1940 static int hf_skinny_failureNodeIpAddr = -1;
1941 static int hf_skinny_featureCapabilities = -1;
1942 static int hf_skinny_featureID = -1;
1943 static int hf_skinny_featureIndex = -1;
1944 static int hf_skinny_featureStatus = -1;
1945 static int hf_skinny_featureTextLabel = -1;
1946 static int hf_skinny_features = -1;
1947 static int hf_skinny_firmwareLoadName = -1;
1948 static int hf_skinny_firstGOB = -1;
1949 static int hf_skinny_firstMB = -1;
1950 static int hf_skinny_format = -1;
1951 static int hf_skinny_forwardAllActive = -1;
1952 static int hf_skinny_forwardAllDirnum = -1;
1953 static int hf_skinny_forwardBusyActive = -1;
1954 static int hf_skinny_forwardBusyDirnum = -1;
1955 static int hf_skinny_forwardNoAnswerActive = -1;
1956 static int hf_skinny_forwardNoAnswerlDirnum = -1;
1957 static int hf_skinny_g723BitRate = -1;
1958 static int hf_skinny_headsetStatus = -1;
1959 static int hf_skinny_hearingConfPartyMask = -1;
1960 static int hf_skinny_instance = -1;
1961 static int hf_skinny_instanceNumber = -1;
1962 static int hf_skinny_ipAddr_ipv4 = -1;
1963 static int hf_skinny_ipAddr_ipv6 = -1;
1964 static int hf_skinny_ipAddressType = -1;
1965 static int hf_skinny_ipAddressingMode = -1;
1966 static int hf_skinny_ipV4AddressScope = -1;
1967 static int hf_skinny_ipV6AddressScope = -1;
1968 static int hf_skinny_isConferenceCreator = -1;
1969 static int hf_skinny_isMKIPresent = -1;
1970 static int hf_skinny_jitter = -1;
1971 static int hf_skinny_keepAliveInterval = -1;
1972 static int hf_skinny_key = -1;
1973 static int hf_skinny_keyDerivationRate = -1;
1974 static int hf_skinny_keylen = -1;
1975 static int hf_skinny_kpButton = -1;
1976 static int hf_skinny_lampMode = -1;
1977 static int hf_skinny_last = -1;
1978 static int hf_skinny_lastRedirectingParty = -1;
1979 static int hf_skinny_lastRedirectingPartyName = -1;
1980 static int hf_skinny_lastRedirectingReason = -1;
1981 static int hf_skinny_lastRedirectingVoiceMailbox = -1;
1982 static int hf_skinny_latency = -1;
1983 static int hf_skinny_layoutCount = -1;
1984 static int hf_skinny_layoutID = -1;
1985 static int hf_skinny_layouts = -1;
1986 static int hf_skinny_level = -1;
1987 static int hf_skinny_levelPreferenceCount = -1;
1988 static int hf_skinny_lineDataEntries = -1;
1989 static int hf_skinny_lineDirNumber = -1;
1990 static int hf_skinny_lineDisplayOptions = -1;
1991 static int hf_skinny_lineFullyQualifiedDisplayName = -1;
1992 static int hf_skinny_lineInstance = -1;
1993 static int hf_skinny_lineNumber = -1;
1994 static int hf_skinny_lineTextLabel = -1;
1995 static int hf_skinny_locale = -1;
1996 static int hf_skinny_locationInfo = -1;
1997 static int hf_skinny_longTermPictureIndex = -1;
1998 static int hf_skinny_macAddress = -1;
1999 static int hf_skinny_matrixConfPartyID = -1;
2000 static int hf_skinny_maxBW = -1;
2001 static int hf_skinny_maxBitRate = -1;
2002 static int hf_skinny_maxConferences = -1;
2003 static int hf_skinny_maxFramesPerPacket = -1;
2004 static int hf_skinny_maxNumCalls = -1;
2005 static int hf_skinny_maxNumOfAvailLines = -1;
2006 static int hf_skinny_maxNumberOfLines = -1;
2007 static int hf_skinny_maxProtocolVer = -1;
2008 static int hf_skinny_maxRetryNumber = -1;
2009 static int hf_skinny_maxStreams = -1;
2010 static int hf_skinny_maxStreamsPerConf = -1;
2011 static int hf_skinny_maximumBitRate = -1;
2012 static int hf_skinny_mediaPathCapabilities = -1;
2013 static int hf_skinny_mediaPathEvent = -1;
2014 static int hf_skinny_mediaPathID = -1;
2015 static int hf_skinny_mediaReceptionStatus = -1;
2016 static int hf_skinny_mediaTransmissionStatus = -1;
2017 static int hf_skinny_mediaTransportType = -1;
2018 static int hf_skinny_mediaType = -1;
2019 static int hf_skinny_micMode = -1;
2020 static int hf_skinny_milliSecondPacketSize = -1;
2021 static int hf_skinny_minBitRate = -1;
2022 static int hf_skinny_mixingMode = -1;
2023 static int hf_skinny_modAnd2833 = -1;
2024 static int hf_skinny_modelNumber = -1;
2025 static int hf_skinny_modify_conf_result = -1;
2026 static int hf_skinny_multicastIpAddr_ipv4 = -1;
2027 static int hf_skinny_multicastIpAddr_ipv6 = -1;
2028 static int hf_skinny_multicastPortNumber = -1;
2029 static int hf_skinny_multicastReceptionStatus = -1;
2030 static int hf_skinny_multimediaReceptionStatus = -1;
2031 static int hf_skinny_multimediaTransmissionStatus = -1;
2032 static int hf_skinny_mwiControlNumber = -1;
2033 static int hf_skinny_mwiTargetNumber = -1;
2034 static int hf_skinny_mwi_notification_result = -1;
2035 static int hf_skinny_noaudio = -1;
2036 static int hf_skinny_none = -1;
2037 static int hf_skinny_notificationStatus = -1;
2038 static int hf_skinny_notify = -1;
2039 static int hf_skinny_nse = -1;
2040 static int hf_skinny_numNewMsgs = -1;
2041 static int hf_skinny_numOldMsgs = -1;
2042 static int hf_skinny_numberOctetsReceived = -1;
2043 static int hf_skinny_numberOctetsSent = -1;
2044 static int hf_skinny_numberOfActiveParticipants = -1;
2045 static int hf_skinny_numberOfEntries = -1;
2046 static int hf_skinny_numberOfGOBs = -1;
2047 static int hf_skinny_numberOfInServiceStreams = -1;
2048 static int hf_skinny_numberOfLines = -1;
2049 static int hf_skinny_numberOfMBs = -1;
2050 static int hf_skinny_numberOfOutOfServiceStreams = -1;
2051 static int hf_skinny_numberOfReservedParticipants = -1;
2052 static int hf_skinny_numberOfSpeedDials = -1;
2053 static int hf_skinny_numberPacketsLost = -1;
2054 static int hf_skinny_numberPacketsReceived = -1;
2055 static int hf_skinny_numberPacketsSent = -1;
2056 static int hf_skinny_originalCalledParty = -1;
2057 static int hf_skinny_originalCalledPartyName = -1;
2058 static int hf_skinny_originalCdpnRedirectReason = -1;
2059 static int hf_skinny_originalCdpnVoiceMailbox = -1;
2060 static int hf_skinny_padding = -1;
2061 static int hf_skinny_parm1 = -1;
2062 static int hf_skinny_parm2 = -1;
2063 static int hf_skinny_participantEntry = -1;
2064 static int hf_skinny_participantName = -1;
2065 static int hf_skinny_participantNumber = -1;
2066 static int hf_skinny_partyDirection = -1;
2067 static int hf_skinny_passThroughPartyId = -1;
2068 static int hf_skinny_passThruData = -1;
2069 static int hf_skinny_passthruPartyID = -1;
2070 static int hf_skinny_payloadCapability = -1;
2071 static int hf_skinny_payloadDtmf = -1;
2072 static int hf_skinny_payloadType = -1;
2073 static int hf_skinny_payload_rfc_number = -1;
2074 static int hf_skinny_peakRate = -1;
2075 static int hf_skinny_pictureFormatCount = -1;
2076 static int hf_skinny_pictureHeight = -1;
2077 static int hf_skinny_pictureNumber = -1;
2078 static int hf_skinny_pictureWidth = -1;
2079 static int hf_skinny_pixelAspectRatio = -1;
2080 static int hf_skinny_portHandlingFlag = -1;
2081 static int hf_skinny_portNumber = -1;
2082 static int hf_skinny_precedenceDomain = -1;
2083 static int hf_skinny_precedenceLevel = -1;
2084 static int hf_skinny_precedenceValue = -1;
2085 static int hf_skinny_preemptionPriority = -1;
2086 static int hf_skinny_priority = -1;
2087 static int hf_skinny_privacy = -1;
2088 static int hf_skinny_profile = -1;
2089 static int hf_skinny_promptStatus = -1;
2090 static int hf_skinny_protocolDependentData = -1;
2091 static int hf_skinny_protocolVer = -1;
2092 static int hf_skinny_recording_status = -1;
2093 static int hf_skinny_recoveryReferencePictureCount = -1;
2094 static int hf_skinny_remoteIpAddr_ipv4 = -1;
2095 static int hf_skinny_remoteIpAddr_ipv6 = -1;
2096 static int hf_skinny_remotePortNumber = -1;
2097 static int hf_skinny_requestedIpAddrType = -1;
2098 static int hf_skinny_reserved_for_future_use = -1;
2099 static int hf_skinny_resetType = -1;
2100 static int hf_skinny_resourceType = -1;
2101 static int hf_skinny_result = -1;
2102 static int hf_skinny_resvStyle = -1;
2103 static int hf_skinny_retryTimer = -1;
2104 static int hf_skinny_rfc2833 = -1;
2105 static int hf_skinny_ringDuration = -1;
2106 static int hf_skinny_ringMode = -1;
2107 static int hf_skinny_routingID = -1;
2108 static int hf_skinny_rsvpErrorCode = -1;
2109 static int hf_skinny_rsvpErrorFlag = -1;
2110 static int hf_skinny_rsvpErrorSubCodeVal = -1;
2111 static int hf_skinny_rtpMediaPort = -1;
2112 static int hf_skinny_rtpPayloadFormat = -1;
2113 static int hf_skinny_salt = -1;
2114 static int hf_skinny_saltlen = -1;
2115 static int hf_skinny_secondaryKeepAliveInterval = -1;
2116 static int hf_skinny_sequenceFlag = -1;
2117 static int hf_skinny_serverName = -1;
2118 static int hf_skinny_serverTcpListenPort = -1;
2119 static int hf_skinny_serviceNum = -1;
2120 static int hf_skinny_serviceNumber = -1;
2121 static int hf_skinny_serviceResourceCount = -1;
2122 static int hf_skinny_serviceURL = -1;
2123 static int hf_skinny_serviceURLDisplayName = -1;
2124 static int hf_skinny_serviceURLIndex = -1;
2125 static int hf_skinny_sessionType = -1;
2126 static int hf_skinny_softKeyCount = -1;
2127 static int hf_skinny_softKeyEvent = -1;
2128 static int hf_skinny_softKeyInfoIndex = -1;
2129 static int hf_skinny_softKeyLabel = -1;
2130 static int hf_skinny_softKeyOffset = -1;
2131 static int hf_skinny_softKeySetCount = -1;
2132 static int hf_skinny_softKeySetIndex = -1;
2133 static int hf_skinny_softKeySetOffset = -1;
2134 static int hf_skinny_softKeyTemplateIndex = -1;
2135 static int hf_skinny_sourceIpAddr_ipv4 = -1;
2136 static int hf_skinny_sourceIpAddr_ipv6 = -1;
2137 static int hf_skinny_sourcePortNumber = -1;
2138 static int hf_skinny_speakerMode = -1;
2139 static int hf_skinny_speedDialDirNumber = -1;
2140 static int hf_skinny_speedDialDisplayName = -1;
2141 static int hf_skinny_speedDialNumber = -1;
2142 static int hf_skinny_ssValue = -1;
2143 static int hf_skinny_sse = -1;
2144 static int hf_skinny_standard = -1;
2145 static int hf_skinny_startingLineInstance = -1;
2146 static int hf_skinny_stationIpAddr = -1;
2147 static int hf_skinny_stationIpAddr_ipv4 = -1;
2148 static int hf_skinny_stationIpAddr_ipv6 = -1;
2149 static int hf_skinny_stationIpV6Addr = -1;
2150 static int hf_skinny_stationIpV6Addr_ipv4 = -1;
2151 static int hf_skinny_stationIpV6Addr_ipv6 = -1;
2152 static int hf_skinny_statsProcessingMode = -1;
2153 static int hf_skinny_status = -1;
2154 static int hf_skinny_stillImageTransmission = -1;
2155 static int hf_skinny_stimulus = -1;
2156 static int hf_skinny_stimulusInstance = -1;
2157 static int hf_skinny_stimulusStatus = -1;
2158 static int hf_skinny_streamPassThroughId = -1;
2159 static int hf_skinny_subAppID = -1;
2160 static int hf_skinny_subscriptionFeatureID = -1;
2161 static int hf_skinny_subscriptionID = -1;
2162 static int hf_skinny_systemTime = -1;
2163 static int hf_skinny_temporalSpatialTradeOff = -1;
2164 static int hf_skinny_temporalSpatialTradeOffCapability = -1;
2165 static int hf_skinny_text = -1;
2166 static int hf_skinny_timeOutValue = -1;
2167 static int hf_skinny_timer = -1;
2168 static int hf_skinny_tone = -1;
2169 static int hf_skinny_toneAnnouncement = -1;
2170 static int hf_skinny_tone_output_direction = -1;
2171 static int hf_skinny_totalButtonCount = -1;
2172 static int hf_skinny_totalNumOfConfiguredLines = -1;
2173 static int hf_skinny_totalSoftKeyCount = -1;
2174 static int hf_skinny_totalSoftKeySetCount = -1;
2175 static int hf_skinny_transactionId = -1;
2176 static int hf_skinny_transmitIpAddr_ipv4 = -1;
2177 static int hf_skinny_transmitIpAddr_ipv6 = -1;
2178 static int hf_skinny_transmitPreference = -1;
2179 static int hf_skinny_unRegReasonCode = -1;
2180 static int hf_skinny_unknown = -1;
2181 static int hf_skinny_unknown1_0159 = -1;
2182 static int hf_skinny_unknown2_0159 = -1;
2183 static int hf_skinny_unknown3_0159 = -1;
2184 static int hf_skinny_unknownString_0159 = -1;
2185 static int hf_skinny_userName = -1;
2186 static int hf_skinny_v150sprt = -1;
2187 static int hf_skinny_vendor = -1;
2188 static int hf_skinny_vendorID = -1;
2189 static int hf_skinny_version = -1;
2190 static int hf_skinny_versionStr = -1;
2191 static int hf_skinny_videoCapCount = -1;
2192 static int hf_skinny_videoCapabilityDirection = -1;
2193 static int hf_skinny_wDay = -1;
2194 static int hf_skinny_wDayOfWeek = -1;
2195 static int hf_skinny_wHour = -1;
2196 static int hf_skinny_wMilliseconds = -1;
2197 static int hf_skinny_wMinute = -1;
2198 static int hf_skinny_wMonth = -1;
2199 static int hf_skinny_wSecond = -1;
2200 static int hf_skinny_wYear = -1;
2201 static int hf_skinny_waitTimeBeforeNextReq = -1;
2202 static int hf_skinny_xmldata = -1;
2203 
2204 static dissector_handle_t xml_handle;
2205 
2206 /* Initialize the subtree pointers */
2207 static gint ett_skinny          = -1;
2208 static gint ett_skinny_tree     = -1;
2209 
2210 /* preference globals */
2211 static gboolean global_skinny_desegment = TRUE;
2212 
2213 /* tap register id */
2214 static int skinny_tap = -1;
2215 
2216 /* skinny protocol tap info */
2217 #define MAX_SKINNY_MESSAGES_IN_PACKET 10
2218 static skinny_info_t pi_arr[MAX_SKINNY_MESSAGES_IN_PACKET];
2219 static int pi_current = 0;
2220 static skinny_info_t *si;
2221 
2222 dissector_handle_t skinny_handle;
2223 
2224 /* Get the length of a single SKINNY PDU */
2225 static guint
get_skinny_pdu_len(packet_info * pinfo _U_,tvbuff_t * tvb,int offset,void * data _U_)2226 get_skinny_pdu_len(packet_info *pinfo _U_, tvbuff_t *tvb, int offset, void *data _U_)
2227 {
2228   guint32 hdr_data_length;
2229 
2230   /* Get the length of the SKINNY packet. */
2231   hdr_data_length = tvb_get_letohl(tvb, offset);
2232 
2233   /* That length doesn't include the length of the header itself. */
2234   return hdr_data_length + 8;
2235 }
2236 
2237 static void
dissect_skinny_xml(ptvcursor_t * cursor,int hfindex,packet_info * pinfo,guint32 length,guint32 maxlength)2238 dissect_skinny_xml(ptvcursor_t *cursor, int hfindex, packet_info *pinfo, guint32 length, guint32 maxlength)
2239 {
2240   proto_item         *item       = NULL;
2241   proto_tree         *subtree    = NULL;
2242   proto_tree         *tree       = ptvcursor_tree(cursor);
2243   guint32            offset      = ptvcursor_current_offset(cursor);
2244   tvbuff_t           *tvb        = ptvcursor_tvbuff(cursor);
2245   tvbuff_t           *next_tvb;
2246 
2247   if (length == 0) {
2248     length = tvb_strnlen(tvb, offset, -1);
2249   }
2250   if (length >= maxlength) {
2251     length = maxlength;
2252   }
2253 
2254   ptvcursor_add_no_advance(cursor, hfindex, length, ENC_ASCII|ENC_NA);
2255 
2256   item = proto_tree_add_item(tree, hf_skinny_xmlData, tvb, offset, length, ENC_ASCII|ENC_NA);
2257   subtree = proto_item_add_subtree(item, 0);
2258   next_tvb = tvb_new_subset_length_caplen(tvb, offset, length, -1);
2259   if (xml_handle != NULL) {
2260     call_dissector(xml_handle, next_tvb, pinfo, subtree);
2261   }
2262   ptvcursor_advance(cursor, maxlength);
2263 }
2264 
2265 static void
dissect_skinny_ipv4or6(ptvcursor_t * cursor,int hfindex_ipv4,int hfindex_ipv6)2266 dissect_skinny_ipv4or6(ptvcursor_t *cursor, int hfindex_ipv4, int hfindex_ipv6)
2267 {
2268   guint32            ipversion   = 0;
2269   guint32            offset      = ptvcursor_current_offset(cursor);
2270   tvbuff_t           *tvb        = ptvcursor_tvbuff(cursor);
2271   guint32            hdr_version = tvb_get_letohl(tvb, 4);
2272 
2273   /* ProtocolVersion > 18 include and extra field to declare IPv4 (0) / IPv6 (1) */
2274   if (hdr_version >= V17_MSG_TYPE) {
2275     ipversion = tvb_get_letohl(tvb, offset);
2276     ptvcursor_add(cursor, hf_skinny_ipv4or6, 4, ENC_LITTLE_ENDIAN);
2277   }
2278   if (ipversion == IPADDRTYPE_IPV4) {
2279     ptvcursor_add(cursor, hfindex_ipv4, 4, ENC_BIG_ENDIAN);
2280     if (hdr_version >= V17_MSG_TYPE) {
2281       /* skip over the extra room for ipv6 addresses */
2282       ptvcursor_advance(cursor, 12);
2283     }
2284   } else if (ipversion == IPADDRTYPE_IPV6 || ipversion == IPADDRTYPE_IPV4_V6) {
2285     ptvcursor_add(cursor, hfindex_ipv6, 16, ENC_NA);
2286   } else {
2287     /* Invalid : skip over ipv6 space completely */
2288     ptvcursor_advance(cursor, 16);
2289   }
2290 }
2291 
2292 /* Reads address to provided variable */
2293 static void
read_skinny_ipv4or6(ptvcursor_t * cursor,address * media_addr)2294 read_skinny_ipv4or6(ptvcursor_t *cursor, address *media_addr)
2295 {
2296   guint32            ipversion   = IPADDRTYPE_IPV4;
2297   guint32            offset      = ptvcursor_current_offset(cursor);
2298   guint32            offset2     = 0;
2299   tvbuff_t           *tvb        = ptvcursor_tvbuff(cursor);
2300   guint32            hdr_version = tvb_get_letohl(tvb, 4);
2301 
2302   /* ProtocolVersion > 18 include and extra field to declare IPv4 (0) / IPv6 (1) */
2303   if (hdr_version >= V17_MSG_TYPE) {
2304     ipversion = tvb_get_letohl(tvb, offset);
2305     offset2 = 4;
2306   }
2307   if (ipversion == IPADDRTYPE_IPV4) {
2308     set_address_tvb(media_addr, AT_IPv4, 4, tvb, offset+offset2);
2309   } else if (ipversion == IPADDRTYPE_IPV6 || ipversion == IPADDRTYPE_IPV4_V6) {
2310     set_address_tvb(media_addr, AT_IPv6, 16, tvb, offset+offset2);
2311   } else {
2312     clear_address(media_addr);
2313   }
2314 }
2315 
2316 /**
2317  * Parse a displayLabel string and check if it is using any embedded labels, if so lookup the label and add a user readable translation to the item_tree
2318  */
2319 static void
dissect_skinny_displayLabel(ptvcursor_t * cursor,packet_info * pinfo,int hfindex,gint length)2320 dissect_skinny_displayLabel(ptvcursor_t *cursor, packet_info *pinfo, int hfindex, gint length)
2321 {
2322   proto_item    *item             = NULL;
2323   proto_tree    *tree             = ptvcursor_tree(cursor);
2324   guint32       offset            = ptvcursor_current_offset(cursor);
2325   tvbuff_t      *tvb              = ptvcursor_tvbuff(cursor);
2326   wmem_strbuf_t *wmem_new         = NULL;
2327   gchar         *disp_string      = NULL;
2328   const gchar   *replacestr       = NULL;
2329   gboolean      show_replaced_str = FALSE;
2330   gint          x                 = 0;
2331 
2332   if (length == 0) {
2333     length = tvb_strnlen(tvb, offset, -1);
2334     if (length == -1) {
2335       /* did not find end of string */
2336       length = tvb_captured_length_remaining(tvb, offset);
2337     }
2338   }
2339 
2340   item = proto_tree_add_item(tree, hfindex, tvb, offset, length, ENC_ASCII | ENC_NA);
2341 
2342   wmem_new = wmem_strbuf_sized_new(pinfo->pool, length + 1, 0);
2343   disp_string = (gchar*) wmem_alloc(pinfo->pool, length + 1);
2344   disp_string[length] = '\0';
2345   tvb_memcpy(tvb, (void*)disp_string, offset, length);
2346 
2347   for (x = 0; x < length && disp_string[x] != '\0'; x++) {
2348     replacestr = NULL;
2349     if (x + 1 < length) {
2350       if (disp_string[x] == '\36') {
2351         replacestr = try_val_to_str_ext(disp_string[x + 1], &DisplayLabels_36_ext);
2352       } else if (disp_string[x] == '\200') {
2353         replacestr = try_val_to_str_ext(disp_string[x + 1], &DisplayLabels_200_ext);
2354       }
2355     }
2356     if (replacestr) {
2357       x++;        /* swallow replaced characters */
2358       wmem_strbuf_append(wmem_new, replacestr);
2359       show_replaced_str = TRUE;
2360     } else {
2361       wmem_strbuf_append_c(wmem_new, disp_string[x]);
2362     }
2363   }
2364   if (show_replaced_str) {
2365     si->additionalInfo = g_strdup_printf("\"%s\"", wmem_strbuf_get_str(wmem_new));
2366     proto_item_append_text(item, " => \"%s\"" , wmem_strbuf_get_str(wmem_new));
2367   }
2368   ptvcursor_advance(cursor, length);
2369 }
2370 
2371 /*** Request / Response helper functions */
skinny_reqrep_add_request(ptvcursor_t * cursor,packet_info * pinfo,skinny_conv_info_t * skinny_conv,const int request_key)2372 static void skinny_reqrep_add_request(ptvcursor_t *cursor, packet_info * pinfo, skinny_conv_info_t * skinny_conv, const int request_key)
2373 {
2374   proto_tree *tree = ptvcursor_tree(cursor);
2375   tvbuff_t *tvb = ptvcursor_tvbuff(cursor);
2376   skinny_req_resp_t *req_resp = NULL;
2377 
2378   if (!PINFO_FD_VISITED(pinfo)) {
2379     req_resp = wmem_new0(wmem_file_scope(), skinny_req_resp_t);
2380     req_resp->request_frame = pinfo->num;
2381     req_resp->response_frame = 0;
2382     req_resp->request_time = pinfo->abs_ts;
2383     wmem_map_insert(skinny_conv->pending_req_resp, GINT_TO_POINTER(request_key), (void *)req_resp);
2384     DPRINT(("SKINNY: setup_request: frame=%d add key=%d to map\n", pinfo->num, request_key));
2385   }
2386 
2387   req_resp = (skinny_req_resp_t *) wmem_map_lookup(skinny_conv->requests, GUINT_TO_POINTER(pinfo->num));
2388   if (req_resp && req_resp->response_frame) {
2389     DPRINT(("SKINNY: show request in tree: frame/key=%d\n", pinfo->num));
2390     proto_item *it;
2391     it = proto_tree_add_uint(tree, hf_skinny_response_in, tvb, 0, 0, req_resp->response_frame);
2392     proto_item_set_generated(it);
2393   } else {
2394     DPRINT(("SKINNY: no request found for frame/key=%d\n", pinfo->num));
2395   }
2396 }
2397 
2398 
skinny_reqrep_add_response(ptvcursor_t * cursor,packet_info * pinfo,skinny_conv_info_t * skinny_conv,const int request_key)2399 static void skinny_reqrep_add_response(ptvcursor_t *cursor, packet_info * pinfo, skinny_conv_info_t * skinny_conv, const int request_key)
2400 {
2401   proto_tree *tree = ptvcursor_tree(cursor);
2402   tvbuff_t *tvb = ptvcursor_tvbuff(cursor);
2403   skinny_req_resp_t *req_resp = NULL;
2404 
2405   if (!PINFO_FD_VISITED(pinfo)) {
2406     req_resp = (skinny_req_resp_t *) wmem_map_remove(skinny_conv->pending_req_resp, GINT_TO_POINTER(request_key));
2407     if (req_resp) {
2408       DPRINT(("SKINNY: match request:%d with response:%d for key=%d\n", req_resp->request_frame, pinfo->num, request_key));
2409       req_resp->response_frame = pinfo->num;
2410       wmem_map_insert(skinny_conv->requests, GUINT_TO_POINTER(req_resp->request_frame), (void *)req_resp);
2411       wmem_map_insert(skinny_conv->responses, GUINT_TO_POINTER(pinfo->num), (void *)req_resp);
2412     } else {
2413       DPRINT(("SKINNY: no match found for response frame=%d and key=%d\n", pinfo->num, request_key));
2414     }
2415   }
2416 
2417   req_resp = (skinny_req_resp_t *) wmem_map_lookup(skinny_conv->responses, GUINT_TO_POINTER(pinfo->num));
2418   if (req_resp && req_resp->request_frame) {
2419     DPRINT(("SKINNY: show response in tree: frame/key=%d\n", pinfo->num));
2420     proto_item *it;
2421     nstime_t ns;
2422     it = proto_tree_add_uint(tree, hf_skinny_response_to, tvb, 0, 0, req_resp->request_frame);
2423     proto_item_set_generated(it);
2424 
2425     nstime_delta(&ns, &pinfo->abs_ts, &req_resp->request_time);
2426     it = proto_tree_add_time(tree, hf_skinny_response_time, tvb, 0, 0, &ns);
2427     proto_item_set_generated(it);
2428   } else {
2429     DPRINT(("SKINNY: no response found for frame/key=%d\n", pinfo->num));
2430   }
2431 }
2432 
2433 /*** Messages Handlers ***/
2434 /*
2435  * Message:   RegisterReqMessage
2436  * Opcode:    0x0001
2437  * Type:      RegistrationAndManagement
2438  * Direction: dev2pbx
2439  * VarLength: no
2440  * MsgType:   request
2441  */
2442 static void
handle_RegisterReqMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)2443 handle_RegisterReqMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
2444 {
2445   guint32 hdr_data_length = tvb_get_letohl(ptvcursor_tvbuff(cursor), 0);
2446 
2447   {
2448     ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "sid");
2449     ptvcursor_add(cursor, hf_skinny_DeviceName, 16, ENC_ASCII|ENC_NA);
2450     ptvcursor_add(cursor, hf_skinny_reserved_for_future_use, 4, ENC_LITTLE_ENDIAN);
2451     ptvcursor_add(cursor, hf_skinny_instance, 4, ENC_LITTLE_ENDIAN);
2452     ptvcursor_pop_subtree(cursor);
2453   }
2454   ptvcursor_add(cursor, hf_skinny_stationIpAddr, 4, ENC_BIG_ENDIAN);
2455   ptvcursor_add(cursor, hf_skinny_deviceType, 4, ENC_LITTLE_ENDIAN);
2456   ptvcursor_add(cursor, hf_skinny_maxStreams, 4, ENC_LITTLE_ENDIAN);
2457   if (hdr_data_length > 52) {
2458     ptvcursor_add(cursor, hf_skinny_activeStreams, 4, ENC_LITTLE_ENDIAN);
2459     ptvcursor_add(cursor, hf_skinny_protocolVer, 1, ENC_LITTLE_ENDIAN);
2460     ptvcursor_add(cursor, hf_skinny_unknown, 1, ENC_LITTLE_ENDIAN);
2461     ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "phoneFeatures");
2462     ptvcursor_add_no_advance(cursor, hf_skinny_PhoneFeatures_Bit1, 2, ENC_LITTLE_ENDIAN);
2463     ptvcursor_add_no_advance(cursor, hf_skinny_PhoneFeatures_Bit2, 2, ENC_LITTLE_ENDIAN);
2464     ptvcursor_add_no_advance(cursor, hf_skinny_PhoneFeatures_Bit3, 2, ENC_LITTLE_ENDIAN);
2465     ptvcursor_add_no_advance(cursor, hf_skinny_PhoneFeatures_Bit4, 2, ENC_LITTLE_ENDIAN);
2466     ptvcursor_add_no_advance(cursor, hf_skinny_PhoneFeatures_UTF8, 2, ENC_LITTLE_ENDIAN);
2467     ptvcursor_add_no_advance(cursor, hf_skinny_PhoneFeatures_Bit6, 2, ENC_LITTLE_ENDIAN);
2468     ptvcursor_add_no_advance(cursor, hf_skinny_PhoneFeatures_Bit7, 2, ENC_LITTLE_ENDIAN);
2469     ptvcursor_add_no_advance(cursor, hf_skinny_PhoneFeatures_DynamicMessages, 2, ENC_LITTLE_ENDIAN);
2470     ptvcursor_add_no_advance(cursor, hf_skinny_PhoneFeatures_Bit9, 2, ENC_LITTLE_ENDIAN);
2471     ptvcursor_add_no_advance(cursor, hf_skinny_PhoneFeatures_RFC2833, 2, ENC_LITTLE_ENDIAN);
2472     ptvcursor_add_no_advance(cursor, hf_skinny_PhoneFeatures_Bit11, 2, ENC_LITTLE_ENDIAN);
2473     ptvcursor_add_no_advance(cursor, hf_skinny_PhoneFeatures_Bit12, 2, ENC_LITTLE_ENDIAN);
2474     ptvcursor_add_no_advance(cursor, hf_skinny_PhoneFeatures_Bit13, 2, ENC_LITTLE_ENDIAN);
2475     ptvcursor_add_no_advance(cursor, hf_skinny_PhoneFeatures_Bit14, 2, ENC_LITTLE_ENDIAN);
2476     ptvcursor_add_no_advance(cursor, hf_skinny_PhoneFeatures_Bit15, 2, ENC_LITTLE_ENDIAN);
2477     ptvcursor_add_no_advance(cursor, hf_skinny_PhoneFeatures_Abbreviated_Dial, 2, ENC_LITTLE_ENDIAN);
2478     ptvcursor_advance(cursor, 2);
2479     ptvcursor_pop_subtree(cursor); /* end bitfield: phoneFeatures */
2480     ptvcursor_add(cursor, hf_skinny_maxConferences, 4, ENC_LITTLE_ENDIAN);
2481   }
2482   if (hdr_data_length > 100) {
2483     ptvcursor_add(cursor, hf_skinny_activeConferences, 4, ENC_LITTLE_ENDIAN);
2484     ptvcursor_add(cursor, hf_skinny_macAddress, 6, ENC_NA);
2485     ptvcursor_advance(cursor, 12 - 6);
2486     ptvcursor_add(cursor, hf_skinny_ipV4AddressScope, 4, ENC_LITTLE_ENDIAN);
2487     ptvcursor_add(cursor, hf_skinny_maxNumberOfLines, 4, ENC_LITTLE_ENDIAN);
2488     ptvcursor_add(cursor, hf_skinny_stationIpV6Addr, 16, ENC_NA);
2489     ptvcursor_add(cursor, hf_skinny_ipV6AddressScope, 4, ENC_LITTLE_ENDIAN);
2490     ptvcursor_add(cursor, hf_skinny_firmwareLoadName, 32, ENC_ASCII|ENC_NA);
2491   }
2492   if (hdr_data_length > 191) {
2493     ptvcursor_add(cursor, hf_skinny_configVersionStamp, 48, ENC_ASCII|ENC_NA);
2494   }
2495   skinny_reqrep_add_request(cursor, pinfo, skinny_conv, 0x0001);
2496 }
2497 
2498 /*
2499  * Message:   IpPortMessage
2500  * Opcode:    0x0002
2501  * Type:      CallControl
2502  * Direction: dev2pbx
2503  * VarLength: no
2504  * MsgType:   event
2505  */
2506 static void
handle_IpPortMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)2507 handle_IpPortMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
2508 {
2509   ptvcursor_add(cursor, hf_skinny_rtpMediaPort, 4, ENC_LITTLE_ENDIAN);
2510 }
2511 
2512 /*
2513  * Message:   KeypadButtonMessage
2514  * Opcode:    0x0003
2515  * Type:      CallControl
2516  * Direction: dev2pbx
2517  * VarLength: no
2518  * MsgType:   event
2519  */
2520 static void
handle_KeypadButtonMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)2521 handle_KeypadButtonMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
2522 {
2523   guint32 hdr_data_length = tvb_get_letohl(ptvcursor_tvbuff(cursor), 0);
2524 
2525   si->additionalInfo = g_strdup_printf("\"%s\"",
2526     try_val_to_str_ext(
2527       tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor)),
2528       &KeyPadButton_short_ext
2529     )
2530   );
2531   ptvcursor_add(cursor, hf_skinny_kpButton, 4, ENC_LITTLE_ENDIAN);
2532   if (hdr_data_length > 8) {
2533     si->lineId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
2534     ptvcursor_add(cursor, hf_skinny_lineInstance, 4, ENC_LITTLE_ENDIAN);
2535     si->callId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
2536     ptvcursor_add(cursor, hf_skinny_callReference, 4, ENC_LITTLE_ENDIAN);
2537   }
2538 }
2539 
2540 /*
2541  * Message:   EnblocCallMessage
2542  * Opcode:    0x0004
2543  * Type:      CallControl
2544  * Direction: dev2pbx
2545  * VarLength: no
2546  * MsgType:   event
2547  */
2548 static void
handle_EnblocCallMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)2549 handle_EnblocCallMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
2550 {
2551   guint32 hdr_data_length = tvb_get_letohl(ptvcursor_tvbuff(cursor), 0);
2552   guint32 hdr_version = tvb_get_letohl(ptvcursor_tvbuff(cursor), 4);
2553   guint32 VariableDirnumSize = (hdr_version >= V18_MSG_TYPE) ? 25 : 24;
2554 
2555   si->calledParty = g_strdup(tvb_format_stringzpad(pinfo->pool, ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor), VariableDirnumSize));
2556   ptvcursor_add(cursor, hf_skinny_calledParty, VariableDirnumSize, ENC_ASCII|ENC_NA);
2557   if (hdr_data_length > 28) {
2558     si->lineId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
2559     ptvcursor_add(cursor, hf_skinny_lineInstance, 4, ENC_LITTLE_ENDIAN);
2560   }
2561 }
2562 
2563 /*
2564  * Message:   StimulusMessage
2565  * Opcode:    0x0005
2566  * Type:      CallControl
2567  * Direction: dev2pbx
2568  * VarLength: no
2569  * MsgType:   event
2570  */
2571 static void
handle_StimulusMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)2572 handle_StimulusMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
2573 {
2574   ptvcursor_add(cursor, hf_skinny_stimulus, 4, ENC_LITTLE_ENDIAN);
2575   si->lineId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
2576   ptvcursor_add(cursor, hf_skinny_lineInstance, 4, ENC_LITTLE_ENDIAN);
2577   si->callId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
2578   ptvcursor_add(cursor, hf_skinny_callReference, 4, ENC_LITTLE_ENDIAN);
2579   ptvcursor_add(cursor, hf_skinny_stimulusStatus, 4, ENC_LITTLE_ENDIAN);
2580 }
2581 
2582 /*
2583  * Message:   OffHookMessage
2584  * Opcode:    0x0006
2585  * Type:      CallControl
2586  * Direction: dev2pbx
2587  * VarLength: no
2588  * MsgType:   event
2589  */
2590 static void
handle_OffHookMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)2591 handle_OffHookMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
2592 {
2593   guint32 hdr_data_length = tvb_get_letohl(ptvcursor_tvbuff(cursor), 0);
2594 
2595   if (hdr_data_length > 4) {
2596     si->lineId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
2597     ptvcursor_add(cursor, hf_skinny_lineInstance, 4, ENC_LITTLE_ENDIAN);
2598     si->callId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
2599     ptvcursor_add(cursor, hf_skinny_callReference, 4, ENC_LITTLE_ENDIAN);
2600   }
2601 }
2602 
2603 /*
2604  * Message:   OnHookMessage
2605  * Opcode:    0x0007
2606  * Type:      CallControl
2607  * Direction: dev2pbx
2608  * VarLength: no
2609  * MsgType:   event
2610  */
2611 static void
handle_OnHookMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)2612 handle_OnHookMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
2613 {
2614   guint32 hdr_data_length = tvb_get_letohl(ptvcursor_tvbuff(cursor), 0);
2615 
2616   if (hdr_data_length > 4) {
2617     si->lineId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
2618     ptvcursor_add(cursor, hf_skinny_lineInstance, 4, ENC_LITTLE_ENDIAN);
2619     si->callId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
2620     ptvcursor_add(cursor, hf_skinny_callReference, 4, ENC_LITTLE_ENDIAN);
2621   }
2622 }
2623 
2624 /*
2625  * Message:   HookFlashMessage
2626  * Opcode:    0x0008
2627  * Type:      CallControl
2628  * Direction: dev2pbx
2629  * VarLength: no
2630  * MsgType:   event
2631  */
2632 static void
handle_HookFlashMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)2633 handle_HookFlashMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
2634 {
2635   si->lineId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
2636   ptvcursor_add(cursor, hf_skinny_lineInstance, 4, ENC_LITTLE_ENDIAN);
2637   si->callId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
2638   ptvcursor_add(cursor, hf_skinny_callReference, 4, ENC_LITTLE_ENDIAN);
2639 }
2640 
2641 /*
2642  * Message:   ForwardStatReqMessage
2643  * Opcode:    0x0009
2644  * Type:      RegistrationAndManagement
2645  * Direction: dev2pbx
2646  * VarLength: no
2647  * MsgType:   request
2648  */
2649 static void
handle_ForwardStatReqMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)2650 handle_ForwardStatReqMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
2651 {
2652   guint32 lineNumber = 0;
2653   lineNumber = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
2654   ptvcursor_add(cursor, hf_skinny_lineNumber, 4, ENC_LITTLE_ENDIAN);
2655   skinny_reqrep_add_request(cursor, pinfo, skinny_conv, 0x0009 ^ lineNumber);
2656 }
2657 
2658 /*
2659  * Message:   SpeedDialStatReqMessage
2660  * Opcode:    0x000a
2661  * Type:      RegistrationAndManagement
2662  * Direction: dev2pbx
2663  * VarLength: no
2664  * MsgType:   request
2665  */
2666 static void
handle_SpeedDialStatReqMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)2667 handle_SpeedDialStatReqMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
2668 {
2669   guint32 speedDialNumber = 0;
2670   speedDialNumber = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
2671   ptvcursor_add(cursor, hf_skinny_speedDialNumber, 4, ENC_LITTLE_ENDIAN);
2672   skinny_reqrep_add_request(cursor, pinfo, skinny_conv, 0x000a ^ speedDialNumber);
2673 }
2674 
2675 /*
2676  * Message:   LineStatReqMessage
2677  * Opcode:    0x000b
2678  * Type:      RegistrationAndManagement
2679  * Direction: dev2pbx
2680  * VarLength: no
2681  * MsgType:   request
2682  */
2683 static void
handle_LineStatReqMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)2684 handle_LineStatReqMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
2685 {
2686   guint32 lineNumber = 0;
2687   lineNumber = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
2688   ptvcursor_add(cursor, hf_skinny_lineNumber, 4, ENC_LITTLE_ENDIAN);
2689   skinny_reqrep_add_request(cursor, pinfo, skinny_conv, 0x000b ^ lineNumber);
2690 }
2691 
2692 /*
2693  * Message:   CapabilitiesResMessage
2694  * Opcode:    0x0010
2695  * Type:      RegistrationAndManagement
2696  * Direction: dev2pbx
2697  * VarLength: no
2698  * MsgType:   response
2699  */
2700 static void
handle_CapabilitiesResMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)2701 handle_CapabilitiesResMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
2702 {
2703   guint32 capCount = 0;
2704   guint32 payloadCapability = 0;
2705   capCount = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
2706   ptvcursor_add(cursor, hf_skinny_capCount, 4, ENC_LITTLE_ENDIAN);
2707   if (capCount <= 18) {
2708     guint32 counter_1 = 0;
2709     ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "caps [ref:capCount = %d, max:18]", capCount);
2710     if (capCount && tvb_get_letohl(ptvcursor_tvbuff(cursor), 0) + 8 >= ptvcursor_current_offset(cursor) + (capCount * 16) && capCount <= 18) {
2711       for (counter_1 = 0; counter_1 < 18; counter_1++) {
2712         if (counter_1 < capCount) {
2713           ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "caps [%d / %d]", counter_1 + 1, capCount);
2714           payloadCapability = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
2715           ptvcursor_add(cursor, hf_skinny_payloadCapability, 4, ENC_LITTLE_ENDIAN);
2716           ptvcursor_add(cursor, hf_skinny_maxFramesPerPacket, 4, ENC_LITTLE_ENDIAN);
2717           if (payloadCapability == MEDIA_PAYLOAD_G7231)           {
2718             ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "payloadCapability is Media_Payload_G7231");
2719             ptvcursor_add(cursor, hf_skinny_g723BitRate, 4, ENC_LITTLE_ENDIAN);
2720             ptvcursor_pop_subtree(cursor);
2721             ptvcursor_advance(cursor, 4);
2722           } else if (payloadCapability == MEDIA_PAYLOAD_V150_LC_MODEMRELAY)           {
2723             ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "payloadCapability is Media_Payload_v150_LC_ModemRelay");
2724             {
2725               ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "modemRelay");
2726               ptvcursor_add(cursor, hf_skinny_capAndVer, 4, ENC_LITTLE_ENDIAN);
2727               ptvcursor_add(cursor, hf_skinny_modAnd2833, 4, ENC_LITTLE_ENDIAN);
2728               ptvcursor_pop_subtree(cursor);
2729             }
2730             ptvcursor_pop_subtree(cursor);
2731           } else if (payloadCapability == MEDIA_PAYLOAD_V150_LC_SPRT)           {
2732             ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "payloadCapability is Media_Payload_v150_LC_SPRT");
2733             {
2734               ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "sprtPayload");
2735               ptvcursor_add(cursor, hf_skinny_chan0MaxPayload, 2, ENC_LITTLE_ENDIAN);
2736               ptvcursor_add(cursor, hf_skinny_chan2MaxPayload, 2, ENC_LITTLE_ENDIAN);
2737               ptvcursor_add(cursor, hf_skinny_chan3MaxPayload, 2, ENC_LITTLE_ENDIAN);
2738               ptvcursor_add(cursor, hf_skinny_chan2MaxWindow, 2, ENC_LITTLE_ENDIAN);
2739               ptvcursor_pop_subtree(cursor);
2740             }
2741             ptvcursor_pop_subtree(cursor);
2742           } else if (payloadCapability == MEDIA_PAYLOAD_V150_LC_SSE)           {
2743             ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "payloadCapability is Media_Payload_v150_LC_SSE");
2744             {
2745               ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "sse");
2746               ptvcursor_add(cursor, hf_skinny_standard, 4, ENC_LITTLE_ENDIAN);
2747               ptvcursor_add(cursor, hf_skinny_vendor, 4, ENC_LITTLE_ENDIAN);
2748               ptvcursor_pop_subtree(cursor);
2749             }
2750             ptvcursor_pop_subtree(cursor);
2751           } else           {
2752             ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "any payloadCapability");
2753             {
2754               ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "codecParams");
2755               ptvcursor_add(cursor, hf_skinny_codecMode, 1, ENC_LITTLE_ENDIAN);
2756               ptvcursor_add(cursor, hf_skinny_dynamicPayload, 1, ENC_LITTLE_ENDIAN);
2757               ptvcursor_add(cursor, hf_skinny_codecParam1, 1, ENC_LITTLE_ENDIAN);
2758               ptvcursor_add(cursor, hf_skinny_codecParam2, 1, ENC_LITTLE_ENDIAN);
2759               ptvcursor_pop_subtree(cursor);
2760             }
2761             ptvcursor_pop_subtree(cursor);
2762             ptvcursor_advance(cursor, 4);
2763           }
2764         } else {
2765           ptvcursor_advance(cursor, 16);
2766         }
2767         ptvcursor_pop_subtree(cursor);
2768       }
2769     }
2770     ptvcursor_pop_subtree(cursor);
2771   } else {
2772     ptvcursor_advance(cursor, (capCount * 16));
2773   }
2774   skinny_reqrep_add_response(cursor, pinfo, skinny_conv, 0x009b);
2775 }
2776 
2777 /*
2778  * Message:   AlarmMessage
2779  * Opcode:    0x0020
2780  * Type:      RegistrationAndManagement
2781  * Direction: dev2pbx
2782  * VarLength: no
2783  * MsgType:   event
2784  */
2785 static void
handle_AlarmMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)2786 handle_AlarmMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
2787 {
2788   ptvcursor_add(cursor, hf_skinny_alarmSeverity, 4, ENC_LITTLE_ENDIAN);
2789   ptvcursor_add(cursor, hf_skinny_text, 80, ENC_ASCII|ENC_NA);
2790   ptvcursor_add(cursor, hf_skinny_parm1, 4, ENC_LITTLE_ENDIAN);
2791   ptvcursor_add(cursor, hf_skinny_parm2, 4, ENC_LITTLE_ENDIAN);
2792 }
2793 
2794 /*
2795  * Message:   MulticastMediaReceptionAckMessage
2796  * Opcode:    0x0021
2797  * Type:      MediaControl
2798  * Direction: dev2pbx
2799  * VarLength: no
2800  * MsgType:   response
2801  */
2802 static void
handle_MulticastMediaReceptionAckMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)2803 handle_MulticastMediaReceptionAckMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
2804 {
2805   guint32 passThroughPartyId = 0;
2806   si->multicastReceptionStatus = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
2807   ptvcursor_add(cursor, hf_skinny_multicastReceptionStatus, 4, ENC_LITTLE_ENDIAN);
2808   passThroughPartyId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
2809   si->passThroughPartyId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
2810   ptvcursor_add(cursor, hf_skinny_passThroughPartyId, 4, ENC_LITTLE_ENDIAN);
2811   si->callId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
2812   ptvcursor_add(cursor, hf_skinny_callReference, 4, ENC_LITTLE_ENDIAN);
2813   skinny_reqrep_add_response(cursor, pinfo, skinny_conv, 0x0101 ^ passThroughPartyId);
2814 }
2815 
2816 /*
2817  * Message:   OpenReceiveChannelAckMessage
2818  * Opcode:    0x0022
2819  * Type:      MediaControl
2820  * Direction: dev2pbx
2821  * VarLength: no
2822  * MsgType:   response
2823  */
2824 static void
handle_OpenReceiveChannelAckMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)2825 handle_OpenReceiveChannelAckMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
2826 {
2827   guint32 hdr_data_length = tvb_get_letohl(ptvcursor_tvbuff(cursor), 0);
2828   address ipAddr;
2829   char *ipAddr_str = NULL;
2830   guint32 portNumber = 0;
2831   guint32 passThroughPartyId = 0;
2832 
2833   si->mediaReceptionStatus = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
2834   ptvcursor_add(cursor, hf_skinny_mediaReceptionStatus, 4, ENC_LITTLE_ENDIAN);
2835   read_skinny_ipv4or6(cursor, &ipAddr);
2836   dissect_skinny_ipv4or6(cursor, hf_skinny_ipAddr_ipv4, hf_skinny_ipAddr_ipv6);
2837   portNumber = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
2838   ptvcursor_add(cursor, hf_skinny_portNumber, 4, ENC_LITTLE_ENDIAN);
2839   srtp_add_address(pinfo, PT_UDP, &ipAddr, portNumber, 0, "SKINNY", pinfo->num, false, NULL, NULL, NULL);
2840   ipAddr_str = address_to_display(NULL, &ipAddr);
2841   si->additionalInfo = g_strdup_printf("%s:%d", ipAddr_str, portNumber);
2842   wmem_free(NULL, ipAddr_str);
2843   passThroughPartyId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
2844   si->passThroughPartyId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
2845   ptvcursor_add(cursor, hf_skinny_passThroughPartyId, 4, ENC_LITTLE_ENDIAN);
2846   if (hdr_data_length > 20) {
2847     si->callId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
2848     ptvcursor_add(cursor, hf_skinny_callReference, 4, ENC_LITTLE_ENDIAN);
2849   }
2850   skinny_reqrep_add_response(cursor, pinfo, skinny_conv, 0x0105 ^ passThroughPartyId);
2851 }
2852 
2853 /*
2854  * Message:   ConnectionStatisticsResMessage
2855  * Opcode:    0x0023
2856  * Type:      CallControl
2857  * Direction: dev2pbx
2858  * VarLength: no
2859  * MsgType:   response
2860  */
2861 static void
handle_ConnectionStatisticsResMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)2862 handle_ConnectionStatisticsResMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
2863 {
2864   guint32 hdr_data_length = tvb_get_letohl(ptvcursor_tvbuff(cursor), 0);
2865   guint32 hdr_version = tvb_get_letohl(ptvcursor_tvbuff(cursor), 4);
2866   guint32 callReference = 0;
2867   guint32 dataSize = 0;
2868 
2869   if (hdr_version <= V17_MSG_TYPE) {
2870     ptvcursor_add(cursor, hf_skinny_directoryNum, 24, ENC_ASCII|ENC_NA);
2871     callReference = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
2872     si->callId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
2873     ptvcursor_add(cursor, hf_skinny_callReference, 4, ENC_LITTLE_ENDIAN);
2874     ptvcursor_add(cursor, hf_skinny_statsProcessingMode, 4, ENC_LITTLE_ENDIAN);
2875   }
2876   if (hdr_version >= V18_MSG_TYPE) {
2877     ptvcursor_add(cursor, hf_skinny_directoryNum, 28, ENC_ASCII|ENC_NA);
2878     callReference = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
2879     si->callId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
2880     ptvcursor_add(cursor, hf_skinny_callReference, 4, ENC_LITTLE_ENDIAN);
2881     ptvcursor_add(cursor, hf_skinny_statsProcessingMode, 1, ENC_LITTLE_ENDIAN);
2882   }
2883   ptvcursor_add(cursor, hf_skinny_numberPacketsSent, 4, ENC_LITTLE_ENDIAN);
2884   ptvcursor_add(cursor, hf_skinny_numberOctetsSent, 4, ENC_LITTLE_ENDIAN);
2885   ptvcursor_add(cursor, hf_skinny_numberPacketsReceived, 4, ENC_LITTLE_ENDIAN);
2886   ptvcursor_add(cursor, hf_skinny_numberOctetsReceived, 4, ENC_LITTLE_ENDIAN);
2887   ptvcursor_add(cursor, hf_skinny_numberPacketsLost, 4, ENC_LITTLE_ENDIAN);
2888   ptvcursor_add(cursor, hf_skinny_jitter, 4, ENC_LITTLE_ENDIAN);
2889   ptvcursor_add(cursor, hf_skinny_latency, 4, ENC_LITTLE_ENDIAN);
2890   if (hdr_data_length > 64) {
2891     dataSize = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
2892     ptvcursor_add(cursor, hf_skinny_dataSize, 4, ENC_LITTLE_ENDIAN);
2893     ptvcursor_add(cursor, hf_skinny_data, dataSize, ENC_ASCII|ENC_NA);
2894   }
2895   skinny_reqrep_add_response(cursor, pinfo, skinny_conv, 0x0107 ^ callReference);
2896 }
2897 
2898 /*
2899  * Message:   OffHookWithCallingPartyNumberMessage
2900  * Opcode:    0x0024
2901  * Type:      CallControl
2902  * Direction: dev2pbx
2903  * VarLength: no
2904  * MsgType:   event
2905  */
2906 static void
handle_OffHookWithCallingPartyNumberMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)2907 handle_OffHookWithCallingPartyNumberMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
2908 {
2909   guint32 hdr_version = tvb_get_letohl(ptvcursor_tvbuff(cursor), 4);
2910   guint32 VariableDirnumSize = (hdr_version >= V18_MSG_TYPE) ? 25 : 24;
2911   ptvcursor_add(cursor, hf_skinny_callingPartyNumber, VariableDirnumSize, ENC_ASCII|ENC_NA);
2912   ptvcursor_add(cursor, hf_skinny_cgpnVoiceMailbox, VariableDirnumSize, ENC_ASCII|ENC_NA);
2913   si->lineId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
2914   ptvcursor_add(cursor, hf_skinny_lineInstance, 4, ENC_LITTLE_ENDIAN);
2915 }
2916 
2917 /*
2918  * Message:   SoftKeyEventMessage
2919  * Opcode:    0x0026
2920  * Type:      RegistrationAndManagement
2921  * Direction: dev2pbx
2922  * VarLength: no
2923  * MsgType:   event
2924  */
2925 static void
handle_SoftKeyEventMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)2926 handle_SoftKeyEventMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
2927 {
2928   ptvcursor_add(cursor, hf_skinny_softKeyEvent, 4, ENC_LITTLE_ENDIAN);
2929   si->lineId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
2930   ptvcursor_add(cursor, hf_skinny_lineInstance, 4, ENC_LITTLE_ENDIAN);
2931   si->callId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
2932   ptvcursor_add(cursor, hf_skinny_callReference, 4, ENC_LITTLE_ENDIAN);
2933 }
2934 
2935 /*
2936  * Message:   UnregisterReqMessage
2937  * Opcode:    0x0027
2938  * Type:      RegistrationAndManagement
2939  * Direction: dev2pbx
2940  * VarLength: no
2941  * MsgType:   request
2942  */
2943 static void
handle_UnregisterReqMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)2944 handle_UnregisterReqMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
2945 {
2946   guint32 hdr_data_length = tvb_get_letohl(ptvcursor_tvbuff(cursor), 0);
2947 
2948   if (hdr_data_length > 12) {
2949     ptvcursor_add(cursor, hf_skinny_unRegReasonCode, 4, ENC_LITTLE_ENDIAN);
2950   }
2951   skinny_reqrep_add_request(cursor, pinfo, skinny_conv, 0x0027);
2952 }
2953 
2954 /*
2955  * Message:   RegisterTokenReq
2956  * Opcode:    0x0029
2957  * Type:      RegistrationAndManagement
2958  * Direction: dev2pbx
2959  * VarLength: no
2960  * MsgType:   request
2961  */
2962 static void
handle_RegisterTokenReq(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)2963 handle_RegisterTokenReq(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
2964 {
2965   {
2966     ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "sid");
2967     ptvcursor_add(cursor, hf_skinny_DeviceName, 16, ENC_ASCII|ENC_NA);
2968     ptvcursor_add(cursor, hf_skinny_reserved_for_future_use, 4, ENC_LITTLE_ENDIAN);
2969     ptvcursor_add(cursor, hf_skinny_instance, 4, ENC_LITTLE_ENDIAN);
2970     ptvcursor_pop_subtree(cursor);
2971   }
2972   ptvcursor_add(cursor, hf_skinny_stationIpAddr, 4, ENC_LITTLE_ENDIAN);
2973   ptvcursor_add(cursor, hf_skinny_deviceType, 4, ENC_LITTLE_ENDIAN);
2974   dissect_skinny_ipv4or6(cursor, hf_skinny_stationIpV6Addr_ipv4, hf_skinny_stationIpV6Addr_ipv6);
2975   skinny_reqrep_add_request(cursor, pinfo, skinny_conv, 0x0029);
2976 }
2977 
2978 /*
2979  * Message:   MediaTransmissionFailureMessage
2980  * Opcode:    0x002a
2981  * Type:      MediaControl
2982  * Direction: dev2pbx
2983  * VarLength: no
2984  * MsgType:   response
2985  */
2986 static void
handle_MediaTransmissionFailureMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)2987 handle_MediaTransmissionFailureMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
2988 {
2989   guint32 passThroughPartyId = 0;
2990   address remoteIpAddr;
2991   char *remoteIpAddr_str = NULL;
2992   guint32 remotePortNumber = 0;
2993   ptvcursor_add(cursor, hf_skinny_conferenceId, 4, ENC_LITTLE_ENDIAN);
2994   passThroughPartyId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
2995   si->passThroughPartyId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
2996   ptvcursor_add(cursor, hf_skinny_passThroughPartyId, 4, ENC_LITTLE_ENDIAN);
2997   read_skinny_ipv4or6(cursor, &remoteIpAddr);
2998   dissect_skinny_ipv4or6(cursor, hf_skinny_remoteIpAddr_ipv4, hf_skinny_remoteIpAddr_ipv6);
2999   remotePortNumber = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
3000   ptvcursor_add(cursor, hf_skinny_remotePortNumber, 4, ENC_LITTLE_ENDIAN);
3001   srtp_add_address(pinfo, PT_UDP, &remoteIpAddr, remotePortNumber, 0, "SKINNY", pinfo->num, false, NULL, NULL, NULL);
3002   remoteIpAddr_str = address_to_display(NULL, &remoteIpAddr);
3003   si->additionalInfo = g_strdup_printf("%s:%d", remoteIpAddr_str, remotePortNumber);
3004   wmem_free(NULL, remoteIpAddr_str);
3005   si->callId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
3006   ptvcursor_add(cursor, hf_skinny_callReference, 4, ENC_LITTLE_ENDIAN);
3007   skinny_reqrep_add_response(cursor, pinfo, skinny_conv, 0x008a ^ passThroughPartyId);
3008 }
3009 
3010 /*
3011  * Message:   HeadsetStatusMessage
3012  * Opcode:    0x002b
3013  * Type:      CallControl
3014  * Direction: dev2pbx
3015  * VarLength: no
3016  * MsgType:   event
3017  */
3018 static void
handle_HeadsetStatusMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)3019 handle_HeadsetStatusMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
3020 {
3021   ptvcursor_add(cursor, hf_skinny_headsetStatus, 4, ENC_LITTLE_ENDIAN);
3022 }
3023 
3024 /*
3025  * Message:   MediaResourceNotificationMessage
3026  * Opcode:    0x002c
3027  * Type:      MediaControl
3028  * Direction: dev2pbx
3029  * VarLength: no
3030  * MsgType:   event
3031  */
3032 static void
handle_MediaResourceNotificationMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)3033 handle_MediaResourceNotificationMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
3034 {
3035   ptvcursor_add(cursor, hf_skinny_deviceType, 4, ENC_LITTLE_ENDIAN);
3036   ptvcursor_add(cursor, hf_skinny_numberOfInServiceStreams, 4, ENC_LITTLE_ENDIAN);
3037   ptvcursor_add(cursor, hf_skinny_maxStreamsPerConf, 4, ENC_LITTLE_ENDIAN);
3038   ptvcursor_add(cursor, hf_skinny_numberOfOutOfServiceStreams, 4, ENC_LITTLE_ENDIAN);
3039 }
3040 
3041 /*
3042  * Message:   RegisterAvailableLinesMessage
3043  * Opcode:    0x002d
3044  * Type:      RegistrationAndManagement
3045  * Direction: dev2pbx
3046  * VarLength: no
3047  * MsgType:   event
3048  */
3049 static void
handle_RegisterAvailableLinesMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)3050 handle_RegisterAvailableLinesMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
3051 {
3052   ptvcursor_add(cursor, hf_skinny_maxNumOfAvailLines, 4, ENC_LITTLE_ENDIAN);
3053 }
3054 
3055 /*
3056  * Message:   DeviceToUserDataMessage
3057  * Opcode:    0x002e
3058  * Type:      RegistrationAndManagement
3059  * Direction: dev2pbx
3060  * VarLength: no
3061  * MsgType:   request
3062  */
3063 static void
handle_DeviceToUserDataMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)3064 handle_DeviceToUserDataMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
3065 {
3066   guint32 dataLength = 0;
3067   {
3068     ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "deviceToUserData");
3069     ptvcursor_add(cursor, hf_skinny_applicationId, 4, ENC_LITTLE_ENDIAN);
3070     si->lineId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
3071     ptvcursor_add(cursor, hf_skinny_lineInstance, 4, ENC_LITTLE_ENDIAN);
3072     si->callId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
3073     ptvcursor_add(cursor, hf_skinny_callReference, 4, ENC_LITTLE_ENDIAN);
3074     ptvcursor_add(cursor, hf_skinny_transactionId, 4, ENC_LITTLE_ENDIAN);
3075     dataLength = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
3076     ptvcursor_add(cursor, hf_skinny_dataLength, 4, ENC_LITTLE_ENDIAN);
3077     dissect_skinny_xml(cursor, hf_skinny_xmldata, pinfo, dataLength, 2000);
3078     ptvcursor_pop_subtree(cursor);
3079   }
3080   skinny_reqrep_add_request(cursor, pinfo, skinny_conv, 0x002e);
3081 }
3082 
3083 /*
3084  * Message:   DeviceToUserDataResponseMessage
3085  * Opcode:    0x002f
3086  * Type:      RegistrationAndManagement
3087  * Direction: dev2pbx
3088  * VarLength: no
3089  * MsgType:   response
3090  */
3091 static void
handle_DeviceToUserDataResponseMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)3092 handle_DeviceToUserDataResponseMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
3093 {
3094   guint32 dataLength = 0;
3095   {
3096     ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "deviceToUserData");
3097     ptvcursor_add(cursor, hf_skinny_applicationId, 4, ENC_LITTLE_ENDIAN);
3098     si->lineId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
3099     ptvcursor_add(cursor, hf_skinny_lineInstance, 4, ENC_LITTLE_ENDIAN);
3100     si->callId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
3101     ptvcursor_add(cursor, hf_skinny_callReference, 4, ENC_LITTLE_ENDIAN);
3102     ptvcursor_add(cursor, hf_skinny_transactionId, 4, ENC_LITTLE_ENDIAN);
3103     dataLength = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
3104     ptvcursor_add(cursor, hf_skinny_dataLength, 4, ENC_LITTLE_ENDIAN);
3105     dissect_skinny_xml(cursor, hf_skinny_xmldata, pinfo, dataLength, 2000);
3106     ptvcursor_pop_subtree(cursor);
3107   }
3108   skinny_reqrep_add_response(cursor, pinfo, skinny_conv, 0x002e);
3109 }
3110 
3111 /*
3112  * Message:   UpdateCapabilitiesMessage
3113  * Opcode:    0x0030
3114  * Type:      RegistrationAndManagement
3115  * Direction: dev2pbx
3116  * VarLength: no
3117  * MsgType:   event
3118  */
3119 static void
handle_UpdateCapabilitiesMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)3120 handle_UpdateCapabilitiesMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
3121 {
3122   guint32 audioCapCount = 0;
3123   guint32 videoCapCount = 0;
3124   guint32 dataCapCount = 0;
3125   guint32 customPictureFormatCount = 0;
3126   guint32 serviceResourceCount = 0;
3127   guint32 layoutCount = 0;
3128   guint32 payloadCapability = 0;
3129   guint32 levelPreferenceCount = 0;
3130   audioCapCount = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
3131   ptvcursor_add(cursor, hf_skinny_audioCapCount, 4, ENC_LITTLE_ENDIAN);
3132   videoCapCount = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
3133   ptvcursor_add(cursor, hf_skinny_videoCapCount, 4, ENC_LITTLE_ENDIAN);
3134   dataCapCount = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
3135   ptvcursor_add(cursor, hf_skinny_dataCapCount, 4, ENC_LITTLE_ENDIAN);
3136   ptvcursor_add(cursor, hf_skinny_rtpPayloadFormat, 4, ENC_LITTLE_ENDIAN);
3137   customPictureFormatCount = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
3138   ptvcursor_add(cursor, hf_skinny_customPictureFormatCount, 4, ENC_LITTLE_ENDIAN);
3139   if (customPictureFormatCount <= 6) {
3140     guint32 counter_1 = 0;
3141     ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "customPictureFormat [ref:customPictureFormatCount = %d, max:6]", customPictureFormatCount);
3142     if (customPictureFormatCount && tvb_get_letohl(ptvcursor_tvbuff(cursor), 0) + 8 >= ptvcursor_current_offset(cursor) + (customPictureFormatCount * 20) && customPictureFormatCount <= 6) {
3143       for (counter_1 = 0; counter_1 < 6; counter_1++) {
3144         if (counter_1 < customPictureFormatCount) {
3145           ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "customPictureFormat [%d / %d]", counter_1 + 1, customPictureFormatCount);
3146           ptvcursor_add(cursor, hf_skinny_pictureWidth, 4, ENC_LITTLE_ENDIAN);
3147           ptvcursor_add(cursor, hf_skinny_pictureHeight, 4, ENC_LITTLE_ENDIAN);
3148           ptvcursor_add(cursor, hf_skinny_pixelAspectRatio, 4, ENC_LITTLE_ENDIAN);
3149           ptvcursor_add(cursor, hf_skinny_clockConversionCode, 4, ENC_LITTLE_ENDIAN);
3150           ptvcursor_add(cursor, hf_skinny_clockDivisor, 4, ENC_LITTLE_ENDIAN);
3151         } else {
3152           ptvcursor_advance(cursor, 20);
3153         }
3154         ptvcursor_pop_subtree(cursor);
3155       }
3156     }
3157     ptvcursor_pop_subtree(cursor);
3158   } else {
3159     ptvcursor_advance(cursor, (customPictureFormatCount * 20));
3160   }
3161   {
3162     ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "confResources");
3163     ptvcursor_add(cursor, hf_skinny_activeStreamsOnRegistration, 4, ENC_LITTLE_ENDIAN);
3164     ptvcursor_add(cursor, hf_skinny_maxBW, 4, ENC_LITTLE_ENDIAN);
3165     serviceResourceCount = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
3166     ptvcursor_add(cursor, hf_skinny_serviceResourceCount, 4, ENC_LITTLE_ENDIAN);
3167     if (serviceResourceCount <= 4) {
3168       guint32 counter_2 = 0;
3169       ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "serviceResource [ref:serviceResourceCount = %d, max:4]", serviceResourceCount);
3170       if (serviceResourceCount && tvb_get_letohl(ptvcursor_tvbuff(cursor), 0) + 8 >= ptvcursor_current_offset(cursor) + (serviceResourceCount * 24) && serviceResourceCount <= 4) {
3171         for (counter_2 = 0; counter_2 < 4; counter_2++) {
3172           if (counter_2 < serviceResourceCount) {
3173             ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "serviceResource [%d / %d]", counter_2 + 1, serviceResourceCount);
3174             layoutCount = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
3175             ptvcursor_add(cursor, hf_skinny_layoutCount, 4, ENC_LITTLE_ENDIAN);
3176             if (layoutCount <= 5) { /* tvb enum size guard */
3177               guint32 counter_7 = 0;
3178               ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "layouts [ref: layoutCount = %d, max:5]", layoutCount);
3179               for (counter_7 = 0; counter_7 < 5; counter_7++) {
3180                 if (counter_7 < layoutCount) {
3181                   ptvcursor_add(cursor, hf_skinny_layouts, 4, ENC_LITTLE_ENDIAN);
3182                 } else {
3183                   ptvcursor_advance(cursor, 4);
3184                 }
3185               }
3186               ptvcursor_pop_subtree(cursor);
3187             } else {
3188               ptvcursor_advance(cursor, (5 * 4)); /* guard kicked in -> skip the rest */;
3189             }
3190             ptvcursor_add(cursor, hf_skinny_serviceNum, 4, ENC_LITTLE_ENDIAN);
3191             ptvcursor_add(cursor, hf_skinny_maxStreams, 4, ENC_LITTLE_ENDIAN);
3192             ptvcursor_add(cursor, hf_skinny_maxConferences, 4, ENC_LITTLE_ENDIAN);
3193             ptvcursor_add(cursor, hf_skinny_activeConferenceOnRegistration, 4, ENC_LITTLE_ENDIAN);
3194           } else {
3195             ptvcursor_advance(cursor, 24);
3196           }
3197           ptvcursor_pop_subtree(cursor);
3198         }
3199       }
3200       ptvcursor_pop_subtree(cursor);
3201     } else {
3202       ptvcursor_advance(cursor, (serviceResourceCount * 24));
3203     }
3204     ptvcursor_pop_subtree(cursor);
3205   }
3206   if (audioCapCount <= 18) {
3207     guint32 counter_1 = 0;
3208     ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "audiocaps [ref:audioCapCount = %d, max:18]", audioCapCount);
3209     if (audioCapCount && tvb_get_letohl(ptvcursor_tvbuff(cursor), 0) + 8 >= ptvcursor_current_offset(cursor) + (audioCapCount * 16) && audioCapCount <= 18) {
3210       for (counter_1 = 0; counter_1 < 18; counter_1++) {
3211         if (counter_1 < audioCapCount) {
3212           ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "audiocaps [%d / %d]", counter_1 + 1, audioCapCount);
3213           payloadCapability = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
3214           ptvcursor_add(cursor, hf_skinny_payloadCapability, 4, ENC_LITTLE_ENDIAN);
3215           ptvcursor_add(cursor, hf_skinny_maxFramesPerPacket, 4, ENC_LITTLE_ENDIAN);
3216           if (payloadCapability == MEDIA_PAYLOAD_G7231)           {
3217             ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "payloadCapability is Media_Payload_G7231");
3218             ptvcursor_add(cursor, hf_skinny_g723BitRate, 4, ENC_LITTLE_ENDIAN);
3219             ptvcursor_pop_subtree(cursor);
3220             ptvcursor_advance(cursor, 4);
3221           } else if (payloadCapability == MEDIA_PAYLOAD_V150_LC_MODEMRELAY)           {
3222             ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "payloadCapability is Media_Payload_v150_LC_ModemRelay");
3223             {
3224               ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "modemRelay");
3225               ptvcursor_add(cursor, hf_skinny_capAndVer, 4, ENC_LITTLE_ENDIAN);
3226               ptvcursor_add(cursor, hf_skinny_modAnd2833, 4, ENC_LITTLE_ENDIAN);
3227               ptvcursor_pop_subtree(cursor);
3228             }
3229             ptvcursor_pop_subtree(cursor);
3230           } else if (payloadCapability == MEDIA_PAYLOAD_V150_LC_SPRT)           {
3231             ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "payloadCapability is Media_Payload_v150_LC_SPRT");
3232             {
3233               ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "sprtPayload");
3234               ptvcursor_add(cursor, hf_skinny_chan0MaxPayload, 2, ENC_LITTLE_ENDIAN);
3235               ptvcursor_add(cursor, hf_skinny_chan2MaxPayload, 2, ENC_LITTLE_ENDIAN);
3236               ptvcursor_add(cursor, hf_skinny_chan3MaxPayload, 2, ENC_LITTLE_ENDIAN);
3237               ptvcursor_add(cursor, hf_skinny_chan2MaxWindow, 2, ENC_LITTLE_ENDIAN);
3238               ptvcursor_pop_subtree(cursor);
3239             }
3240             ptvcursor_pop_subtree(cursor);
3241           } else if (payloadCapability == MEDIA_PAYLOAD_V150_LC_SSE)           {
3242             ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "payloadCapability is Media_Payload_v150_LC_SSE");
3243             {
3244               ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "sse");
3245               ptvcursor_add(cursor, hf_skinny_standard, 4, ENC_LITTLE_ENDIAN);
3246               ptvcursor_add(cursor, hf_skinny_vendor, 4, ENC_LITTLE_ENDIAN);
3247               ptvcursor_pop_subtree(cursor);
3248             }
3249             ptvcursor_pop_subtree(cursor);
3250           } else           {
3251             ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "any payloadCapability");
3252             {
3253               ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "codecParams");
3254               ptvcursor_add(cursor, hf_skinny_codecMode, 1, ENC_LITTLE_ENDIAN);
3255               ptvcursor_add(cursor, hf_skinny_dynamicPayload, 1, ENC_LITTLE_ENDIAN);
3256               ptvcursor_add(cursor, hf_skinny_codecParam1, 1, ENC_LITTLE_ENDIAN);
3257               ptvcursor_add(cursor, hf_skinny_codecParam2, 1, ENC_LITTLE_ENDIAN);
3258               ptvcursor_pop_subtree(cursor);
3259             }
3260             ptvcursor_pop_subtree(cursor);
3261             ptvcursor_advance(cursor, 4);
3262           }
3263         } else {
3264           ptvcursor_advance(cursor, 16);
3265         }
3266         ptvcursor_pop_subtree(cursor);
3267       }
3268     }
3269     ptvcursor_pop_subtree(cursor);
3270   } else {
3271     ptvcursor_advance(cursor, (audioCapCount * 16));
3272   }
3273   if (videoCapCount <= 10) {
3274     guint32 counter_1 = 0;
3275     ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "vidCaps [ref:videoCapCount = %d, max:10]", videoCapCount);
3276     if (videoCapCount && tvb_get_letohl(ptvcursor_tvbuff(cursor), 0) + 8 >= ptvcursor_current_offset(cursor) + (videoCapCount * 44) && videoCapCount <= 10) {
3277       for (counter_1 = 0; counter_1 < 10; counter_1++) {
3278         if (counter_1 < videoCapCount) {
3279           ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "vidCaps [%d / %d]", counter_1 + 1, videoCapCount);
3280           payloadCapability = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
3281           ptvcursor_add(cursor, hf_skinny_payloadCapability, 4, ENC_LITTLE_ENDIAN);
3282           ptvcursor_add(cursor, hf_skinny_videoCapabilityDirection, 4, ENC_LITTLE_ENDIAN);
3283           levelPreferenceCount = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
3284           ptvcursor_add(cursor, hf_skinny_levelPreferenceCount, 4, ENC_LITTLE_ENDIAN);
3285           if (levelPreferenceCount <= 4) {
3286             guint32 counter_5 = 0;
3287             ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "levelPreference [ref:levelPreferenceCount = %d, max:4]", levelPreferenceCount);
3288             if (levelPreferenceCount && tvb_get_letohl(ptvcursor_tvbuff(cursor), 0) + 8 >= ptvcursor_current_offset(cursor) + (levelPreferenceCount * 24) && levelPreferenceCount <= 4) {
3289               for (counter_5 = 0; counter_5 < 4; counter_5++) {
3290                 if (counter_5 < levelPreferenceCount) {
3291                   ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "levelPreference [%d / %d]", counter_5 + 1, levelPreferenceCount);
3292                   ptvcursor_add(cursor, hf_skinny_transmitPreference, 4, ENC_LITTLE_ENDIAN);
3293                   ptvcursor_add(cursor, hf_skinny_format, 4, ENC_LITTLE_ENDIAN);
3294                   ptvcursor_add(cursor, hf_skinny_maxBitRate, 4, ENC_LITTLE_ENDIAN);
3295                   ptvcursor_add(cursor, hf_skinny_minBitRate, 4, ENC_LITTLE_ENDIAN);
3296                   ptvcursor_add(cursor, hf_skinny_MPI, 4, ENC_LITTLE_ENDIAN);
3297                   ptvcursor_add(cursor, hf_skinny_serviceNumber, 4, ENC_LITTLE_ENDIAN);
3298                 } else {
3299                   ptvcursor_advance(cursor, 24);
3300                 }
3301                 ptvcursor_pop_subtree(cursor);
3302               }
3303             }
3304             ptvcursor_pop_subtree(cursor);
3305           } else {
3306             ptvcursor_advance(cursor, (levelPreferenceCount * 24));
3307           }
3308           if (payloadCapability == MEDIA_PAYLOAD_H261)           {
3309             ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "payloadCapability is Media_Payload_H261");
3310             {
3311               ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "h261VideoCapability");
3312               ptvcursor_add(cursor, hf_skinny_temporalSpatialTradeOffCapability, 4, ENC_LITTLE_ENDIAN);
3313               ptvcursor_add(cursor, hf_skinny_stillImageTransmission, 4, ENC_LITTLE_ENDIAN);
3314               ptvcursor_pop_subtree(cursor);
3315             }
3316             ptvcursor_pop_subtree(cursor);
3317           } else if (payloadCapability == MEDIA_PAYLOAD_H263)           {
3318             ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "payloadCapability is Media_Payload_H263");
3319             {
3320               ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "h263VideoCapability");
3321               ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "h263_capability_bitfield");
3322               ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit1, 4, ENC_LITTLE_ENDIAN);
3323               ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit2, 4, ENC_LITTLE_ENDIAN);
3324               ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit3, 4, ENC_LITTLE_ENDIAN);
3325               ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit4, 4, ENC_LITTLE_ENDIAN);
3326               ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit5, 4, ENC_LITTLE_ENDIAN);
3327               ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit6, 4, ENC_LITTLE_ENDIAN);
3328               ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit7, 4, ENC_LITTLE_ENDIAN);
3329               ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit8, 4, ENC_LITTLE_ENDIAN);
3330               ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit9, 4, ENC_LITTLE_ENDIAN);
3331               ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit10, 4, ENC_LITTLE_ENDIAN);
3332               ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit11, 4, ENC_LITTLE_ENDIAN);
3333               ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit12, 4, ENC_LITTLE_ENDIAN);
3334               ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit13, 4, ENC_LITTLE_ENDIAN);
3335               ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit14, 4, ENC_LITTLE_ENDIAN);
3336               ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit15, 4, ENC_LITTLE_ENDIAN);
3337               ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit16, 4, ENC_LITTLE_ENDIAN);
3338               ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit17, 4, ENC_LITTLE_ENDIAN);
3339               ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit18, 4, ENC_LITTLE_ENDIAN);
3340               ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit19, 4, ENC_LITTLE_ENDIAN);
3341               ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit20, 4, ENC_LITTLE_ENDIAN);
3342               ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit21, 4, ENC_LITTLE_ENDIAN);
3343               ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit22, 4, ENC_LITTLE_ENDIAN);
3344               ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit23, 4, ENC_LITTLE_ENDIAN);
3345               ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit24, 4, ENC_LITTLE_ENDIAN);
3346               ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit25, 4, ENC_LITTLE_ENDIAN);
3347               ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit26, 4, ENC_LITTLE_ENDIAN);
3348               ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit27, 4, ENC_LITTLE_ENDIAN);
3349               ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit28, 4, ENC_LITTLE_ENDIAN);
3350               ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit29, 4, ENC_LITTLE_ENDIAN);
3351               ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit30, 4, ENC_LITTLE_ENDIAN);
3352               ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit31, 4, ENC_LITTLE_ENDIAN);
3353               ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit32, 4, ENC_LITTLE_ENDIAN);
3354               ptvcursor_advance(cursor, 4);
3355               ptvcursor_pop_subtree(cursor); /* end bitfield: h263_capability_bitfield */
3356               ptvcursor_add(cursor, hf_skinny_annexNandWFutureUse, 4, ENC_LITTLE_ENDIAN);
3357               ptvcursor_pop_subtree(cursor);
3358             }
3359             ptvcursor_pop_subtree(cursor);
3360           } else if (payloadCapability == MEDIA_PAYLOAD_VIEO)           {
3361             ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "payloadCapability is Media_Payload_Vieo");
3362             {
3363               ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "vieoVideoCapability");
3364               ptvcursor_add(cursor, hf_skinny_modelNumber, 4, ENC_LITTLE_ENDIAN);
3365               ptvcursor_add(cursor, hf_skinny_bandwidth, 4, ENC_LITTLE_ENDIAN);
3366               ptvcursor_pop_subtree(cursor);
3367             }
3368             ptvcursor_pop_subtree(cursor);
3369           }
3370         } else {
3371           ptvcursor_advance(cursor, 44);
3372         }
3373         ptvcursor_pop_subtree(cursor);
3374       }
3375     }
3376     ptvcursor_pop_subtree(cursor);
3377   } else {
3378     ptvcursor_advance(cursor, (videoCapCount * 44));
3379   }
3380   if (dataCapCount <= 5) {
3381     guint32 counter_1 = 0;
3382     ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "dataCaps [ref:dataCapCount = %d, max:5]", dataCapCount);
3383     if (dataCapCount && tvb_get_letohl(ptvcursor_tvbuff(cursor), 0) + 8 >= ptvcursor_current_offset(cursor) + (dataCapCount * 16) && dataCapCount <= 5) {
3384       for (counter_1 = 0; counter_1 < 5; counter_1++) {
3385         if (counter_1 < dataCapCount) {
3386           ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "dataCaps [%d / %d]", counter_1 + 1, dataCapCount);
3387           ptvcursor_add(cursor, hf_skinny_payloadCapability, 4, ENC_LITTLE_ENDIAN);
3388           ptvcursor_add(cursor, hf_skinny_dataCapabilityDirection, 4, ENC_LITTLE_ENDIAN);
3389           ptvcursor_add(cursor, hf_skinny_protocolDependentData, 4, ENC_LITTLE_ENDIAN);
3390           ptvcursor_add(cursor, hf_skinny_maxBitRate, 4, ENC_LITTLE_ENDIAN);
3391         } else {
3392           ptvcursor_advance(cursor, 16);
3393         }
3394         ptvcursor_pop_subtree(cursor);
3395       }
3396     }
3397     ptvcursor_pop_subtree(cursor);
3398   } else {
3399     ptvcursor_advance(cursor, (dataCapCount * 16));
3400   }
3401 }
3402 
3403 /*
3404  * Message:   OpenMultiMediaReceiveChannelAckMessage
3405  * Opcode:    0x0031
3406  * Type:      MediaControl
3407  * Direction: dev2pbx
3408  * VarLength: no
3409  * MsgType:   response
3410  */
3411 static void
handle_OpenMultiMediaReceiveChannelAckMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)3412 handle_OpenMultiMediaReceiveChannelAckMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
3413 {
3414   address ipAddr;
3415   char *ipAddr_str = NULL;
3416   guint32 portNumber = 0;
3417   guint32 passThroughPartyId = 0;
3418   si->multimediaReceptionStatus = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
3419   ptvcursor_add(cursor, hf_skinny_multimediaReceptionStatus, 4, ENC_LITTLE_ENDIAN);
3420   read_skinny_ipv4or6(cursor, &ipAddr);
3421   dissect_skinny_ipv4or6(cursor, hf_skinny_ipAddr_ipv4, hf_skinny_ipAddr_ipv6);
3422   portNumber = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
3423   ptvcursor_add(cursor, hf_skinny_portNumber, 4, ENC_LITTLE_ENDIAN);
3424   srtp_add_address(pinfo, PT_UDP, &ipAddr, portNumber, 0, "SKINNY", pinfo->num, false, NULL, NULL, NULL);
3425   ipAddr_str = address_to_display(NULL, &ipAddr);
3426   si->additionalInfo = g_strdup_printf("%s:%d", ipAddr_str, portNumber);
3427   wmem_free(NULL, ipAddr_str);
3428   passThroughPartyId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
3429   si->passThroughPartyId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
3430   ptvcursor_add(cursor, hf_skinny_passThroughPartyId, 4, ENC_LITTLE_ENDIAN);
3431   si->callId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
3432   ptvcursor_add(cursor, hf_skinny_callReference, 4, ENC_LITTLE_ENDIAN);
3433   skinny_reqrep_add_response(cursor, pinfo, skinny_conv, 0x0131 ^ passThroughPartyId);
3434 }
3435 
3436 /*
3437  * Message:   ClearConferenceMessage
3438  * Opcode:    0x0032
3439  * Type:      Conference
3440  * Direction: dev2pbx
3441  * VarLength: no
3442  * MsgType:   event
3443  */
3444 static void
handle_ClearConferenceMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)3445 handle_ClearConferenceMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
3446 {
3447   ptvcursor_add(cursor, hf_skinny_conferenceId, 4, ENC_LITTLE_ENDIAN);
3448   ptvcursor_add(cursor, hf_skinny_serviceNum, 4, ENC_LITTLE_ENDIAN);
3449 }
3450 
3451 /*
3452  * Message:   ServiceURLStatReqMessage
3453  * Opcode:    0x0033
3454  * Type:      RegistrationAndManagement
3455  * Direction: dev2pbx
3456  * VarLength: no
3457  * MsgType:   request
3458  */
3459 static void
handle_ServiceURLStatReqMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)3460 handle_ServiceURLStatReqMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
3461 {
3462   guint32 serviceURLIndex = 0;
3463   serviceURLIndex = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
3464   ptvcursor_add(cursor, hf_skinny_serviceURLIndex, 4, ENC_LITTLE_ENDIAN);
3465   skinny_reqrep_add_request(cursor, pinfo, skinny_conv, 0x0033 ^ serviceURLIndex);
3466 }
3467 
3468 /*
3469  * Message:   FeatureStatReqMessage
3470  * Opcode:    0x0034
3471  * Type:      RegistrationAndManagement
3472  * Direction: dev2pbx
3473  * VarLength: no
3474  * MsgType:   request
3475  */
3476 static void
handle_FeatureStatReqMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)3477 handle_FeatureStatReqMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
3478 {
3479   guint32 hdr_data_length = tvb_get_letohl(ptvcursor_tvbuff(cursor), 0);
3480   guint32 featureIndex = 0;
3481 
3482   featureIndex = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
3483   ptvcursor_add(cursor, hf_skinny_featureIndex, 4, ENC_LITTLE_ENDIAN);
3484   if (hdr_data_length > 16) {
3485     ptvcursor_add(cursor, hf_skinny_featureCapabilities, 4, ENC_LITTLE_ENDIAN);
3486   }
3487   skinny_reqrep_add_request(cursor, pinfo, skinny_conv, 0x0034 ^ featureIndex);
3488 }
3489 
3490 /*
3491  * Message:   CreateConferenceResMessage
3492  * Opcode:    0x0035
3493  * Type:      IntraCCM
3494  * Direction: pbx2pbx
3495  * VarLength: no
3496  * MsgType:   response
3497  */
3498 static void
handle_CreateConferenceResMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)3499 handle_CreateConferenceResMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
3500 {
3501   guint32 conferenceId = 0;
3502   guint32 dataLength = 0;
3503   conferenceId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
3504   ptvcursor_add(cursor, hf_skinny_conferenceId, 4, ENC_LITTLE_ENDIAN);
3505   ptvcursor_add(cursor, hf_skinny_result, 4, ENC_LITTLE_ENDIAN);
3506   dataLength = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
3507   ptvcursor_add(cursor, hf_skinny_dataLength, 4, ENC_LITTLE_ENDIAN);
3508   ptvcursor_add(cursor, hf_skinny_passThruData, dataLength, ENC_ASCII|ENC_NA);
3509   skinny_reqrep_add_response(cursor, pinfo, skinny_conv, 0x0137 ^ conferenceId);
3510 }
3511 
3512 /*
3513  * Message:   DeleteConferenceResMessage
3514  * Opcode:    0x0036
3515  * Type:      IntraCCM
3516  * Direction: pbx2pbx
3517  * VarLength: no
3518  * MsgType:   response
3519  */
3520 static void
handle_DeleteConferenceResMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)3521 handle_DeleteConferenceResMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
3522 {
3523   guint32 conferenceId = 0;
3524   conferenceId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
3525   ptvcursor_add(cursor, hf_skinny_conferenceId, 4, ENC_LITTLE_ENDIAN);
3526   ptvcursor_add(cursor, hf_skinny_delete_conf_result, 4, ENC_LITTLE_ENDIAN);
3527   skinny_reqrep_add_response(cursor, pinfo, skinny_conv, 0x0138 ^ conferenceId);
3528 }
3529 
3530 /*
3531  * Message:   ModifyConferenceResMessage
3532  * Opcode:    0x0037
3533  * Type:      IntraCCM
3534  * Direction: pbx2pbx
3535  * VarLength: no
3536  * MsgType:   response
3537  */
3538 static void
handle_ModifyConferenceResMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)3539 handle_ModifyConferenceResMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
3540 {
3541   guint32 conferenceId = 0;
3542   guint32 dataLength = 0;
3543   conferenceId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
3544   ptvcursor_add(cursor, hf_skinny_conferenceId, 4, ENC_LITTLE_ENDIAN);
3545   ptvcursor_add(cursor, hf_skinny_modify_conf_result, 4, ENC_LITTLE_ENDIAN);
3546   dataLength = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
3547   ptvcursor_add(cursor, hf_skinny_dataLength, 4, ENC_LITTLE_ENDIAN);
3548   ptvcursor_add(cursor, hf_skinny_passThruData, dataLength, ENC_ASCII|ENC_NA);
3549   skinny_reqrep_add_response(cursor, pinfo, skinny_conv, 0x0139 ^ conferenceId);
3550 }
3551 
3552 /*
3553  * Message:   AddParticipantResMessage
3554  * Opcode:    0x0038
3555  * Type:      IntraCCM
3556  * Direction: pbx2pbx
3557  * VarLength: no
3558  * MsgType:   response
3559  */
3560 static void
handle_AddParticipantResMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)3561 handle_AddParticipantResMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
3562 {
3563   guint32 conferenceId = 0;
3564   conferenceId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
3565   ptvcursor_add(cursor, hf_skinny_conferenceId, 4, ENC_LITTLE_ENDIAN);
3566   si->callId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
3567   ptvcursor_add(cursor, hf_skinny_callReference, 4, ENC_LITTLE_ENDIAN);
3568   ptvcursor_add(cursor, hf_skinny_add_participant_result, 4, ENC_LITTLE_ENDIAN);
3569   ptvcursor_add(cursor, hf_skinny_bridgeParticipantId, 257, ENC_ASCII|ENC_NA);
3570   skinny_reqrep_add_response(cursor, pinfo, skinny_conv, 0x013a ^ conferenceId);
3571 }
3572 
3573 /*
3574  * Message:   AuditConferenceResMessage
3575  * Opcode:    0x0039
3576  * Type:      IntraCCM
3577  * Direction: pbx2pbx
3578  * VarLength: no
3579  * MsgType:   response
3580  */
3581 static void
handle_AuditConferenceResMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)3582 handle_AuditConferenceResMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
3583 {
3584   guint32 numberOfEntries = 0;
3585   ptvcursor_add(cursor, hf_skinny_last, 4, ENC_LITTLE_ENDIAN);
3586   numberOfEntries = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
3587   ptvcursor_add(cursor, hf_skinny_numberOfEntries, 4, ENC_LITTLE_ENDIAN);
3588   if (numberOfEntries <= 32) {
3589     guint32 counter_1 = 0;
3590     ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "conferenceEntry [ref:numberOfEntries = %d, max:32]", numberOfEntries);
3591     if (numberOfEntries && tvb_get_letohl(ptvcursor_tvbuff(cursor), 0) + 8 >= ptvcursor_current_offset(cursor) + (numberOfEntries * 76) && numberOfEntries <= 32) {
3592       for (counter_1 = 0; counter_1 < 32; counter_1++) {
3593         if (counter_1 < numberOfEntries) {
3594           ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "conferenceEntry [%d / %d]", counter_1 + 1, numberOfEntries);
3595           ptvcursor_add(cursor, hf_skinny_conferenceId, 4, ENC_LITTLE_ENDIAN);
3596           ptvcursor_add(cursor, hf_skinny_resourceType, 4, ENC_LITTLE_ENDIAN);
3597           ptvcursor_add(cursor, hf_skinny_numberOfReservedParticipants, 4, ENC_LITTLE_ENDIAN);
3598           ptvcursor_add(cursor, hf_skinny_numberOfActiveParticipants, 4, ENC_LITTLE_ENDIAN);
3599           ptvcursor_add(cursor, hf_skinny_applicationId, 4, ENC_LITTLE_ENDIAN);
3600           ptvcursor_add(cursor, hf_skinny_appConfID, 32, ENC_ASCII|ENC_NA);
3601           ptvcursor_add(cursor, hf_skinny_appData, 24, ENC_ASCII|ENC_NA);
3602         } else {
3603           ptvcursor_advance(cursor, 76);
3604         }
3605         ptvcursor_pop_subtree(cursor);
3606       }
3607     }
3608     ptvcursor_pop_subtree(cursor);
3609   } else {
3610     ptvcursor_advance(cursor, (numberOfEntries * 76));
3611   }
3612   skinny_reqrep_add_response(cursor, pinfo, skinny_conv, 0x013c);
3613 }
3614 
3615 /*
3616  * Message:   AuditParticipantResMessage
3617  * Opcode:    0x0040
3618  * Type:      IntraCCM
3619  * Direction: pbx2pbx
3620  * VarLength: no
3621  * MsgType:   response
3622  */
3623 static void
handle_AuditParticipantResMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)3624 handle_AuditParticipantResMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
3625 {
3626   guint32 conferenceId = 0;
3627   guint32 numberOfEntries = 0;
3628   ptvcursor_add(cursor, hf_skinny_audit_participant_result, 4, ENC_LITTLE_ENDIAN);
3629   ptvcursor_add(cursor, hf_skinny_last, 4, ENC_LITTLE_ENDIAN);
3630   conferenceId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
3631   ptvcursor_add(cursor, hf_skinny_conferenceId, 4, ENC_LITTLE_ENDIAN);
3632   numberOfEntries = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
3633   ptvcursor_add(cursor, hf_skinny_numberOfEntries, 4, ENC_LITTLE_ENDIAN);
3634   if (numberOfEntries <= 256) {
3635     guint32 counter_2 = 0;
3636     ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "participantEntry [ref:numberOfEntries = %d, max:256]", numberOfEntries);
3637     for (counter_2 = 0; counter_2 < 256; counter_2++) {
3638       if (counter_2 < numberOfEntries) {
3639         ptvcursor_add(cursor, hf_skinny_participantEntry, 4, ENC_LITTLE_ENDIAN);
3640       } else {
3641         ptvcursor_advance(cursor, 4);
3642       }
3643     }
3644     ptvcursor_pop_subtree(cursor);
3645   } else {
3646     ptvcursor_advance(cursor, (256 * 4));
3647   }
3648   skinny_reqrep_add_response(cursor, pinfo, skinny_conv, 0x013d ^ conferenceId);
3649 }
3650 
3651 /*
3652  * Message:   DeviceToUserDataMessageVersion1
3653  * Opcode:    0x0041
3654  * Type:      RegistrationAndManagement
3655  * Direction: dev2pbx
3656  * VarLength: no
3657  * MsgType:   request
3658  */
3659 static void
handle_DeviceToUserDataMessageVersion1(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)3660 handle_DeviceToUserDataMessageVersion1(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
3661 {
3662   guint32 dataLength = 0;
3663   {
3664     ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "deviceToUserDataVersion1");
3665     ptvcursor_add(cursor, hf_skinny_applicationId, 4, ENC_LITTLE_ENDIAN);
3666     si->lineId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
3667     ptvcursor_add(cursor, hf_skinny_lineInstance, 4, ENC_LITTLE_ENDIAN);
3668     si->callId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
3669     ptvcursor_add(cursor, hf_skinny_callReference, 4, ENC_LITTLE_ENDIAN);
3670     ptvcursor_add(cursor, hf_skinny_transactionId, 4, ENC_LITTLE_ENDIAN);
3671     dataLength = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
3672     ptvcursor_add(cursor, hf_skinny_dataLength, 4, ENC_LITTLE_ENDIAN);
3673     ptvcursor_add(cursor, hf_skinny_sequenceFlag, 4, ENC_LITTLE_ENDIAN);
3674     ptvcursor_add(cursor, hf_skinny_displayPriority, 4, ENC_LITTLE_ENDIAN);
3675     ptvcursor_add(cursor, hf_skinny_conferenceId, 4, ENC_LITTLE_ENDIAN);
3676     ptvcursor_add(cursor, hf_skinny_appInstanceID, 4, ENC_LITTLE_ENDIAN);
3677     ptvcursor_add(cursor, hf_skinny_routingID, 4, ENC_LITTLE_ENDIAN);
3678     dissect_skinny_xml(cursor, hf_skinny_xmldata, pinfo, dataLength, 2000);
3679     ptvcursor_pop_subtree(cursor);
3680   }
3681   skinny_reqrep_add_request(cursor, pinfo, skinny_conv, 0x0041);
3682 }
3683 
3684 /*
3685  * Message:   DeviceToUserDataResponseMessageVersion1
3686  * Opcode:    0x0042
3687  * Type:      RegistrationAndManagement
3688  * Direction: dev2pbx
3689  * VarLength: no
3690  * MsgType:   response
3691  */
3692 static void
handle_DeviceToUserDataResponseMessageVersion1(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)3693 handle_DeviceToUserDataResponseMessageVersion1(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
3694 {
3695   guint32 dataLength = 0;
3696   {
3697     ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "deviceToUserDataVersion1");
3698     ptvcursor_add(cursor, hf_skinny_applicationId, 4, ENC_LITTLE_ENDIAN);
3699     si->lineId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
3700     ptvcursor_add(cursor, hf_skinny_lineInstance, 4, ENC_LITTLE_ENDIAN);
3701     si->callId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
3702     ptvcursor_add(cursor, hf_skinny_callReference, 4, ENC_LITTLE_ENDIAN);
3703     ptvcursor_add(cursor, hf_skinny_transactionId, 4, ENC_LITTLE_ENDIAN);
3704     dataLength = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
3705     ptvcursor_add(cursor, hf_skinny_dataLength, 4, ENC_LITTLE_ENDIAN);
3706     ptvcursor_add(cursor, hf_skinny_sequenceFlag, 4, ENC_LITTLE_ENDIAN);
3707     ptvcursor_add(cursor, hf_skinny_displayPriority, 4, ENC_LITTLE_ENDIAN);
3708     ptvcursor_add(cursor, hf_skinny_conferenceId, 4, ENC_LITTLE_ENDIAN);
3709     ptvcursor_add(cursor, hf_skinny_appInstanceID, 4, ENC_LITTLE_ENDIAN);
3710     ptvcursor_add(cursor, hf_skinny_routingID, 4, ENC_LITTLE_ENDIAN);
3711     dissect_skinny_xml(cursor, hf_skinny_xmldata, pinfo, dataLength, 2000);
3712     ptvcursor_pop_subtree(cursor);
3713   }
3714   skinny_reqrep_add_response(cursor, pinfo, skinny_conv, 0x0041);
3715 }
3716 
3717 /*
3718  * Message:   CapabilitiesV2ResMessage
3719  * Opcode:    0x0043
3720  * Type:      RegistrationAndManagement
3721  * Direction: dev2pbx
3722  * VarLength: no
3723  * MsgType:   response
3724  */
3725 static void
handle_CapabilitiesV2ResMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)3726 handle_CapabilitiesV2ResMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
3727 {
3728   guint32 audioCapCount = 0;
3729   guint32 videoCapCount = 0;
3730   guint32 dataCapCount = 0;
3731   guint32 customPictureFormatCount = 0;
3732   guint32 serviceResourceCount = 0;
3733   guint32 layoutCount = 0;
3734   guint32 payloadCapability = 0;
3735   guint32 levelPreferenceCount = 0;
3736   audioCapCount = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
3737   ptvcursor_add(cursor, hf_skinny_audioCapCount, 4, ENC_LITTLE_ENDIAN);
3738   videoCapCount = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
3739   ptvcursor_add(cursor, hf_skinny_videoCapCount, 4, ENC_LITTLE_ENDIAN);
3740   dataCapCount = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
3741   ptvcursor_add(cursor, hf_skinny_dataCapCount, 4, ENC_LITTLE_ENDIAN);
3742   ptvcursor_add(cursor, hf_skinny_rtpPayloadFormat, 4, ENC_LITTLE_ENDIAN);
3743   customPictureFormatCount = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
3744   ptvcursor_add(cursor, hf_skinny_customPictureFormatCount, 4, ENC_LITTLE_ENDIAN);
3745   if (customPictureFormatCount <= 6) {
3746     guint32 counter_1 = 0;
3747     ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "customPictureFormat [ref:customPictureFormatCount = %d, max:6]", customPictureFormatCount);
3748     if (customPictureFormatCount && tvb_get_letohl(ptvcursor_tvbuff(cursor), 0) + 8 >= ptvcursor_current_offset(cursor) + (customPictureFormatCount * 20) && customPictureFormatCount <= 6) {
3749       for (counter_1 = 0; counter_1 < 6; counter_1++) {
3750         if (counter_1 < customPictureFormatCount) {
3751           ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "customPictureFormat [%d / %d]", counter_1 + 1, customPictureFormatCount);
3752           ptvcursor_add(cursor, hf_skinny_pictureWidth, 4, ENC_LITTLE_ENDIAN);
3753           ptvcursor_add(cursor, hf_skinny_pictureHeight, 4, ENC_LITTLE_ENDIAN);
3754           ptvcursor_add(cursor, hf_skinny_pixelAspectRatio, 4, ENC_LITTLE_ENDIAN);
3755           ptvcursor_add(cursor, hf_skinny_clockConversionCode, 4, ENC_LITTLE_ENDIAN);
3756           ptvcursor_add(cursor, hf_skinny_clockDivisor, 4, ENC_LITTLE_ENDIAN);
3757         } else {
3758           ptvcursor_advance(cursor, 20);
3759         }
3760         ptvcursor_pop_subtree(cursor);
3761       }
3762     }
3763     ptvcursor_pop_subtree(cursor);
3764   } else {
3765     ptvcursor_advance(cursor, (customPictureFormatCount * 20));
3766   }
3767   {
3768     ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "confResources");
3769     ptvcursor_add(cursor, hf_skinny_activeStreamsOnRegistration, 4, ENC_LITTLE_ENDIAN);
3770     ptvcursor_add(cursor, hf_skinny_maxBW, 4, ENC_LITTLE_ENDIAN);
3771     serviceResourceCount = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
3772     ptvcursor_add(cursor, hf_skinny_serviceResourceCount, 4, ENC_LITTLE_ENDIAN);
3773     if (serviceResourceCount <= 4) {
3774       guint32 counter_2 = 0;
3775       ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "serviceResource [ref:serviceResourceCount = %d, max:4]", serviceResourceCount);
3776       if (serviceResourceCount && tvb_get_letohl(ptvcursor_tvbuff(cursor), 0) + 8 >= ptvcursor_current_offset(cursor) + (serviceResourceCount * 24) && serviceResourceCount <= 4) {
3777         for (counter_2 = 0; counter_2 < 4; counter_2++) {
3778           if (counter_2 < serviceResourceCount) {
3779             ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "serviceResource [%d / %d]", counter_2 + 1, serviceResourceCount);
3780             layoutCount = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
3781             ptvcursor_add(cursor, hf_skinny_layoutCount, 4, ENC_LITTLE_ENDIAN);
3782             if (layoutCount <= 5) { /* tvb enum size guard */
3783               guint32 counter_7 = 0;
3784               ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "layouts [ref: layoutCount = %d, max:5]", layoutCount);
3785               for (counter_7 = 0; counter_7 < 5; counter_7++) {
3786                 if (counter_7 < layoutCount) {
3787                   ptvcursor_add(cursor, hf_skinny_layouts, 4, ENC_LITTLE_ENDIAN);
3788                 } else {
3789                   ptvcursor_advance(cursor, 4);
3790                 }
3791               }
3792               ptvcursor_pop_subtree(cursor);
3793             } else {
3794               ptvcursor_advance(cursor, (5 * 4)); /* guard kicked in -> skip the rest */;
3795             }
3796             ptvcursor_add(cursor, hf_skinny_serviceNum, 4, ENC_LITTLE_ENDIAN);
3797             ptvcursor_add(cursor, hf_skinny_maxStreams, 4, ENC_LITTLE_ENDIAN);
3798             ptvcursor_add(cursor, hf_skinny_maxConferences, 4, ENC_LITTLE_ENDIAN);
3799             ptvcursor_add(cursor, hf_skinny_activeConferenceOnRegistration, 4, ENC_LITTLE_ENDIAN);
3800           } else {
3801             ptvcursor_advance(cursor, 24);
3802           }
3803           ptvcursor_pop_subtree(cursor);
3804         }
3805       }
3806       ptvcursor_pop_subtree(cursor);
3807     } else {
3808       ptvcursor_advance(cursor, (serviceResourceCount * 24));
3809     }
3810     ptvcursor_pop_subtree(cursor);
3811   }
3812   if (audioCapCount <= 18) {
3813     guint32 counter_1 = 0;
3814     ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "audiocaps [ref:audioCapCount = %d, max:18]", audioCapCount);
3815     if (audioCapCount && tvb_get_letohl(ptvcursor_tvbuff(cursor), 0) + 8 >= ptvcursor_current_offset(cursor) + (audioCapCount * 16) && audioCapCount <= 18) {
3816       for (counter_1 = 0; counter_1 < 18; counter_1++) {
3817         if (counter_1 < audioCapCount) {
3818           ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "audiocaps [%d / %d]", counter_1 + 1, audioCapCount);
3819           payloadCapability = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
3820           ptvcursor_add(cursor, hf_skinny_payloadCapability, 4, ENC_LITTLE_ENDIAN);
3821           ptvcursor_add(cursor, hf_skinny_maxFramesPerPacket, 4, ENC_LITTLE_ENDIAN);
3822           if (payloadCapability == MEDIA_PAYLOAD_G7231)           {
3823             ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "payloadCapability is Media_Payload_G7231");
3824             ptvcursor_add(cursor, hf_skinny_g723BitRate, 4, ENC_LITTLE_ENDIAN);
3825             ptvcursor_pop_subtree(cursor);
3826             ptvcursor_advance(cursor, 4);
3827           } else if (payloadCapability == MEDIA_PAYLOAD_V150_LC_MODEMRELAY)           {
3828             ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "payloadCapability is Media_Payload_v150_LC_ModemRelay");
3829             {
3830               ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "modemRelay");
3831               ptvcursor_add(cursor, hf_skinny_capAndVer, 4, ENC_LITTLE_ENDIAN);
3832               ptvcursor_add(cursor, hf_skinny_modAnd2833, 4, ENC_LITTLE_ENDIAN);
3833               ptvcursor_pop_subtree(cursor);
3834             }
3835             ptvcursor_pop_subtree(cursor);
3836           } else if (payloadCapability == MEDIA_PAYLOAD_V150_LC_SPRT)           {
3837             ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "payloadCapability is Media_Payload_v150_LC_SPRT");
3838             {
3839               ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "sprtPayload");
3840               ptvcursor_add(cursor, hf_skinny_chan0MaxPayload, 2, ENC_LITTLE_ENDIAN);
3841               ptvcursor_add(cursor, hf_skinny_chan2MaxPayload, 2, ENC_LITTLE_ENDIAN);
3842               ptvcursor_add(cursor, hf_skinny_chan3MaxPayload, 2, ENC_LITTLE_ENDIAN);
3843               ptvcursor_add(cursor, hf_skinny_chan2MaxWindow, 2, ENC_LITTLE_ENDIAN);
3844               ptvcursor_pop_subtree(cursor);
3845             }
3846             ptvcursor_pop_subtree(cursor);
3847           } else if (payloadCapability == MEDIA_PAYLOAD_V150_LC_SSE)           {
3848             ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "payloadCapability is Media_Payload_v150_LC_SSE");
3849             {
3850               ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "sse");
3851               ptvcursor_add(cursor, hf_skinny_standard, 4, ENC_LITTLE_ENDIAN);
3852               ptvcursor_add(cursor, hf_skinny_vendor, 4, ENC_LITTLE_ENDIAN);
3853               ptvcursor_pop_subtree(cursor);
3854             }
3855             ptvcursor_pop_subtree(cursor);
3856           } else           {
3857             ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "any payloadCapability");
3858             {
3859               ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "codecParams");
3860               ptvcursor_add(cursor, hf_skinny_codecMode, 1, ENC_LITTLE_ENDIAN);
3861               ptvcursor_add(cursor, hf_skinny_dynamicPayload, 1, ENC_LITTLE_ENDIAN);
3862               ptvcursor_add(cursor, hf_skinny_codecParam1, 1, ENC_LITTLE_ENDIAN);
3863               ptvcursor_add(cursor, hf_skinny_codecParam2, 1, ENC_LITTLE_ENDIAN);
3864               ptvcursor_pop_subtree(cursor);
3865             }
3866             ptvcursor_pop_subtree(cursor);
3867             ptvcursor_advance(cursor, 4);
3868           }
3869         } else {
3870           ptvcursor_advance(cursor, 16);
3871         }
3872         ptvcursor_pop_subtree(cursor);
3873       }
3874     }
3875     ptvcursor_pop_subtree(cursor);
3876   } else {
3877     ptvcursor_advance(cursor, (audioCapCount * 16));
3878   }
3879   if (videoCapCount <= 10) {
3880     guint32 counter_1 = 0;
3881     ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "vidCaps [ref:videoCapCount = %d, max:10]", videoCapCount);
3882     if (videoCapCount && tvb_get_letohl(ptvcursor_tvbuff(cursor), 0) + 8 >= ptvcursor_current_offset(cursor) + (videoCapCount * 60) && videoCapCount <= 10) {
3883       for (counter_1 = 0; counter_1 < 10; counter_1++) {
3884         if (counter_1 < videoCapCount) {
3885           ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "vidCaps [%d / %d]", counter_1 + 1, videoCapCount);
3886           payloadCapability = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
3887           ptvcursor_add(cursor, hf_skinny_payloadCapability, 4, ENC_LITTLE_ENDIAN);
3888           ptvcursor_add(cursor, hf_skinny_videoCapabilityDirection, 4, ENC_LITTLE_ENDIAN);
3889           levelPreferenceCount = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
3890           ptvcursor_add(cursor, hf_skinny_levelPreferenceCount, 4, ENC_LITTLE_ENDIAN);
3891           if (levelPreferenceCount <= 4) {
3892             guint32 counter_5 = 0;
3893             ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "levelPreference [ref:levelPreferenceCount = %d, max:4]", levelPreferenceCount);
3894             if (levelPreferenceCount && tvb_get_letohl(ptvcursor_tvbuff(cursor), 0) + 8 >= ptvcursor_current_offset(cursor) + (levelPreferenceCount * 24) && levelPreferenceCount <= 4) {
3895               for (counter_5 = 0; counter_5 < 4; counter_5++) {
3896                 if (counter_5 < levelPreferenceCount) {
3897                   ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "levelPreference [%d / %d]", counter_5 + 1, levelPreferenceCount);
3898                   ptvcursor_add(cursor, hf_skinny_transmitPreference, 4, ENC_LITTLE_ENDIAN);
3899                   ptvcursor_add(cursor, hf_skinny_format, 4, ENC_LITTLE_ENDIAN);
3900                   ptvcursor_add(cursor, hf_skinny_maxBitRate, 4, ENC_LITTLE_ENDIAN);
3901                   ptvcursor_add(cursor, hf_skinny_minBitRate, 4, ENC_LITTLE_ENDIAN);
3902                   ptvcursor_add(cursor, hf_skinny_MPI, 4, ENC_LITTLE_ENDIAN);
3903                   ptvcursor_add(cursor, hf_skinny_serviceNumber, 4, ENC_LITTLE_ENDIAN);
3904                 } else {
3905                   ptvcursor_advance(cursor, 24);
3906                 }
3907                 ptvcursor_pop_subtree(cursor);
3908               }
3909             }
3910             ptvcursor_pop_subtree(cursor);
3911           } else {
3912             ptvcursor_advance(cursor, (levelPreferenceCount * 24));
3913           }
3914           if (payloadCapability == MEDIA_PAYLOAD_H261)           {
3915             ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "payloadCapability is Media_Payload_H261");
3916             {
3917               ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "h261VideoCapability");
3918               ptvcursor_add(cursor, hf_skinny_temporalSpatialTradeOffCapability, 4, ENC_LITTLE_ENDIAN);
3919               ptvcursor_add(cursor, hf_skinny_stillImageTransmission, 4, ENC_LITTLE_ENDIAN);
3920               ptvcursor_pop_subtree(cursor);
3921             }
3922             ptvcursor_pop_subtree(cursor);
3923             ptvcursor_advance(cursor, 16);
3924           } else if (payloadCapability == MEDIA_PAYLOAD_H263)           {
3925             ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "payloadCapability is Media_Payload_H263");
3926             {
3927               ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "h263VideoCapability");
3928               ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "h263_capability_bitfield");
3929               ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit1, 4, ENC_LITTLE_ENDIAN);
3930               ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit2, 4, ENC_LITTLE_ENDIAN);
3931               ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit3, 4, ENC_LITTLE_ENDIAN);
3932               ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit4, 4, ENC_LITTLE_ENDIAN);
3933               ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit5, 4, ENC_LITTLE_ENDIAN);
3934               ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit6, 4, ENC_LITTLE_ENDIAN);
3935               ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit7, 4, ENC_LITTLE_ENDIAN);
3936               ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit8, 4, ENC_LITTLE_ENDIAN);
3937               ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit9, 4, ENC_LITTLE_ENDIAN);
3938               ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit10, 4, ENC_LITTLE_ENDIAN);
3939               ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit11, 4, ENC_LITTLE_ENDIAN);
3940               ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit12, 4, ENC_LITTLE_ENDIAN);
3941               ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit13, 4, ENC_LITTLE_ENDIAN);
3942               ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit14, 4, ENC_LITTLE_ENDIAN);
3943               ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit15, 4, ENC_LITTLE_ENDIAN);
3944               ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit16, 4, ENC_LITTLE_ENDIAN);
3945               ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit17, 4, ENC_LITTLE_ENDIAN);
3946               ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit18, 4, ENC_LITTLE_ENDIAN);
3947               ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit19, 4, ENC_LITTLE_ENDIAN);
3948               ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit20, 4, ENC_LITTLE_ENDIAN);
3949               ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit21, 4, ENC_LITTLE_ENDIAN);
3950               ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit22, 4, ENC_LITTLE_ENDIAN);
3951               ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit23, 4, ENC_LITTLE_ENDIAN);
3952               ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit24, 4, ENC_LITTLE_ENDIAN);
3953               ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit25, 4, ENC_LITTLE_ENDIAN);
3954               ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit26, 4, ENC_LITTLE_ENDIAN);
3955               ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit27, 4, ENC_LITTLE_ENDIAN);
3956               ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit28, 4, ENC_LITTLE_ENDIAN);
3957               ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit29, 4, ENC_LITTLE_ENDIAN);
3958               ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit30, 4, ENC_LITTLE_ENDIAN);
3959               ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit31, 4, ENC_LITTLE_ENDIAN);
3960               ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit32, 4, ENC_LITTLE_ENDIAN);
3961               ptvcursor_advance(cursor, 4);
3962               ptvcursor_pop_subtree(cursor); /* end bitfield: h263_capability_bitfield */
3963               ptvcursor_add(cursor, hf_skinny_annexNandWFutureUse, 4, ENC_LITTLE_ENDIAN);
3964               ptvcursor_pop_subtree(cursor);
3965             }
3966             ptvcursor_pop_subtree(cursor);
3967             ptvcursor_advance(cursor, 16);
3968           } else if (payloadCapability == MEDIA_PAYLOAD_H264)           {
3969             ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "payloadCapability is Media_Payload_H264");
3970             {
3971               ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "h264VideoCapability");
3972               ptvcursor_add(cursor, hf_skinny_profile, 4, ENC_LITTLE_ENDIAN);
3973               ptvcursor_add(cursor, hf_skinny_level, 4, ENC_LITTLE_ENDIAN);
3974               ptvcursor_add(cursor, hf_skinny_customMaxMBPS, 4, ENC_LITTLE_ENDIAN);
3975               ptvcursor_add(cursor, hf_skinny_customMaxFS, 4, ENC_LITTLE_ENDIAN);
3976               ptvcursor_add(cursor, hf_skinny_customMaxDPB, 4, ENC_LITTLE_ENDIAN);
3977               ptvcursor_add(cursor, hf_skinny_customMaxBRandCPB, 4, ENC_LITTLE_ENDIAN);
3978               ptvcursor_pop_subtree(cursor);
3979             }
3980             ptvcursor_pop_subtree(cursor);
3981           } else if (payloadCapability == MEDIA_PAYLOAD_VIEO)           {
3982             ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "payloadCapability is Media_Payload_Vieo");
3983             {
3984               ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "vieoVideoCapability");
3985               ptvcursor_add(cursor, hf_skinny_modelNumber, 4, ENC_LITTLE_ENDIAN);
3986               ptvcursor_add(cursor, hf_skinny_bandwidth, 4, ENC_LITTLE_ENDIAN);
3987               ptvcursor_pop_subtree(cursor);
3988             }
3989             ptvcursor_pop_subtree(cursor);
3990             ptvcursor_advance(cursor, 16);
3991           }
3992         } else {
3993           ptvcursor_advance(cursor, 60);
3994         }
3995         ptvcursor_pop_subtree(cursor);
3996       }
3997     }
3998     ptvcursor_pop_subtree(cursor);
3999   } else {
4000     ptvcursor_advance(cursor, (videoCapCount * 60));
4001   }
4002   if (dataCapCount <= 5) {
4003     guint32 counter_1 = 0;
4004     ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "dataCaps [ref:dataCapCount = %d, max:5]", dataCapCount);
4005     if (dataCapCount && tvb_get_letohl(ptvcursor_tvbuff(cursor), 0) + 8 >= ptvcursor_current_offset(cursor) + (dataCapCount * 16) && dataCapCount <= 5) {
4006       for (counter_1 = 0; counter_1 < 5; counter_1++) {
4007         if (counter_1 < dataCapCount) {
4008           ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "dataCaps [%d / %d]", counter_1 + 1, dataCapCount);
4009           ptvcursor_add(cursor, hf_skinny_payloadCapability, 4, ENC_LITTLE_ENDIAN);
4010           ptvcursor_add(cursor, hf_skinny_dataCapabilityDirection, 4, ENC_LITTLE_ENDIAN);
4011           ptvcursor_add(cursor, hf_skinny_protocolDependentData, 4, ENC_LITTLE_ENDIAN);
4012           ptvcursor_add(cursor, hf_skinny_maxBitRate, 4, ENC_LITTLE_ENDIAN);
4013         } else {
4014           ptvcursor_advance(cursor, 16);
4015         }
4016         ptvcursor_pop_subtree(cursor);
4017       }
4018     }
4019     ptvcursor_pop_subtree(cursor);
4020   } else {
4021     ptvcursor_advance(cursor, (dataCapCount * 16));
4022   }
4023   skinny_reqrep_add_response(cursor, pinfo, skinny_conv, 0x009b);
4024 }
4025 
4026 /*
4027  * Message:   CapabilitiesV3ResMessage
4028  * Opcode:    0x0044
4029  * Type:      RegistrationAndManagement
4030  * Direction: dev2pbx
4031  * VarLength: yes
4032  * MsgType:   response
4033  */
4034 static void
handle_CapabilitiesV3ResMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)4035 handle_CapabilitiesV3ResMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
4036 {
4037   guint32 audioCapCount = 0;
4038   guint32 videoCapCount = 0;
4039   guint32 dataCapCount = 0;
4040   guint32 customPictureFormatCount = 0;
4041   guint32 serviceResourceCount = 0;
4042   guint32 layoutCount = 0;
4043   guint32 payloadCapability = 0;
4044   guint32 hdr_version = tvb_get_letohl(ptvcursor_tvbuff(cursor), 4);
4045   guint32 levelPreferenceCount = 0;
4046   audioCapCount = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
4047   ptvcursor_add(cursor, hf_skinny_audioCapCount, 4, ENC_LITTLE_ENDIAN);
4048   videoCapCount = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
4049   ptvcursor_add(cursor, hf_skinny_videoCapCount, 4, ENC_LITTLE_ENDIAN);
4050   dataCapCount = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
4051   ptvcursor_add(cursor, hf_skinny_dataCapCount, 4, ENC_LITTLE_ENDIAN);
4052   ptvcursor_add(cursor, hf_skinny_rtpPayloadFormat, 4, ENC_LITTLE_ENDIAN);
4053   customPictureFormatCount = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
4054   ptvcursor_add(cursor, hf_skinny_customPictureFormatCount, 4, ENC_LITTLE_ENDIAN);
4055   if (customPictureFormatCount <= 6) {
4056     guint32 counter_1 = 0;
4057     ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "customPictureFormat [ref:customPictureFormatCount = %d, max:6]", customPictureFormatCount);
4058     if (customPictureFormatCount && tvb_get_letohl(ptvcursor_tvbuff(cursor), 0) + 8 >= ptvcursor_current_offset(cursor) + (customPictureFormatCount * 20) && customPictureFormatCount <= 6) {
4059       for (counter_1 = 0; counter_1 < 6; counter_1++) {
4060         ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "customPictureFormat [%d / %d]", counter_1 + 1, customPictureFormatCount);
4061         ptvcursor_add(cursor, hf_skinny_pictureWidth, 4, ENC_LITTLE_ENDIAN);
4062         ptvcursor_add(cursor, hf_skinny_pictureHeight, 4, ENC_LITTLE_ENDIAN);
4063         ptvcursor_add(cursor, hf_skinny_pixelAspectRatio, 4, ENC_LITTLE_ENDIAN);
4064         ptvcursor_add(cursor, hf_skinny_clockConversionCode, 4, ENC_LITTLE_ENDIAN);
4065         ptvcursor_add(cursor, hf_skinny_clockDivisor, 4, ENC_LITTLE_ENDIAN);
4066         ptvcursor_pop_subtree(cursor);
4067       }
4068     }
4069     ptvcursor_pop_subtree(cursor);
4070   } else {
4071     ptvcursor_advance(cursor, (customPictureFormatCount * 20));
4072   }
4073   {
4074     ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "confResources");
4075     ptvcursor_add(cursor, hf_skinny_activeStreamsOnRegistration, 4, ENC_LITTLE_ENDIAN);
4076     ptvcursor_add(cursor, hf_skinny_maxBW, 4, ENC_LITTLE_ENDIAN);
4077     serviceResourceCount = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
4078     ptvcursor_add(cursor, hf_skinny_serviceResourceCount, 4, ENC_LITTLE_ENDIAN);
4079     if (serviceResourceCount <= 4) {
4080       guint32 counter_2 = 0;
4081       ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "serviceResource [ref:serviceResourceCount = %d, max:4]", serviceResourceCount);
4082       if (serviceResourceCount && tvb_get_letohl(ptvcursor_tvbuff(cursor), 0) + 8 >= ptvcursor_current_offset(cursor) + (serviceResourceCount * 24) && serviceResourceCount <= 4) {
4083         for (counter_2 = 0; counter_2 < 4; counter_2++) {
4084           ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "serviceResource [%d / %d]", counter_2 + 1, serviceResourceCount);
4085           layoutCount = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
4086           ptvcursor_add(cursor, hf_skinny_layoutCount, 4, ENC_LITTLE_ENDIAN);
4087           if (layoutCount <= 5) { /* tvb enum size guard */
4088             guint32 counter_6 = 0;
4089             ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "layouts [ref: layoutCount = %d, max:layoutCount]", layoutCount);
4090             for (counter_6 = 0; counter_6 < layoutCount; counter_6++) {
4091               ptvcursor_add(cursor, hf_skinny_layouts, 4, ENC_LITTLE_ENDIAN);
4092             }
4093             ptvcursor_pop_subtree(cursor);
4094           } else {
4095             ptvcursor_advance(cursor, (layoutCount * 4)); /* guard kicked in -> skip the rest */;
4096           }
4097           ptvcursor_add(cursor, hf_skinny_serviceNum, 4, ENC_LITTLE_ENDIAN);
4098           ptvcursor_add(cursor, hf_skinny_maxStreams, 4, ENC_LITTLE_ENDIAN);
4099           ptvcursor_add(cursor, hf_skinny_maxConferences, 4, ENC_LITTLE_ENDIAN);
4100           ptvcursor_add(cursor, hf_skinny_activeConferenceOnRegistration, 4, ENC_LITTLE_ENDIAN);
4101           ptvcursor_pop_subtree(cursor);
4102         }
4103       }
4104       ptvcursor_pop_subtree(cursor);
4105     } else {
4106       ptvcursor_advance(cursor, (serviceResourceCount * 24));
4107     }
4108     ptvcursor_pop_subtree(cursor);
4109   }
4110   if (audioCapCount <= 18) {
4111     guint32 counter_1 = 0;
4112     ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "audiocaps [ref:audioCapCount = %d, max:18]", audioCapCount);
4113     if (audioCapCount && tvb_get_letohl(ptvcursor_tvbuff(cursor), 0) + 8 >= ptvcursor_current_offset(cursor) + (audioCapCount * 16) && audioCapCount <= 18) {
4114       for (counter_1 = 0; counter_1 < 18; counter_1++) {
4115         ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "audiocaps [%d / %d]", counter_1 + 1, audioCapCount);
4116         payloadCapability = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
4117         ptvcursor_add(cursor, hf_skinny_payloadCapability, 4, ENC_LITTLE_ENDIAN);
4118         ptvcursor_add(cursor, hf_skinny_maxFramesPerPacket, 4, ENC_LITTLE_ENDIAN);
4119         if (payloadCapability == MEDIA_PAYLOAD_G7231)         {
4120           ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "payloadCapability is Media_Payload_G7231");
4121           ptvcursor_add(cursor, hf_skinny_g723BitRate, 4, ENC_LITTLE_ENDIAN);
4122           ptvcursor_pop_subtree(cursor);
4123           ptvcursor_advance(cursor, 4);
4124         } else if (payloadCapability == MEDIA_PAYLOAD_V150_LC_MODEMRELAY)         {
4125           ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "payloadCapability is Media_Payload_v150_LC_ModemRelay");
4126           {
4127             ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "modemRelay");
4128             ptvcursor_add(cursor, hf_skinny_capAndVer, 4, ENC_LITTLE_ENDIAN);
4129             ptvcursor_add(cursor, hf_skinny_modAnd2833, 4, ENC_LITTLE_ENDIAN);
4130             ptvcursor_pop_subtree(cursor);
4131           }
4132           ptvcursor_pop_subtree(cursor);
4133         } else if (payloadCapability == MEDIA_PAYLOAD_V150_LC_SPRT)         {
4134           ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "payloadCapability is Media_Payload_v150_LC_SPRT");
4135           {
4136             ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "sprtPayload");
4137             ptvcursor_add(cursor, hf_skinny_chan0MaxPayload, 2, ENC_LITTLE_ENDIAN);
4138             ptvcursor_add(cursor, hf_skinny_chan2MaxPayload, 2, ENC_LITTLE_ENDIAN);
4139             ptvcursor_add(cursor, hf_skinny_chan3MaxPayload, 2, ENC_LITTLE_ENDIAN);
4140             ptvcursor_add(cursor, hf_skinny_chan2MaxWindow, 2, ENC_LITTLE_ENDIAN);
4141             ptvcursor_pop_subtree(cursor);
4142           }
4143           ptvcursor_pop_subtree(cursor);
4144         } else if (payloadCapability == MEDIA_PAYLOAD_V150_LC_SSE)         {
4145           ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "payloadCapability is Media_Payload_v150_LC_SSE");
4146           {
4147             ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "sse");
4148             ptvcursor_add(cursor, hf_skinny_standard, 4, ENC_LITTLE_ENDIAN);
4149             ptvcursor_add(cursor, hf_skinny_vendor, 4, ENC_LITTLE_ENDIAN);
4150             ptvcursor_pop_subtree(cursor);
4151           }
4152           ptvcursor_pop_subtree(cursor);
4153         } else         {
4154           ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "any payloadCapability");
4155           {
4156             ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "codecParams");
4157             ptvcursor_add(cursor, hf_skinny_codecMode, 1, ENC_LITTLE_ENDIAN);
4158             ptvcursor_add(cursor, hf_skinny_dynamicPayload, 1, ENC_LITTLE_ENDIAN);
4159             ptvcursor_add(cursor, hf_skinny_codecParam1, 1, ENC_LITTLE_ENDIAN);
4160             ptvcursor_add(cursor, hf_skinny_codecParam2, 1, ENC_LITTLE_ENDIAN);
4161             ptvcursor_pop_subtree(cursor);
4162           }
4163           ptvcursor_pop_subtree(cursor);
4164           ptvcursor_advance(cursor, 4);
4165         }
4166         ptvcursor_pop_subtree(cursor);
4167       }
4168     }
4169     ptvcursor_pop_subtree(cursor);
4170   } else {
4171     ptvcursor_advance(cursor, (audioCapCount * 16));
4172   }
4173   if (videoCapCount <= 10) {
4174     guint32 counter_1 = 0;
4175     ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "vidCaps [ref:videoCapCount = %d, max:10]", videoCapCount);
4176     if (videoCapCount && tvb_get_letohl(ptvcursor_tvbuff(cursor), 0) + 8 >= ptvcursor_current_offset(cursor) + (videoCapCount * 4) && videoCapCount <= 10) {
4177       for (counter_1 = 0; counter_1 < 10; counter_1++) {
4178         ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "vidCaps [%d / %d]", counter_1 + 1, videoCapCount);
4179         payloadCapability = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
4180         ptvcursor_add(cursor, hf_skinny_payloadCapability, 4, ENC_LITTLE_ENDIAN);
4181         ptvcursor_add(cursor, hf_skinny_videoCapabilityDirection, 4, ENC_LITTLE_ENDIAN);
4182         levelPreferenceCount = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
4183         ptvcursor_add(cursor, hf_skinny_levelPreferenceCount, 4, ENC_LITTLE_ENDIAN);
4184         if (levelPreferenceCount <= 4) {
4185           guint32 counter_4 = 0;
4186           ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "levelPreference [ref:levelPreferenceCount = %d, max:4]", levelPreferenceCount);
4187           if (levelPreferenceCount && tvb_get_letohl(ptvcursor_tvbuff(cursor), 0) + 8 >= ptvcursor_current_offset(cursor) + (levelPreferenceCount * 24) && levelPreferenceCount <= 4) {
4188             for (counter_4 = 0; counter_4 < 4; counter_4++) {
4189               ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "levelPreference [%d / %d]", counter_4 + 1, levelPreferenceCount);
4190               ptvcursor_add(cursor, hf_skinny_transmitPreference, 4, ENC_LITTLE_ENDIAN);
4191               ptvcursor_add(cursor, hf_skinny_format, 4, ENC_LITTLE_ENDIAN);
4192               ptvcursor_add(cursor, hf_skinny_maxBitRate, 4, ENC_LITTLE_ENDIAN);
4193               ptvcursor_add(cursor, hf_skinny_minBitRate, 4, ENC_LITTLE_ENDIAN);
4194               ptvcursor_add(cursor, hf_skinny_MPI, 4, ENC_LITTLE_ENDIAN);
4195               ptvcursor_add(cursor, hf_skinny_serviceNumber, 4, ENC_LITTLE_ENDIAN);
4196               ptvcursor_pop_subtree(cursor);
4197             }
4198           }
4199           ptvcursor_pop_subtree(cursor);
4200         } else {
4201           ptvcursor_advance(cursor, (levelPreferenceCount * 24));
4202         }
4203         ptvcursor_add(cursor, hf_skinny_encryptionCapability, 4, ENC_LITTLE_ENDIAN);
4204         if (payloadCapability == MEDIA_PAYLOAD_H261)         {
4205           ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "payloadCapability is Media_Payload_H261");
4206           {
4207             ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "h261VideoCapability");
4208             ptvcursor_add(cursor, hf_skinny_temporalSpatialTradeOffCapability, 4, ENC_LITTLE_ENDIAN);
4209             ptvcursor_add(cursor, hf_skinny_stillImageTransmission, 4, ENC_LITTLE_ENDIAN);
4210             ptvcursor_pop_subtree(cursor);
4211           }
4212           ptvcursor_pop_subtree(cursor);
4213           ptvcursor_advance(cursor, 16);
4214         } else if (payloadCapability == MEDIA_PAYLOAD_H263)         {
4215           ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "payloadCapability is Media_Payload_H263");
4216           {
4217             ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "h263VideoCapability");
4218             ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "h263_capability_bitfield");
4219             ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit1, 4, ENC_LITTLE_ENDIAN);
4220             ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit2, 4, ENC_LITTLE_ENDIAN);
4221             ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit3, 4, ENC_LITTLE_ENDIAN);
4222             ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit4, 4, ENC_LITTLE_ENDIAN);
4223             ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit5, 4, ENC_LITTLE_ENDIAN);
4224             ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit6, 4, ENC_LITTLE_ENDIAN);
4225             ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit7, 4, ENC_LITTLE_ENDIAN);
4226             ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit8, 4, ENC_LITTLE_ENDIAN);
4227             ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit9, 4, ENC_LITTLE_ENDIAN);
4228             ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit10, 4, ENC_LITTLE_ENDIAN);
4229             ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit11, 4, ENC_LITTLE_ENDIAN);
4230             ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit12, 4, ENC_LITTLE_ENDIAN);
4231             ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit13, 4, ENC_LITTLE_ENDIAN);
4232             ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit14, 4, ENC_LITTLE_ENDIAN);
4233             ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit15, 4, ENC_LITTLE_ENDIAN);
4234             ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit16, 4, ENC_LITTLE_ENDIAN);
4235             ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit17, 4, ENC_LITTLE_ENDIAN);
4236             ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit18, 4, ENC_LITTLE_ENDIAN);
4237             ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit19, 4, ENC_LITTLE_ENDIAN);
4238             ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit20, 4, ENC_LITTLE_ENDIAN);
4239             ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit21, 4, ENC_LITTLE_ENDIAN);
4240             ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit22, 4, ENC_LITTLE_ENDIAN);
4241             ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit23, 4, ENC_LITTLE_ENDIAN);
4242             ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit24, 4, ENC_LITTLE_ENDIAN);
4243             ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit25, 4, ENC_LITTLE_ENDIAN);
4244             ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit26, 4, ENC_LITTLE_ENDIAN);
4245             ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit27, 4, ENC_LITTLE_ENDIAN);
4246             ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit28, 4, ENC_LITTLE_ENDIAN);
4247             ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit29, 4, ENC_LITTLE_ENDIAN);
4248             ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit30, 4, ENC_LITTLE_ENDIAN);
4249             ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit31, 4, ENC_LITTLE_ENDIAN);
4250             ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit32, 4, ENC_LITTLE_ENDIAN);
4251             ptvcursor_advance(cursor, 4);
4252             ptvcursor_pop_subtree(cursor); /* end bitfield: h263_capability_bitfield */
4253             ptvcursor_add(cursor, hf_skinny_annexNandWFutureUse, 4, ENC_LITTLE_ENDIAN);
4254             ptvcursor_pop_subtree(cursor);
4255           }
4256           ptvcursor_pop_subtree(cursor);
4257           ptvcursor_advance(cursor, 16);
4258         } else if (payloadCapability == MEDIA_PAYLOAD_H264)         {
4259           ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "payloadCapability is Media_Payload_H264");
4260           {
4261             ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "h264VideoCapability");
4262             ptvcursor_add(cursor, hf_skinny_profile, 4, ENC_LITTLE_ENDIAN);
4263             ptvcursor_add(cursor, hf_skinny_level, 4, ENC_LITTLE_ENDIAN);
4264             ptvcursor_add(cursor, hf_skinny_customMaxMBPS, 4, ENC_LITTLE_ENDIAN);
4265             ptvcursor_add(cursor, hf_skinny_customMaxFS, 4, ENC_LITTLE_ENDIAN);
4266             ptvcursor_add(cursor, hf_skinny_customMaxDPB, 4, ENC_LITTLE_ENDIAN);
4267             ptvcursor_add(cursor, hf_skinny_customMaxBRandCPB, 4, ENC_LITTLE_ENDIAN);
4268             ptvcursor_pop_subtree(cursor);
4269           }
4270           ptvcursor_pop_subtree(cursor);
4271         } else if (payloadCapability == MEDIA_PAYLOAD_VIEO)         {
4272           ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "payloadCapability is Media_Payload_Vieo");
4273           {
4274             ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "vieoVideoCapability");
4275             ptvcursor_add(cursor, hf_skinny_modelNumber, 4, ENC_LITTLE_ENDIAN);
4276             ptvcursor_add(cursor, hf_skinny_bandwidth, 4, ENC_LITTLE_ENDIAN);
4277             ptvcursor_pop_subtree(cursor);
4278           }
4279           ptvcursor_pop_subtree(cursor);
4280           ptvcursor_advance(cursor, 16);
4281         }
4282         ptvcursor_add(cursor, hf_skinny_ipAddressingMode, 4, ENC_LITTLE_ENDIAN);
4283         if (hdr_version >= V16_MSG_TYPE) {
4284           ptvcursor_add(cursor, hf_skinny_ipAddressingMode, 4, ENC_LITTLE_ENDIAN);
4285         }
4286         ptvcursor_pop_subtree(cursor);
4287       }
4288     }
4289     ptvcursor_pop_subtree(cursor);
4290   } else {
4291     ptvcursor_advance(cursor, (videoCapCount * 4));
4292   }
4293   if (dataCapCount <= 5) {
4294     guint32 counter_1 = 0;
4295     ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "dataCaps [ref:dataCapCount = %d, max:5]", dataCapCount);
4296     if (dataCapCount && tvb_get_letohl(ptvcursor_tvbuff(cursor), 0) + 8 >= ptvcursor_current_offset(cursor) + (dataCapCount * 20) && dataCapCount <= 5) {
4297       for (counter_1 = 0; counter_1 < 5; counter_1++) {
4298         ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "dataCaps [%d / %d]", counter_1 + 1, dataCapCount);
4299         ptvcursor_add(cursor, hf_skinny_payloadCapability, 4, ENC_LITTLE_ENDIAN);
4300         ptvcursor_add(cursor, hf_skinny_dataCapabilityDirection, 4, ENC_LITTLE_ENDIAN);
4301         ptvcursor_add(cursor, hf_skinny_protocolDependentData, 4, ENC_LITTLE_ENDIAN);
4302         ptvcursor_add(cursor, hf_skinny_maxBitRate, 4, ENC_LITTLE_ENDIAN);
4303         ptvcursor_add(cursor, hf_skinny_encryptionCapability, 4, ENC_LITTLE_ENDIAN);
4304         ptvcursor_pop_subtree(cursor);
4305       }
4306     }
4307     ptvcursor_pop_subtree(cursor);
4308   } else {
4309     ptvcursor_advance(cursor, (dataCapCount * 20));
4310   }
4311   skinny_reqrep_add_response(cursor, pinfo, skinny_conv, 0x009b);
4312 }
4313 
4314 /*
4315  * Message:   PortResMessage
4316  * Opcode:    0x0045
4317  * Type:      MediaControl
4318  * Direction: dev2pbx
4319  * VarLength: no
4320  * MsgType:   response
4321  */
4322 static void
handle_PortResMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)4323 handle_PortResMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
4324 {
4325   guint32 hdr_version = tvb_get_letohl(ptvcursor_tvbuff(cursor), 4);
4326   guint32 callReference = 0;
4327   address ipAddr;
4328   char *ipAddr_str = NULL;
4329   guint32 portNumber = 0;
4330 
4331   ptvcursor_add(cursor, hf_skinny_conferenceId, 4, ENC_LITTLE_ENDIAN);
4332   callReference = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
4333   si->callId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
4334   ptvcursor_add(cursor, hf_skinny_callReference, 4, ENC_LITTLE_ENDIAN);
4335   si->passThroughPartyId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
4336   ptvcursor_add(cursor, hf_skinny_passThroughPartyId, 4, ENC_LITTLE_ENDIAN);
4337   read_skinny_ipv4or6(cursor, &ipAddr);
4338   dissect_skinny_ipv4or6(cursor, hf_skinny_ipAddr_ipv4, hf_skinny_ipAddr_ipv6);
4339   portNumber = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
4340   ptvcursor_add(cursor, hf_skinny_portNumber, 4, ENC_LITTLE_ENDIAN);
4341   srtp_add_address(pinfo, PT_UDP, &ipAddr, portNumber, 0, "SKINNY", pinfo->num, false, NULL, NULL, NULL);
4342   ipAddr_str = address_to_display(NULL, &ipAddr);
4343   si->additionalInfo = g_strdup_printf("%s:%d", ipAddr_str, portNumber);
4344   wmem_free(NULL, ipAddr_str);
4345   ptvcursor_add(cursor, hf_skinny_RTCPPortNumber, 4, ENC_LITTLE_ENDIAN);
4346   if (hdr_version >= V19_MSG_TYPE) {
4347     ptvcursor_add(cursor, hf_skinny_mediaType, 4, ENC_LITTLE_ENDIAN);
4348   }
4349   skinny_reqrep_add_response(cursor, pinfo, skinny_conv, 0x014b ^ callReference);
4350 }
4351 
4352 /*
4353  * Message:   QoSResvNotifyMessage
4354  * Opcode:    0x0046
4355  * Type:      IntraCCM
4356  * Direction: pbx2pbx
4357  * VarLength: no
4358  * MsgType:   event
4359  */
4360 static void
handle_QoSResvNotifyMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)4361 handle_QoSResvNotifyMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
4362 {
4363   address remoteIpAddr;
4364   char *remoteIpAddr_str = NULL;
4365   guint32 remotePortNumber = 0;
4366   ptvcursor_add(cursor, hf_skinny_conferenceId, 4, ENC_LITTLE_ENDIAN);
4367   si->callId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
4368   ptvcursor_add(cursor, hf_skinny_callReference, 4, ENC_LITTLE_ENDIAN);
4369   si->passThroughPartyId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
4370   ptvcursor_add(cursor, hf_skinny_passThroughPartyId, 4, ENC_LITTLE_ENDIAN);
4371   read_skinny_ipv4or6(cursor, &remoteIpAddr);
4372   dissect_skinny_ipv4or6(cursor, hf_skinny_remoteIpAddr_ipv4, hf_skinny_remoteIpAddr_ipv6);
4373   remotePortNumber = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
4374   ptvcursor_add(cursor, hf_skinny_remotePortNumber, 4, ENC_LITTLE_ENDIAN);
4375   srtp_add_address(pinfo, PT_UDP, &remoteIpAddr, remotePortNumber, 0, "SKINNY", pinfo->num, false, NULL, NULL, NULL);
4376   remoteIpAddr_str = address_to_display(NULL, &remoteIpAddr);
4377   si->additionalInfo = g_strdup_printf("%s:%d", remoteIpAddr_str, remotePortNumber);
4378   wmem_free(NULL, remoteIpAddr_str);
4379   ptvcursor_add(cursor, hf_skinny_direction, 4, ENC_LITTLE_ENDIAN);
4380 }
4381 
4382 /*
4383  * Message:   QoSErrorNotifyMessage
4384  * Opcode:    0x0047
4385  * Type:      IntraCCM
4386  * Direction: pbx2pbx
4387  * VarLength: no
4388  * MsgType:   event
4389  */
4390 static void
handle_QoSErrorNotifyMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)4391 handle_QoSErrorNotifyMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
4392 {
4393   address remoteIpAddr;
4394   char *remoteIpAddr_str = NULL;
4395   guint32 remotePortNumber = 0;
4396   ptvcursor_add(cursor, hf_skinny_conferenceId, 4, ENC_LITTLE_ENDIAN);
4397   si->callId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
4398   ptvcursor_add(cursor, hf_skinny_callReference, 4, ENC_LITTLE_ENDIAN);
4399   si->passThroughPartyId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
4400   ptvcursor_add(cursor, hf_skinny_passThroughPartyId, 4, ENC_LITTLE_ENDIAN);
4401   read_skinny_ipv4or6(cursor, &remoteIpAddr);
4402   dissect_skinny_ipv4or6(cursor, hf_skinny_remoteIpAddr_ipv4, hf_skinny_remoteIpAddr_ipv6);
4403   remotePortNumber = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
4404   ptvcursor_add(cursor, hf_skinny_remotePortNumber, 4, ENC_LITTLE_ENDIAN);
4405   srtp_add_address(pinfo, PT_UDP, &remoteIpAddr, remotePortNumber, 0, "SKINNY", pinfo->num, false, NULL, NULL, NULL);
4406   remoteIpAddr_str = address_to_display(NULL, &remoteIpAddr);
4407   si->additionalInfo = g_strdup_printf("%s:%d", remoteIpAddr_str, remotePortNumber);
4408   wmem_free(NULL, remoteIpAddr_str);
4409   ptvcursor_add(cursor, hf_skinny_direction, 4, ENC_LITTLE_ENDIAN);
4410   ptvcursor_add(cursor, hf_skinny_errorCode, 4, ENC_LITTLE_ENDIAN);
4411   ptvcursor_add(cursor, hf_skinny_failureNodeIpAddr, 4, ENC_LITTLE_ENDIAN);
4412   ptvcursor_add(cursor, hf_skinny_rsvpErrorCode, 4, ENC_LITTLE_ENDIAN);
4413   ptvcursor_add(cursor, hf_skinny_rsvpErrorSubCodeVal, 4, ENC_LITTLE_ENDIAN);
4414   ptvcursor_add(cursor, hf_skinny_rsvpErrorFlag, 4, ENC_LITTLE_ENDIAN);
4415 }
4416 
4417 /*
4418  * Message:   SubscriptionStatReqMessage
4419  * Opcode:    0x0048
4420  * Type:      CallControl
4421  * Direction: dev2pbx
4422  * VarLength: no
4423  * MsgType:   request
4424  */
4425 static void
handle_SubscriptionStatReqMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)4426 handle_SubscriptionStatReqMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
4427 {
4428   guint32 transactionId = 0;
4429   transactionId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
4430   ptvcursor_add(cursor, hf_skinny_transactionId, 4, ENC_LITTLE_ENDIAN);
4431   ptvcursor_add(cursor, hf_skinny_subscriptionFeatureID, 4, ENC_LITTLE_ENDIAN);
4432   ptvcursor_add(cursor, hf_skinny_timer, 4, ENC_LITTLE_ENDIAN);
4433   ptvcursor_add(cursor, hf_skinny_subscriptionID, 64, ENC_ASCII|ENC_NA);
4434   skinny_reqrep_add_request(cursor, pinfo, skinny_conv, 0x0048 ^ transactionId);
4435 }
4436 
4437 /*
4438  * Message:   MediaPathEventMessage
4439  * Opcode:    0x0049
4440  * Type:      CallControl
4441  * Direction: dev2pbx
4442  * VarLength: no
4443  * MsgType:   event
4444  */
4445 static void
handle_MediaPathEventMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)4446 handle_MediaPathEventMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
4447 {
4448   ptvcursor_add(cursor, hf_skinny_mediaPathID, 4, ENC_LITTLE_ENDIAN);
4449   ptvcursor_add(cursor, hf_skinny_mediaPathEvent, 4, ENC_LITTLE_ENDIAN);
4450 }
4451 
4452 /*
4453  * Message:   MediaPathCapabilityMessage
4454  * Opcode:    0x004a
4455  * Type:      CallControl
4456  * Direction: dev2pbx
4457  * VarLength: no
4458  * MsgType:   event
4459  */
4460 static void
handle_MediaPathCapabilityMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)4461 handle_MediaPathCapabilityMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
4462 {
4463   ptvcursor_add(cursor, hf_skinny_mediaPathID, 4, ENC_LITTLE_ENDIAN);
4464   ptvcursor_add(cursor, hf_skinny_mediaPathCapabilities, 4, ENC_LITTLE_ENDIAN);
4465 }
4466 
4467 /*
4468  * Message:   MwiNotificationMessage
4469  * Opcode:    0x004c
4470  * Type:      RegistrationAndManagement
4471  * Direction: pbx2pbx
4472  * VarLength: no
4473  * MsgType:   request
4474  */
4475 static void
handle_MwiNotificationMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)4476 handle_MwiNotificationMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
4477 {
4478   ptvcursor_add(cursor, hf_skinny_mwiTargetNumber, 25, ENC_ASCII|ENC_NA);
4479   ptvcursor_add(cursor, hf_skinny_mwiControlNumber, 25, ENC_ASCII|ENC_NA);
4480   ptvcursor_add(cursor, hf_skinny_areMessagesWaiting, 4, ENC_LITTLE_ENDIAN);
4481   {
4482     ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "totalVmCounts");
4483     ptvcursor_add(cursor, hf_skinny_numNewMsgs, 4, ENC_LITTLE_ENDIAN);
4484     ptvcursor_add(cursor, hf_skinny_numOldMsgs, 4, ENC_LITTLE_ENDIAN);
4485     ptvcursor_pop_subtree(cursor);
4486   }
4487   {
4488     ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "priorityVmCounts");
4489     ptvcursor_add(cursor, hf_skinny_numNewMsgs, 4, ENC_LITTLE_ENDIAN);
4490     ptvcursor_add(cursor, hf_skinny_numOldMsgs, 4, ENC_LITTLE_ENDIAN);
4491     ptvcursor_pop_subtree(cursor);
4492   }
4493   {
4494     ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "totalFaxCounts");
4495     ptvcursor_add(cursor, hf_skinny_numNewMsgs, 4, ENC_LITTLE_ENDIAN);
4496     ptvcursor_add(cursor, hf_skinny_numOldMsgs, 4, ENC_LITTLE_ENDIAN);
4497     ptvcursor_pop_subtree(cursor);
4498   }
4499   {
4500     ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "priorityFaxCounts");
4501     ptvcursor_add(cursor, hf_skinny_numNewMsgs, 4, ENC_LITTLE_ENDIAN);
4502     ptvcursor_add(cursor, hf_skinny_numOldMsgs, 4, ENC_LITTLE_ENDIAN);
4503     ptvcursor_pop_subtree(cursor);
4504   }
4505   skinny_reqrep_add_request(cursor, pinfo, skinny_conv, 0x004c);
4506 }
4507 
4508 /*
4509  * Message:   RegisterAckMessage
4510  * Opcode:    0x0081
4511  * Type:      RegistrationAndManagement
4512  * Direction: pbx2dev
4513  * VarLength: no
4514  * MsgType:   response
4515  */
4516 static void
handle_RegisterAckMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)4517 handle_RegisterAckMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
4518 {
4519   ptvcursor_add(cursor, hf_skinny_keepAliveInterval, 4, ENC_LITTLE_ENDIAN);
4520   ptvcursor_add(cursor, hf_skinny_dateTemplate, 6, ENC_ASCII|ENC_NA);
4521   ptvcursor_add(cursor, hf_skinny_alignmentPadding, 2, ENC_LITTLE_ENDIAN);
4522   ptvcursor_add(cursor, hf_skinny_secondaryKeepAliveInterval, 4, ENC_LITTLE_ENDIAN);
4523   ptvcursor_add(cursor, hf_skinny_maxProtocolVer, 1, ENC_LITTLE_ENDIAN);
4524   ptvcursor_add(cursor, hf_skinny_unknown, 1, ENC_LITTLE_ENDIAN);
4525   ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "phoneFeatures");
4526   ptvcursor_add_no_advance(cursor, hf_skinny_PhoneFeatures_Bit1, 2, ENC_LITTLE_ENDIAN);
4527   ptvcursor_add_no_advance(cursor, hf_skinny_PhoneFeatures_Bit2, 2, ENC_LITTLE_ENDIAN);
4528   ptvcursor_add_no_advance(cursor, hf_skinny_PhoneFeatures_Bit3, 2, ENC_LITTLE_ENDIAN);
4529   ptvcursor_add_no_advance(cursor, hf_skinny_PhoneFeatures_Bit4, 2, ENC_LITTLE_ENDIAN);
4530   ptvcursor_add_no_advance(cursor, hf_skinny_PhoneFeatures_UTF8, 2, ENC_LITTLE_ENDIAN);
4531   ptvcursor_add_no_advance(cursor, hf_skinny_PhoneFeatures_Bit6, 2, ENC_LITTLE_ENDIAN);
4532   ptvcursor_add_no_advance(cursor, hf_skinny_PhoneFeatures_Bit7, 2, ENC_LITTLE_ENDIAN);
4533   ptvcursor_add_no_advance(cursor, hf_skinny_PhoneFeatures_DynamicMessages, 2, ENC_LITTLE_ENDIAN);
4534   ptvcursor_add_no_advance(cursor, hf_skinny_PhoneFeatures_Bit9, 2, ENC_LITTLE_ENDIAN);
4535   ptvcursor_add_no_advance(cursor, hf_skinny_PhoneFeatures_RFC2833, 2, ENC_LITTLE_ENDIAN);
4536   ptvcursor_add_no_advance(cursor, hf_skinny_PhoneFeatures_Bit11, 2, ENC_LITTLE_ENDIAN);
4537   ptvcursor_add_no_advance(cursor, hf_skinny_PhoneFeatures_Bit12, 2, ENC_LITTLE_ENDIAN);
4538   ptvcursor_add_no_advance(cursor, hf_skinny_PhoneFeatures_Bit13, 2, ENC_LITTLE_ENDIAN);
4539   ptvcursor_add_no_advance(cursor, hf_skinny_PhoneFeatures_Bit14, 2, ENC_LITTLE_ENDIAN);
4540   ptvcursor_add_no_advance(cursor, hf_skinny_PhoneFeatures_Bit15, 2, ENC_LITTLE_ENDIAN);
4541   ptvcursor_add_no_advance(cursor, hf_skinny_PhoneFeatures_Abbreviated_Dial, 2, ENC_LITTLE_ENDIAN);
4542   ptvcursor_advance(cursor, 2);
4543   ptvcursor_pop_subtree(cursor); /* end bitfield: phoneFeatures */
4544   skinny_reqrep_add_response(cursor, pinfo, skinny_conv, 0x0001);
4545 }
4546 
4547 /*
4548  * Message:   StartToneMessage
4549  * Opcode:    0x0082
4550  * Type:      MediaControl
4551  * Direction: pbx2dev
4552  * VarLength: no
4553  * MsgType:   event
4554  */
4555 static void
handle_StartToneMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)4556 handle_StartToneMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
4557 {
4558   si->additionalInfo = g_strdup_printf("\"%s\"",
4559     try_val_to_str_ext(
4560       tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor)),
4561       &DeviceTone_ext
4562     )
4563   );
4564   ptvcursor_add(cursor, hf_skinny_tone, 4, ENC_LITTLE_ENDIAN);
4565   ptvcursor_add(cursor, hf_skinny_tone_output_direction, 4, ENC_LITTLE_ENDIAN);
4566   si->lineId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
4567   ptvcursor_add(cursor, hf_skinny_lineInstance, 4, ENC_LITTLE_ENDIAN);
4568   si->callId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
4569   ptvcursor_add(cursor, hf_skinny_callReference, 4, ENC_LITTLE_ENDIAN);
4570 }
4571 
4572 /*
4573  * Message:   StopToneMessage
4574  * Opcode:    0x0083
4575  * Type:      MediaControl
4576  * Direction: pbx2dev
4577  * VarLength: no
4578  * MsgType:   event
4579  */
4580 static void
handle_StopToneMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)4581 handle_StopToneMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
4582 {
4583   guint32 hdr_version = tvb_get_letohl(ptvcursor_tvbuff(cursor), 4);
4584 
4585   si->lineId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
4586   ptvcursor_add(cursor, hf_skinny_lineInstance, 4, ENC_LITTLE_ENDIAN);
4587   si->callId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
4588   ptvcursor_add(cursor, hf_skinny_callReference, 4, ENC_LITTLE_ENDIAN);
4589   if (hdr_version >= V11_MSG_TYPE) {
4590     ptvcursor_add(cursor, hf_skinny_tone, 4, ENC_LITTLE_ENDIAN);
4591   }
4592 }
4593 
4594 /*
4595  * Message:   SetRingerMessage
4596  * Opcode:    0x0085
4597  * Type:      CallControl
4598  * Direction: pbx2dev
4599  * VarLength: no
4600  * MsgType:   event
4601  */
4602 static void
handle_SetRingerMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)4603 handle_SetRingerMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
4604 {
4605   ptvcursor_add(cursor, hf_skinny_ringMode, 4, ENC_LITTLE_ENDIAN);
4606   ptvcursor_add(cursor, hf_skinny_ringDuration, 4, ENC_LITTLE_ENDIAN);
4607   si->lineId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
4608   ptvcursor_add(cursor, hf_skinny_lineInstance, 4, ENC_LITTLE_ENDIAN);
4609   si->callId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
4610   ptvcursor_add(cursor, hf_skinny_callReference, 4, ENC_LITTLE_ENDIAN);
4611 }
4612 
4613 /*
4614  * Message:   SetLampMessage
4615  * Opcode:    0x0086
4616  * Type:      CallControl
4617  * Direction: pbx2dev
4618  * VarLength: no
4619  * MsgType:   event
4620  */
4621 static void
handle_SetLampMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)4622 handle_SetLampMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
4623 {
4624   ptvcursor_add(cursor, hf_skinny_stimulus, 4, ENC_LITTLE_ENDIAN);
4625   ptvcursor_add(cursor, hf_skinny_stimulusInstance, 4, ENC_LITTLE_ENDIAN);
4626   ptvcursor_add(cursor, hf_skinny_lampMode, 4, ENC_LITTLE_ENDIAN);
4627 }
4628 
4629 /*
4630  * Message:   SetSpeakerModeMessage
4631  * Opcode:    0x0088
4632  * Type:      CallControl
4633  * Direction: pbx2dev
4634  * VarLength: no
4635  * MsgType:   event
4636  */
4637 static void
handle_SetSpeakerModeMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)4638 handle_SetSpeakerModeMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
4639 {
4640   ptvcursor_add(cursor, hf_skinny_speakerMode, 4, ENC_LITTLE_ENDIAN);
4641 }
4642 
4643 /*
4644  * Message:   SetMicroModeMessage
4645  * Opcode:    0x0089
4646  * Type:      CallControl
4647  * Direction: pbx2dev
4648  * VarLength: no
4649  * MsgType:   event
4650  */
4651 static void
handle_SetMicroModeMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)4652 handle_SetMicroModeMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
4653 {
4654   ptvcursor_add(cursor, hf_skinny_micMode, 4, ENC_LITTLE_ENDIAN);
4655 }
4656 
4657 /*
4658  * Message:   StartMediaTransmissionMessage
4659  * Opcode:    0x008a
4660  * Type:      MediaControl
4661  * Direction: pbx2dev
4662  * VarLength: no
4663  * MsgType:   request
4664  */
4665 static void
handle_StartMediaTransmissionMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)4666 handle_StartMediaTransmissionMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
4667 {
4668   guint32 hdr_version = tvb_get_letohl(ptvcursor_tvbuff(cursor), 4);
4669   guint32 passThroughPartyId = 0;
4670   address remoteIpAddr;
4671   char *remoteIpAddr_str = NULL;
4672   guint32 remotePortNumber = 0;
4673   guint32 compressionType = 0;
4674   guint16 keylen = 0;
4675   guint16 saltlen = 0;
4676 
4677   ptvcursor_add(cursor, hf_skinny_conferenceId, 4, ENC_LITTLE_ENDIAN);
4678   passThroughPartyId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
4679   si->passThroughPartyId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
4680   ptvcursor_add(cursor, hf_skinny_passThroughPartyId, 4, ENC_LITTLE_ENDIAN);
4681   read_skinny_ipv4or6(cursor, &remoteIpAddr);
4682   dissect_skinny_ipv4or6(cursor, hf_skinny_remoteIpAddr_ipv4, hf_skinny_remoteIpAddr_ipv6);
4683   remotePortNumber = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
4684   ptvcursor_add(cursor, hf_skinny_remotePortNumber, 4, ENC_LITTLE_ENDIAN);
4685   srtp_add_address(pinfo, PT_UDP, &remoteIpAddr, remotePortNumber, 0, "SKINNY", pinfo->num, false, NULL, NULL, NULL);
4686   remoteIpAddr_str = address_to_display(NULL, &remoteIpAddr);
4687   si->additionalInfo = g_strdup_printf("%s:%d", remoteIpAddr_str, remotePortNumber);
4688   wmem_free(NULL, remoteIpAddr_str);
4689   ptvcursor_add(cursor, hf_skinny_milliSecondPacketSize, 4, ENC_LITTLE_ENDIAN);
4690   compressionType = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
4691   ptvcursor_add(cursor, hf_skinny_compressionType, 4, ENC_LITTLE_ENDIAN);
4692   {
4693     ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "qualifierOut");
4694     ptvcursor_add(cursor, hf_skinny_precedenceValue, 4, ENC_LITTLE_ENDIAN);
4695     ptvcursor_add(cursor, hf_skinny_ssValue, 4, ENC_LITTLE_ENDIAN);
4696     ptvcursor_add(cursor, hf_skinny_maxFramesPerPacket, 2, ENC_LITTLE_ENDIAN);
4697     ptvcursor_add(cursor, hf_skinny_padding, 2, ENC_LITTLE_ENDIAN);
4698     if (hdr_version <= V10_MSG_TYPE) {
4699       ptvcursor_add(cursor, hf_skinny_g723BitRate, 4, ENC_LITTLE_ENDIAN);
4700     }
4701     if (hdr_version >= V11_MSG_TYPE) {
4702       if (compressionType == MEDIA_PAYLOAD_G7231)       {
4703         ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "compressionType is Media_Payload_G7231");
4704         ptvcursor_add(cursor, hf_skinny_g723BitRate, 4, ENC_LITTLE_ENDIAN);
4705         ptvcursor_pop_subtree(cursor);
4706       } else       {
4707         ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "any compressionType");
4708         {
4709           ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "codecParams");
4710           ptvcursor_add(cursor, hf_skinny_codecMode, 1, ENC_LITTLE_ENDIAN);
4711           ptvcursor_add(cursor, hf_skinny_dynamicPayload, 1, ENC_LITTLE_ENDIAN);
4712           ptvcursor_add(cursor, hf_skinny_codecParam1, 1, ENC_LITTLE_ENDIAN);
4713           ptvcursor_add(cursor, hf_skinny_codecParam2, 1, ENC_LITTLE_ENDIAN);
4714           ptvcursor_pop_subtree(cursor);
4715         }
4716         ptvcursor_pop_subtree(cursor);
4717       }
4718     }
4719     ptvcursor_pop_subtree(cursor);
4720   }
4721   si->callId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
4722   ptvcursor_add(cursor, hf_skinny_callReference, 4, ENC_LITTLE_ENDIAN);
4723   {
4724     ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "mTxMediaEncryptionKeyInfo");
4725     ptvcursor_add(cursor, hf_skinny_algorithmID, 4, ENC_LITTLE_ENDIAN);
4726     keylen = tvb_get_letohs(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
4727     ptvcursor_add(cursor, hf_skinny_keylen, 2, ENC_LITTLE_ENDIAN);
4728     saltlen = tvb_get_letohs(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
4729     ptvcursor_add(cursor, hf_skinny_saltlen, 2, ENC_LITTLE_ENDIAN);
4730     if (keylen <= 16) {
4731       guint32 counter_3 = 0;
4732       ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "key [ref:keylen = %d, max:16]", keylen);
4733       for (counter_3 = 0; counter_3 < 16; counter_3++) {
4734         if (counter_3 < keylen) {
4735           ptvcursor_add(cursor, hf_skinny_key, 1, ENC_LITTLE_ENDIAN);
4736         } else {
4737           ptvcursor_advance(cursor, 1);
4738         }
4739       }
4740       ptvcursor_pop_subtree(cursor);
4741     } else {
4742       ptvcursor_advance(cursor, (16 * 1));
4743     }
4744     if (saltlen <= 16) {
4745       guint32 counter_3 = 0;
4746       ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "salt [ref:saltlen = %d, max:16]", saltlen);
4747       for (counter_3 = 0; counter_3 < 16; counter_3++) {
4748         if (counter_3 < saltlen) {
4749           ptvcursor_add(cursor, hf_skinny_salt, 1, ENC_LITTLE_ENDIAN);
4750         } else {
4751           ptvcursor_advance(cursor, 1);
4752         }
4753       }
4754       ptvcursor_pop_subtree(cursor);
4755     } else {
4756       ptvcursor_advance(cursor, (16 * 1));
4757     }
4758     ptvcursor_add(cursor, hf_skinny_isMKIPresent, 4, ENC_LITTLE_ENDIAN);
4759     ptvcursor_add(cursor, hf_skinny_keyDerivationRate, 4, ENC_LITTLE_ENDIAN);
4760     ptvcursor_pop_subtree(cursor);
4761   }
4762   ptvcursor_add(cursor, hf_skinny_streamPassThroughId, 4, ENC_LITTLE_ENDIAN);
4763   ptvcursor_add(cursor, hf_skinny_associatedStreamId, 4, ENC_LITTLE_ENDIAN);
4764   ptvcursor_add(cursor, hf_skinny_RFC2833PayloadType, 4, ENC_LITTLE_ENDIAN);
4765   ptvcursor_add(cursor, hf_skinny_dtmfType, 4, ENC_LITTLE_ENDIAN);
4766   ptvcursor_add(cursor, hf_skinny_mixingMode, 4, ENC_LITTLE_ENDIAN);
4767   if (hdr_version >= V15_MSG_TYPE) {
4768     ptvcursor_add(cursor, hf_skinny_partyDirection, 4, ENC_LITTLE_ENDIAN);
4769   }
4770   if (hdr_version >= V21_MSG_TYPE) {
4771     {
4772       ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "latentCapsInfo");
4773       ptvcursor_add(cursor, hf_skinny_active, 4, ENC_LITTLE_ENDIAN);
4774       {
4775         ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "modemRelay");
4776         ptvcursor_add(cursor, hf_skinny_capAndVer, 4, ENC_LITTLE_ENDIAN);
4777         ptvcursor_add(cursor, hf_skinny_modAnd2833, 4, ENC_LITTLE_ENDIAN);
4778         ptvcursor_pop_subtree(cursor);
4779       }
4780       {
4781         ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "sprtPayload");
4782         ptvcursor_add(cursor, hf_skinny_chan0MaxPayload, 2, ENC_LITTLE_ENDIAN);
4783         ptvcursor_add(cursor, hf_skinny_chan2MaxPayload, 2, ENC_LITTLE_ENDIAN);
4784         ptvcursor_add(cursor, hf_skinny_chan3MaxPayload, 2, ENC_LITTLE_ENDIAN);
4785         ptvcursor_add(cursor, hf_skinny_chan2MaxWindow, 2, ENC_LITTLE_ENDIAN);
4786         ptvcursor_pop_subtree(cursor);
4787       }
4788       {
4789         ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "sse");
4790         ptvcursor_add(cursor, hf_skinny_standard, 4, ENC_LITTLE_ENDIAN);
4791         ptvcursor_add(cursor, hf_skinny_vendor, 4, ENC_LITTLE_ENDIAN);
4792         ptvcursor_pop_subtree(cursor);
4793       }
4794       {
4795         ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "payloadParam");
4796         ptvcursor_add(cursor, hf_skinny_nse, 1, ENC_LITTLE_ENDIAN);
4797         ptvcursor_add(cursor, hf_skinny_rfc2833, 1, ENC_LITTLE_ENDIAN);
4798         ptvcursor_add(cursor, hf_skinny_sse, 1, ENC_LITTLE_ENDIAN);
4799         ptvcursor_add(cursor, hf_skinny_v150sprt, 1, ENC_LITTLE_ENDIAN);
4800         ptvcursor_add(cursor, hf_skinny_noaudio, 1, ENC_LITTLE_ENDIAN);
4801         ptvcursor_add(cursor, hf_skinny_FutureUse1, 1, ENC_LITTLE_ENDIAN);
4802         ptvcursor_add(cursor, hf_skinny_FutureUse2, 1, ENC_LITTLE_ENDIAN);
4803         ptvcursor_add(cursor, hf_skinny_FutureUse3, 1, ENC_LITTLE_ENDIAN);
4804         ptvcursor_pop_subtree(cursor);
4805       }
4806       ptvcursor_pop_subtree(cursor);
4807     }
4808   }
4809   skinny_reqrep_add_request(cursor, pinfo, skinny_conv, 0x008a ^ passThroughPartyId);
4810 }
4811 
4812 /*
4813  * Message:   StopMediaTransmissionMessage
4814  * Opcode:    0x008b
4815  * Type:      MediaControl
4816  * Direction: pbx2dev
4817  * VarLength: no
4818  * MsgType:   event
4819  */
4820 static void
handle_StopMediaTransmissionMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)4821 handle_StopMediaTransmissionMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
4822 {
4823   ptvcursor_add(cursor, hf_skinny_conferenceId, 4, ENC_LITTLE_ENDIAN);
4824   si->passThroughPartyId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
4825   ptvcursor_add(cursor, hf_skinny_passThroughPartyId, 4, ENC_LITTLE_ENDIAN);
4826   si->callId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
4827   ptvcursor_add(cursor, hf_skinny_callReference, 4, ENC_LITTLE_ENDIAN);
4828   ptvcursor_add(cursor, hf_skinny_portHandlingFlag, 4, ENC_LITTLE_ENDIAN);
4829 }
4830 
4831 /*
4832  * Message:   CallInfoMessage
4833  * Opcode:    0x008f
4834  * Type:      CallControl
4835  * Direction: pbx2dev
4836  * VarLength: no
4837  * MsgType:   event
4838  */
4839 static void
handle_CallInfoMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)4840 handle_CallInfoMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
4841 {
4842   ptvcursor_add(cursor, hf_skinny_callingPartyName, 40, ENC_ASCII|ENC_NA);
4843   si->callingParty = g_strdup(tvb_format_stringzpad(pinfo->pool, ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor), 24));
4844   ptvcursor_add(cursor, hf_skinny_callingParty, 24, ENC_ASCII|ENC_NA);
4845   ptvcursor_add(cursor, hf_skinny_calledPartyName, 40, ENC_ASCII|ENC_NA);
4846   si->calledParty = g_strdup(tvb_format_stringzpad(pinfo->pool, ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor), 24));
4847   ptvcursor_add(cursor, hf_skinny_calledParty, 24, ENC_ASCII|ENC_NA);
4848   si->lineId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
4849   ptvcursor_add(cursor, hf_skinny_lineInstance, 4, ENC_LITTLE_ENDIAN);
4850   si->callId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
4851   ptvcursor_add(cursor, hf_skinny_callReference, 4, ENC_LITTLE_ENDIAN);
4852   ptvcursor_add(cursor, hf_skinny_callType, 4, ENC_LITTLE_ENDIAN);
4853   ptvcursor_add(cursor, hf_skinny_originalCalledPartyName, 40, ENC_ASCII|ENC_NA);
4854   ptvcursor_add(cursor, hf_skinny_originalCalledParty, 24, ENC_ASCII|ENC_NA);
4855   ptvcursor_add(cursor, hf_skinny_lastRedirectingPartyName, 40, ENC_ASCII|ENC_NA);
4856   ptvcursor_add(cursor, hf_skinny_lastRedirectingParty, 24, ENC_ASCII|ENC_NA);
4857   ptvcursor_add(cursor, hf_skinny_originalCdpnRedirectReason, 4, ENC_LITTLE_ENDIAN);
4858   ptvcursor_add(cursor, hf_skinny_lastRedirectingReason, 4, ENC_LITTLE_ENDIAN);
4859   ptvcursor_add(cursor, hf_skinny_cgpnVoiceMailbox, 24, ENC_ASCII|ENC_NA);
4860   ptvcursor_add(cursor, hf_skinny_cdpnVoiceMailbox, 24, ENC_ASCII|ENC_NA);
4861   ptvcursor_add(cursor, hf_skinny_originalCdpnVoiceMailbox, 24, ENC_ASCII|ENC_NA);
4862   ptvcursor_add(cursor, hf_skinny_lastRedirectingVoiceMailbox, 24, ENC_ASCII|ENC_NA);
4863   ptvcursor_add(cursor, hf_skinny_callInstance, 4, ENC_LITTLE_ENDIAN);
4864   ptvcursor_add(cursor, hf_skinny_callSecurityStatus, 4, ENC_LITTLE_ENDIAN);
4865   ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "partyPIRestrictionBits");
4866   ptvcursor_add_no_advance(cursor, hf_skinny_RestrictInformationType_CallingPartyName, 4, ENC_LITTLE_ENDIAN);
4867   ptvcursor_add_no_advance(cursor, hf_skinny_RestrictInformationType_CallingPartyNumber, 4, ENC_LITTLE_ENDIAN);
4868   ptvcursor_add_no_advance(cursor, hf_skinny_RestrictInformationType_CallingParty, 4, ENC_LITTLE_ENDIAN);
4869   ptvcursor_add_no_advance(cursor, hf_skinny_RestrictInformationType_CalledPartyName, 4, ENC_LITTLE_ENDIAN);
4870   ptvcursor_add_no_advance(cursor, hf_skinny_RestrictInformationType_CalledPartyNumber, 4, ENC_LITTLE_ENDIAN);
4871   ptvcursor_add_no_advance(cursor, hf_skinny_RestrictInformationType_CalledParty, 4, ENC_LITTLE_ENDIAN);
4872   ptvcursor_add_no_advance(cursor, hf_skinny_RestrictInformationType_OriginalCalledPartyName, 4, ENC_LITTLE_ENDIAN);
4873   ptvcursor_add_no_advance(cursor, hf_skinny_RestrictInformationType_OriginalCalledPartyNumber, 4, ENC_LITTLE_ENDIAN);
4874   ptvcursor_add_no_advance(cursor, hf_skinny_RestrictInformationType_OriginalCalledParty, 4, ENC_LITTLE_ENDIAN);
4875   ptvcursor_add_no_advance(cursor, hf_skinny_RestrictInformationType_LastRedirectPartyName, 4, ENC_LITTLE_ENDIAN);
4876   ptvcursor_add_no_advance(cursor, hf_skinny_RestrictInformationType_LastRedirectPartyNumber, 4, ENC_LITTLE_ENDIAN);
4877   ptvcursor_add_no_advance(cursor, hf_skinny_RestrictInformationType_LastRedirectParty, 4, ENC_LITTLE_ENDIAN);
4878   ptvcursor_add_no_advance(cursor, hf_skinny_RestrictInformationType_BitsReserved, 4, ENC_LITTLE_ENDIAN);
4879   ptvcursor_advance(cursor, 4);
4880   ptvcursor_pop_subtree(cursor); /* end bitfield: partyPIRestrictionBits */
4881   if (si->callingParty && si->calledParty) {
4882     si->additionalInfo = g_strdup_printf("\"%s -> %s\"", si->callingParty, si->calledParty);
4883   }
4884 }
4885 
4886 /*
4887  * Message:   ForwardStatResMessage
4888  * Opcode:    0x0090
4889  * Type:      RegistrationAndManagement
4890  * Direction: pbx2dev
4891  * VarLength: no
4892  * MsgType:   response
4893  */
4894 static void
handle_ForwardStatResMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)4895 handle_ForwardStatResMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
4896 {
4897   guint32 lineNumber = 0;
4898   guint32 hdr_version = tvb_get_letohl(ptvcursor_tvbuff(cursor), 4);
4899   guint32 VariableDirnumSize = (hdr_version >= V18_MSG_TYPE) ? 25 : 24;
4900   ptvcursor_add(cursor, hf_skinny_activeForward, 4, ENC_LITTLE_ENDIAN);
4901   lineNumber = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
4902   ptvcursor_add(cursor, hf_skinny_lineNumber, 4, ENC_LITTLE_ENDIAN);
4903   ptvcursor_add(cursor, hf_skinny_forwardAllActive, 4, ENC_LITTLE_ENDIAN);
4904   ptvcursor_add(cursor, hf_skinny_forwardAllDirnum, VariableDirnumSize, ENC_ASCII|ENC_NA);
4905   ptvcursor_add(cursor, hf_skinny_forwardBusyActive, 4, ENC_LITTLE_ENDIAN);
4906   ptvcursor_add(cursor, hf_skinny_forwardBusyDirnum, VariableDirnumSize, ENC_ASCII|ENC_NA);
4907   ptvcursor_add(cursor, hf_skinny_forwardNoAnswerActive, 4, ENC_LITTLE_ENDIAN);
4908   ptvcursor_add(cursor, hf_skinny_forwardNoAnswerlDirnum, VariableDirnumSize, ENC_ASCII|ENC_NA);
4909   skinny_reqrep_add_response(cursor, pinfo, skinny_conv, 0x0009 ^ lineNumber);
4910 }
4911 
4912 /*
4913  * Message:   SpeedDialStatResMessage
4914  * Opcode:    0x0091
4915  * Type:      RegistrationAndManagement
4916  * Direction: pbx2dev
4917  * VarLength: no
4918  * MsgType:   response
4919  */
4920 static void
handle_SpeedDialStatResMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)4921 handle_SpeedDialStatResMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
4922 {
4923   guint32 speedDialNumber = 0;
4924   speedDialNumber = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
4925   ptvcursor_add(cursor, hf_skinny_speedDialNumber, 4, ENC_LITTLE_ENDIAN);
4926   ptvcursor_add(cursor, hf_skinny_speedDialDirNumber, 24, ENC_ASCII|ENC_NA);
4927   ptvcursor_add(cursor, hf_skinny_speedDialDisplayName, 40, ENC_ASCII|ENC_NA);
4928   skinny_reqrep_add_response(cursor, pinfo, skinny_conv, 0x000a ^ speedDialNumber);
4929 }
4930 
4931 /*
4932  * Message:   LineStatResMessage
4933  * Opcode:    0x0092
4934  * Type:      RegistrationAndManagement
4935  * Direction: pbx2dev
4936  * VarLength: no
4937  * MsgType:   response
4938  */
4939 static void
handle_LineStatResMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)4940 handle_LineStatResMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
4941 {
4942   guint32 lineNumber = 0;
4943   lineNumber = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
4944   ptvcursor_add(cursor, hf_skinny_lineNumber, 4, ENC_LITTLE_ENDIAN);
4945   ptvcursor_add(cursor, hf_skinny_lineDirNumber, 24, ENC_ASCII|ENC_NA);
4946   ptvcursor_add(cursor, hf_skinny_lineFullyQualifiedDisplayName, 40, ENC_ASCII|ENC_NA);
4947   ptvcursor_add(cursor, hf_skinny_lineTextLabel, 40, ENC_ASCII|ENC_NA);
4948   ptvcursor_add(cursor, hf_skinny_lineDisplayOptions, 4, ENC_LITTLE_ENDIAN);
4949   skinny_reqrep_add_response(cursor, pinfo, skinny_conv, 0x000b ^ lineNumber);
4950 }
4951 
4952 /*
4953  * Message:   ConfigStatResMessage
4954  * Opcode:    0x0093
4955  * Type:      RegistrationAndManagement
4956  * Direction: pbx2dev
4957  * VarLength: no
4958  * MsgType:   response
4959  */
4960 static void
handle_ConfigStatResMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)4961 handle_ConfigStatResMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
4962 {
4963   {
4964     ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "sid");
4965     ptvcursor_add(cursor, hf_skinny_DeviceName, 16, ENC_ASCII|ENC_NA);
4966     ptvcursor_add(cursor, hf_skinny_reserved_for_future_use, 4, ENC_LITTLE_ENDIAN);
4967     ptvcursor_add(cursor, hf_skinny_instance, 4, ENC_LITTLE_ENDIAN);
4968     ptvcursor_pop_subtree(cursor);
4969   }
4970   ptvcursor_add(cursor, hf_skinny_userName, 40, ENC_ASCII|ENC_NA);
4971   ptvcursor_add(cursor, hf_skinny_serverName, 40, ENC_ASCII|ENC_NA);
4972   ptvcursor_add(cursor, hf_skinny_numberOfLines, 4, ENC_LITTLE_ENDIAN);
4973   ptvcursor_add(cursor, hf_skinny_numberOfSpeedDials, 4, ENC_LITTLE_ENDIAN);
4974   skinny_reqrep_add_response(cursor, pinfo, skinny_conv, 0x000c);
4975 }
4976 
4977 /*
4978  * Message:   TimeDateResMessage
4979  * Opcode:    0x0094
4980  * Type:      RegistrationAndManagement
4981  * Direction: pbx2dev
4982  * VarLength: no
4983  * MsgType:   response
4984  */
4985 static void
handle_TimeDateResMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)4986 handle_TimeDateResMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
4987 {
4988   {
4989     ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "timeDataInfo");
4990     ptvcursor_add(cursor, hf_skinny_wYear, 4, ENC_LITTLE_ENDIAN);
4991     ptvcursor_add(cursor, hf_skinny_wMonth, 4, ENC_LITTLE_ENDIAN);
4992     ptvcursor_add(cursor, hf_skinny_wDayOfWeek, 4, ENC_LITTLE_ENDIAN);
4993     ptvcursor_add(cursor, hf_skinny_wDay, 4, ENC_LITTLE_ENDIAN);
4994     ptvcursor_add(cursor, hf_skinny_wHour, 4, ENC_LITTLE_ENDIAN);
4995     ptvcursor_add(cursor, hf_skinny_wMinute, 4, ENC_LITTLE_ENDIAN);
4996     ptvcursor_add(cursor, hf_skinny_wSecond, 4, ENC_LITTLE_ENDIAN);
4997     ptvcursor_add(cursor, hf_skinny_wMilliseconds, 4, ENC_LITTLE_ENDIAN);
4998     ptvcursor_pop_subtree(cursor);
4999   }
5000   ptvcursor_add(cursor, hf_skinny_systemTime, 4, ENC_LITTLE_ENDIAN);
5001   skinny_reqrep_add_response(cursor, pinfo, skinny_conv, 0x000d);
5002 }
5003 
5004 /*
5005  * Message:   StartSessionTransmissionMessage
5006  * Opcode:    0x0095
5007  * Type:      IntraCCM
5008  * Direction: pbx2pbx
5009  * VarLength: no
5010  * MsgType:   event
5011  */
5012 static void
handle_StartSessionTransmissionMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)5013 handle_StartSessionTransmissionMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
5014 {
5015   dissect_skinny_ipv4or6(cursor, hf_skinny_remoteIpAddr_ipv4, hf_skinny_remoteIpAddr_ipv6);
5016   ptvcursor_add(cursor, hf_skinny_sessionType, 4, ENC_LITTLE_ENDIAN);
5017 }
5018 
5019 /*
5020  * Message:   StopSessionTransmissionMessage
5021  * Opcode:    0x0096
5022  * Type:      IntraCCM
5023  * Direction: pbx2pbx
5024  * VarLength: no
5025  * MsgType:   event
5026  */
5027 static void
handle_StopSessionTransmissionMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)5028 handle_StopSessionTransmissionMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
5029 {
5030   dissect_skinny_ipv4or6(cursor, hf_skinny_remoteIpAddr_ipv4, hf_skinny_remoteIpAddr_ipv6);
5031   ptvcursor_add(cursor, hf_skinny_sessionType, 4, ENC_LITTLE_ENDIAN);
5032 }
5033 
5034 /*
5035  * Message:   ButtonTemplateResMessage
5036  * Opcode:    0x0097
5037  * Type:      RegistrationAndManagement
5038  * Direction: pbx2dev
5039  * VarLength: no
5040  * MsgType:   response
5041  */
5042 static void
handle_ButtonTemplateResMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)5043 handle_ButtonTemplateResMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
5044 {
5045   guint32 totalButtonCount = 0;
5046   {
5047     ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "buttonTemplate");
5048     ptvcursor_add(cursor, hf_skinny_buttonOffset, 4, ENC_LITTLE_ENDIAN);
5049     ptvcursor_add(cursor, hf_skinny_buttonCount, 4, ENC_LITTLE_ENDIAN);
5050     totalButtonCount = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
5051     ptvcursor_add(cursor, hf_skinny_totalButtonCount, 4, ENC_LITTLE_ENDIAN);
5052     if (totalButtonCount <= 42) {
5053       guint32 counter_2 = 0;
5054       ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "definition [ref:totalButtonCount = %d, max:42]", totalButtonCount);
5055       if (totalButtonCount && tvb_get_letohl(ptvcursor_tvbuff(cursor), 0) + 8 >= ptvcursor_current_offset(cursor) + (totalButtonCount * 2) && totalButtonCount <= 42) {
5056         for (counter_2 = 0; counter_2 < 42; counter_2++) {
5057           if (counter_2 < totalButtonCount) {
5058             ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "definition [%d / %d]", counter_2 + 1, totalButtonCount);
5059             ptvcursor_add(cursor, hf_skinny_instanceNumber, 1, ENC_LITTLE_ENDIAN);
5060             ptvcursor_add(cursor, hf_skinny_buttonDefinition, 1, ENC_LITTLE_ENDIAN);
5061           } else {
5062             ptvcursor_advance(cursor, 2);
5063           }
5064           ptvcursor_pop_subtree(cursor);
5065         }
5066       }
5067       ptvcursor_pop_subtree(cursor);
5068     } else {
5069       ptvcursor_advance(cursor, (totalButtonCount * 2));
5070     }
5071     ptvcursor_pop_subtree(cursor);
5072   }
5073   skinny_reqrep_add_response(cursor, pinfo, skinny_conv, 0x000e);
5074 }
5075 
5076 /*
5077  * Message:   VersionResMessage
5078  * Opcode:    0x0098
5079  * Type:      RegistrationAndManagement
5080  * Direction: pbx2dev
5081  * VarLength: no
5082  * MsgType:   response
5083  */
5084 static void
handle_VersionResMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)5085 handle_VersionResMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
5086 {
5087   ptvcursor_add(cursor, hf_skinny_versionStr, 16, ENC_ASCII|ENC_NA);
5088   skinny_reqrep_add_response(cursor, pinfo, skinny_conv, 0x000f);
5089 }
5090 
5091 /*
5092  * Message:   DisplayTextMessage
5093  * Opcode:    0x0099
5094  * Type:      CallControl
5095  * Direction: pbx2dev
5096  * VarLength: no
5097  * MsgType:   event
5098  */
5099 static void
handle_DisplayTextMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)5100 handle_DisplayTextMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
5101 {
5102   ptvcursor_add(cursor, hf_skinny_text, 32, ENC_ASCII|ENC_NA);
5103 }
5104 
5105 /*
5106  * Message:   RegisterRejectMessage
5107  * Opcode:    0x009d
5108  * Type:      RegistrationAndManagement
5109  * Direction: pbx2dev
5110  * VarLength: no
5111  * MsgType:   event
5112  */
5113 static void
handle_RegisterRejectMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)5114 handle_RegisterRejectMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
5115 {
5116   ptvcursor_add(cursor, hf_skinny_text, 32, ENC_ASCII|ENC_NA);
5117 }
5118 
5119 /*
5120  * Message:   ServerResMessage
5121  * Opcode:    0x009e
5122  * Type:      RegistrationAndManagement
5123  * Direction: pbx2dev
5124  * VarLength: no
5125  * MsgType:   response
5126  */
5127 static void
handle_ServerResMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)5128 handle_ServerResMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
5129 {
5130   guint32 hdr_data_length = tvb_get_letohl(ptvcursor_tvbuff(cursor), 0);
5131 
5132   {
5133     guint32 counter_1 = 0;
5134     ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "server [max:5]");
5135     for (counter_1 = 0; counter_1 < 5; counter_1++) {
5136       ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "server [%d / %d]", counter_1 + 1, 5);
5137       ptvcursor_add(cursor, hf_skinny_ServerName, 48, ENC_ASCII|ENC_NA);
5138       ptvcursor_pop_subtree(cursor);
5139     }
5140     ptvcursor_pop_subtree(cursor);
5141   }
5142   {
5143     guint32 counter_2 = 0;
5144     ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "serverTcpListenPort [max:5]");
5145     for (counter_2 = 0; counter_2 < 5; counter_2++) {
5146       ptvcursor_add(cursor, hf_skinny_serverTcpListenPort, 4, ENC_LITTLE_ENDIAN);
5147     }
5148     ptvcursor_pop_subtree(cursor);
5149   }
5150   if (hdr_data_length < 293) {
5151     {
5152       guint32 counter_2 = 0;
5153       ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "serverIpAddr [max:5]");
5154       for (counter_2 = 0; counter_2 < 5; counter_2++) {
5155         ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "serverIpAddr [%d / %d]", counter_2 + 1, 5);
5156         ptvcursor_add(cursor, hf_skinny_stationIpAddr, 4, ENC_BIG_ENDIAN);
5157         ptvcursor_pop_subtree(cursor);
5158       }
5159       ptvcursor_pop_subtree(cursor);
5160     }
5161   }
5162   if (hdr_data_length > 292) {
5163     {
5164       guint32 counter_2 = 0;
5165       ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "serverIpAddr [max:5]");
5166       for (counter_2 = 0; counter_2 < 5; counter_2++) {
5167         ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "serverIpAddr [%d / %d]", counter_2 + 1, 5);
5168         dissect_skinny_ipv4or6(cursor, hf_skinny_stationIpAddr_ipv4, hf_skinny_stationIpAddr_ipv6);
5169         ptvcursor_pop_subtree(cursor);
5170       }
5171       ptvcursor_pop_subtree(cursor);
5172     }
5173   }
5174   skinny_reqrep_add_response(cursor, pinfo, skinny_conv, 0x0012);
5175 }
5176 
5177 /*
5178  * Message:   Reset
5179  * Opcode:    0x009f
5180  * Type:      RegistrationAndManagement
5181  * Direction: pbx2dev
5182  * VarLength: no
5183  * MsgType:   event
5184  */
5185 static void
handle_Reset(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)5186 handle_Reset(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
5187 {
5188   ptvcursor_add(cursor, hf_skinny_resetType, 4, ENC_LITTLE_ENDIAN);
5189 }
5190 
5191 /*
5192  * Message:   StartMulticastMediaReceptionMessage
5193  * Opcode:    0x0101
5194  * Type:      MediaControl
5195  * Direction: pbx2dev
5196  * VarLength: no
5197  * MsgType:   request
5198  */
5199 static void
handle_StartMulticastMediaReceptionMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)5200 handle_StartMulticastMediaReceptionMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
5201 {
5202   guint32 passThroughPartyId = 0;
5203   address multicastIpAddr;
5204   char *multicastIpAddr_str = NULL;
5205   guint32 multicastPortNumber = 0;
5206   guint32 compressionType = 0;
5207   guint32 hdr_version = tvb_get_letohl(ptvcursor_tvbuff(cursor), 4);
5208   ptvcursor_add(cursor, hf_skinny_conferenceId, 4, ENC_LITTLE_ENDIAN);
5209   passThroughPartyId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
5210   si->passThroughPartyId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
5211   ptvcursor_add(cursor, hf_skinny_passThroughPartyId, 4, ENC_LITTLE_ENDIAN);
5212   read_skinny_ipv4or6(cursor, &multicastIpAddr);
5213   dissect_skinny_ipv4or6(cursor, hf_skinny_multicastIpAddr_ipv4, hf_skinny_multicastIpAddr_ipv6);
5214   multicastPortNumber = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
5215   ptvcursor_add(cursor, hf_skinny_multicastPortNumber, 4, ENC_LITTLE_ENDIAN);
5216   srtp_add_address(pinfo, PT_UDP, &multicastIpAddr, multicastPortNumber, 0, "SKINNY", pinfo->num, false, NULL, NULL, NULL);
5217   multicastIpAddr_str = address_to_display(NULL, &multicastIpAddr);
5218   si->additionalInfo = g_strdup_printf("%s:%d", multicastIpAddr_str, multicastPortNumber);
5219   wmem_free(NULL, multicastIpAddr_str);
5220   ptvcursor_add(cursor, hf_skinny_milliSecondPacketSize, 4, ENC_LITTLE_ENDIAN);
5221   compressionType = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
5222   ptvcursor_add(cursor, hf_skinny_compressionType, 4, ENC_LITTLE_ENDIAN);
5223   {
5224     ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "qualifierIn");
5225     ptvcursor_add(cursor, hf_skinny_ecValue, 4, ENC_LITTLE_ENDIAN);
5226     if (hdr_version <= V10_MSG_TYPE) {
5227       ptvcursor_add(cursor, hf_skinny_g723BitRate, 4, ENC_LITTLE_ENDIAN);
5228     }
5229     if (hdr_version >= V11_MSG_TYPE) {
5230       if (compressionType == MEDIA_PAYLOAD_G7231)       {
5231         ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "compressionType is Media_Payload_G7231");
5232         ptvcursor_add(cursor, hf_skinny_g723BitRate, 4, ENC_LITTLE_ENDIAN);
5233         ptvcursor_pop_subtree(cursor);
5234       } else       {
5235         ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "any compressionType");
5236         {
5237           ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "codecParams");
5238           ptvcursor_add(cursor, hf_skinny_codecMode, 1, ENC_LITTLE_ENDIAN);
5239           ptvcursor_add(cursor, hf_skinny_dynamicPayload, 1, ENC_LITTLE_ENDIAN);
5240           ptvcursor_add(cursor, hf_skinny_codecParam1, 1, ENC_LITTLE_ENDIAN);
5241           ptvcursor_add(cursor, hf_skinny_codecParam2, 1, ENC_LITTLE_ENDIAN);
5242           ptvcursor_pop_subtree(cursor);
5243         }
5244         ptvcursor_pop_subtree(cursor);
5245       }
5246     }
5247     ptvcursor_pop_subtree(cursor);
5248   }
5249   si->callId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
5250   ptvcursor_add(cursor, hf_skinny_callReference, 4, ENC_LITTLE_ENDIAN);
5251   skinny_reqrep_add_request(cursor, pinfo, skinny_conv, 0x0101 ^ passThroughPartyId);
5252 }
5253 
5254 /*
5255  * Message:   StartMulticastMediaTransmissionMessage
5256  * Opcode:    0x0102
5257  * Type:      MediaControl
5258  * Direction: pbx2dev
5259  * VarLength: no
5260  * MsgType:   request
5261  */
5262 static void
handle_StartMulticastMediaTransmissionMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)5263 handle_StartMulticastMediaTransmissionMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
5264 {
5265   guint32 passThroughPartyId = 0;
5266   address multicastIpAddr;
5267   char *multicastIpAddr_str = NULL;
5268   guint32 multicastPortNumber = 0;
5269   guint32 compressionType = 0;
5270   guint32 hdr_version = tvb_get_letohl(ptvcursor_tvbuff(cursor), 4);
5271   ptvcursor_add(cursor, hf_skinny_conferenceId, 4, ENC_LITTLE_ENDIAN);
5272   passThroughPartyId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
5273   si->passThroughPartyId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
5274   ptvcursor_add(cursor, hf_skinny_passThroughPartyId, 4, ENC_LITTLE_ENDIAN);
5275   read_skinny_ipv4or6(cursor, &multicastIpAddr);
5276   dissect_skinny_ipv4or6(cursor, hf_skinny_multicastIpAddr_ipv4, hf_skinny_multicastIpAddr_ipv6);
5277   multicastPortNumber = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
5278   ptvcursor_add(cursor, hf_skinny_multicastPortNumber, 4, ENC_LITTLE_ENDIAN);
5279   srtp_add_address(pinfo, PT_UDP, &multicastIpAddr, multicastPortNumber, 0, "SKINNY", pinfo->num, false, NULL, NULL, NULL);
5280   multicastIpAddr_str = address_to_display(NULL, &multicastIpAddr);
5281   si->additionalInfo = g_strdup_printf("%s:%d", multicastIpAddr_str, multicastPortNumber);
5282   wmem_free(NULL, multicastIpAddr_str);
5283   ptvcursor_add(cursor, hf_skinny_milliSecondPacketSize, 4, ENC_LITTLE_ENDIAN);
5284   compressionType = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
5285   ptvcursor_add(cursor, hf_skinny_compressionType, 4, ENC_LITTLE_ENDIAN);
5286   {
5287     ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "qualifierOut");
5288     ptvcursor_add(cursor, hf_skinny_precedenceValue, 4, ENC_LITTLE_ENDIAN);
5289     ptvcursor_add(cursor, hf_skinny_ssValue, 4, ENC_LITTLE_ENDIAN);
5290     ptvcursor_add(cursor, hf_skinny_maxFramesPerPacket, 2, ENC_LITTLE_ENDIAN);
5291     ptvcursor_add(cursor, hf_skinny_padding, 2, ENC_LITTLE_ENDIAN);
5292     if (hdr_version <= V10_MSG_TYPE) {
5293       ptvcursor_add(cursor, hf_skinny_g723BitRate, 4, ENC_LITTLE_ENDIAN);
5294     }
5295     if (hdr_version >= V11_MSG_TYPE) {
5296       if (compressionType == MEDIA_PAYLOAD_G7231)       {
5297         ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "compressionType is Media_Payload_G7231");
5298         ptvcursor_add(cursor, hf_skinny_g723BitRate, 4, ENC_LITTLE_ENDIAN);
5299         ptvcursor_pop_subtree(cursor);
5300       } else       {
5301         ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "any compressionType");
5302         {
5303           ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "codecParams");
5304           ptvcursor_add(cursor, hf_skinny_codecMode, 1, ENC_LITTLE_ENDIAN);
5305           ptvcursor_add(cursor, hf_skinny_dynamicPayload, 1, ENC_LITTLE_ENDIAN);
5306           ptvcursor_add(cursor, hf_skinny_codecParam1, 1, ENC_LITTLE_ENDIAN);
5307           ptvcursor_add(cursor, hf_skinny_codecParam2, 1, ENC_LITTLE_ENDIAN);
5308           ptvcursor_pop_subtree(cursor);
5309         }
5310         ptvcursor_pop_subtree(cursor);
5311       }
5312     }
5313     ptvcursor_pop_subtree(cursor);
5314   }
5315   si->callId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
5316   ptvcursor_add(cursor, hf_skinny_callReference, 4, ENC_LITTLE_ENDIAN);
5317   skinny_reqrep_add_request(cursor, pinfo, skinny_conv, 0x0102 ^ passThroughPartyId);
5318 }
5319 
5320 /*
5321  * Message:   StopMulticastMediaReceptionMessage
5322  * Opcode:    0x0103
5323  * Type:      MediaControl
5324  * Direction: pbx2dev
5325  * VarLength: no
5326  * MsgType:   event
5327  */
5328 static void
handle_StopMulticastMediaReceptionMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)5329 handle_StopMulticastMediaReceptionMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
5330 {
5331   ptvcursor_add(cursor, hf_skinny_conferenceId, 4, ENC_LITTLE_ENDIAN);
5332   si->passThroughPartyId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
5333   ptvcursor_add(cursor, hf_skinny_passThroughPartyId, 4, ENC_LITTLE_ENDIAN);
5334   si->callId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
5335   ptvcursor_add(cursor, hf_skinny_callReference, 4, ENC_LITTLE_ENDIAN);
5336 }
5337 
5338 /*
5339  * Message:   StopMulticastMediaTransmissionMessage
5340  * Opcode:    0x0104
5341  * Type:      MediaControl
5342  * Direction: pbx2dev
5343  * VarLength: no
5344  * MsgType:   event
5345  */
5346 static void
handle_StopMulticastMediaTransmissionMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)5347 handle_StopMulticastMediaTransmissionMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
5348 {
5349   ptvcursor_add(cursor, hf_skinny_conferenceId, 4, ENC_LITTLE_ENDIAN);
5350   si->passThroughPartyId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
5351   ptvcursor_add(cursor, hf_skinny_passThroughPartyId, 4, ENC_LITTLE_ENDIAN);
5352   si->callId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
5353   ptvcursor_add(cursor, hf_skinny_callReference, 4, ENC_LITTLE_ENDIAN);
5354 }
5355 
5356 /*
5357  * Message:   OpenReceiveChannelMessage
5358  * Opcode:    0x0105
5359  * Type:      MediaControl
5360  * Direction: pbx2dev
5361  * VarLength: no
5362  * MsgType:   request
5363  */
5364 static void
handle_OpenReceiveChannelMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)5365 handle_OpenReceiveChannelMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
5366 {
5367   guint32 hdr_data_length = tvb_get_letohl(ptvcursor_tvbuff(cursor), 0);
5368   guint32 passThroughPartyId = 0;
5369   guint32 compressionType = 0;
5370   guint32 hdr_version = tvb_get_letohl(ptvcursor_tvbuff(cursor), 4);
5371   guint16 keylen = 0;
5372   guint16 saltlen = 0;
5373   address sourceIpAddr;
5374   char *sourceIpAddr_str = NULL;
5375   guint32 sourcePortNumber = 0;
5376 
5377   ptvcursor_add(cursor, hf_skinny_conferenceId, 4, ENC_LITTLE_ENDIAN);
5378   passThroughPartyId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
5379   si->passThroughPartyId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
5380   ptvcursor_add(cursor, hf_skinny_passThroughPartyId, 4, ENC_LITTLE_ENDIAN);
5381   ptvcursor_add(cursor, hf_skinny_milliSecondPacketSize, 4, ENC_LITTLE_ENDIAN);
5382   compressionType = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
5383   ptvcursor_add(cursor, hf_skinny_compressionType, 4, ENC_LITTLE_ENDIAN);
5384   {
5385     ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "qualifierIn");
5386     ptvcursor_add(cursor, hf_skinny_ecValue, 4, ENC_LITTLE_ENDIAN);
5387     if (hdr_version <= V10_MSG_TYPE) {
5388       ptvcursor_add(cursor, hf_skinny_g723BitRate, 4, ENC_LITTLE_ENDIAN);
5389     }
5390     if (hdr_version >= V11_MSG_TYPE) {
5391       if (compressionType == MEDIA_PAYLOAD_G7231)       {
5392         ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "compressionType is Media_Payload_G7231");
5393         ptvcursor_add(cursor, hf_skinny_g723BitRate, 4, ENC_LITTLE_ENDIAN);
5394         ptvcursor_pop_subtree(cursor);
5395       } else       {
5396         ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "any compressionType");
5397         {
5398           ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "codecParams");
5399           ptvcursor_add(cursor, hf_skinny_codecMode, 1, ENC_LITTLE_ENDIAN);
5400           ptvcursor_add(cursor, hf_skinny_dynamicPayload, 1, ENC_LITTLE_ENDIAN);
5401           ptvcursor_add(cursor, hf_skinny_codecParam1, 1, ENC_LITTLE_ENDIAN);
5402           ptvcursor_add(cursor, hf_skinny_codecParam2, 1, ENC_LITTLE_ENDIAN);
5403           ptvcursor_pop_subtree(cursor);
5404         }
5405         ptvcursor_pop_subtree(cursor);
5406       }
5407     }
5408     ptvcursor_pop_subtree(cursor);
5409   }
5410   si->callId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
5411   ptvcursor_add(cursor, hf_skinny_callReference, 4, ENC_LITTLE_ENDIAN);
5412   {
5413     ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "mRxMediaEncryptionKeyInfo");
5414     ptvcursor_add(cursor, hf_skinny_algorithmID, 4, ENC_LITTLE_ENDIAN);
5415     keylen = tvb_get_letohs(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
5416     ptvcursor_add(cursor, hf_skinny_keylen, 2, ENC_LITTLE_ENDIAN);
5417     saltlen = tvb_get_letohs(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
5418     ptvcursor_add(cursor, hf_skinny_saltlen, 2, ENC_LITTLE_ENDIAN);
5419     if (keylen <= 16) {
5420       guint32 counter_3 = 0;
5421       ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "key [ref:keylen = %d, max:16]", keylen);
5422       for (counter_3 = 0; counter_3 < 16; counter_3++) {
5423         if (counter_3 < keylen) {
5424           ptvcursor_add(cursor, hf_skinny_key, 1, ENC_LITTLE_ENDIAN);
5425         } else {
5426           ptvcursor_advance(cursor, 1);
5427         }
5428       }
5429       ptvcursor_pop_subtree(cursor);
5430     } else {
5431       ptvcursor_advance(cursor, (16 * 1));
5432     }
5433     if (saltlen <= 16) {
5434       guint32 counter_3 = 0;
5435       ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "salt [ref:saltlen = %d, max:16]", saltlen);
5436       for (counter_3 = 0; counter_3 < 16; counter_3++) {
5437         if (counter_3 < saltlen) {
5438           ptvcursor_add(cursor, hf_skinny_salt, 1, ENC_LITTLE_ENDIAN);
5439         } else {
5440           ptvcursor_advance(cursor, 1);
5441         }
5442       }
5443       ptvcursor_pop_subtree(cursor);
5444     } else {
5445       ptvcursor_advance(cursor, (16 * 1));
5446     }
5447     ptvcursor_add(cursor, hf_skinny_isMKIPresent, 4, ENC_LITTLE_ENDIAN);
5448     ptvcursor_add(cursor, hf_skinny_keyDerivationRate, 4, ENC_LITTLE_ENDIAN);
5449     ptvcursor_pop_subtree(cursor);
5450   }
5451   ptvcursor_add(cursor, hf_skinny_streamPassThroughId, 4, ENC_LITTLE_ENDIAN);
5452   ptvcursor_add(cursor, hf_skinny_associatedStreamId, 4, ENC_LITTLE_ENDIAN);
5453   ptvcursor_add(cursor, hf_skinny_RFC2833PayloadType, 4, ENC_LITTLE_ENDIAN);
5454   ptvcursor_add(cursor, hf_skinny_dtmfType, 4, ENC_LITTLE_ENDIAN);
5455   if (hdr_version >= V11_MSG_TYPE) {
5456     ptvcursor_add(cursor, hf_skinny_mixingMode, 4, ENC_LITTLE_ENDIAN);
5457     ptvcursor_add(cursor, hf_skinny_partyDirection, 4, ENC_LITTLE_ENDIAN);
5458     read_skinny_ipv4or6(cursor, &sourceIpAddr);
5459     dissect_skinny_ipv4or6(cursor, hf_skinny_sourceIpAddr_ipv4, hf_skinny_sourceIpAddr_ipv6);
5460     sourcePortNumber = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
5461     ptvcursor_add(cursor, hf_skinny_sourcePortNumber, 4, ENC_LITTLE_ENDIAN);
5462     srtp_add_address(pinfo, PT_UDP, &sourceIpAddr, sourcePortNumber, 0, "SKINNY", pinfo->num, false, NULL, NULL, NULL);
5463     sourceIpAddr_str = address_to_display(NULL, &sourceIpAddr);
5464     si->additionalInfo = g_strdup_printf("%s:%d", sourceIpAddr_str, sourcePortNumber);
5465     wmem_free(NULL, sourceIpAddr_str);
5466   }
5467   if (hdr_version >= V16_MSG_TYPE) {
5468     ptvcursor_add(cursor, hf_skinny_requestedIpAddrType, 4, ENC_LITTLE_ENDIAN);
5469   }
5470   if (hdr_version >= V17_MSG_TYPE) {
5471     if (hdr_data_length > 132) {
5472       ptvcursor_add(cursor, hf_skinny_audioLevelAdjustment, 4, ENC_LITTLE_ENDIAN);
5473     }
5474   }
5475   if (hdr_version >= V21_MSG_TYPE) {
5476     if (hdr_data_length > 132) {
5477       {
5478         ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "latentCapsInfo");
5479         ptvcursor_add(cursor, hf_skinny_active, 4, ENC_LITTLE_ENDIAN);
5480         {
5481           ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "modemRelay");
5482           ptvcursor_add(cursor, hf_skinny_capAndVer, 4, ENC_LITTLE_ENDIAN);
5483           ptvcursor_add(cursor, hf_skinny_modAnd2833, 4, ENC_LITTLE_ENDIAN);
5484           ptvcursor_pop_subtree(cursor);
5485         }
5486         {
5487           ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "sprtPayload");
5488           ptvcursor_add(cursor, hf_skinny_chan0MaxPayload, 2, ENC_LITTLE_ENDIAN);
5489           ptvcursor_add(cursor, hf_skinny_chan2MaxPayload, 2, ENC_LITTLE_ENDIAN);
5490           ptvcursor_add(cursor, hf_skinny_chan3MaxPayload, 2, ENC_LITTLE_ENDIAN);
5491           ptvcursor_add(cursor, hf_skinny_chan2MaxWindow, 2, ENC_LITTLE_ENDIAN);
5492           ptvcursor_pop_subtree(cursor);
5493         }
5494         {
5495           ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "sse");
5496           ptvcursor_add(cursor, hf_skinny_standard, 4, ENC_LITTLE_ENDIAN);
5497           ptvcursor_add(cursor, hf_skinny_vendor, 4, ENC_LITTLE_ENDIAN);
5498           ptvcursor_pop_subtree(cursor);
5499         }
5500         {
5501           ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "payloadParam");
5502           ptvcursor_add(cursor, hf_skinny_nse, 1, ENC_LITTLE_ENDIAN);
5503           ptvcursor_add(cursor, hf_skinny_rfc2833, 1, ENC_LITTLE_ENDIAN);
5504           ptvcursor_add(cursor, hf_skinny_sse, 1, ENC_LITTLE_ENDIAN);
5505           ptvcursor_add(cursor, hf_skinny_v150sprt, 1, ENC_LITTLE_ENDIAN);
5506           ptvcursor_add(cursor, hf_skinny_noaudio, 1, ENC_LITTLE_ENDIAN);
5507           ptvcursor_add(cursor, hf_skinny_FutureUse1, 1, ENC_LITTLE_ENDIAN);
5508           ptvcursor_add(cursor, hf_skinny_FutureUse2, 1, ENC_LITTLE_ENDIAN);
5509           ptvcursor_add(cursor, hf_skinny_FutureUse3, 1, ENC_LITTLE_ENDIAN);
5510           ptvcursor_pop_subtree(cursor);
5511         }
5512         ptvcursor_pop_subtree(cursor);
5513       }
5514     }
5515   }
5516   skinny_reqrep_add_request(cursor, pinfo, skinny_conv, 0x0105 ^ passThroughPartyId);
5517 }
5518 
5519 /*
5520  * Message:   CloseReceiveChannelMessage
5521  * Opcode:    0x0106
5522  * Type:      MediaControl
5523  * Direction: pbx2dev
5524  * VarLength: no
5525  * MsgType:   event
5526  */
5527 static void
handle_CloseReceiveChannelMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)5528 handle_CloseReceiveChannelMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
5529 {
5530   ptvcursor_add(cursor, hf_skinny_conferenceId, 4, ENC_LITTLE_ENDIAN);
5531   si->passThroughPartyId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
5532   ptvcursor_add(cursor, hf_skinny_passThroughPartyId, 4, ENC_LITTLE_ENDIAN);
5533   si->callId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
5534   ptvcursor_add(cursor, hf_skinny_callReference, 4, ENC_LITTLE_ENDIAN);
5535   ptvcursor_add(cursor, hf_skinny_portHandlingFlag, 4, ENC_LITTLE_ENDIAN);
5536 }
5537 
5538 /*
5539  * Message:   ConnectionStatisticsReqMessage
5540  * Opcode:    0x0107
5541  * Type:      CallControl
5542  * Direction: pbx2dev
5543  * VarLength: no
5544  * MsgType:   request
5545  */
5546 static void
handle_ConnectionStatisticsReqMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)5547 handle_ConnectionStatisticsReqMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
5548 {
5549   guint32 hdr_version = tvb_get_letohl(ptvcursor_tvbuff(cursor), 4);
5550   guint32 callReference = 0;
5551 
5552   if (hdr_version <= V17_MSG_TYPE) {
5553     ptvcursor_add(cursor, hf_skinny_directoryNum, 24, ENC_ASCII|ENC_NA);
5554   }
5555   if (hdr_version >= V18_MSG_TYPE) {
5556     ptvcursor_add(cursor, hf_skinny_directoryNum, 28, ENC_ASCII|ENC_NA);
5557   }
5558   callReference = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
5559   si->callId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
5560   ptvcursor_add(cursor, hf_skinny_callReference, 4, ENC_LITTLE_ENDIAN);
5561   ptvcursor_add(cursor, hf_skinny_statsProcessingMode, 4, ENC_LITTLE_ENDIAN);
5562   skinny_reqrep_add_request(cursor, pinfo, skinny_conv, 0x0107 ^ callReference);
5563 }
5564 
5565 /*
5566  * Message:   SoftKeyTemplateResMessage
5567  * Opcode:    0x0108
5568  * Type:      RegistrationAndManagement
5569  * Direction: pbx2dev
5570  * VarLength: no
5571  * MsgType:   response
5572  */
5573 static void
handle_SoftKeyTemplateResMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)5574 handle_SoftKeyTemplateResMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
5575 {
5576   guint32 totalSoftKeyCount = 0;
5577   {
5578     ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "softKeyTemplate");
5579     ptvcursor_add(cursor, hf_skinny_softKeyOffset, 4, ENC_LITTLE_ENDIAN);
5580     ptvcursor_add(cursor, hf_skinny_softKeyCount, 4, ENC_LITTLE_ENDIAN);
5581     totalSoftKeyCount = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
5582     ptvcursor_add(cursor, hf_skinny_totalSoftKeyCount, 4, ENC_LITTLE_ENDIAN);
5583     if (totalSoftKeyCount <= 32) {
5584       guint32 counter_2 = 0;
5585       ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "definition [ref:totalSoftKeyCount = %d, max:32]", totalSoftKeyCount);
5586       if (totalSoftKeyCount && tvb_get_letohl(ptvcursor_tvbuff(cursor), 0) + 8 >= ptvcursor_current_offset(cursor) + (totalSoftKeyCount * 20) && totalSoftKeyCount <= 32) {
5587         for (counter_2 = 0; counter_2 < 32; counter_2++) {
5588           if (counter_2 < totalSoftKeyCount) {
5589             ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "definition [%d / %d]", counter_2 + 1, totalSoftKeyCount);
5590             dissect_skinny_displayLabel(cursor, pinfo, hf_skinny_softKeyLabel, 16);
5591             ptvcursor_add(cursor, hf_skinny_softKeyEvent, 4, ENC_LITTLE_ENDIAN);
5592           } else {
5593             ptvcursor_advance(cursor, 20);
5594           }
5595           ptvcursor_pop_subtree(cursor);
5596         }
5597       }
5598       ptvcursor_pop_subtree(cursor);
5599     } else {
5600       ptvcursor_advance(cursor, (totalSoftKeyCount * 20));
5601     }
5602     ptvcursor_pop_subtree(cursor);
5603   }
5604   skinny_reqrep_add_response(cursor, pinfo, skinny_conv, 0x0028);
5605 }
5606 
5607 /*
5608  * Message:   SoftKeySetResMessage
5609  * Opcode:    0x0109
5610  * Type:      RegistrationAndManagement
5611  * Direction: pbx2dev
5612  * VarLength: no
5613  * MsgType:   response
5614  */
5615 static void
handle_SoftKeySetResMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)5616 handle_SoftKeySetResMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
5617 {
5618   guint32 totalSoftKeySetCount = 0;
5619   {
5620     ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "softKeySets");
5621     ptvcursor_add(cursor, hf_skinny_softKeySetOffset, 4, ENC_LITTLE_ENDIAN);
5622     ptvcursor_add(cursor, hf_skinny_softKeySetCount, 4, ENC_LITTLE_ENDIAN);
5623     totalSoftKeySetCount = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
5624     ptvcursor_add(cursor, hf_skinny_totalSoftKeySetCount, 4, ENC_LITTLE_ENDIAN);
5625     if (totalSoftKeySetCount <= 16) {
5626       guint32 counter_2 = 0;
5627       ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "definition [ref:totalSoftKeySetCount = %d, max:16]", totalSoftKeySetCount);
5628       if (totalSoftKeySetCount && tvb_get_letohl(ptvcursor_tvbuff(cursor), 0) + 8 >= ptvcursor_current_offset(cursor) + (totalSoftKeySetCount * 3) && totalSoftKeySetCount <= 16) {
5629         for (counter_2 = 0; counter_2 < 16; counter_2++) {
5630           if (counter_2 < totalSoftKeySetCount) {
5631             ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "definition [%d / %d]", counter_2 + 1, totalSoftKeySetCount);
5632             {
5633               guint32 counter_7 = 0;
5634               ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "softKeyTemplateIndex [max:16]");
5635               for (counter_7 = 0; counter_7 < 16; counter_7++) {
5636                 ptvcursor_add(cursor, hf_skinny_softKeyTemplateIndex, 1, ENC_LITTLE_ENDIAN);
5637               }
5638               ptvcursor_pop_subtree(cursor);
5639             }
5640             {
5641               guint32 counter_7 = 0;
5642               ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "softKeyInfoIndex [max:16]");
5643               for (counter_7 = 0; counter_7 < 16; counter_7++) {
5644                 ptvcursor_add(cursor, hf_skinny_softKeyInfoIndex, 2, ENC_LITTLE_ENDIAN);
5645               }
5646               ptvcursor_pop_subtree(cursor);
5647             }
5648           } else {
5649             ptvcursor_advance(cursor, 3);
5650           }
5651           ptvcursor_pop_subtree(cursor);
5652         }
5653       }
5654       ptvcursor_pop_subtree(cursor);
5655     } else {
5656       ptvcursor_advance(cursor, (totalSoftKeySetCount * 3));
5657     }
5658     ptvcursor_pop_subtree(cursor);
5659   }
5660   skinny_reqrep_add_response(cursor, pinfo, skinny_conv, 0x0025);
5661 }
5662 
5663 /*
5664  * Message:   SelectSoftKeysMessage
5665  * Opcode:    0x0110
5666  * Type:      RegistrationAndManagement
5667  * Direction: pbx2dev
5668  * VarLength: no
5669  * MsgType:   event
5670  */
5671 static void
handle_SelectSoftKeysMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)5672 handle_SelectSoftKeysMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
5673 {
5674   si->lineId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
5675   ptvcursor_add(cursor, hf_skinny_lineInstance, 4, ENC_LITTLE_ENDIAN);
5676   si->callId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
5677   ptvcursor_add(cursor, hf_skinny_callReference, 4, ENC_LITTLE_ENDIAN);
5678   ptvcursor_add(cursor, hf_skinny_softKeySetIndex, 4, ENC_LITTLE_ENDIAN);
5679   ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "validKeyMask");
5680   ptvcursor_add_no_advance(cursor, hf_skinny_SoftKeyMask_SoftKey1, 4, ENC_LITTLE_ENDIAN);
5681   ptvcursor_add_no_advance(cursor, hf_skinny_SoftKeyMask_SoftKey2, 4, ENC_LITTLE_ENDIAN);
5682   ptvcursor_add_no_advance(cursor, hf_skinny_SoftKeyMask_SoftKey3, 4, ENC_LITTLE_ENDIAN);
5683   ptvcursor_add_no_advance(cursor, hf_skinny_SoftKeyMask_SoftKey4, 4, ENC_LITTLE_ENDIAN);
5684   ptvcursor_add_no_advance(cursor, hf_skinny_SoftKeyMask_SoftKey5, 4, ENC_LITTLE_ENDIAN);
5685   ptvcursor_add_no_advance(cursor, hf_skinny_SoftKeyMask_SoftKey6, 4, ENC_LITTLE_ENDIAN);
5686   ptvcursor_add_no_advance(cursor, hf_skinny_SoftKeyMask_SoftKey7, 4, ENC_LITTLE_ENDIAN);
5687   ptvcursor_add_no_advance(cursor, hf_skinny_SoftKeyMask_SoftKey8, 4, ENC_LITTLE_ENDIAN);
5688   ptvcursor_add_no_advance(cursor, hf_skinny_SoftKeyMask_SoftKey9, 4, ENC_LITTLE_ENDIAN);
5689   ptvcursor_add_no_advance(cursor, hf_skinny_SoftKeyMask_SoftKey10, 4, ENC_LITTLE_ENDIAN);
5690   ptvcursor_add_no_advance(cursor, hf_skinny_SoftKeyMask_SoftKey11, 4, ENC_LITTLE_ENDIAN);
5691   ptvcursor_add_no_advance(cursor, hf_skinny_SoftKeyMask_SoftKey12, 4, ENC_LITTLE_ENDIAN);
5692   ptvcursor_add_no_advance(cursor, hf_skinny_SoftKeyMask_SoftKey13, 4, ENC_LITTLE_ENDIAN);
5693   ptvcursor_add_no_advance(cursor, hf_skinny_SoftKeyMask_SoftKey14, 4, ENC_LITTLE_ENDIAN);
5694   ptvcursor_add_no_advance(cursor, hf_skinny_SoftKeyMask_SoftKey15, 4, ENC_LITTLE_ENDIAN);
5695   ptvcursor_add_no_advance(cursor, hf_skinny_SoftKeyMask_SoftKey16, 4, ENC_LITTLE_ENDIAN);
5696   ptvcursor_advance(cursor, 4);
5697   ptvcursor_pop_subtree(cursor); /* end bitfield: validKeyMask */
5698 }
5699 
5700 /*
5701  * Message:   CallStateMessage
5702  * Opcode:    0x0111
5703  * Type:      CallControl
5704  * Direction: pbx2dev
5705  * VarLength: no
5706  * MsgType:   event
5707  */
5708 static void
handle_CallStateMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)5709 handle_CallStateMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
5710 {
5711   si->additionalInfo = g_strdup_printf("\"%s\"",
5712     try_val_to_str_ext(
5713       tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor)),
5714       &DCallState_ext
5715     )
5716   );
5717   si->callState = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
5718   ptvcursor_add(cursor, hf_skinny_callState, 4, ENC_LITTLE_ENDIAN);
5719   si->lineId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
5720   ptvcursor_add(cursor, hf_skinny_lineInstance, 4, ENC_LITTLE_ENDIAN);
5721   si->callId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
5722   ptvcursor_add(cursor, hf_skinny_callReference, 4, ENC_LITTLE_ENDIAN);
5723   ptvcursor_add(cursor, hf_skinny_privacy, 4, ENC_LITTLE_ENDIAN);
5724   {
5725     ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "precedence");
5726     ptvcursor_add(cursor, hf_skinny_precedenceLevel, 4, ENC_LITTLE_ENDIAN);
5727     ptvcursor_add(cursor, hf_skinny_precedenceDomain, 4, ENC_LITTLE_ENDIAN);
5728     ptvcursor_pop_subtree(cursor);
5729   }
5730 }
5731 
5732 /*
5733  * Message:   DisplayPromptStatusMessage
5734  * Opcode:    0x0112
5735  * Type:      CallControl
5736  * Direction: pbx2dev
5737  * VarLength: no
5738  * MsgType:   event
5739  */
5740 static void
handle_DisplayPromptStatusMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)5741 handle_DisplayPromptStatusMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
5742 {
5743   ptvcursor_add(cursor, hf_skinny_timeOutValue, 4, ENC_LITTLE_ENDIAN);
5744   dissect_skinny_displayLabel(cursor, pinfo, hf_skinny_promptStatus, 32);
5745   si->lineId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
5746   ptvcursor_add(cursor, hf_skinny_lineInstance, 4, ENC_LITTLE_ENDIAN);
5747   si->callId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
5748   ptvcursor_add(cursor, hf_skinny_callReference, 4, ENC_LITTLE_ENDIAN);
5749 }
5750 
5751 /*
5752  * Message:   ClearPromptStatusMessage
5753  * Opcode:    0x0113
5754  * Type:      CallControl
5755  * Direction: pbx2dev
5756  * VarLength: no
5757  * MsgType:   event
5758  */
5759 static void
handle_ClearPromptStatusMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)5760 handle_ClearPromptStatusMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
5761 {
5762   si->lineId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
5763   ptvcursor_add(cursor, hf_skinny_lineInstance, 4, ENC_LITTLE_ENDIAN);
5764   si->callId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
5765   ptvcursor_add(cursor, hf_skinny_callReference, 4, ENC_LITTLE_ENDIAN);
5766 }
5767 
5768 /*
5769  * Message:   DisplayNotifyMessage
5770  * Opcode:    0x0114
5771  * Type:      CallControl
5772  * Direction: pbx2dev
5773  * VarLength: no
5774  * MsgType:   event
5775  */
5776 static void
handle_DisplayNotifyMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)5777 handle_DisplayNotifyMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
5778 {
5779   ptvcursor_add(cursor, hf_skinny_timeOutValue, 4, ENC_LITTLE_ENDIAN);
5780   dissect_skinny_displayLabel(cursor, pinfo, hf_skinny_notify, 32);
5781 }
5782 
5783 /*
5784  * Message:   ActivateCallPlaneMessage
5785  * Opcode:    0x0116
5786  * Type:      CallControl
5787  * Direction: pbx2dev
5788  * VarLength: no
5789  * MsgType:   event
5790  */
5791 static void
handle_ActivateCallPlaneMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)5792 handle_ActivateCallPlaneMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
5793 {
5794   si->lineId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
5795   ptvcursor_add(cursor, hf_skinny_lineInstance, 4, ENC_LITTLE_ENDIAN);
5796 }
5797 
5798 /*
5799  * Message:   UnregisterAckMessage
5800  * Opcode:    0x0118
5801  * Type:      RegistrationAndManagement
5802  * Direction: pbx2dev
5803  * VarLength: no
5804  * MsgType:   response
5805  */
5806 static void
handle_UnregisterAckMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)5807 handle_UnregisterAckMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
5808 {
5809   ptvcursor_add(cursor, hf_skinny_status, 4, ENC_LITTLE_ENDIAN);
5810   skinny_reqrep_add_response(cursor, pinfo, skinny_conv, 0x0027);
5811 }
5812 
5813 /*
5814  * Message:   BackSpaceResMessage
5815  * Opcode:    0x0119
5816  * Type:      CallControl
5817  * Direction: pbx2dev
5818  * VarLength: no
5819  * MsgType:   event
5820  */
5821 static void
handle_BackSpaceResMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)5822 handle_BackSpaceResMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
5823 {
5824   si->lineId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
5825   ptvcursor_add(cursor, hf_skinny_lineInstance, 4, ENC_LITTLE_ENDIAN);
5826   si->callId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
5827   ptvcursor_add(cursor, hf_skinny_callReference, 4, ENC_LITTLE_ENDIAN);
5828 }
5829 
5830 /*
5831  * Message:   RegisterTokenReject
5832  * Opcode:    0x011b
5833  * Type:      RegistrationAndManagement
5834  * Direction: pbx2dev
5835  * VarLength: no
5836  * MsgType:   response
5837  */
5838 static void
handle_RegisterTokenReject(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)5839 handle_RegisterTokenReject(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
5840 {
5841   ptvcursor_add(cursor, hf_skinny_waitTimeBeforeNextReq, 4, ENC_LITTLE_ENDIAN);
5842   skinny_reqrep_add_response(cursor, pinfo, skinny_conv, 0x0029);
5843 }
5844 
5845 /*
5846  * Message:   StartMediaFailureDetectionMessage
5847  * Opcode:    0x011c
5848  * Type:      MediaControl
5849  * Direction: pbx2dev
5850  * VarLength: no
5851  * MsgType:   event
5852  */
5853 static void
handle_StartMediaFailureDetectionMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)5854 handle_StartMediaFailureDetectionMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
5855 {
5856   guint32 compressionType = 0;
5857   guint32 hdr_version = tvb_get_letohl(ptvcursor_tvbuff(cursor), 4);
5858   ptvcursor_add(cursor, hf_skinny_conferenceId, 4, ENC_LITTLE_ENDIAN);
5859   si->passThroughPartyId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
5860   ptvcursor_add(cursor, hf_skinny_passThroughPartyId, 4, ENC_LITTLE_ENDIAN);
5861   ptvcursor_add(cursor, hf_skinny_milliSecondPacketSize, 4, ENC_LITTLE_ENDIAN);
5862   compressionType = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
5863   ptvcursor_add(cursor, hf_skinny_compressionType, 4, ENC_LITTLE_ENDIAN);
5864   {
5865     ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "qualifierIn");
5866     ptvcursor_add(cursor, hf_skinny_ecValue, 4, ENC_LITTLE_ENDIAN);
5867     if (hdr_version <= V10_MSG_TYPE) {
5868       ptvcursor_add(cursor, hf_skinny_g723BitRate, 4, ENC_LITTLE_ENDIAN);
5869     }
5870     if (hdr_version >= V11_MSG_TYPE) {
5871       if (compressionType == MEDIA_PAYLOAD_G7231)       {
5872         ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "compressionType is Media_Payload_G7231");
5873         ptvcursor_add(cursor, hf_skinny_g723BitRate, 4, ENC_LITTLE_ENDIAN);
5874         ptvcursor_pop_subtree(cursor);
5875       } else       {
5876         ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "any compressionType");
5877         {
5878           ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "codecParams");
5879           ptvcursor_add(cursor, hf_skinny_codecMode, 1, ENC_LITTLE_ENDIAN);
5880           ptvcursor_add(cursor, hf_skinny_dynamicPayload, 1, ENC_LITTLE_ENDIAN);
5881           ptvcursor_add(cursor, hf_skinny_codecParam1, 1, ENC_LITTLE_ENDIAN);
5882           ptvcursor_add(cursor, hf_skinny_codecParam2, 1, ENC_LITTLE_ENDIAN);
5883           ptvcursor_pop_subtree(cursor);
5884         }
5885         ptvcursor_pop_subtree(cursor);
5886       }
5887     }
5888     ptvcursor_pop_subtree(cursor);
5889   }
5890   si->callId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
5891   ptvcursor_add(cursor, hf_skinny_callReference, 4, ENC_LITTLE_ENDIAN);
5892 }
5893 
5894 /*
5895  * Message:   DialedNumberMessage
5896  * Opcode:    0x011d
5897  * Type:      CallControl
5898  * Direction: pbx2dev
5899  * VarLength: no
5900  * MsgType:   event
5901  */
5902 static void
handle_DialedNumberMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)5903 handle_DialedNumberMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
5904 {
5905   guint32 hdr_version = tvb_get_letohl(ptvcursor_tvbuff(cursor), 4);
5906   guint32 VariableDirnumSize = (hdr_version >= V18_MSG_TYPE) ? 25 : 24;
5907 
5908   if (hdr_version <= V17_MSG_TYPE) {
5909     guint32 dialedNumber_len;
5910     dialedNumber_len = tvb_strnlen(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor), 24)+1;
5911     if (dialedNumber_len > 1) {
5912       si->additionalInfo = g_strdup_printf("\"%s\"", tvb_format_stringzpad(pinfo->pool, ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor), dialedNumber_len));
5913     }
5914     ptvcursor_add(cursor, hf_skinny_dialedNumber, 24, ENC_ASCII|ENC_NA);
5915     si->lineId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
5916     ptvcursor_add(cursor, hf_skinny_lineInstance, 4, ENC_LITTLE_ENDIAN);
5917     si->callId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
5918     ptvcursor_add(cursor, hf_skinny_callReference, 4, ENC_LITTLE_ENDIAN);
5919   }
5920   if (hdr_version >= V18_MSG_TYPE) {
5921     guint32 dialedNumber_len;
5922     dialedNumber_len = tvb_strnlen(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor), VariableDirnumSize)+1;
5923     if (dialedNumber_len > 1) {
5924       si->additionalInfo = g_strdup_printf("\"%s\"", tvb_format_stringzpad(pinfo->pool, ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor), dialedNumber_len));
5925     }
5926     ptvcursor_add(cursor, hf_skinny_dialedNumber, VariableDirnumSize, ENC_ASCII|ENC_NA);
5927     si->lineId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
5928     ptvcursor_add(cursor, hf_skinny_lineInstance, 4, ENC_LITTLE_ENDIAN);
5929     si->callId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
5930     ptvcursor_add(cursor, hf_skinny_callReference, 4, ENC_LITTLE_ENDIAN);
5931   }
5932 }
5933 
5934 /*
5935  * Message:   UserToDeviceDataMessage
5936  * Opcode:    0x011e
5937  * Type:      RegistrationAndManagement
5938  * Direction: pbx2dev
5939  * VarLength: no
5940  * MsgType:   event
5941  */
5942 static void
handle_UserToDeviceDataMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)5943 handle_UserToDeviceDataMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
5944 {
5945   guint32 dataLength = 0;
5946   {
5947     ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "userToDeviceData");
5948     ptvcursor_add(cursor, hf_skinny_applicationId, 4, ENC_LITTLE_ENDIAN);
5949     si->lineId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
5950     ptvcursor_add(cursor, hf_skinny_lineInstance, 4, ENC_LITTLE_ENDIAN);
5951     si->callId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
5952     ptvcursor_add(cursor, hf_skinny_callReference, 4, ENC_LITTLE_ENDIAN);
5953     ptvcursor_add(cursor, hf_skinny_transactionId, 4, ENC_LITTLE_ENDIAN);
5954     dataLength = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
5955     ptvcursor_add(cursor, hf_skinny_dataLength, 4, ENC_LITTLE_ENDIAN);
5956     dissect_skinny_xml(cursor, hf_skinny_xmldata, pinfo, dataLength, 2000);
5957     ptvcursor_pop_subtree(cursor);
5958   }
5959 }
5960 
5961 /*
5962  * Message:   FeatureStatResMessage
5963  * Opcode:    0x011f
5964  * Type:      RegistrationAndManagement
5965  * Direction: pbx2dev
5966  * VarLength: no
5967  * MsgType:   response
5968  */
5969 static void
handle_FeatureStatResMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)5970 handle_FeatureStatResMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
5971 {
5972   guint32 featureIndex = 0;
5973   featureIndex = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
5974   ptvcursor_add(cursor, hf_skinny_featureIndex, 4, ENC_LITTLE_ENDIAN);
5975   ptvcursor_add(cursor, hf_skinny_featureID, 4, ENC_LITTLE_ENDIAN);
5976   ptvcursor_add(cursor, hf_skinny_featureTextLabel, 40, ENC_ASCII|ENC_NA);
5977   ptvcursor_add(cursor, hf_skinny_featureStatus, 4, ENC_LITTLE_ENDIAN);
5978   skinny_reqrep_add_response(cursor, pinfo, skinny_conv, 0x0034 ^ featureIndex);
5979 }
5980 
5981 /*
5982  * Message:   DisplayPriNotifyMessage
5983  * Opcode:    0x0120
5984  * Type:      RegistrationAndManagement
5985  * Direction: pbx2dev
5986  * VarLength: no
5987  * MsgType:   event
5988  */
5989 static void
handle_DisplayPriNotifyMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)5990 handle_DisplayPriNotifyMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
5991 {
5992   ptvcursor_add(cursor, hf_skinny_timeOutValue, 4, ENC_LITTLE_ENDIAN);
5993   ptvcursor_add(cursor, hf_skinny_priority, 4, ENC_LITTLE_ENDIAN);
5994   dissect_skinny_displayLabel(cursor, pinfo, hf_skinny_notify, 32);
5995 }
5996 
5997 /*
5998  * Message:   ClearPriNotifyMessage
5999  * Opcode:    0x0121
6000  * Type:      RegistrationAndManagement
6001  * Direction: pbx2dev
6002  * VarLength: no
6003  * MsgType:   event
6004  */
6005 static void
handle_ClearPriNotifyMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)6006 handle_ClearPriNotifyMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
6007 {
6008   ptvcursor_add(cursor, hf_skinny_priority, 4, ENC_LITTLE_ENDIAN);
6009 }
6010 
6011 /*
6012  * Message:   StartAnnouncementMessage
6013  * Opcode:    0x0122
6014  * Type:      IntraCCM
6015  * Direction: pbx2pbx
6016  * VarLength: no
6017  * MsgType:   event
6018  */
6019 static void
handle_StartAnnouncementMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)6020 handle_StartAnnouncementMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
6021 {
6022   {
6023     guint32 counter_1 = 0;
6024     ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "AnnList [max:32]");
6025     for (counter_1 = 0; counter_1 < 32; counter_1++) {
6026       ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "AnnList [%d / %d]", counter_1 + 1, 32);
6027       ptvcursor_add(cursor, hf_skinny_locale, 4, ENC_LITTLE_ENDIAN);
6028       ptvcursor_add(cursor, hf_skinny_country, 4, ENC_LITTLE_ENDIAN);
6029       ptvcursor_add(cursor, hf_skinny_toneAnnouncement, 4, ENC_LITTLE_ENDIAN);
6030       ptvcursor_pop_subtree(cursor);
6031     }
6032     ptvcursor_pop_subtree(cursor);
6033   }
6034   ptvcursor_add(cursor, hf_skinny_annAckReq, 4, ENC_LITTLE_ENDIAN);
6035   ptvcursor_add(cursor, hf_skinny_conferenceId, 4, ENC_LITTLE_ENDIAN);
6036   {
6037     guint32 counter_2 = 0;
6038     ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "matrixConfPartyID [max:16]");
6039     for (counter_2 = 0; counter_2 < 16; counter_2++) {
6040       ptvcursor_add(cursor, hf_skinny_matrixConfPartyID, 4, ENC_LITTLE_ENDIAN);
6041     }
6042     ptvcursor_pop_subtree(cursor);
6043   }
6044   ptvcursor_add(cursor, hf_skinny_hearingConfPartyMask, 4, ENC_LITTLE_ENDIAN);
6045   ptvcursor_add(cursor, hf_skinny_annPlayMode, 4, ENC_LITTLE_ENDIAN);
6046 }
6047 
6048 /*
6049  * Message:   StopAnnouncementMessage
6050  * Opcode:    0x0123
6051  * Type:      IntraCCM
6052  * Direction: pbx2pbx
6053  * VarLength: no
6054  * MsgType:   event
6055  */
6056 static void
handle_StopAnnouncementMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)6057 handle_StopAnnouncementMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
6058 {
6059   ptvcursor_add(cursor, hf_skinny_conferenceId, 4, ENC_LITTLE_ENDIAN);
6060 }
6061 
6062 /*
6063  * Message:   AnnouncementFinishMessage
6064  * Opcode:    0x0124
6065  * Type:      IntraCCM
6066  * Direction: pbx2pbx
6067  * VarLength: no
6068  * MsgType:   event
6069  */
6070 static void
handle_AnnouncementFinishMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)6071 handle_AnnouncementFinishMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
6072 {
6073   ptvcursor_add(cursor, hf_skinny_conferenceId, 4, ENC_LITTLE_ENDIAN);
6074   ptvcursor_add(cursor, hf_skinny_annStatus, 4, ENC_LITTLE_ENDIAN);
6075 }
6076 
6077 /*
6078  * Message:   NotifyDtmfToneMessage
6079  * Opcode:    0x0127
6080  * Type:      CallControl
6081  * Direction: pbx2dev
6082  * VarLength: no
6083  * MsgType:   event
6084  */
6085 static void
handle_NotifyDtmfToneMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)6086 handle_NotifyDtmfToneMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
6087 {
6088   ptvcursor_add(cursor, hf_skinny_tone, 4, ENC_LITTLE_ENDIAN);
6089   ptvcursor_add(cursor, hf_skinny_conferenceId, 4, ENC_LITTLE_ENDIAN);
6090   ptvcursor_add(cursor, hf_skinny_passthruPartyID, 4, ENC_LITTLE_ENDIAN);
6091 }
6092 
6093 /*
6094  * Message:   SendDtmfToneMessage
6095  * Opcode:    0x0128
6096  * Type:      CallControl
6097  * Direction: pbx2dev
6098  * VarLength: no
6099  * MsgType:   event
6100  */
6101 static void
handle_SendDtmfToneMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)6102 handle_SendDtmfToneMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
6103 {
6104   ptvcursor_add(cursor, hf_skinny_tone, 4, ENC_LITTLE_ENDIAN);
6105   ptvcursor_add(cursor, hf_skinny_conferenceId, 4, ENC_LITTLE_ENDIAN);
6106   ptvcursor_add(cursor, hf_skinny_passthruPartyID, 4, ENC_LITTLE_ENDIAN);
6107 }
6108 
6109 /*
6110  * Message:   SubscribeDtmfPayloadReqMessage
6111  * Opcode:    0x0129
6112  * Type:      CallControl
6113  * Direction: pbx2dev
6114  * VarLength: no
6115  * MsgType:   request
6116  */
6117 static void
handle_SubscribeDtmfPayloadReqMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)6118 handle_SubscribeDtmfPayloadReqMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
6119 {
6120   ptvcursor_add(cursor, hf_skinny_payloadDtmf, 4, ENC_LITTLE_ENDIAN);
6121   ptvcursor_add(cursor, hf_skinny_conferenceId, 4, ENC_LITTLE_ENDIAN);
6122   ptvcursor_add(cursor, hf_skinny_passthruPartyID, 4, ENC_LITTLE_ENDIAN);
6123   ptvcursor_add(cursor, hf_skinny_dtmfType, 4, ENC_LITTLE_ENDIAN);
6124   skinny_reqrep_add_request(cursor, pinfo, skinny_conv, 0x0129);
6125 }
6126 
6127 /*
6128  * Message:   SubscribeDtmfPayloadResMessage
6129  * Opcode:    0x012a
6130  * Type:      CallControl
6131  * Direction: pbx2dev
6132  * VarLength: no
6133  * MsgType:   response
6134  */
6135 static void
handle_SubscribeDtmfPayloadResMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)6136 handle_SubscribeDtmfPayloadResMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
6137 {
6138   guint32 passthruPartyID = 0;
6139   ptvcursor_add(cursor, hf_skinny_payloadDtmf, 4, ENC_LITTLE_ENDIAN);
6140   ptvcursor_add(cursor, hf_skinny_conferenceId, 4, ENC_LITTLE_ENDIAN);
6141   passthruPartyID = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
6142   ptvcursor_add(cursor, hf_skinny_passthruPartyID, 4, ENC_LITTLE_ENDIAN);
6143   skinny_reqrep_add_response(cursor, pinfo, skinny_conv, 0x0129 ^ passthruPartyID);
6144 }
6145 
6146 /*
6147  * Message:   SubscribeDtmfPayloadErrMessage
6148  * Opcode:    0x012b
6149  * Type:      CallControl
6150  * Direction: pbx2dev
6151  * VarLength: no
6152  * MsgType:   response
6153  */
6154 static void
handle_SubscribeDtmfPayloadErrMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)6155 handle_SubscribeDtmfPayloadErrMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
6156 {
6157   guint32 passthruPartyID = 0;
6158   ptvcursor_add(cursor, hf_skinny_payloadDtmf, 4, ENC_LITTLE_ENDIAN);
6159   ptvcursor_add(cursor, hf_skinny_conferenceId, 4, ENC_LITTLE_ENDIAN);
6160   passthruPartyID = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
6161   ptvcursor_add(cursor, hf_skinny_passthruPartyID, 4, ENC_LITTLE_ENDIAN);
6162   skinny_reqrep_add_response(cursor, pinfo, skinny_conv, 0x0129 ^ passthruPartyID);
6163 }
6164 
6165 /*
6166  * Message:   UnSubscribeDtmfPayloadReqMessage
6167  * Opcode:    0x012c
6168  * Type:      CallControl
6169  * Direction: pbx2dev
6170  * VarLength: no
6171  * MsgType:   request
6172  */
6173 static void
handle_UnSubscribeDtmfPayloadReqMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)6174 handle_UnSubscribeDtmfPayloadReqMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
6175 {
6176   guint32 passthruPartyID = 0;
6177   ptvcursor_add(cursor, hf_skinny_payloadDtmf, 4, ENC_LITTLE_ENDIAN);
6178   ptvcursor_add(cursor, hf_skinny_conferenceId, 4, ENC_LITTLE_ENDIAN);
6179   passthruPartyID = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
6180   ptvcursor_add(cursor, hf_skinny_passthruPartyID, 4, ENC_LITTLE_ENDIAN);
6181   ptvcursor_add(cursor, hf_skinny_dtmfType, 4, ENC_LITTLE_ENDIAN);
6182   skinny_reqrep_add_request(cursor, pinfo, skinny_conv, 0x012c ^ passthruPartyID);
6183 }
6184 
6185 /*
6186  * Message:   UnSubscribeDtmfPayloadResMessage
6187  * Opcode:    0x012d
6188  * Type:      CallControl
6189  * Direction: pbx2dev
6190  * VarLength: no
6191  * MsgType:   response
6192  */
6193 static void
handle_UnSubscribeDtmfPayloadResMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)6194 handle_UnSubscribeDtmfPayloadResMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
6195 {
6196   guint32 passthruPartyID = 0;
6197   ptvcursor_add(cursor, hf_skinny_payloadDtmf, 4, ENC_LITTLE_ENDIAN);
6198   ptvcursor_add(cursor, hf_skinny_conferenceId, 4, ENC_LITTLE_ENDIAN);
6199   passthruPartyID = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
6200   ptvcursor_add(cursor, hf_skinny_passthruPartyID, 4, ENC_LITTLE_ENDIAN);
6201   skinny_reqrep_add_response(cursor, pinfo, skinny_conv, 0x012d ^ passthruPartyID);
6202 }
6203 
6204 /*
6205  * Message:   UnSubscribeDtmfPayloadErrMessage
6206  * Opcode:    0x012e
6207  * Type:      CallControl
6208  * Direction: pbx2dev
6209  * VarLength: no
6210  * MsgType:   response
6211  */
6212 static void
handle_UnSubscribeDtmfPayloadErrMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)6213 handle_UnSubscribeDtmfPayloadErrMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
6214 {
6215   guint32 passthruPartyID = 0;
6216   ptvcursor_add(cursor, hf_skinny_payloadDtmf, 4, ENC_LITTLE_ENDIAN);
6217   ptvcursor_add(cursor, hf_skinny_conferenceId, 4, ENC_LITTLE_ENDIAN);
6218   passthruPartyID = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
6219   ptvcursor_add(cursor, hf_skinny_passthruPartyID, 4, ENC_LITTLE_ENDIAN);
6220   skinny_reqrep_add_response(cursor, pinfo, skinny_conv, 0x012d ^ passthruPartyID);
6221 }
6222 
6223 /*
6224  * Message:   ServiceURLStatResMessage
6225  * Opcode:    0x012f
6226  * Type:      RegistrationAndManagement
6227  * Direction: pbx2dev
6228  * VarLength: no
6229  * MsgType:   response
6230  */
6231 static void
handle_ServiceURLStatResMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)6232 handle_ServiceURLStatResMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
6233 {
6234   guint32 serviceURLIndex = 0;
6235   serviceURLIndex = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
6236   ptvcursor_add(cursor, hf_skinny_serviceURLIndex, 4, ENC_LITTLE_ENDIAN);
6237   ptvcursor_add(cursor, hf_skinny_serviceURL, 256, ENC_ASCII|ENC_NA);
6238   ptvcursor_add(cursor, hf_skinny_serviceURLDisplayName, 40, ENC_ASCII|ENC_NA);
6239   skinny_reqrep_add_response(cursor, pinfo, skinny_conv, 0x0033 ^ serviceURLIndex);
6240 }
6241 
6242 /*
6243  * Message:   CallSelectStatResMessage
6244  * Opcode:    0x0130
6245  * Type:      CallControl
6246  * Direction: pbx2dev
6247  * VarLength: no
6248  * MsgType:   event
6249  */
6250 static void
handle_CallSelectStatResMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)6251 handle_CallSelectStatResMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
6252 {
6253   ptvcursor_add(cursor, hf_skinny_callSelectStat, 4, ENC_LITTLE_ENDIAN);
6254   si->callId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
6255   ptvcursor_add(cursor, hf_skinny_callReference, 4, ENC_LITTLE_ENDIAN);
6256   si->lineId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
6257   ptvcursor_add(cursor, hf_skinny_lineInstance, 4, ENC_LITTLE_ENDIAN);
6258 }
6259 
6260 /*
6261  * Message:   OpenMultiMediaReceiveChannelMessage
6262  * Opcode:    0x0131
6263  * Type:      MediaControl
6264  * Direction: pbx2dev
6265  * VarLength: no
6266  * MsgType:   request
6267  */
6268 static void
handle_OpenMultiMediaReceiveChannelMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)6269 handle_OpenMultiMediaReceiveChannelMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
6270 {
6271   guint32 hdr_version = tvb_get_letohl(ptvcursor_tvbuff(cursor), 4);
6272   guint32 passThroughPartyId = 0;
6273   guint32 compressionType = 0;
6274   guint32 payloadType = 0;
6275   guint32 pictureFormatCount = 0;
6276   guint16 keylen = 0;
6277   guint16 saltlen = 0;
6278   address sourceIpAddr;
6279   char *sourceIpAddr_str = NULL;
6280   guint32 sourcePortNumber = 0;
6281 
6282   ptvcursor_add(cursor, hf_skinny_conferenceId, 4, ENC_LITTLE_ENDIAN);
6283   passThroughPartyId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
6284   si->passThroughPartyId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
6285   ptvcursor_add(cursor, hf_skinny_passThroughPartyId, 4, ENC_LITTLE_ENDIAN);
6286   compressionType = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
6287   ptvcursor_add(cursor, hf_skinny_compressionType, 4, ENC_LITTLE_ENDIAN);
6288   si->lineId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
6289   ptvcursor_add(cursor, hf_skinny_lineInstance, 4, ENC_LITTLE_ENDIAN);
6290   si->callId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
6291   ptvcursor_add(cursor, hf_skinny_callReference, 4, ENC_LITTLE_ENDIAN);
6292   {
6293     ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "payloadType");
6294     ptvcursor_add(cursor, hf_skinny_payload_rfc_number, 4, ENC_LITTLE_ENDIAN);
6295     payloadType = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
6296     ptvcursor_add(cursor, hf_skinny_payloadType, 4, ENC_LITTLE_ENDIAN);
6297     ptvcursor_pop_subtree(cursor);
6298   }
6299   ptvcursor_add(cursor, hf_skinny_isConferenceCreator, 4, ENC_LITTLE_ENDIAN);
6300   if (payloadType <= MEDIA_PAYLOAD_AMR_WB)   {
6301     ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "payloadType <= Media_Payload_AMR_WB");
6302     {
6303       ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "audioParameters");
6304       ptvcursor_add(cursor, hf_skinny_milliSecondPacketSize, 4, ENC_LITTLE_ENDIAN);
6305       {
6306         ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "qualifierIn");
6307         ptvcursor_add(cursor, hf_skinny_ecValue, 4, ENC_LITTLE_ENDIAN);
6308         if (hdr_version <= V10_MSG_TYPE) {
6309           ptvcursor_add(cursor, hf_skinny_g723BitRate, 4, ENC_LITTLE_ENDIAN);
6310         }
6311         if (hdr_version >= V11_MSG_TYPE) {
6312           if (compressionType == MEDIA_PAYLOAD_G7231)           {
6313             ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "compressionType is Media_Payload_G7231");
6314             ptvcursor_add(cursor, hf_skinny_g723BitRate, 4, ENC_LITTLE_ENDIAN);
6315             ptvcursor_pop_subtree(cursor);
6316           } else           {
6317             ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "any compressionType");
6318             {
6319               ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "codecParams");
6320               ptvcursor_add(cursor, hf_skinny_codecMode, 1, ENC_LITTLE_ENDIAN);
6321               ptvcursor_add(cursor, hf_skinny_dynamicPayload, 1, ENC_LITTLE_ENDIAN);
6322               ptvcursor_add(cursor, hf_skinny_codecParam1, 1, ENC_LITTLE_ENDIAN);
6323               ptvcursor_add(cursor, hf_skinny_codecParam2, 1, ENC_LITTLE_ENDIAN);
6324               ptvcursor_pop_subtree(cursor);
6325             }
6326             ptvcursor_pop_subtree(cursor);
6327           }
6328         }
6329         ptvcursor_pop_subtree(cursor);
6330       }
6331       ptvcursor_pop_subtree(cursor);
6332     }
6333     ptvcursor_pop_subtree(cursor);
6334     ptvcursor_advance(cursor, 36);
6335   } else if (payloadType >= MEDIA_PAYLOAD_H261 && payloadType <= MEDIA_PAYLOAD_H264_FEC)   {
6336     ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "Media_Payload_H261 <= payloadType <= Media_Payload_H264_FEC");
6337     {
6338       ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "vidParameters");
6339       ptvcursor_add(cursor, hf_skinny_bitRate, 4, ENC_LITTLE_ENDIAN);
6340       pictureFormatCount = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
6341       ptvcursor_add(cursor, hf_skinny_pictureFormatCount, 4, ENC_LITTLE_ENDIAN);
6342       if (pictureFormatCount <= 5) {
6343         guint32 counter_3 = 0;
6344         ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "pictureFormat [ref:pictureFormatCount = %d, max:5]", pictureFormatCount);
6345         if (pictureFormatCount && tvb_get_letohl(ptvcursor_tvbuff(cursor), 0) + 8 >= ptvcursor_current_offset(cursor) + (pictureFormatCount * 8) && pictureFormatCount <= 5) {
6346           for (counter_3 = 0; counter_3 < 5; counter_3++) {
6347             if (counter_3 < pictureFormatCount) {
6348               ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "pictureFormat [%d / %d]", counter_3 + 1, pictureFormatCount);
6349               ptvcursor_add(cursor, hf_skinny_format, 4, ENC_LITTLE_ENDIAN);
6350               ptvcursor_add(cursor, hf_skinny_MPI, 4, ENC_LITTLE_ENDIAN);
6351             } else {
6352               ptvcursor_advance(cursor, 8);
6353             }
6354             ptvcursor_pop_subtree(cursor);
6355           }
6356         }
6357         ptvcursor_pop_subtree(cursor);
6358       } else {
6359         ptvcursor_advance(cursor, (pictureFormatCount * 8));
6360       }
6361       ptvcursor_add(cursor, hf_skinny_confServiceNum, 4, ENC_LITTLE_ENDIAN);
6362       if (payloadType == MEDIA_PAYLOAD_H261)       {
6363         ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "payloadType is Media_Payload_H261");
6364         {
6365           ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "h261VideoCapability");
6366           ptvcursor_add(cursor, hf_skinny_temporalSpatialTradeOffCapability, 4, ENC_LITTLE_ENDIAN);
6367           ptvcursor_add(cursor, hf_skinny_stillImageTransmission, 4, ENC_LITTLE_ENDIAN);
6368           ptvcursor_pop_subtree(cursor);
6369         }
6370         ptvcursor_pop_subtree(cursor);
6371         ptvcursor_advance(cursor, 16);
6372       } else if (payloadType == MEDIA_PAYLOAD_H263)       {
6373         ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "payloadType is Media_Payload_H263");
6374         {
6375           ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "h263VideoCapability");
6376           ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "h263_capability_bitfield");
6377           ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit1, 4, ENC_LITTLE_ENDIAN);
6378           ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit2, 4, ENC_LITTLE_ENDIAN);
6379           ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit3, 4, ENC_LITTLE_ENDIAN);
6380           ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit4, 4, ENC_LITTLE_ENDIAN);
6381           ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit5, 4, ENC_LITTLE_ENDIAN);
6382           ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit6, 4, ENC_LITTLE_ENDIAN);
6383           ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit7, 4, ENC_LITTLE_ENDIAN);
6384           ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit8, 4, ENC_LITTLE_ENDIAN);
6385           ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit9, 4, ENC_LITTLE_ENDIAN);
6386           ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit10, 4, ENC_LITTLE_ENDIAN);
6387           ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit11, 4, ENC_LITTLE_ENDIAN);
6388           ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit12, 4, ENC_LITTLE_ENDIAN);
6389           ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit13, 4, ENC_LITTLE_ENDIAN);
6390           ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit14, 4, ENC_LITTLE_ENDIAN);
6391           ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit15, 4, ENC_LITTLE_ENDIAN);
6392           ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit16, 4, ENC_LITTLE_ENDIAN);
6393           ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit17, 4, ENC_LITTLE_ENDIAN);
6394           ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit18, 4, ENC_LITTLE_ENDIAN);
6395           ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit19, 4, ENC_LITTLE_ENDIAN);
6396           ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit20, 4, ENC_LITTLE_ENDIAN);
6397           ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit21, 4, ENC_LITTLE_ENDIAN);
6398           ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit22, 4, ENC_LITTLE_ENDIAN);
6399           ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit23, 4, ENC_LITTLE_ENDIAN);
6400           ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit24, 4, ENC_LITTLE_ENDIAN);
6401           ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit25, 4, ENC_LITTLE_ENDIAN);
6402           ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit26, 4, ENC_LITTLE_ENDIAN);
6403           ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit27, 4, ENC_LITTLE_ENDIAN);
6404           ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit28, 4, ENC_LITTLE_ENDIAN);
6405           ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit29, 4, ENC_LITTLE_ENDIAN);
6406           ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit30, 4, ENC_LITTLE_ENDIAN);
6407           ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit31, 4, ENC_LITTLE_ENDIAN);
6408           ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit32, 4, ENC_LITTLE_ENDIAN);
6409           ptvcursor_advance(cursor, 4);
6410           ptvcursor_pop_subtree(cursor); /* end bitfield: h263_capability_bitfield */
6411           ptvcursor_add(cursor, hf_skinny_annexNandWFutureUse, 4, ENC_LITTLE_ENDIAN);
6412           ptvcursor_pop_subtree(cursor);
6413         }
6414         ptvcursor_pop_subtree(cursor);
6415         ptvcursor_advance(cursor, 16);
6416       } else if (payloadType == MEDIA_PAYLOAD_H264)       {
6417         ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "payloadType is Media_Payload_H264");
6418         {
6419           ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "h264VideoCapability");
6420           ptvcursor_add(cursor, hf_skinny_profile, 4, ENC_LITTLE_ENDIAN);
6421           ptvcursor_add(cursor, hf_skinny_level, 4, ENC_LITTLE_ENDIAN);
6422           ptvcursor_add(cursor, hf_skinny_customMaxMBPS, 4, ENC_LITTLE_ENDIAN);
6423           ptvcursor_add(cursor, hf_skinny_customMaxFS, 4, ENC_LITTLE_ENDIAN);
6424           ptvcursor_add(cursor, hf_skinny_customMaxDPB, 4, ENC_LITTLE_ENDIAN);
6425           ptvcursor_add(cursor, hf_skinny_customMaxBRandCPB, 4, ENC_LITTLE_ENDIAN);
6426           ptvcursor_pop_subtree(cursor);
6427         }
6428         ptvcursor_pop_subtree(cursor);
6429       } else if (payloadType == MEDIA_PAYLOAD_VIEO)       {
6430         ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "payloadType is Media_Payload_Vieo");
6431         {
6432           ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "vieoVideoCapability");
6433           ptvcursor_add(cursor, hf_skinny_modelNumber, 4, ENC_LITTLE_ENDIAN);
6434           ptvcursor_add(cursor, hf_skinny_bandwidth, 4, ENC_LITTLE_ENDIAN);
6435           ptvcursor_pop_subtree(cursor);
6436         }
6437         ptvcursor_pop_subtree(cursor);
6438         ptvcursor_advance(cursor, 16);
6439       }
6440       ptvcursor_pop_subtree(cursor);
6441     }
6442     ptvcursor_pop_subtree(cursor);
6443   } else if (payloadType >= MEDIA_PAYLOAD_CLEAR_CHAN)   {
6444     ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "payloadType >= Media_Payload_Clear_Chan");
6445     {
6446       ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "dataParameters");
6447       ptvcursor_add(cursor, hf_skinny_protocolDependentData, 4, ENC_LITTLE_ENDIAN);
6448       ptvcursor_add(cursor, hf_skinny_maxBitRate, 4, ENC_LITTLE_ENDIAN);
6449       ptvcursor_pop_subtree(cursor);
6450     }
6451     ptvcursor_pop_subtree(cursor);
6452     ptvcursor_advance(cursor, 36);
6453   }
6454   {
6455     ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "mRxMediaEncryptionKeyInfo");
6456     ptvcursor_add(cursor, hf_skinny_algorithmID, 4, ENC_LITTLE_ENDIAN);
6457     keylen = tvb_get_letohs(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
6458     ptvcursor_add(cursor, hf_skinny_keylen, 2, ENC_LITTLE_ENDIAN);
6459     saltlen = tvb_get_letohs(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
6460     ptvcursor_add(cursor, hf_skinny_saltlen, 2, ENC_LITTLE_ENDIAN);
6461     if (keylen <= 16) {
6462       guint32 counter_3 = 0;
6463       ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "key [ref:keylen = %d, max:16]", keylen);
6464       for (counter_3 = 0; counter_3 < 16; counter_3++) {
6465         if (counter_3 < keylen) {
6466           ptvcursor_add(cursor, hf_skinny_key, 1, ENC_LITTLE_ENDIAN);
6467         } else {
6468           ptvcursor_advance(cursor, 1);
6469         }
6470       }
6471       ptvcursor_pop_subtree(cursor);
6472     } else {
6473       ptvcursor_advance(cursor, (16 * 1));
6474     }
6475     if (saltlen <= 16) {
6476       guint32 counter_3 = 0;
6477       ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "salt [ref:saltlen = %d, max:16]", saltlen);
6478       for (counter_3 = 0; counter_3 < 16; counter_3++) {
6479         if (counter_3 < saltlen) {
6480           ptvcursor_add(cursor, hf_skinny_salt, 1, ENC_LITTLE_ENDIAN);
6481         } else {
6482           ptvcursor_advance(cursor, 1);
6483         }
6484       }
6485       ptvcursor_pop_subtree(cursor);
6486     } else {
6487       ptvcursor_advance(cursor, (16 * 1));
6488     }
6489     ptvcursor_add(cursor, hf_skinny_isMKIPresent, 4, ENC_LITTLE_ENDIAN);
6490     ptvcursor_add(cursor, hf_skinny_keyDerivationRate, 4, ENC_LITTLE_ENDIAN);
6491     ptvcursor_pop_subtree(cursor);
6492   }
6493   ptvcursor_add(cursor, hf_skinny_streamPassThroughId, 4, ENC_LITTLE_ENDIAN);
6494   ptvcursor_add(cursor, hf_skinny_associatedStreamId, 4, ENC_LITTLE_ENDIAN);
6495   if (hdr_version >= V11_MSG_TYPE) {
6496     read_skinny_ipv4or6(cursor, &sourceIpAddr);
6497     dissect_skinny_ipv4or6(cursor, hf_skinny_sourceIpAddr_ipv4, hf_skinny_sourceIpAddr_ipv6);
6498     sourcePortNumber = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
6499     ptvcursor_add(cursor, hf_skinny_sourcePortNumber, 4, ENC_LITTLE_ENDIAN);
6500     srtp_add_address(pinfo, PT_UDP, &sourceIpAddr, sourcePortNumber, 0, "SKINNY", pinfo->num, false, NULL, NULL, NULL);
6501     sourceIpAddr_str = address_to_display(NULL, &sourceIpAddr);
6502     si->additionalInfo = g_strdup_printf("%s:%d", sourceIpAddr_str, sourcePortNumber);
6503     wmem_free(NULL, sourceIpAddr_str);
6504   }
6505   if (hdr_version >= V16_MSG_TYPE) {
6506     ptvcursor_add(cursor, hf_skinny_requestedIpAddrType, 4, ENC_LITTLE_ENDIAN);
6507   }
6508   skinny_reqrep_add_request(cursor, pinfo, skinny_conv, 0x0131 ^ passThroughPartyId);
6509 }
6510 
6511 /*
6512  * Message:   StartMultiMediaTransmissionMessage
6513  * Opcode:    0x0132
6514  * Type:      MediaControl
6515  * Direction: pbx2dev
6516  * VarLength: no
6517  * MsgType:   request
6518  */
6519 static void
handle_StartMultiMediaTransmissionMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)6520 handle_StartMultiMediaTransmissionMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
6521 {
6522   guint32 passthruPartyID = 0;
6523   guint32 compressionType = 0;
6524   guint32 payloadType = 0;
6525   guint32 hdr_version = tvb_get_letohl(ptvcursor_tvbuff(cursor), 4);
6526   guint32 pictureFormatCount = 0;
6527   guint16 keylen = 0;
6528   guint16 saltlen = 0;
6529   ptvcursor_add(cursor, hf_skinny_conferenceId, 4, ENC_LITTLE_ENDIAN);
6530   passthruPartyID = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
6531   ptvcursor_add(cursor, hf_skinny_passthruPartyID, 4, ENC_LITTLE_ENDIAN);
6532   compressionType = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
6533   ptvcursor_add(cursor, hf_skinny_compressionType, 4, ENC_LITTLE_ENDIAN);
6534   dissect_skinny_ipv4or6(cursor, hf_skinny_remoteIpAddr_ipv4, hf_skinny_remoteIpAddr_ipv6);
6535   ptvcursor_add(cursor, hf_skinny_remotePortNumber, 4, ENC_LITTLE_ENDIAN);
6536   si->callId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
6537   ptvcursor_add(cursor, hf_skinny_callReference, 4, ENC_LITTLE_ENDIAN);
6538   {
6539     ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "payloadType");
6540     ptvcursor_add(cursor, hf_skinny_payload_rfc_number, 4, ENC_LITTLE_ENDIAN);
6541     payloadType = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
6542     ptvcursor_add(cursor, hf_skinny_payloadType, 4, ENC_LITTLE_ENDIAN);
6543     ptvcursor_pop_subtree(cursor);
6544   }
6545   ptvcursor_add(cursor, hf_skinny_DSCPValue, 4, ENC_LITTLE_ENDIAN);
6546   if (payloadType <= MEDIA_PAYLOAD_AMR_WB)   {
6547     ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "payloadType <= Media_Payload_AMR_WB");
6548     {
6549       ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "audioParameters");
6550       ptvcursor_add(cursor, hf_skinny_milliSecondPacketSize, 4, ENC_LITTLE_ENDIAN);
6551       {
6552         ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "qualifierIn");
6553         ptvcursor_add(cursor, hf_skinny_ecValue, 4, ENC_LITTLE_ENDIAN);
6554         if (hdr_version <= V10_MSG_TYPE) {
6555           ptvcursor_add(cursor, hf_skinny_g723BitRate, 4, ENC_LITTLE_ENDIAN);
6556         }
6557         if (hdr_version >= V11_MSG_TYPE) {
6558           if (compressionType == MEDIA_PAYLOAD_G7231)           {
6559             ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "compressionType is Media_Payload_G7231");
6560             ptvcursor_add(cursor, hf_skinny_g723BitRate, 4, ENC_LITTLE_ENDIAN);
6561             ptvcursor_pop_subtree(cursor);
6562           } else           {
6563             ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "any compressionType");
6564             {
6565               ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "codecParams");
6566               ptvcursor_add(cursor, hf_skinny_codecMode, 1, ENC_LITTLE_ENDIAN);
6567               ptvcursor_add(cursor, hf_skinny_dynamicPayload, 1, ENC_LITTLE_ENDIAN);
6568               ptvcursor_add(cursor, hf_skinny_codecParam1, 1, ENC_LITTLE_ENDIAN);
6569               ptvcursor_add(cursor, hf_skinny_codecParam2, 1, ENC_LITTLE_ENDIAN);
6570               ptvcursor_pop_subtree(cursor);
6571             }
6572             ptvcursor_pop_subtree(cursor);
6573           }
6574         }
6575         ptvcursor_pop_subtree(cursor);
6576       }
6577       ptvcursor_pop_subtree(cursor);
6578     }
6579     ptvcursor_pop_subtree(cursor);
6580     ptvcursor_advance(cursor, 36);
6581   } else if (payloadType >= MEDIA_PAYLOAD_H261 && payloadType <= MEDIA_PAYLOAD_H264_FEC)   {
6582     ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "Media_Payload_H261 <= payloadType <= Media_Payload_H264_FEC");
6583     {
6584       ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "vidParameters");
6585       ptvcursor_add(cursor, hf_skinny_bitRate, 4, ENC_LITTLE_ENDIAN);
6586       pictureFormatCount = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
6587       ptvcursor_add(cursor, hf_skinny_pictureFormatCount, 4, ENC_LITTLE_ENDIAN);
6588       if (pictureFormatCount <= 5) {
6589         guint32 counter_3 = 0;
6590         ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "pictureFormat [ref:pictureFormatCount = %d, max:5]", pictureFormatCount);
6591         if (pictureFormatCount && tvb_get_letohl(ptvcursor_tvbuff(cursor), 0) + 8 >= ptvcursor_current_offset(cursor) + (pictureFormatCount * 8) && pictureFormatCount <= 5) {
6592           for (counter_3 = 0; counter_3 < 5; counter_3++) {
6593             if (counter_3 < pictureFormatCount) {
6594               ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "pictureFormat [%d / %d]", counter_3 + 1, pictureFormatCount);
6595               ptvcursor_add(cursor, hf_skinny_format, 4, ENC_LITTLE_ENDIAN);
6596               ptvcursor_add(cursor, hf_skinny_MPI, 4, ENC_LITTLE_ENDIAN);
6597             } else {
6598               ptvcursor_advance(cursor, 8);
6599             }
6600             ptvcursor_pop_subtree(cursor);
6601           }
6602         }
6603         ptvcursor_pop_subtree(cursor);
6604       } else {
6605         ptvcursor_advance(cursor, (pictureFormatCount * 8));
6606       }
6607       ptvcursor_add(cursor, hf_skinny_confServiceNum, 4, ENC_LITTLE_ENDIAN);
6608       if (payloadType == MEDIA_PAYLOAD_H261)       {
6609         ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "payloadType is Media_Payload_H261");
6610         {
6611           ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "h261VideoCapability");
6612           ptvcursor_add(cursor, hf_skinny_temporalSpatialTradeOffCapability, 4, ENC_LITTLE_ENDIAN);
6613           ptvcursor_add(cursor, hf_skinny_stillImageTransmission, 4, ENC_LITTLE_ENDIAN);
6614           ptvcursor_pop_subtree(cursor);
6615         }
6616         ptvcursor_pop_subtree(cursor);
6617         ptvcursor_advance(cursor, 16);
6618       } else if (payloadType == MEDIA_PAYLOAD_H263)       {
6619         ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "payloadType is Media_Payload_H263");
6620         {
6621           ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "h263VideoCapability");
6622           ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "h263_capability_bitfield");
6623           ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit1, 4, ENC_LITTLE_ENDIAN);
6624           ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit2, 4, ENC_LITTLE_ENDIAN);
6625           ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit3, 4, ENC_LITTLE_ENDIAN);
6626           ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit4, 4, ENC_LITTLE_ENDIAN);
6627           ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit5, 4, ENC_LITTLE_ENDIAN);
6628           ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit6, 4, ENC_LITTLE_ENDIAN);
6629           ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit7, 4, ENC_LITTLE_ENDIAN);
6630           ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit8, 4, ENC_LITTLE_ENDIAN);
6631           ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit9, 4, ENC_LITTLE_ENDIAN);
6632           ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit10, 4, ENC_LITTLE_ENDIAN);
6633           ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit11, 4, ENC_LITTLE_ENDIAN);
6634           ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit12, 4, ENC_LITTLE_ENDIAN);
6635           ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit13, 4, ENC_LITTLE_ENDIAN);
6636           ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit14, 4, ENC_LITTLE_ENDIAN);
6637           ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit15, 4, ENC_LITTLE_ENDIAN);
6638           ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit16, 4, ENC_LITTLE_ENDIAN);
6639           ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit17, 4, ENC_LITTLE_ENDIAN);
6640           ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit18, 4, ENC_LITTLE_ENDIAN);
6641           ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit19, 4, ENC_LITTLE_ENDIAN);
6642           ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit20, 4, ENC_LITTLE_ENDIAN);
6643           ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit21, 4, ENC_LITTLE_ENDIAN);
6644           ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit22, 4, ENC_LITTLE_ENDIAN);
6645           ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit23, 4, ENC_LITTLE_ENDIAN);
6646           ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit24, 4, ENC_LITTLE_ENDIAN);
6647           ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit25, 4, ENC_LITTLE_ENDIAN);
6648           ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit26, 4, ENC_LITTLE_ENDIAN);
6649           ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit27, 4, ENC_LITTLE_ENDIAN);
6650           ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit28, 4, ENC_LITTLE_ENDIAN);
6651           ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit29, 4, ENC_LITTLE_ENDIAN);
6652           ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit30, 4, ENC_LITTLE_ENDIAN);
6653           ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit31, 4, ENC_LITTLE_ENDIAN);
6654           ptvcursor_add_no_advance(cursor, hf_skinny_Generic_Bitfield_Bit32, 4, ENC_LITTLE_ENDIAN);
6655           ptvcursor_advance(cursor, 4);
6656           ptvcursor_pop_subtree(cursor); /* end bitfield: h263_capability_bitfield */
6657           ptvcursor_add(cursor, hf_skinny_annexNandWFutureUse, 4, ENC_LITTLE_ENDIAN);
6658           ptvcursor_pop_subtree(cursor);
6659         }
6660         ptvcursor_pop_subtree(cursor);
6661         ptvcursor_advance(cursor, 16);
6662       } else if (payloadType == MEDIA_PAYLOAD_H264)       {
6663         ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "payloadType is Media_Payload_H264");
6664         {
6665           ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "h264VideoCapability");
6666           ptvcursor_add(cursor, hf_skinny_profile, 4, ENC_LITTLE_ENDIAN);
6667           ptvcursor_add(cursor, hf_skinny_level, 4, ENC_LITTLE_ENDIAN);
6668           ptvcursor_add(cursor, hf_skinny_customMaxMBPS, 4, ENC_LITTLE_ENDIAN);
6669           ptvcursor_add(cursor, hf_skinny_customMaxFS, 4, ENC_LITTLE_ENDIAN);
6670           ptvcursor_add(cursor, hf_skinny_customMaxDPB, 4, ENC_LITTLE_ENDIAN);
6671           ptvcursor_add(cursor, hf_skinny_customMaxBRandCPB, 4, ENC_LITTLE_ENDIAN);
6672           ptvcursor_pop_subtree(cursor);
6673         }
6674         ptvcursor_pop_subtree(cursor);
6675       } else if (payloadType == MEDIA_PAYLOAD_VIEO)       {
6676         ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "payloadType is Media_Payload_Vieo");
6677         {
6678           ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "vieoVideoCapability");
6679           ptvcursor_add(cursor, hf_skinny_modelNumber, 4, ENC_LITTLE_ENDIAN);
6680           ptvcursor_add(cursor, hf_skinny_bandwidth, 4, ENC_LITTLE_ENDIAN);
6681           ptvcursor_pop_subtree(cursor);
6682         }
6683         ptvcursor_pop_subtree(cursor);
6684         ptvcursor_advance(cursor, 16);
6685       }
6686       ptvcursor_pop_subtree(cursor);
6687     }
6688     ptvcursor_pop_subtree(cursor);
6689   } else if (payloadType >= MEDIA_PAYLOAD_CLEAR_CHAN)   {
6690     ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "payloadType >= Media_Payload_Clear_Chan");
6691     {
6692       ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "dataParameters");
6693       ptvcursor_add(cursor, hf_skinny_protocolDependentData, 4, ENC_LITTLE_ENDIAN);
6694       ptvcursor_add(cursor, hf_skinny_maxBitRate, 4, ENC_LITTLE_ENDIAN);
6695       ptvcursor_pop_subtree(cursor);
6696     }
6697     ptvcursor_pop_subtree(cursor);
6698     ptvcursor_advance(cursor, 36);
6699   }
6700   {
6701     ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "mTxMediaEncryptionKeyInfo");
6702     ptvcursor_add(cursor, hf_skinny_algorithmID, 4, ENC_LITTLE_ENDIAN);
6703     keylen = tvb_get_letohs(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
6704     ptvcursor_add(cursor, hf_skinny_keylen, 2, ENC_LITTLE_ENDIAN);
6705     saltlen = tvb_get_letohs(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
6706     ptvcursor_add(cursor, hf_skinny_saltlen, 2, ENC_LITTLE_ENDIAN);
6707     if (keylen <= 16) {
6708       guint32 counter_3 = 0;
6709       ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "key [ref:keylen = %d, max:16]", keylen);
6710       for (counter_3 = 0; counter_3 < 16; counter_3++) {
6711         if (counter_3 < keylen) {
6712           ptvcursor_add(cursor, hf_skinny_key, 1, ENC_LITTLE_ENDIAN);
6713         } else {
6714           ptvcursor_advance(cursor, 1);
6715         }
6716       }
6717       ptvcursor_pop_subtree(cursor);
6718     } else {
6719       ptvcursor_advance(cursor, (16 * 1));
6720     }
6721     if (saltlen <= 16) {
6722       guint32 counter_3 = 0;
6723       ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "salt [ref:saltlen = %d, max:16]", saltlen);
6724       for (counter_3 = 0; counter_3 < 16; counter_3++) {
6725         if (counter_3 < saltlen) {
6726           ptvcursor_add(cursor, hf_skinny_salt, 1, ENC_LITTLE_ENDIAN);
6727         } else {
6728           ptvcursor_advance(cursor, 1);
6729         }
6730       }
6731       ptvcursor_pop_subtree(cursor);
6732     } else {
6733       ptvcursor_advance(cursor, (16 * 1));
6734     }
6735     ptvcursor_add(cursor, hf_skinny_isMKIPresent, 4, ENC_LITTLE_ENDIAN);
6736     ptvcursor_add(cursor, hf_skinny_keyDerivationRate, 4, ENC_LITTLE_ENDIAN);
6737     ptvcursor_pop_subtree(cursor);
6738   }
6739   ptvcursor_add(cursor, hf_skinny_streamPassThroughId, 4, ENC_LITTLE_ENDIAN);
6740   ptvcursor_add(cursor, hf_skinny_associatedStreamId, 4, ENC_LITTLE_ENDIAN);
6741   skinny_reqrep_add_request(cursor, pinfo, skinny_conv, 0x0132 ^ passthruPartyID);
6742 }
6743 
6744 /*
6745  * Message:   StopMultiMediaTransmissionMessage
6746  * Opcode:    0x0133
6747  * Type:      MediaControl
6748  * Direction: pbx2dev
6749  * VarLength: no
6750  * MsgType:   event
6751  */
6752 static void
handle_StopMultiMediaTransmissionMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)6753 handle_StopMultiMediaTransmissionMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
6754 {
6755   ptvcursor_add(cursor, hf_skinny_conferenceId, 4, ENC_LITTLE_ENDIAN);
6756   si->passThroughPartyId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
6757   ptvcursor_add(cursor, hf_skinny_passThroughPartyId, 4, ENC_LITTLE_ENDIAN);
6758   si->callId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
6759   ptvcursor_add(cursor, hf_skinny_callReference, 4, ENC_LITTLE_ENDIAN);
6760   ptvcursor_add(cursor, hf_skinny_portHandlingFlag, 4, ENC_LITTLE_ENDIAN);
6761 }
6762 
6763 /*
6764  * Message:   MiscellaneousCommandMessage
6765  * Opcode:    0x0134
6766  * Type:      CallControl
6767  * Direction: pbx2dev
6768  * VarLength: no
6769  * MsgType:   event
6770  */
6771 static void
handle_MiscellaneousCommandMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)6772 handle_MiscellaneousCommandMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
6773 {
6774   guint32 command = 0;
6775   guint32 recoveryReferencePictureCount = 0;
6776   ptvcursor_add(cursor, hf_skinny_conferenceId, 4, ENC_LITTLE_ENDIAN);
6777   ptvcursor_add(cursor, hf_skinny_passthruPartyID, 4, ENC_LITTLE_ENDIAN);
6778   si->callId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
6779   ptvcursor_add(cursor, hf_skinny_callReference, 4, ENC_LITTLE_ENDIAN);
6780   command = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
6781   ptvcursor_add(cursor, hf_skinny_command, 4, ENC_LITTLE_ENDIAN);
6782   if (command == MISCCOMMANDTYPE_VIDEOFASTUPDATEPICTURE)   {
6783     ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "command is MiscCommandType_videoFastUpdatePicture");
6784     {
6785       ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "videoFastUpdatePicture");
6786       ptvcursor_add(cursor, hf_skinny_firstGOB, 4, ENC_LITTLE_ENDIAN);
6787       ptvcursor_add(cursor, hf_skinny_numberOfGOBs, 4, ENC_LITTLE_ENDIAN);
6788       ptvcursor_pop_subtree(cursor);
6789     }
6790     ptvcursor_pop_subtree(cursor);
6791     ptvcursor_advance(cursor, 8);
6792   } else if (command == MISCCOMMANDTYPE_VIDEOFASTUPDATEGOB)   {
6793     ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "command is MiscCommandType_videoFastUpdateGOB");
6794     {
6795       ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "videoFastUpdateGOB");
6796       ptvcursor_add(cursor, hf_skinny_firstGOB, 4, ENC_LITTLE_ENDIAN);
6797       ptvcursor_add(cursor, hf_skinny_numberOfGOBs, 4, ENC_LITTLE_ENDIAN);
6798       ptvcursor_pop_subtree(cursor);
6799     }
6800     ptvcursor_pop_subtree(cursor);
6801     ptvcursor_advance(cursor, 8);
6802   } else if (command == MISCCOMMANDTYPE_VIDEOFASTUPDATEMB)   {
6803     ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "command is MiscCommandType_videoFastUpdateMB");
6804     {
6805       ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "videoFastUpdateMB");
6806       ptvcursor_add(cursor, hf_skinny_firstGOB, 4, ENC_LITTLE_ENDIAN);
6807       ptvcursor_add(cursor, hf_skinny_firstMB, 4, ENC_LITTLE_ENDIAN);
6808       ptvcursor_add(cursor, hf_skinny_numberOfMBs, 4, ENC_LITTLE_ENDIAN);
6809       ptvcursor_pop_subtree(cursor);
6810     }
6811     ptvcursor_pop_subtree(cursor);
6812     ptvcursor_advance(cursor, 4);
6813   } else if (command == MISCCOMMANDTYPE_LOSTPICTURE)   {
6814     ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "command is MiscCommandType_lostPicture");
6815     {
6816       ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "lostPicture");
6817       ptvcursor_add(cursor, hf_skinny_pictureNumber, 4, ENC_LITTLE_ENDIAN);
6818       ptvcursor_add(cursor, hf_skinny_longTermPictureIndex, 4, ENC_LITTLE_ENDIAN);
6819       ptvcursor_pop_subtree(cursor);
6820     }
6821     ptvcursor_pop_subtree(cursor);
6822     ptvcursor_advance(cursor, 8);
6823   } else if (command == MISCCOMMANDTYPE_LOSTPARTIALPICTURE)   {
6824     ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "command is MiscCommandType_lostPartialPicture");
6825     {
6826       ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "lostPartialPicture");
6827       {
6828         ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "pictureReference");
6829         ptvcursor_add(cursor, hf_skinny_pictureNumber, 4, ENC_LITTLE_ENDIAN);
6830         ptvcursor_add(cursor, hf_skinny_longTermPictureIndex, 4, ENC_LITTLE_ENDIAN);
6831         ptvcursor_pop_subtree(cursor);
6832       }
6833       ptvcursor_add(cursor, hf_skinny_firstMB, 4, ENC_LITTLE_ENDIAN);
6834       ptvcursor_add(cursor, hf_skinny_numberOfMBs, 4, ENC_LITTLE_ENDIAN);
6835       ptvcursor_pop_subtree(cursor);
6836     }
6837     ptvcursor_pop_subtree(cursor);
6838   } else if (command == MISCCOMMANDTYPE_RECOVERYREFERENCEPICTURE)   {
6839     ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "command is MiscCommandType_recoveryReferencePicture");
6840     {
6841       ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "recoveryReferencePictureValue");
6842       recoveryReferencePictureCount = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
6843       ptvcursor_add(cursor, hf_skinny_recoveryReferencePictureCount, 4, ENC_LITTLE_ENDIAN);
6844       if (recoveryReferencePictureCount <= 4) {
6845         guint32 counter_3 = 0;
6846         ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "recoveryReferencePicture [ref:recoveryReferencePictureCount = %d, max:4]", recoveryReferencePictureCount);
6847         if (recoveryReferencePictureCount && tvb_get_letohl(ptvcursor_tvbuff(cursor), 0) + 8 >= ptvcursor_current_offset(cursor) + (recoveryReferencePictureCount * 8) && recoveryReferencePictureCount <= 4) {
6848           for (counter_3 = 0; counter_3 < 4; counter_3++) {
6849             if (counter_3 < recoveryReferencePictureCount) {
6850               ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "recoveryReferencePicture [%d / %d]", counter_3 + 1, recoveryReferencePictureCount);
6851               ptvcursor_add(cursor, hf_skinny_pictureNumber, 4, ENC_LITTLE_ENDIAN);
6852               ptvcursor_add(cursor, hf_skinny_longTermPictureIndex, 4, ENC_LITTLE_ENDIAN);
6853             } else {
6854               ptvcursor_advance(cursor, 8);
6855             }
6856             ptvcursor_pop_subtree(cursor);
6857           }
6858         }
6859         ptvcursor_pop_subtree(cursor);
6860       } else {
6861         ptvcursor_advance(cursor, (recoveryReferencePictureCount * 8));
6862       }
6863       ptvcursor_pop_subtree(cursor);
6864     }
6865     ptvcursor_pop_subtree(cursor);
6866     ptvcursor_advance(cursor, 4);
6867   } else if (command == MISCCOMMANDTYPE_TEMPORALSPATIALTRADEOFF)   {
6868     ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "command is MiscCommandType_temporalSpatialTradeOff");
6869     ptvcursor_add(cursor, hf_skinny_temporalSpatialTradeOff, 4, ENC_LITTLE_ENDIAN);
6870     ptvcursor_pop_subtree(cursor);
6871     ptvcursor_advance(cursor, 12);
6872   } else   {
6873     ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "any command");
6874     ptvcursor_add(cursor, hf_skinny_none, 4, ENC_LITTLE_ENDIAN);
6875     ptvcursor_pop_subtree(cursor);
6876     ptvcursor_advance(cursor, 12);
6877   }
6878 }
6879 
6880 /*
6881  * Message:   FlowControlCommandMessage
6882  * Opcode:    0x0135
6883  * Type:      CallControl
6884  * Direction: pbx2dev
6885  * VarLength: no
6886  * MsgType:   event
6887  */
6888 static void
handle_FlowControlCommandMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)6889 handle_FlowControlCommandMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
6890 {
6891   ptvcursor_add(cursor, hf_skinny_conferenceId, 4, ENC_LITTLE_ENDIAN);
6892   ptvcursor_add(cursor, hf_skinny_passthruPartyID, 4, ENC_LITTLE_ENDIAN);
6893   si->callId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
6894   ptvcursor_add(cursor, hf_skinny_callReference, 4, ENC_LITTLE_ENDIAN);
6895   ptvcursor_add(cursor, hf_skinny_maximumBitRate, 4, ENC_LITTLE_ENDIAN);
6896 }
6897 
6898 /*
6899  * Message:   CloseMultiMediaReceiveChannelMessage
6900  * Opcode:    0x0136
6901  * Type:      MediaControl
6902  * Direction: pbx2dev
6903  * VarLength: no
6904  * MsgType:   event
6905  */
6906 static void
handle_CloseMultiMediaReceiveChannelMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)6907 handle_CloseMultiMediaReceiveChannelMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
6908 {
6909   ptvcursor_add(cursor, hf_skinny_conferenceId, 4, ENC_LITTLE_ENDIAN);
6910   si->passThroughPartyId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
6911   ptvcursor_add(cursor, hf_skinny_passThroughPartyId, 4, ENC_LITTLE_ENDIAN);
6912   si->callId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
6913   ptvcursor_add(cursor, hf_skinny_callReference, 4, ENC_LITTLE_ENDIAN);
6914   ptvcursor_add(cursor, hf_skinny_portHandlingFlag, 4, ENC_LITTLE_ENDIAN);
6915 }
6916 
6917 /*
6918  * Message:   CreateConferenceReqMessage
6919  * Opcode:    0x0137
6920  * Type:      IntraCCM
6921  * Direction: pbx2pbx
6922  * VarLength: no
6923  * MsgType:   request
6924  */
6925 static void
handle_CreateConferenceReqMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)6926 handle_CreateConferenceReqMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
6927 {
6928   guint32 conferenceId = 0;
6929   guint32 dataLength = 0;
6930   conferenceId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
6931   ptvcursor_add(cursor, hf_skinny_conferenceId, 4, ENC_LITTLE_ENDIAN);
6932   ptvcursor_add(cursor, hf_skinny_numberOfReservedParticipants, 4, ENC_LITTLE_ENDIAN);
6933   ptvcursor_add(cursor, hf_skinny_resourceType, 4, ENC_LITTLE_ENDIAN);
6934   ptvcursor_add(cursor, hf_skinny_applicationId, 4, ENC_LITTLE_ENDIAN);
6935   ptvcursor_add(cursor, hf_skinny_appConfID, 32, ENC_ASCII|ENC_NA);
6936   ptvcursor_add(cursor, hf_skinny_appData, 24, ENC_ASCII|ENC_NA);
6937   dataLength = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
6938   ptvcursor_add(cursor, hf_skinny_dataLength, 4, ENC_LITTLE_ENDIAN);
6939   ptvcursor_add(cursor, hf_skinny_passThruData, dataLength, ENC_ASCII|ENC_NA);
6940   skinny_reqrep_add_request(cursor, pinfo, skinny_conv, 0x0137 ^ conferenceId);
6941 }
6942 
6943 /*
6944  * Message:   DeleteConferenceReqMessage
6945  * Opcode:    0x0138
6946  * Type:      IntraCCM
6947  * Direction: pbx2pbx
6948  * VarLength: no
6949  * MsgType:   request
6950  */
6951 static void
handle_DeleteConferenceReqMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)6952 handle_DeleteConferenceReqMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
6953 {
6954   guint32 conferenceId = 0;
6955   conferenceId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
6956   ptvcursor_add(cursor, hf_skinny_conferenceId, 4, ENC_LITTLE_ENDIAN);
6957   skinny_reqrep_add_request(cursor, pinfo, skinny_conv, 0x0138 ^ conferenceId);
6958 }
6959 
6960 /*
6961  * Message:   ModifyConferenceReqMessage
6962  * Opcode:    0x0139
6963  * Type:      IntraCCM
6964  * Direction: pbx2pbx
6965  * VarLength: no
6966  * MsgType:   request
6967  */
6968 static void
handle_ModifyConferenceReqMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)6969 handle_ModifyConferenceReqMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
6970 {
6971   guint32 conferenceId = 0;
6972   guint32 dataLength = 0;
6973   conferenceId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
6974   ptvcursor_add(cursor, hf_skinny_conferenceId, 4, ENC_LITTLE_ENDIAN);
6975   ptvcursor_add(cursor, hf_skinny_numberOfReservedParticipants, 4, ENC_LITTLE_ENDIAN);
6976   ptvcursor_add(cursor, hf_skinny_applicationId, 4, ENC_LITTLE_ENDIAN);
6977   ptvcursor_add(cursor, hf_skinny_appConfID, 32, ENC_ASCII|ENC_NA);
6978   ptvcursor_add(cursor, hf_skinny_appData, 24, ENC_ASCII|ENC_NA);
6979   dataLength = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
6980   ptvcursor_add(cursor, hf_skinny_dataLength, 4, ENC_LITTLE_ENDIAN);
6981   ptvcursor_add(cursor, hf_skinny_passThruData, dataLength, ENC_ASCII|ENC_NA);
6982   skinny_reqrep_add_request(cursor, pinfo, skinny_conv, 0x0139 ^ conferenceId);
6983 }
6984 
6985 /*
6986  * Message:   AddParticipantReqMessage
6987  * Opcode:    0x013a
6988  * Type:      IntraCCM
6989  * Direction: pbx2pbx
6990  * VarLength: no
6991  * MsgType:   request
6992  */
6993 static void
handle_AddParticipantReqMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)6994 handle_AddParticipantReqMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
6995 {
6996   guint32 conferenceId = 0;
6997   conferenceId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
6998   ptvcursor_add(cursor, hf_skinny_conferenceId, 4, ENC_LITTLE_ENDIAN);
6999   si->callId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
7000   ptvcursor_add(cursor, hf_skinny_callReference, 4, ENC_LITTLE_ENDIAN);
7001   ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "partyPIRestrictionBits");
7002   ptvcursor_add_no_advance(cursor, hf_skinny_RestrictInformationType_CallingPartyName, 4, ENC_LITTLE_ENDIAN);
7003   ptvcursor_add_no_advance(cursor, hf_skinny_RestrictInformationType_CallingPartyNumber, 4, ENC_LITTLE_ENDIAN);
7004   ptvcursor_add_no_advance(cursor, hf_skinny_RestrictInformationType_CallingParty, 4, ENC_LITTLE_ENDIAN);
7005   ptvcursor_add_no_advance(cursor, hf_skinny_RestrictInformationType_CalledPartyName, 4, ENC_LITTLE_ENDIAN);
7006   ptvcursor_add_no_advance(cursor, hf_skinny_RestrictInformationType_CalledPartyNumber, 4, ENC_LITTLE_ENDIAN);
7007   ptvcursor_add_no_advance(cursor, hf_skinny_RestrictInformationType_CalledParty, 4, ENC_LITTLE_ENDIAN);
7008   ptvcursor_add_no_advance(cursor, hf_skinny_RestrictInformationType_OriginalCalledPartyName, 4, ENC_LITTLE_ENDIAN);
7009   ptvcursor_add_no_advance(cursor, hf_skinny_RestrictInformationType_OriginalCalledPartyNumber, 4, ENC_LITTLE_ENDIAN);
7010   ptvcursor_add_no_advance(cursor, hf_skinny_RestrictInformationType_OriginalCalledParty, 4, ENC_LITTLE_ENDIAN);
7011   ptvcursor_add_no_advance(cursor, hf_skinny_RestrictInformationType_LastRedirectPartyName, 4, ENC_LITTLE_ENDIAN);
7012   ptvcursor_add_no_advance(cursor, hf_skinny_RestrictInformationType_LastRedirectPartyNumber, 4, ENC_LITTLE_ENDIAN);
7013   ptvcursor_add_no_advance(cursor, hf_skinny_RestrictInformationType_LastRedirectParty, 4, ENC_LITTLE_ENDIAN);
7014   ptvcursor_add_no_advance(cursor, hf_skinny_RestrictInformationType_BitsReserved, 4, ENC_LITTLE_ENDIAN);
7015   ptvcursor_advance(cursor, 4);
7016   ptvcursor_pop_subtree(cursor); /* end bitfield: partyPIRestrictionBits */
7017   ptvcursor_add(cursor, hf_skinny_participantName, 40, ENC_ASCII|ENC_NA);
7018   ptvcursor_add(cursor, hf_skinny_participantNumber, 24, ENC_ASCII|ENC_NA);
7019   ptvcursor_add(cursor, hf_skinny_conferenceName, 32, ENC_ASCII|ENC_NA);
7020   skinny_reqrep_add_request(cursor, pinfo, skinny_conv, 0x013a ^ conferenceId);
7021 }
7022 
7023 /*
7024  * Message:   DropParticipantReqMessage
7025  * Opcode:    0x013b
7026  * Type:      IntraCCM
7027  * Direction: pbx2pbx
7028  * VarLength: no
7029  * MsgType:   request
7030  */
7031 static void
handle_DropParticipantReqMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)7032 handle_DropParticipantReqMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
7033 {
7034   guint32 conferenceId = 0;
7035   conferenceId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
7036   ptvcursor_add(cursor, hf_skinny_conferenceId, 4, ENC_LITTLE_ENDIAN);
7037   si->callId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
7038   ptvcursor_add(cursor, hf_skinny_callReference, 4, ENC_LITTLE_ENDIAN);
7039   skinny_reqrep_add_request(cursor, pinfo, skinny_conv, 0x013b ^ conferenceId);
7040 }
7041 
7042 /*
7043  * Message:   AuditParticipantReqMessage
7044  * Opcode:    0x013d
7045  * Type:      IntraCCM
7046  * Direction: pbx2pbx
7047  * VarLength: no
7048  * MsgType:   request
7049  */
7050 static void
handle_AuditParticipantReqMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)7051 handle_AuditParticipantReqMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
7052 {
7053   guint32 conferenceId = 0;
7054   conferenceId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
7055   ptvcursor_add(cursor, hf_skinny_conferenceId, 4, ENC_LITTLE_ENDIAN);
7056   skinny_reqrep_add_request(cursor, pinfo, skinny_conv, 0x013d ^ conferenceId);
7057 }
7058 
7059 /*
7060  * Message:   ChangeParticipantReqMessage
7061  * Opcode:    0x013e
7062  * Type:      IntraCCM
7063  * Direction: pbx2pbx
7064  * VarLength: no
7065  * MsgType:   request
7066  */
7067 static void
handle_ChangeParticipantReqMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)7068 handle_ChangeParticipantReqMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
7069 {
7070   guint32 conferenceId = 0;
7071   conferenceId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
7072   ptvcursor_add(cursor, hf_skinny_conferenceId, 4, ENC_LITTLE_ENDIAN);
7073   si->callId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
7074   ptvcursor_add(cursor, hf_skinny_callReference, 4, ENC_LITTLE_ENDIAN);
7075   ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "partyPIRestrictionBits");
7076   ptvcursor_add_no_advance(cursor, hf_skinny_RestrictInformationType_CallingPartyName, 4, ENC_LITTLE_ENDIAN);
7077   ptvcursor_add_no_advance(cursor, hf_skinny_RestrictInformationType_CallingPartyNumber, 4, ENC_LITTLE_ENDIAN);
7078   ptvcursor_add_no_advance(cursor, hf_skinny_RestrictInformationType_CallingParty, 4, ENC_LITTLE_ENDIAN);
7079   ptvcursor_add_no_advance(cursor, hf_skinny_RestrictInformationType_CalledPartyName, 4, ENC_LITTLE_ENDIAN);
7080   ptvcursor_add_no_advance(cursor, hf_skinny_RestrictInformationType_CalledPartyNumber, 4, ENC_LITTLE_ENDIAN);
7081   ptvcursor_add_no_advance(cursor, hf_skinny_RestrictInformationType_CalledParty, 4, ENC_LITTLE_ENDIAN);
7082   ptvcursor_add_no_advance(cursor, hf_skinny_RestrictInformationType_OriginalCalledPartyName, 4, ENC_LITTLE_ENDIAN);
7083   ptvcursor_add_no_advance(cursor, hf_skinny_RestrictInformationType_OriginalCalledPartyNumber, 4, ENC_LITTLE_ENDIAN);
7084   ptvcursor_add_no_advance(cursor, hf_skinny_RestrictInformationType_OriginalCalledParty, 4, ENC_LITTLE_ENDIAN);
7085   ptvcursor_add_no_advance(cursor, hf_skinny_RestrictInformationType_LastRedirectPartyName, 4, ENC_LITTLE_ENDIAN);
7086   ptvcursor_add_no_advance(cursor, hf_skinny_RestrictInformationType_LastRedirectPartyNumber, 4, ENC_LITTLE_ENDIAN);
7087   ptvcursor_add_no_advance(cursor, hf_skinny_RestrictInformationType_LastRedirectParty, 4, ENC_LITTLE_ENDIAN);
7088   ptvcursor_add_no_advance(cursor, hf_skinny_RestrictInformationType_BitsReserved, 4, ENC_LITTLE_ENDIAN);
7089   ptvcursor_advance(cursor, 4);
7090   ptvcursor_pop_subtree(cursor); /* end bitfield: partyPIRestrictionBits */
7091   ptvcursor_add(cursor, hf_skinny_participantName, 40, ENC_ASCII|ENC_NA);
7092   ptvcursor_add(cursor, hf_skinny_participantNumber, 24, ENC_ASCII|ENC_NA);
7093   ptvcursor_add(cursor, hf_skinny_conferenceName, 32, ENC_ASCII|ENC_NA);
7094   skinny_reqrep_add_request(cursor, pinfo, skinny_conv, 0x013e ^ conferenceId);
7095 }
7096 
7097 /*
7098  * Message:   UserToDeviceDataMessageVersion1
7099  * Opcode:    0x013f
7100  * Type:      RegistrationAndManagement
7101  * Direction: pbx2dev
7102  * VarLength: no
7103  * MsgType:   event
7104  */
7105 static void
handle_UserToDeviceDataMessageVersion1(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)7106 handle_UserToDeviceDataMessageVersion1(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
7107 {
7108   guint32 dataLength = 0;
7109   {
7110     ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "userToDeviceDataVersion1");
7111     ptvcursor_add(cursor, hf_skinny_applicationId, 4, ENC_LITTLE_ENDIAN);
7112     si->lineId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
7113     ptvcursor_add(cursor, hf_skinny_lineInstance, 4, ENC_LITTLE_ENDIAN);
7114     si->callId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
7115     ptvcursor_add(cursor, hf_skinny_callReference, 4, ENC_LITTLE_ENDIAN);
7116     ptvcursor_add(cursor, hf_skinny_transactionId, 4, ENC_LITTLE_ENDIAN);
7117     dataLength = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
7118     ptvcursor_add(cursor, hf_skinny_dataLength, 4, ENC_LITTLE_ENDIAN);
7119     ptvcursor_add(cursor, hf_skinny_sequenceFlag, 4, ENC_LITTLE_ENDIAN);
7120     ptvcursor_add(cursor, hf_skinny_displayPriority, 4, ENC_LITTLE_ENDIAN);
7121     ptvcursor_add(cursor, hf_skinny_conferenceId, 4, ENC_LITTLE_ENDIAN);
7122     ptvcursor_add(cursor, hf_skinny_appInstanceID, 4, ENC_LITTLE_ENDIAN);
7123     ptvcursor_add(cursor, hf_skinny_routingID, 4, ENC_LITTLE_ENDIAN);
7124     dissect_skinny_xml(cursor, hf_skinny_xmldata, pinfo, dataLength, 2000);
7125     ptvcursor_pop_subtree(cursor);
7126   }
7127 }
7128 
7129 /*
7130  * Message:   VideoDisplayCommandMessage
7131  * Opcode:    0x0140
7132  * Type:      MediaControl
7133  * Direction: pbx2dev
7134  * VarLength: no
7135  * MsgType:   event
7136  */
7137 static void
handle_VideoDisplayCommandMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)7138 handle_VideoDisplayCommandMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
7139 {
7140   ptvcursor_add(cursor, hf_skinny_conferenceId, 4, ENC_LITTLE_ENDIAN);
7141   si->callId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
7142   ptvcursor_add(cursor, hf_skinny_callReference, 4, ENC_LITTLE_ENDIAN);
7143   ptvcursor_add(cursor, hf_skinny_layoutID, 4, ENC_LITTLE_ENDIAN);
7144 }
7145 
7146 /*
7147  * Message:   FlowControlNotifyMessage
7148  * Opcode:    0x0141
7149  * Type:      CallControl
7150  * Direction: pbx2dev
7151  * VarLength: no
7152  * MsgType:   event
7153  */
7154 static void
handle_FlowControlNotifyMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)7155 handle_FlowControlNotifyMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
7156 {
7157   ptvcursor_add(cursor, hf_skinny_conferenceId, 4, ENC_LITTLE_ENDIAN);
7158   ptvcursor_add(cursor, hf_skinny_passthruPartyID, 4, ENC_LITTLE_ENDIAN);
7159   si->callId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
7160   ptvcursor_add(cursor, hf_skinny_callReference, 4, ENC_LITTLE_ENDIAN);
7161   ptvcursor_add(cursor, hf_skinny_maximumBitRate, 4, ENC_LITTLE_ENDIAN);
7162 }
7163 
7164 /*
7165  * Message:   ConfigStatV2ResMessage
7166  * Opcode:    0x0142
7167  * Type:      RegistrationAndManagement
7168  * Direction: pbx2dev
7169  * VarLength: yes
7170  * MsgType:   response
7171  */
7172 static void
handle_ConfigStatV2ResMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)7173 handle_ConfigStatV2ResMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
7174 {
7175   guint32 DeviceName_len = 0;
7176   guint32 userName_len = 0;
7177   guint32 serverName_len = 0;
7178   {
7179     ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "sid");
7180     DeviceName_len = tvb_strnlen(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor), -1)+1;
7181     if (DeviceName_len > 1) {
7182       ptvcursor_add(cursor, hf_skinny_DeviceName, DeviceName_len, ENC_ASCII|ENC_NA);
7183     } else {
7184       ptvcursor_advance(cursor, 1);
7185     }
7186     ptvcursor_add(cursor, hf_skinny_reserved_for_future_use, 4, ENC_LITTLE_ENDIAN);
7187     ptvcursor_add(cursor, hf_skinny_instance, 4, ENC_LITTLE_ENDIAN);
7188     ptvcursor_pop_subtree(cursor);
7189   }
7190   ptvcursor_add(cursor, hf_skinny_numberOfLines, 4, ENC_LITTLE_ENDIAN);
7191   ptvcursor_add(cursor, hf_skinny_numberOfSpeedDials, 4, ENC_LITTLE_ENDIAN);
7192   userName_len = tvb_strnlen(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor), -1)+1;
7193   if (userName_len > 1) {
7194     ptvcursor_add(cursor, hf_skinny_userName, userName_len, ENC_ASCII|ENC_NA);
7195   } else {
7196     ptvcursor_advance(cursor, 1);
7197   }
7198   serverName_len = tvb_strnlen(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor), -1)+1;
7199   if (serverName_len > 1) {
7200     ptvcursor_add(cursor, hf_skinny_serverName, serverName_len, ENC_ASCII|ENC_NA);
7201   } else {
7202     ptvcursor_advance(cursor, 1);
7203   }
7204   skinny_reqrep_add_response(cursor, pinfo, skinny_conv, 0x000c);
7205 }
7206 
7207 /*
7208  * Message:   DisplayNotifyV2Message
7209  * Opcode:    0x0143
7210  * Type:      RegistrationAndManagement
7211  * Direction: pbx2dev
7212  * VarLength: yes
7213  * MsgType:   event
7214  */
7215 static void
handle_DisplayNotifyV2Message(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)7216 handle_DisplayNotifyV2Message(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
7217 {
7218   ptvcursor_add(cursor, hf_skinny_timeOutValue, 4, ENC_LITTLE_ENDIAN);
7219   dissect_skinny_displayLabel(cursor, pinfo, hf_skinny_notify, 0);
7220 }
7221 
7222 /*
7223  * Message:   DisplayPriNotifyV2Message
7224  * Opcode:    0x0144
7225  * Type:      RegistrationAndManagement
7226  * Direction: pbx2dev
7227  * VarLength: yes
7228  * MsgType:   event
7229  */
7230 static void
handle_DisplayPriNotifyV2Message(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)7231 handle_DisplayPriNotifyV2Message(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
7232 {
7233   ptvcursor_add(cursor, hf_skinny_timeOutValue, 4, ENC_LITTLE_ENDIAN);
7234   ptvcursor_add(cursor, hf_skinny_priority, 4, ENC_LITTLE_ENDIAN);
7235   dissect_skinny_displayLabel(cursor, pinfo, hf_skinny_notify, 0);
7236 }
7237 
7238 /*
7239  * Message:   DisplayPromptStatusV2Message
7240  * Opcode:    0x0145
7241  * Type:      CallControl
7242  * Direction: pbx2dev
7243  * VarLength: yes
7244  * MsgType:   event
7245  */
7246 static void
handle_DisplayPromptStatusV2Message(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)7247 handle_DisplayPromptStatusV2Message(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
7248 {
7249   ptvcursor_add(cursor, hf_skinny_timeOutValue, 4, ENC_LITTLE_ENDIAN);
7250   si->lineId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
7251   ptvcursor_add(cursor, hf_skinny_lineInstance, 4, ENC_LITTLE_ENDIAN);
7252   si->callId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
7253   ptvcursor_add(cursor, hf_skinny_callReference, 4, ENC_LITTLE_ENDIAN);
7254   dissect_skinny_displayLabel(cursor, pinfo, hf_skinny_promptStatus, 0);
7255 }
7256 
7257 /*
7258  * Message:   FeatureStatV2ResMessage
7259  * Opcode:    0x0146
7260  * Type:      RegistrationAndManagement
7261  * Direction: pbx2dev
7262  * VarLength: yes
7263  * MsgType:   response
7264  */
7265 static void
handle_FeatureStatV2ResMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)7266 handle_FeatureStatV2ResMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
7267 {
7268   guint32 featureTextLabel_len = 0;
7269   ptvcursor_add(cursor, hf_skinny_featureIndex, 4, ENC_LITTLE_ENDIAN);
7270   ptvcursor_add(cursor, hf_skinny_featureID, 4, ENC_LITTLE_ENDIAN);
7271   ptvcursor_add(cursor, hf_skinny_featureStatus, 4, ENC_LITTLE_ENDIAN);
7272   featureTextLabel_len = tvb_strnlen(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor), -1)+1;
7273   if (featureTextLabel_len > 1) {
7274     ptvcursor_add(cursor, hf_skinny_featureTextLabel, featureTextLabel_len, ENC_ASCII|ENC_NA);
7275   } else {
7276     ptvcursor_advance(cursor, 1);
7277   }
7278   skinny_reqrep_add_response(cursor, pinfo, skinny_conv, 0x0034);
7279 }
7280 
7281 /*
7282  * Message:   LineStatV2ResMessage
7283  * Opcode:    0x0147
7284  * Type:      RegistrationAndManagement
7285  * Direction: pbx2dev
7286  * VarLength: yes
7287  * MsgType:   response
7288  */
7289 static void
handle_LineStatV2ResMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)7290 handle_LineStatV2ResMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
7291 {
7292   guint32 lineNumber = 0;
7293   guint32 lineDirNumber_len = 0;
7294   guint32 lineFullyQualifiedDisplayName_len = 0;
7295   guint32 lineTextLabel_len = 0;
7296   lineNumber = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
7297   ptvcursor_add(cursor, hf_skinny_lineNumber, 4, ENC_LITTLE_ENDIAN);
7298   ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "lineType");
7299   ptvcursor_add_no_advance(cursor, hf_skinny_OrigDialed, 4, ENC_LITTLE_ENDIAN);
7300   ptvcursor_add_no_advance(cursor, hf_skinny_RedirDialed, 4, ENC_LITTLE_ENDIAN);
7301   ptvcursor_add_no_advance(cursor, hf_skinny_CallingPartyNumber, 4, ENC_LITTLE_ENDIAN);
7302   ptvcursor_add_no_advance(cursor, hf_skinny_CallingPartyName, 4, ENC_LITTLE_ENDIAN);
7303   ptvcursor_advance(cursor, 4);
7304   ptvcursor_pop_subtree(cursor); /* end bitfield: lineType */
7305   lineDirNumber_len = tvb_strnlen(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor), -1)+1;
7306   if (lineDirNumber_len > 1) {
7307     ptvcursor_add(cursor, hf_skinny_lineDirNumber, lineDirNumber_len, ENC_ASCII|ENC_NA);
7308   } else {
7309     ptvcursor_advance(cursor, 1);
7310   }
7311   lineFullyQualifiedDisplayName_len = tvb_strnlen(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor), -1)+1;
7312   if (lineFullyQualifiedDisplayName_len > 1) {
7313     ptvcursor_add(cursor, hf_skinny_lineFullyQualifiedDisplayName, lineFullyQualifiedDisplayName_len, ENC_ASCII|ENC_NA);
7314   } else {
7315     ptvcursor_advance(cursor, 1);
7316   }
7317   lineTextLabel_len = tvb_strnlen(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor), -1)+1;
7318   if (lineTextLabel_len > 1) {
7319     ptvcursor_add(cursor, hf_skinny_lineTextLabel, lineTextLabel_len, ENC_ASCII|ENC_NA);
7320   } else {
7321     ptvcursor_advance(cursor, 1);
7322   }
7323   skinny_reqrep_add_response(cursor, pinfo, skinny_conv, 0x000b ^ lineNumber);
7324 }
7325 
7326 /*
7327  * Message:   ServiceURLStatV2ResMessage
7328  * Opcode:    0x0148
7329  * Type:      RegistrationAndManagement
7330  * Direction: pbx2dev
7331  * VarLength: yes
7332  * MsgType:   response
7333  */
7334 static void
handle_ServiceURLStatV2ResMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)7335 handle_ServiceURLStatV2ResMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
7336 {
7337   guint32 serviceURLIndex = 0;
7338   serviceURLIndex = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
7339   ptvcursor_add(cursor, hf_skinny_serviceURLIndex, 4, ENC_LITTLE_ENDIAN);
7340   skinny_reqrep_add_response(cursor, pinfo, skinny_conv, 0x0033 ^ serviceURLIndex);
7341 }
7342 
7343 /*
7344  * Message:   SpeedDialStatV2ResMessage
7345  * Opcode:    0x0149
7346  * Type:      RegistrationAndManagement
7347  * Direction: pbx2dev
7348  * VarLength: yes
7349  * MsgType:   response
7350  */
7351 static void
handle_SpeedDialStatV2ResMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)7352 handle_SpeedDialStatV2ResMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
7353 {
7354   guint32 speedDialNumber = 0;
7355   guint32 speedDialDirNumber_len = 0;
7356   guint32 speedDialDisplayName_len = 0;
7357   speedDialNumber = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
7358   ptvcursor_add(cursor, hf_skinny_speedDialNumber, 4, ENC_LITTLE_ENDIAN);
7359   speedDialDirNumber_len = tvb_strnlen(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor), -1)+1;
7360   if (speedDialDirNumber_len > 1) {
7361     ptvcursor_add(cursor, hf_skinny_speedDialDirNumber, speedDialDirNumber_len, ENC_ASCII|ENC_NA);
7362   } else {
7363     ptvcursor_advance(cursor, 1);
7364   }
7365   speedDialDisplayName_len = tvb_strnlen(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor), -1)+1;
7366   if (speedDialDisplayName_len > 1) {
7367     ptvcursor_add(cursor, hf_skinny_speedDialDisplayName, speedDialDisplayName_len, ENC_ASCII|ENC_NA);
7368   } else {
7369     ptvcursor_advance(cursor, 1);
7370   }
7371   skinny_reqrep_add_response(cursor, pinfo, skinny_conv, 0x000a ^ speedDialNumber);
7372 }
7373 
7374 /*
7375  * Message:   CallInfoV2Message
7376  * Opcode:    0x014a
7377  * Type:      CallControl
7378  * Direction: pbx2dev
7379  * VarLength: yes
7380  * MsgType:   event
7381  */
7382 static void
handle_CallInfoV2Message(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)7383 handle_CallInfoV2Message(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
7384 {
7385   guint32 hdr_version = tvb_get_letohl(ptvcursor_tvbuff(cursor), 4);
7386   guint32 callingParty_len = 0;
7387   guint32 AlternateCallingParty_len = 0;
7388   guint32 calledParty_len = 0;
7389   guint32 originalCalledParty_len = 0;
7390   guint32 lastRedirectingParty_len = 0;
7391   guint32 cgpnVoiceMailbox_len = 0;
7392   guint32 cdpnVoiceMailbox_len = 0;
7393   guint32 originalCdpnVoiceMailbox_len = 0;
7394   guint32 lastRedirectingVoiceMailbox_len = 0;
7395   guint32 callingPartyName_len = 0;
7396   guint32 calledPartyName_len = 0;
7397   guint32 originalCalledPartyName_len = 0;
7398   guint32 lastRedirectingPartyName_len = 0;
7399   guint32 HuntPilotNumber_len = 0;
7400   guint32 HuntPilotName_len = 0;
7401 
7402   si->lineId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
7403   ptvcursor_add(cursor, hf_skinny_lineInstance, 4, ENC_LITTLE_ENDIAN);
7404   si->callId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
7405   ptvcursor_add(cursor, hf_skinny_callReference, 4, ENC_LITTLE_ENDIAN);
7406   ptvcursor_add(cursor, hf_skinny_callType, 4, ENC_LITTLE_ENDIAN);
7407   ptvcursor_add(cursor, hf_skinny_originalCdpnRedirectReason, 4, ENC_LITTLE_ENDIAN);
7408   ptvcursor_add(cursor, hf_skinny_lastRedirectingReason, 4, ENC_LITTLE_ENDIAN);
7409   ptvcursor_add(cursor, hf_skinny_callInstance, 4, ENC_LITTLE_ENDIAN);
7410   ptvcursor_add(cursor, hf_skinny_callSecurityStatus, 4, ENC_LITTLE_ENDIAN);
7411   ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "partyPIRestrictionBits");
7412   ptvcursor_add_no_advance(cursor, hf_skinny_RestrictInformationType_CallingPartyName, 4, ENC_LITTLE_ENDIAN);
7413   ptvcursor_add_no_advance(cursor, hf_skinny_RestrictInformationType_CallingPartyNumber, 4, ENC_LITTLE_ENDIAN);
7414   ptvcursor_add_no_advance(cursor, hf_skinny_RestrictInformationType_CallingParty, 4, ENC_LITTLE_ENDIAN);
7415   ptvcursor_add_no_advance(cursor, hf_skinny_RestrictInformationType_CalledPartyName, 4, ENC_LITTLE_ENDIAN);
7416   ptvcursor_add_no_advance(cursor, hf_skinny_RestrictInformationType_CalledPartyNumber, 4, ENC_LITTLE_ENDIAN);
7417   ptvcursor_add_no_advance(cursor, hf_skinny_RestrictInformationType_CalledParty, 4, ENC_LITTLE_ENDIAN);
7418   ptvcursor_add_no_advance(cursor, hf_skinny_RestrictInformationType_OriginalCalledPartyName, 4, ENC_LITTLE_ENDIAN);
7419   ptvcursor_add_no_advance(cursor, hf_skinny_RestrictInformationType_OriginalCalledPartyNumber, 4, ENC_LITTLE_ENDIAN);
7420   ptvcursor_add_no_advance(cursor, hf_skinny_RestrictInformationType_OriginalCalledParty, 4, ENC_LITTLE_ENDIAN);
7421   ptvcursor_add_no_advance(cursor, hf_skinny_RestrictInformationType_LastRedirectPartyName, 4, ENC_LITTLE_ENDIAN);
7422   ptvcursor_add_no_advance(cursor, hf_skinny_RestrictInformationType_LastRedirectPartyNumber, 4, ENC_LITTLE_ENDIAN);
7423   ptvcursor_add_no_advance(cursor, hf_skinny_RestrictInformationType_LastRedirectParty, 4, ENC_LITTLE_ENDIAN);
7424   ptvcursor_add_no_advance(cursor, hf_skinny_RestrictInformationType_BitsReserved, 4, ENC_LITTLE_ENDIAN);
7425   ptvcursor_advance(cursor, 4);
7426   ptvcursor_pop_subtree(cursor); /* end bitfield: partyPIRestrictionBits */
7427   callingParty_len = tvb_strnlen(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor), -1)+1;
7428   if (callingParty_len > 1) {
7429     si->callingParty = g_strdup(tvb_format_stringzpad(pinfo->pool, ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor), callingParty_len));
7430     ptvcursor_add(cursor, hf_skinny_callingParty, callingParty_len, ENC_ASCII|ENC_NA);
7431   } else {
7432     ptvcursor_advance(cursor, 1);
7433   }
7434   AlternateCallingParty_len = tvb_strnlen(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor), -1)+1;
7435   if (AlternateCallingParty_len > 1) {
7436     ptvcursor_add(cursor, hf_skinny_AlternateCallingParty, AlternateCallingParty_len, ENC_ASCII|ENC_NA);
7437   } else {
7438     ptvcursor_advance(cursor, 1);
7439   }
7440   calledParty_len = tvb_strnlen(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor), -1)+1;
7441   if (calledParty_len > 1) {
7442     si->calledParty = g_strdup(tvb_format_stringzpad(pinfo->pool, ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor), calledParty_len));
7443     ptvcursor_add(cursor, hf_skinny_calledParty, calledParty_len, ENC_ASCII|ENC_NA);
7444   } else {
7445     ptvcursor_advance(cursor, 1);
7446   }
7447   originalCalledParty_len = tvb_strnlen(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor), -1)+1;
7448   if (originalCalledParty_len > 1) {
7449     ptvcursor_add(cursor, hf_skinny_originalCalledParty, originalCalledParty_len, ENC_ASCII|ENC_NA);
7450   } else {
7451     ptvcursor_advance(cursor, 1);
7452   }
7453   lastRedirectingParty_len = tvb_strnlen(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor), -1)+1;
7454   if (lastRedirectingParty_len > 1) {
7455     ptvcursor_add(cursor, hf_skinny_lastRedirectingParty, lastRedirectingParty_len, ENC_ASCII|ENC_NA);
7456   } else {
7457     ptvcursor_advance(cursor, 1);
7458   }
7459   cgpnVoiceMailbox_len = tvb_strnlen(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor), -1)+1;
7460   if (cgpnVoiceMailbox_len > 1) {
7461     ptvcursor_add(cursor, hf_skinny_cgpnVoiceMailbox, cgpnVoiceMailbox_len, ENC_ASCII|ENC_NA);
7462   } else {
7463     ptvcursor_advance(cursor, 1);
7464   }
7465   cdpnVoiceMailbox_len = tvb_strnlen(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor), -1)+1;
7466   if (cdpnVoiceMailbox_len > 1) {
7467     ptvcursor_add(cursor, hf_skinny_cdpnVoiceMailbox, cdpnVoiceMailbox_len, ENC_ASCII|ENC_NA);
7468   } else {
7469     ptvcursor_advance(cursor, 1);
7470   }
7471   originalCdpnVoiceMailbox_len = tvb_strnlen(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor), -1)+1;
7472   if (originalCdpnVoiceMailbox_len > 1) {
7473     ptvcursor_add(cursor, hf_skinny_originalCdpnVoiceMailbox, originalCdpnVoiceMailbox_len, ENC_ASCII|ENC_NA);
7474   } else {
7475     ptvcursor_advance(cursor, 1);
7476   }
7477   lastRedirectingVoiceMailbox_len = tvb_strnlen(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor), -1)+1;
7478   if (lastRedirectingVoiceMailbox_len > 1) {
7479     ptvcursor_add(cursor, hf_skinny_lastRedirectingVoiceMailbox, lastRedirectingVoiceMailbox_len, ENC_ASCII|ENC_NA);
7480   } else {
7481     ptvcursor_advance(cursor, 1);
7482   }
7483   callingPartyName_len = tvb_strnlen(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor), -1)+1;
7484   if (callingPartyName_len > 1) {
7485     ptvcursor_add(cursor, hf_skinny_callingPartyName, callingPartyName_len, ENC_ASCII|ENC_NA);
7486   } else {
7487     ptvcursor_advance(cursor, 1);
7488   }
7489   calledPartyName_len = tvb_strnlen(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor), -1)+1;
7490   if (calledPartyName_len > 1) {
7491     ptvcursor_add(cursor, hf_skinny_calledPartyName, calledPartyName_len, ENC_ASCII|ENC_NA);
7492   } else {
7493     ptvcursor_advance(cursor, 1);
7494   }
7495   originalCalledPartyName_len = tvb_strnlen(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor), -1)+1;
7496   if (originalCalledPartyName_len > 1) {
7497     ptvcursor_add(cursor, hf_skinny_originalCalledPartyName, originalCalledPartyName_len, ENC_ASCII|ENC_NA);
7498   } else {
7499     ptvcursor_advance(cursor, 1);
7500   }
7501   lastRedirectingPartyName_len = tvb_strnlen(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor), -1)+1;
7502   if (lastRedirectingPartyName_len > 1) {
7503     ptvcursor_add(cursor, hf_skinny_lastRedirectingPartyName, lastRedirectingPartyName_len, ENC_ASCII|ENC_NA);
7504   } else {
7505     ptvcursor_advance(cursor, 1);
7506   }
7507   if (hdr_version >= V17_MSG_TYPE) {
7508     HuntPilotNumber_len = tvb_strnlen(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor), -1)+1;
7509     if (HuntPilotNumber_len > 1) {
7510       ptvcursor_add(cursor, hf_skinny_HuntPilotNumber, HuntPilotNumber_len, ENC_ASCII|ENC_NA);
7511     } else {
7512       ptvcursor_advance(cursor, 1);
7513     }
7514     HuntPilotName_len = tvb_strnlen(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor), -1)+1;
7515     if (HuntPilotName_len > 1) {
7516       ptvcursor_add(cursor, hf_skinny_HuntPilotName, HuntPilotName_len, ENC_ASCII|ENC_NA);
7517     } else {
7518       ptvcursor_advance(cursor, 1);
7519     }
7520   }
7521   if (si->callingParty && si->calledParty) {
7522     si->additionalInfo = g_strdup_printf("\"%s -> %s\"", si->callingParty, si->calledParty);
7523   }
7524 }
7525 
7526 /*
7527  * Message:   PortReqMessage
7528  * Opcode:    0x014b
7529  * Type:      MediaControl
7530  * Direction: pbx2dev
7531  * VarLength: no
7532  * MsgType:   request
7533  */
7534 static void
handle_PortReqMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)7535 handle_PortReqMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
7536 {
7537   ptvcursor_add(cursor, hf_skinny_conferenceId, 4, ENC_LITTLE_ENDIAN);
7538   si->callId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
7539   ptvcursor_add(cursor, hf_skinny_callReference, 4, ENC_LITTLE_ENDIAN);
7540   si->passThroughPartyId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
7541   ptvcursor_add(cursor, hf_skinny_passThroughPartyId, 4, ENC_LITTLE_ENDIAN);
7542   ptvcursor_add(cursor, hf_skinny_mediaTransportType, 4, ENC_LITTLE_ENDIAN);
7543   ptvcursor_add(cursor, hf_skinny_ipAddressType, 4, ENC_LITTLE_ENDIAN);
7544   ptvcursor_add(cursor, hf_skinny_mediaType, 4, ENC_LITTLE_ENDIAN);
7545   skinny_reqrep_add_request(cursor, pinfo, skinny_conv, 0x014b);
7546 }
7547 
7548 /*
7549  * Message:   PortCloseMessage
7550  * Opcode:    0x014c
7551  * Type:      MediaControl
7552  * Direction: pbx2dev
7553  * VarLength: no
7554  * MsgType:   event
7555  */
7556 static void
handle_PortCloseMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)7557 handle_PortCloseMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
7558 {
7559   ptvcursor_add(cursor, hf_skinny_conferenceId, 4, ENC_LITTLE_ENDIAN);
7560   si->callId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
7561   ptvcursor_add(cursor, hf_skinny_callReference, 4, ENC_LITTLE_ENDIAN);
7562   si->passThroughPartyId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
7563   ptvcursor_add(cursor, hf_skinny_passThroughPartyId, 4, ENC_LITTLE_ENDIAN);
7564   ptvcursor_add(cursor, hf_skinny_mediaType, 4, ENC_LITTLE_ENDIAN);
7565 }
7566 
7567 /*
7568  * Message:   QoSListenMessage
7569  * Opcode:    0x014d
7570  * Type:      IntraCCM
7571  * Direction: pbx2pbx
7572  * VarLength: no
7573  * MsgType:   event
7574  */
7575 static void
handle_QoSListenMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)7576 handle_QoSListenMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
7577 {
7578   address remoteIpAddr;
7579   char *remoteIpAddr_str = NULL;
7580   guint32 remotePortNumber = 0;
7581   ptvcursor_add(cursor, hf_skinny_conferenceId, 4, ENC_LITTLE_ENDIAN);
7582   si->callId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
7583   ptvcursor_add(cursor, hf_skinny_callReference, 4, ENC_LITTLE_ENDIAN);
7584   si->passThroughPartyId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
7585   ptvcursor_add(cursor, hf_skinny_passThroughPartyId, 4, ENC_LITTLE_ENDIAN);
7586   read_skinny_ipv4or6(cursor, &remoteIpAddr);
7587   dissect_skinny_ipv4or6(cursor, hf_skinny_remoteIpAddr_ipv4, hf_skinny_remoteIpAddr_ipv6);
7588   remotePortNumber = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
7589   ptvcursor_add(cursor, hf_skinny_remotePortNumber, 4, ENC_LITTLE_ENDIAN);
7590   srtp_add_address(pinfo, PT_UDP, &remoteIpAddr, remotePortNumber, 0, "SKINNY", pinfo->num, false, NULL, NULL, NULL);
7591   remoteIpAddr_str = address_to_display(NULL, &remoteIpAddr);
7592   si->additionalInfo = g_strdup_printf("%s:%d", remoteIpAddr_str, remotePortNumber);
7593   wmem_free(NULL, remoteIpAddr_str);
7594   ptvcursor_add(cursor, hf_skinny_resvStyle, 4, ENC_LITTLE_ENDIAN);
7595   ptvcursor_add(cursor, hf_skinny_maxRetryNumber, 4, ENC_LITTLE_ENDIAN);
7596   ptvcursor_add(cursor, hf_skinny_retryTimer, 4, ENC_LITTLE_ENDIAN);
7597   ptvcursor_add(cursor, hf_skinny_confirmRequired, 4, ENC_LITTLE_ENDIAN);
7598   ptvcursor_add(cursor, hf_skinny_preemptionPriority, 4, ENC_LITTLE_ENDIAN);
7599   ptvcursor_add(cursor, hf_skinny_defendingPriority, 4, ENC_LITTLE_ENDIAN);
7600   ptvcursor_add(cursor, hf_skinny_compressionType, 4, ENC_LITTLE_ENDIAN);
7601   ptvcursor_add(cursor, hf_skinny_averageBitRate, 4, ENC_LITTLE_ENDIAN);
7602   ptvcursor_add(cursor, hf_skinny_burstSize, 4, ENC_LITTLE_ENDIAN);
7603   ptvcursor_add(cursor, hf_skinny_peakRate, 4, ENC_LITTLE_ENDIAN);
7604   {
7605     ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "applicationID");
7606     ptvcursor_add(cursor, hf_skinny_vendorID, 32, ENC_ASCII|ENC_NA);
7607     ptvcursor_add(cursor, hf_skinny_version, 16, ENC_ASCII|ENC_NA);
7608     ptvcursor_add(cursor, hf_skinny_appName, 32, ENC_ASCII|ENC_NA);
7609     ptvcursor_add(cursor, hf_skinny_subAppID, 32, ENC_ASCII|ENC_NA);
7610     ptvcursor_pop_subtree(cursor);
7611   }
7612 }
7613 
7614 /*
7615  * Message:   QoSPathMessage
7616  * Opcode:    0x014e
7617  * Type:      IntraCCM
7618  * Direction: pbx2pbx
7619  * VarLength: no
7620  * MsgType:   event
7621  */
7622 static void
handle_QoSPathMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)7623 handle_QoSPathMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
7624 {
7625   address remoteIpAddr;
7626   char *remoteIpAddr_str = NULL;
7627   guint32 remotePortNumber = 0;
7628   ptvcursor_add(cursor, hf_skinny_conferenceId, 4, ENC_LITTLE_ENDIAN);
7629   si->callId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
7630   ptvcursor_add(cursor, hf_skinny_callReference, 4, ENC_LITTLE_ENDIAN);
7631   si->passThroughPartyId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
7632   ptvcursor_add(cursor, hf_skinny_passThroughPartyId, 4, ENC_LITTLE_ENDIAN);
7633   read_skinny_ipv4or6(cursor, &remoteIpAddr);
7634   dissect_skinny_ipv4or6(cursor, hf_skinny_remoteIpAddr_ipv4, hf_skinny_remoteIpAddr_ipv6);
7635   remotePortNumber = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
7636   ptvcursor_add(cursor, hf_skinny_remotePortNumber, 4, ENC_LITTLE_ENDIAN);
7637   srtp_add_address(pinfo, PT_UDP, &remoteIpAddr, remotePortNumber, 0, "SKINNY", pinfo->num, false, NULL, NULL, NULL);
7638   remoteIpAddr_str = address_to_display(NULL, &remoteIpAddr);
7639   si->additionalInfo = g_strdup_printf("%s:%d", remoteIpAddr_str, remotePortNumber);
7640   wmem_free(NULL, remoteIpAddr_str);
7641   ptvcursor_add(cursor, hf_skinny_resvStyle, 4, ENC_LITTLE_ENDIAN);
7642   ptvcursor_add(cursor, hf_skinny_maxRetryNumber, 4, ENC_LITTLE_ENDIAN);
7643   ptvcursor_add(cursor, hf_skinny_retryTimer, 4, ENC_LITTLE_ENDIAN);
7644   ptvcursor_add(cursor, hf_skinny_preemptionPriority, 4, ENC_LITTLE_ENDIAN);
7645   ptvcursor_add(cursor, hf_skinny_defendingPriority, 4, ENC_LITTLE_ENDIAN);
7646   ptvcursor_add(cursor, hf_skinny_compressionType, 4, ENC_LITTLE_ENDIAN);
7647   ptvcursor_add(cursor, hf_skinny_averageBitRate, 4, ENC_LITTLE_ENDIAN);
7648   ptvcursor_add(cursor, hf_skinny_burstSize, 4, ENC_LITTLE_ENDIAN);
7649   ptvcursor_add(cursor, hf_skinny_peakRate, 4, ENC_LITTLE_ENDIAN);
7650   {
7651     ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "applicationID");
7652     ptvcursor_add(cursor, hf_skinny_vendorID, 32, ENC_ASCII|ENC_NA);
7653     ptvcursor_add(cursor, hf_skinny_version, 16, ENC_ASCII|ENC_NA);
7654     ptvcursor_add(cursor, hf_skinny_appName, 32, ENC_ASCII|ENC_NA);
7655     ptvcursor_add(cursor, hf_skinny_subAppID, 32, ENC_ASCII|ENC_NA);
7656     ptvcursor_pop_subtree(cursor);
7657   }
7658 }
7659 
7660 /*
7661  * Message:   QoSTeardownMessage
7662  * Opcode:    0x014f
7663  * Type:      IntraCCM
7664  * Direction: pbx2pbx
7665  * VarLength: no
7666  * MsgType:   event
7667  */
7668 static void
handle_QoSTeardownMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)7669 handle_QoSTeardownMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
7670 {
7671   address remoteIpAddr;
7672   char *remoteIpAddr_str = NULL;
7673   guint32 remotePortNumber = 0;
7674   ptvcursor_add(cursor, hf_skinny_conferenceId, 4, ENC_LITTLE_ENDIAN);
7675   si->callId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
7676   ptvcursor_add(cursor, hf_skinny_callReference, 4, ENC_LITTLE_ENDIAN);
7677   si->passThroughPartyId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
7678   ptvcursor_add(cursor, hf_skinny_passThroughPartyId, 4, ENC_LITTLE_ENDIAN);
7679   read_skinny_ipv4or6(cursor, &remoteIpAddr);
7680   dissect_skinny_ipv4or6(cursor, hf_skinny_remoteIpAddr_ipv4, hf_skinny_remoteIpAddr_ipv6);
7681   remotePortNumber = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
7682   ptvcursor_add(cursor, hf_skinny_remotePortNumber, 4, ENC_LITTLE_ENDIAN);
7683   srtp_add_address(pinfo, PT_UDP, &remoteIpAddr, remotePortNumber, 0, "SKINNY", pinfo->num, false, NULL, NULL, NULL);
7684   remoteIpAddr_str = address_to_display(NULL, &remoteIpAddr);
7685   si->additionalInfo = g_strdup_printf("%s:%d", remoteIpAddr_str, remotePortNumber);
7686   wmem_free(NULL, remoteIpAddr_str);
7687   ptvcursor_add(cursor, hf_skinny_direction, 4, ENC_LITTLE_ENDIAN);
7688 }
7689 
7690 /*
7691  * Message:   UpdateDSCPMessage
7692  * Opcode:    0x0150
7693  * Type:      IntraCCM
7694  * Direction: pbx2pbx
7695  * VarLength: no
7696  * MsgType:   event
7697  */
7698 static void
handle_UpdateDSCPMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)7699 handle_UpdateDSCPMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
7700 {
7701   address remoteIpAddr;
7702   char *remoteIpAddr_str = NULL;
7703   guint32 remotePortNumber = 0;
7704   ptvcursor_add(cursor, hf_skinny_conferenceId, 4, ENC_LITTLE_ENDIAN);
7705   si->callId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
7706   ptvcursor_add(cursor, hf_skinny_callReference, 4, ENC_LITTLE_ENDIAN);
7707   si->passThroughPartyId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
7708   ptvcursor_add(cursor, hf_skinny_passThroughPartyId, 4, ENC_LITTLE_ENDIAN);
7709   read_skinny_ipv4or6(cursor, &remoteIpAddr);
7710   dissect_skinny_ipv4or6(cursor, hf_skinny_remoteIpAddr_ipv4, hf_skinny_remoteIpAddr_ipv6);
7711   remotePortNumber = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
7712   ptvcursor_add(cursor, hf_skinny_remotePortNumber, 4, ENC_LITTLE_ENDIAN);
7713   srtp_add_address(pinfo, PT_UDP, &remoteIpAddr, remotePortNumber, 0, "SKINNY", pinfo->num, false, NULL, NULL, NULL);
7714   remoteIpAddr_str = address_to_display(NULL, &remoteIpAddr);
7715   si->additionalInfo = g_strdup_printf("%s:%d", remoteIpAddr_str, remotePortNumber);
7716   wmem_free(NULL, remoteIpAddr_str);
7717   ptvcursor_add(cursor, hf_skinny_DSCPValue, 4, ENC_LITTLE_ENDIAN);
7718 }
7719 
7720 /*
7721  * Message:   QoSModifyMessage
7722  * Opcode:    0x0151
7723  * Type:      IntraCCM
7724  * Direction: pbx2pbx
7725  * VarLength: no
7726  * MsgType:   event
7727  */
7728 static void
handle_QoSModifyMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)7729 handle_QoSModifyMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
7730 {
7731   address remoteIpAddr;
7732   char *remoteIpAddr_str = NULL;
7733   guint32 remotePortNumber = 0;
7734   ptvcursor_add(cursor, hf_skinny_conferenceId, 4, ENC_LITTLE_ENDIAN);
7735   si->callId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
7736   ptvcursor_add(cursor, hf_skinny_callReference, 4, ENC_LITTLE_ENDIAN);
7737   si->passThroughPartyId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
7738   ptvcursor_add(cursor, hf_skinny_passThroughPartyId, 4, ENC_LITTLE_ENDIAN);
7739   read_skinny_ipv4or6(cursor, &remoteIpAddr);
7740   dissect_skinny_ipv4or6(cursor, hf_skinny_remoteIpAddr_ipv4, hf_skinny_remoteIpAddr_ipv6);
7741   remotePortNumber = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
7742   ptvcursor_add(cursor, hf_skinny_remotePortNumber, 4, ENC_LITTLE_ENDIAN);
7743   srtp_add_address(pinfo, PT_UDP, &remoteIpAddr, remotePortNumber, 0, "SKINNY", pinfo->num, false, NULL, NULL, NULL);
7744   remoteIpAddr_str = address_to_display(NULL, &remoteIpAddr);
7745   si->additionalInfo = g_strdup_printf("%s:%d", remoteIpAddr_str, remotePortNumber);
7746   wmem_free(NULL, remoteIpAddr_str);
7747   ptvcursor_add(cursor, hf_skinny_direction, 4, ENC_LITTLE_ENDIAN);
7748   ptvcursor_add(cursor, hf_skinny_compressionType, 4, ENC_LITTLE_ENDIAN);
7749   ptvcursor_add(cursor, hf_skinny_averageBitRate, 4, ENC_LITTLE_ENDIAN);
7750   ptvcursor_add(cursor, hf_skinny_burstSize, 4, ENC_LITTLE_ENDIAN);
7751   ptvcursor_add(cursor, hf_skinny_peakRate, 4, ENC_LITTLE_ENDIAN);
7752   {
7753     ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "applicationID");
7754     ptvcursor_add(cursor, hf_skinny_vendorID, 32, ENC_ASCII|ENC_NA);
7755     ptvcursor_add(cursor, hf_skinny_version, 16, ENC_ASCII|ENC_NA);
7756     ptvcursor_add(cursor, hf_skinny_appName, 32, ENC_ASCII|ENC_NA);
7757     ptvcursor_add(cursor, hf_skinny_subAppID, 32, ENC_ASCII|ENC_NA);
7758     ptvcursor_pop_subtree(cursor);
7759   }
7760 }
7761 
7762 /*
7763  * Message:   SubscriptionStatResMessage
7764  * Opcode:    0x0152
7765  * Type:      RegistrationAndManagement
7766  * Direction: pbx2dev
7767  * VarLength: no
7768  * MsgType:   response
7769  */
7770 static void
handle_SubscriptionStatResMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)7771 handle_SubscriptionStatResMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
7772 {
7773   guint32 transactionId = 0;
7774   transactionId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
7775   ptvcursor_add(cursor, hf_skinny_transactionId, 4, ENC_LITTLE_ENDIAN);
7776   ptvcursor_add(cursor, hf_skinny_subscriptionFeatureID, 4, ENC_LITTLE_ENDIAN);
7777   ptvcursor_add(cursor, hf_skinny_timer, 4, ENC_LITTLE_ENDIAN);
7778   ptvcursor_add(cursor, hf_skinny_cause, 4, ENC_LITTLE_ENDIAN);
7779   skinny_reqrep_add_response(cursor, pinfo, skinny_conv, 0x0048 ^ transactionId);
7780 }
7781 
7782 /*
7783  * Message:   NotificationMessage
7784  * Opcode:    0x0153
7785  * Type:      RegistrationAndManagement
7786  * Direction: pbx2dev
7787  * VarLength: no
7788  * MsgType:   event
7789  */
7790 static void
handle_NotificationMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)7791 handle_NotificationMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
7792 {
7793   ptvcursor_add(cursor, hf_skinny_transactionId, 4, ENC_LITTLE_ENDIAN);
7794   ptvcursor_add(cursor, hf_skinny_subscriptionFeatureID, 4, ENC_LITTLE_ENDIAN);
7795   ptvcursor_add(cursor, hf_skinny_notificationStatus, 4, ENC_LITTLE_ENDIAN);
7796   ptvcursor_add(cursor, hf_skinny_text, 97, ENC_ASCII|ENC_NA);
7797 }
7798 
7799 /*
7800  * Message:   StartMediaTransmissionAckMessage
7801  * Opcode:    0x0154
7802  * Type:      MediaControl
7803  * Direction: pbx2dev
7804  * VarLength: no
7805  * MsgType:   response
7806  */
7807 static void
handle_StartMediaTransmissionAckMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)7808 handle_StartMediaTransmissionAckMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
7809 {
7810   guint32 passThroughPartyId = 0;
7811   address transmitIpAddr;
7812   char *transmitIpAddr_str = NULL;
7813   guint32 portNumber = 0;
7814   ptvcursor_add(cursor, hf_skinny_conferenceId, 4, ENC_LITTLE_ENDIAN);
7815   passThroughPartyId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
7816   si->passThroughPartyId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
7817   ptvcursor_add(cursor, hf_skinny_passThroughPartyId, 4, ENC_LITTLE_ENDIAN);
7818   si->callId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
7819   ptvcursor_add(cursor, hf_skinny_callReference, 4, ENC_LITTLE_ENDIAN);
7820   read_skinny_ipv4or6(cursor, &transmitIpAddr);
7821   dissect_skinny_ipv4or6(cursor, hf_skinny_transmitIpAddr_ipv4, hf_skinny_transmitIpAddr_ipv6);
7822   portNumber = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
7823   ptvcursor_add(cursor, hf_skinny_portNumber, 4, ENC_LITTLE_ENDIAN);
7824   srtp_add_address(pinfo, PT_UDP, &transmitIpAddr, portNumber, 0, "SKINNY", pinfo->num, false, NULL, NULL, NULL);
7825   transmitIpAddr_str = address_to_display(NULL, &transmitIpAddr);
7826   si->additionalInfo = g_strdup_printf("%s:%d", transmitIpAddr_str, portNumber);
7827   wmem_free(NULL, transmitIpAddr_str);
7828   si->mediaTransmissionStatus = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
7829   ptvcursor_add(cursor, hf_skinny_mediaTransmissionStatus, 4, ENC_LITTLE_ENDIAN);
7830   skinny_reqrep_add_response(cursor, pinfo, skinny_conv, 0x008a ^ passThroughPartyId);
7831 }
7832 
7833 /*
7834  * Message:   StartMultiMediaTransmissionAckMessage
7835  * Opcode:    0x0155
7836  * Type:      MediaControl
7837  * Direction: pbx2dev
7838  * VarLength: no
7839  * MsgType:   response
7840  */
7841 static void
handle_StartMultiMediaTransmissionAckMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)7842 handle_StartMultiMediaTransmissionAckMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
7843 {
7844   guint32 passThroughPartyId = 0;
7845   address transmitIpAddr;
7846   char *transmitIpAddr_str = NULL;
7847   guint32 portNumber = 0;
7848   ptvcursor_add(cursor, hf_skinny_conferenceId, 4, ENC_LITTLE_ENDIAN);
7849   passThroughPartyId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
7850   si->passThroughPartyId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
7851   ptvcursor_add(cursor, hf_skinny_passThroughPartyId, 4, ENC_LITTLE_ENDIAN);
7852   si->callId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
7853   ptvcursor_add(cursor, hf_skinny_callReference, 4, ENC_LITTLE_ENDIAN);
7854   read_skinny_ipv4or6(cursor, &transmitIpAddr);
7855   dissect_skinny_ipv4or6(cursor, hf_skinny_transmitIpAddr_ipv4, hf_skinny_transmitIpAddr_ipv6);
7856   portNumber = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
7857   ptvcursor_add(cursor, hf_skinny_portNumber, 4, ENC_LITTLE_ENDIAN);
7858   srtp_add_address(pinfo, PT_UDP, &transmitIpAddr, portNumber, 0, "SKINNY", pinfo->num, false, NULL, NULL, NULL);
7859   transmitIpAddr_str = address_to_display(NULL, &transmitIpAddr);
7860   si->additionalInfo = g_strdup_printf("%s:%d", transmitIpAddr_str, portNumber);
7861   wmem_free(NULL, transmitIpAddr_str);
7862   si->multimediaTransmissionStatus = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
7863   ptvcursor_add(cursor, hf_skinny_multimediaTransmissionStatus, 4, ENC_LITTLE_ENDIAN);
7864   skinny_reqrep_add_response(cursor, pinfo, skinny_conv, 0x0132 ^ passThroughPartyId);
7865 }
7866 
7867 /*
7868  * Message:   CallHistoryInfoMessage
7869  * Opcode:    0x0156
7870  * Type:      CallControl
7871  * Direction: pbx2dev
7872  * VarLength: no
7873  * MsgType:   event
7874  */
7875 static void
handle_CallHistoryInfoMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)7876 handle_CallHistoryInfoMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
7877 {
7878   ptvcursor_add(cursor, hf_skinny_callHistoryDisposition, 4, ENC_LITTLE_ENDIAN);
7879   si->lineId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
7880   ptvcursor_add(cursor, hf_skinny_lineInstance, 4, ENC_LITTLE_ENDIAN);
7881   si->callId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
7882   ptvcursor_add(cursor, hf_skinny_callReference, 4, ENC_LITTLE_ENDIAN);
7883 }
7884 
7885 /*
7886  * Message:   LocationInfoMessage
7887  * Opcode:    0x0157
7888  * Type:      RegistrationAndManagement
7889  * Direction: pbx2dev
7890  * VarLength: no
7891  * MsgType:   event
7892  * Comment: Sent by wifi devices, contains xml information about connected SSID
7893  */
7894 static void
handle_LocationInfoMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)7895 handle_LocationInfoMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
7896 {
7897   ptvcursor_add(cursor, hf_skinny_locationInfo, 2401, ENC_ASCII|ENC_NA);
7898 }
7899 
7900 /*
7901  * Message:   MwiResMessage
7902  * Opcode:    0x0158
7903  * Type:      RegistrationAndManagement
7904  * Direction: pbx2pbx
7905  * VarLength: no
7906  * MsgType:   response
7907  */
7908 static void
handle_MwiResMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)7909 handle_MwiResMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
7910 {
7911   ptvcursor_add(cursor, hf_skinny_mwiTargetNumber, 25, ENC_ASCII|ENC_NA);
7912   ptvcursor_add(cursor, hf_skinny_mwi_notification_result, 4, ENC_LITTLE_ENDIAN);
7913   skinny_reqrep_add_response(cursor, pinfo, skinny_conv, 0x004c);
7914 }
7915 
7916 /*
7917  * Message:   AddOnDeviceCapabilitiesMessage
7918  * Opcode:    0x0159
7919  * Type:      RegistrationAndManagement
7920  * Direction: dev2pbx
7921  * VarLength: no
7922  * MsgType:   event
7923  */
7924 static void
handle_AddOnDeviceCapabilitiesMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)7925 handle_AddOnDeviceCapabilitiesMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
7926 {
7927   ptvcursor_add(cursor, hf_skinny_unknown1_0159, 4, ENC_LITTLE_ENDIAN);
7928   ptvcursor_add(cursor, hf_skinny_unknown2_0159, 4, ENC_LITTLE_ENDIAN);
7929   ptvcursor_add(cursor, hf_skinny_unknown3_0159, 4, ENC_LITTLE_ENDIAN);
7930   ptvcursor_add(cursor, hf_skinny_unknownString_0159, 152, ENC_ASCII|ENC_NA);
7931 }
7932 
7933 /*
7934  * Message:   EnhancedAlarmMessage
7935  * Opcode:    0x015a
7936  * Type:      RegistrationAndManagement
7937  * Direction: pbx2dev
7938  * VarLength: no
7939  * MsgType:   event
7940  */
7941 static void
handle_EnhancedAlarmMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)7942 handle_EnhancedAlarmMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
7943 {
7944   dissect_skinny_xml(cursor, hf_skinny_alarmInfo, pinfo, 0, 2048);
7945 }
7946 
7947 /*
7948  * Message:   CallCountRespMessage
7949  * Opcode:    0x015f
7950  * Type:      CallControl
7951  * Direction: pbx2pbx
7952  * VarLength: no
7953  * MsgType:   response
7954  */
7955 static void
handle_CallCountRespMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)7956 handle_CallCountRespMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
7957 {
7958   guint32 lineDataEntries = 0;
7959   ptvcursor_add(cursor, hf_skinny_totalNumOfConfiguredLines, 4, ENC_LITTLE_ENDIAN);
7960   ptvcursor_add(cursor, hf_skinny_startingLineInstance, 4, ENC_LITTLE_ENDIAN);
7961   lineDataEntries = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
7962   ptvcursor_add(cursor, hf_skinny_lineDataEntries, 4, ENC_LITTLE_ENDIAN);
7963   if (lineDataEntries <= 42) {
7964     guint32 counter_1 = 0;
7965     ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "lineData [ref:lineDataEntries = %d, max:42]", lineDataEntries);
7966     if (lineDataEntries && tvb_get_letohl(ptvcursor_tvbuff(cursor), 0) + 8 >= ptvcursor_current_offset(cursor) + (lineDataEntries * 4) && lineDataEntries <= 42) {
7967       for (counter_1 = 0; counter_1 < 42; counter_1++) {
7968         if (counter_1 < lineDataEntries) {
7969           ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "lineData [%d / %d]", counter_1 + 1, lineDataEntries);
7970           ptvcursor_add(cursor, hf_skinny_maxNumCalls, 2, ENC_LITTLE_ENDIAN);
7971           ptvcursor_add(cursor, hf_skinny_busyTrigger, 2, ENC_LITTLE_ENDIAN);
7972         } else {
7973           ptvcursor_advance(cursor, 4);
7974         }
7975         ptvcursor_pop_subtree(cursor);
7976       }
7977     }
7978     ptvcursor_pop_subtree(cursor);
7979   } else {
7980     ptvcursor_advance(cursor, (lineDataEntries * 4));
7981   }
7982   skinny_reqrep_add_response(cursor, pinfo, skinny_conv, 0x015e);
7983 }
7984 
7985 /*
7986  * Message:   RecordingStatusMessage
7987  * Opcode:    0x0160
7988  * Type:      CallControl
7989  * Direction: pbx2dev
7990  * VarLength: no
7991  * MsgType:   event
7992  */
7993 static void
handle_RecordingStatusMessage(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)7994 handle_RecordingStatusMessage(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
7995 {
7996   si->callId = tvb_get_letohl(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor));
7997   ptvcursor_add(cursor, hf_skinny_callReference, 4, ENC_LITTLE_ENDIAN);
7998   ptvcursor_add(cursor, hf_skinny_recording_status, 4, ENC_LITTLE_ENDIAN);
7999 }
8000 
8001 /*
8002  * Message:   SPCPRegisterTokenReq
8003  * Opcode:    0x8000
8004  * Type:      RegistrationAndManagement
8005  * Direction: dev2pbx
8006  * VarLength: no
8007  * MsgType:   request
8008  */
8009 static void
handle_SPCPRegisterTokenReq(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)8010 handle_SPCPRegisterTokenReq(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
8011 {
8012   {
8013     ptvcursor_add_text_with_subtree(cursor, SUBTREE_UNDEFINED_LENGTH, ett_skinny_tree, "sid");
8014     ptvcursor_add(cursor, hf_skinny_DeviceName, 16, ENC_ASCII|ENC_NA);
8015     ptvcursor_add(cursor, hf_skinny_reserved_for_future_use, 4, ENC_LITTLE_ENDIAN);
8016     ptvcursor_add(cursor, hf_skinny_instance, 4, ENC_LITTLE_ENDIAN);
8017     ptvcursor_pop_subtree(cursor);
8018   }
8019   ptvcursor_add(cursor, hf_skinny_stationIpAddr, 4, ENC_LITTLE_ENDIAN);
8020   ptvcursor_add(cursor, hf_skinny_deviceType, 4, ENC_LITTLE_ENDIAN);
8021   ptvcursor_add(cursor, hf_skinny_maxStreams, 4, ENC_LITTLE_ENDIAN);
8022   skinny_reqrep_add_request(cursor, pinfo, skinny_conv, 0x8000);
8023 }
8024 
8025 /*
8026  * Message:   SPCPRegisterTokenAck
8027  * Opcode:    0x8100
8028  * Type:      RegistrationAndManagement
8029  * Direction: pbx2dev
8030  * VarLength: no
8031  * MsgType:   response
8032  */
8033 static void
handle_SPCPRegisterTokenAck(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)8034 handle_SPCPRegisterTokenAck(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
8035 {
8036   ptvcursor_add(cursor, hf_skinny_features, 4, ENC_LITTLE_ENDIAN);
8037   skinny_reqrep_add_response(cursor, pinfo, skinny_conv, 0x8000);
8038 }
8039 
8040 /*
8041  * Message:   SPCPRegisterTokenReject
8042  * Opcode:    0x8101
8043  * Type:      RegistrationAndManagement
8044  * Direction: pbx2dev
8045  * VarLength: no
8046  * MsgType:   response
8047  */
8048 static void
handle_SPCPRegisterTokenReject(ptvcursor_t * cursor,packet_info * pinfo _U_,skinny_conv_info_t * skinny_conv _U_)8049 handle_SPCPRegisterTokenReject(ptvcursor_t *cursor, packet_info * pinfo _U_, skinny_conv_info_t * skinny_conv _U_)
8050 {
8051   ptvcursor_add(cursor, hf_skinny_waitTimeBeforeNextReq, 4, ENC_LITTLE_ENDIAN);
8052   skinny_reqrep_add_response(cursor, pinfo, skinny_conv, 0x8000);
8053 }
8054 
8055 
8056 typedef void (*message_handler) (ptvcursor_t * cursor, packet_info *pinfo, skinny_conv_info_t * skinny_conv);
8057 
8058 typedef struct _skinny_opcode_map_t {
8059   guint32 opcode;
8060   message_handler handler;
8061   skinny_message_type_t type;
8062   const char *name;
8063 } skinny_opcode_map_t;
8064 
8065 /* Messages Handler Array */
8066 static const skinny_opcode_map_t skinny_opcode_map[] = {
8067   {0x0000, NULL                                           , SKINNY_MSGTYPE_REQUEST  , "KeepAliveReqMessage"},
8068   {0x0001, handle_RegisterReqMessage                      , SKINNY_MSGTYPE_REQUEST  , "RegisterReqMessage"},
8069   {0x0002, handle_IpPortMessage                           , SKINNY_MSGTYPE_EVENT    , "IpPortMessage"},
8070   {0x0003, handle_KeypadButtonMessage                     , SKINNY_MSGTYPE_EVENT    , "KeypadButtonMessage"},
8071   {0x0004, handle_EnblocCallMessage                       , SKINNY_MSGTYPE_EVENT    , "EnblocCallMessage"},
8072   {0x0005, handle_StimulusMessage                         , SKINNY_MSGTYPE_EVENT    , "StimulusMessage"},
8073   {0x0006, handle_OffHookMessage                          , SKINNY_MSGTYPE_EVENT    , "OffHookMessage"},
8074   {0x0007, handle_OnHookMessage                           , SKINNY_MSGTYPE_EVENT    , "OnHookMessage"},
8075   {0x0008, handle_HookFlashMessage                        , SKINNY_MSGTYPE_EVENT    , "HookFlashMessage"},
8076   {0x0009, handle_ForwardStatReqMessage                   , SKINNY_MSGTYPE_REQUEST  , "ForwardStatReqMessage"},
8077   {0x000a, handle_SpeedDialStatReqMessage                 , SKINNY_MSGTYPE_REQUEST  , "SpeedDialStatReqMessage"},
8078   {0x000b, handle_LineStatReqMessage                      , SKINNY_MSGTYPE_REQUEST  , "LineStatReqMessage"},
8079   {0x000c, NULL                                           , SKINNY_MSGTYPE_REQUEST  , "ConfigStatReqMessage"},
8080   {0x000d, NULL                                           , SKINNY_MSGTYPE_REQUEST  , "TimeDateReqMessage"},
8081   {0x000e, NULL                                           , SKINNY_MSGTYPE_REQUEST  , "ButtonTemplateReqMessage"},
8082   {0x000f, NULL                                           , SKINNY_MSGTYPE_REQUEST  , "VersionReqMessage"},
8083   {0x0010, handle_CapabilitiesResMessage                  , SKINNY_MSGTYPE_RESPONSE , "CapabilitiesResMessage"},
8084   {0x0012, NULL                                           , SKINNY_MSGTYPE_REQUEST  , "ServerReqMessage"},
8085   {0x0020, handle_AlarmMessage                            , SKINNY_MSGTYPE_EVENT    , "AlarmMessage"},
8086   {0x0021, handle_MulticastMediaReceptionAckMessage       , SKINNY_MSGTYPE_RESPONSE , "MulticastMediaReceptionAckMessage"},
8087   {0x0022, handle_OpenReceiveChannelAckMessage            , SKINNY_MSGTYPE_RESPONSE , "OpenReceiveChannelAckMessage"},
8088   {0x0023, handle_ConnectionStatisticsResMessage          , SKINNY_MSGTYPE_RESPONSE , "ConnectionStatisticsResMessage"},
8089   {0x0024, handle_OffHookWithCallingPartyNumberMessage    , SKINNY_MSGTYPE_EVENT    , "OffHookWithCallingPartyNumberMessage"},
8090   {0x0025, NULL                                           , SKINNY_MSGTYPE_REQUEST  , "SoftKeySetReqMessage"},
8091   {0x0026, handle_SoftKeyEventMessage                     , SKINNY_MSGTYPE_EVENT    , "SoftKeyEventMessage"},
8092   {0x0027, handle_UnregisterReqMessage                    , SKINNY_MSGTYPE_REQUEST  , "UnregisterReqMessage"},
8093   {0x0028, NULL                                           , SKINNY_MSGTYPE_REQUEST  , "SoftKeyTemplateReqMessage"},
8094   {0x0029, handle_RegisterTokenReq                        , SKINNY_MSGTYPE_REQUEST  , "RegisterTokenReq"},
8095   {0x002a, handle_MediaTransmissionFailureMessage         , SKINNY_MSGTYPE_RESPONSE , "MediaTransmissionFailureMessage"},
8096   {0x002b, handle_HeadsetStatusMessage                    , SKINNY_MSGTYPE_EVENT    , "HeadsetStatusMessage"},
8097   {0x002c, handle_MediaResourceNotificationMessage        , SKINNY_MSGTYPE_EVENT    , "MediaResourceNotificationMessage"},
8098   {0x002d, handle_RegisterAvailableLinesMessage           , SKINNY_MSGTYPE_EVENT    , "RegisterAvailableLinesMessage"},
8099   {0x002e, handle_DeviceToUserDataMessage                 , SKINNY_MSGTYPE_REQUEST  , "DeviceToUserDataMessage"},
8100   {0x002f, handle_DeviceToUserDataResponseMessage         , SKINNY_MSGTYPE_RESPONSE , "DeviceToUserDataResponseMessage"},
8101   {0x0030, handle_UpdateCapabilitiesMessage               , SKINNY_MSGTYPE_EVENT    , "UpdateCapabilitiesMessage"},
8102   {0x0031, handle_OpenMultiMediaReceiveChannelAckMessage  , SKINNY_MSGTYPE_RESPONSE , "OpenMultiMediaReceiveChannelAckMessage"},
8103   {0x0032, handle_ClearConferenceMessage                  , SKINNY_MSGTYPE_EVENT    , "ClearConferenceMessage"},
8104   {0x0033, handle_ServiceURLStatReqMessage                , SKINNY_MSGTYPE_REQUEST  , "ServiceURLStatReqMessage"},
8105   {0x0034, handle_FeatureStatReqMessage                   , SKINNY_MSGTYPE_REQUEST  , "FeatureStatReqMessage"},
8106   {0x0035, handle_CreateConferenceResMessage              , SKINNY_MSGTYPE_RESPONSE , "CreateConferenceResMessage"},
8107   {0x0036, handle_DeleteConferenceResMessage              , SKINNY_MSGTYPE_RESPONSE , "DeleteConferenceResMessage"},
8108   {0x0037, handle_ModifyConferenceResMessage              , SKINNY_MSGTYPE_RESPONSE , "ModifyConferenceResMessage"},
8109   {0x0038, handle_AddParticipantResMessage                , SKINNY_MSGTYPE_RESPONSE , "AddParticipantResMessage"},
8110   {0x0039, handle_AuditConferenceResMessage               , SKINNY_MSGTYPE_RESPONSE , "AuditConferenceResMessage"},
8111   {0x0040, handle_AuditParticipantResMessage              , SKINNY_MSGTYPE_RESPONSE , "AuditParticipantResMessage"},
8112   {0x0041, handle_DeviceToUserDataMessageVersion1         , SKINNY_MSGTYPE_REQUEST  , "DeviceToUserDataMessageVersion1"},
8113   {0x0042, handle_DeviceToUserDataResponseMessageVersion1 , SKINNY_MSGTYPE_RESPONSE , "DeviceToUserDataResponseMessageVersion1"},
8114   {0x0043, handle_CapabilitiesV2ResMessage                , SKINNY_MSGTYPE_RESPONSE , "CapabilitiesV2ResMessage"},
8115   {0x0044, handle_CapabilitiesV3ResMessage                , SKINNY_MSGTYPE_RESPONSE , "CapabilitiesV3ResMessage"},
8116   {0x0045, handle_PortResMessage                          , SKINNY_MSGTYPE_RESPONSE , "PortResMessage"},
8117   {0x0046, handle_QoSResvNotifyMessage                    , SKINNY_MSGTYPE_EVENT    , "QoSResvNotifyMessage"},
8118   {0x0047, handle_QoSErrorNotifyMessage                   , SKINNY_MSGTYPE_EVENT    , "QoSErrorNotifyMessage"},
8119   {0x0048, handle_SubscriptionStatReqMessage              , SKINNY_MSGTYPE_REQUEST  , "SubscriptionStatReqMessage"},
8120   {0x0049, handle_MediaPathEventMessage                   , SKINNY_MSGTYPE_EVENT    , "MediaPathEventMessage"},
8121   {0x004a, handle_MediaPathCapabilityMessage              , SKINNY_MSGTYPE_EVENT    , "MediaPathCapabilityMessage"},
8122   {0x004c, handle_MwiNotificationMessage                  , SKINNY_MSGTYPE_REQUEST  , "MwiNotificationMessage"},
8123   {0x0081, handle_RegisterAckMessage                      , SKINNY_MSGTYPE_RESPONSE , "RegisterAckMessage"},
8124   {0x0082, handle_StartToneMessage                        , SKINNY_MSGTYPE_EVENT    , "StartToneMessage"},
8125   {0x0083, handle_StopToneMessage                         , SKINNY_MSGTYPE_EVENT    , "StopToneMessage"},
8126   {0x0085, handle_SetRingerMessage                        , SKINNY_MSGTYPE_EVENT    , "SetRingerMessage"},
8127   {0x0086, handle_SetLampMessage                          , SKINNY_MSGTYPE_EVENT    , "SetLampMessage"},
8128   {0x0087, NULL                                           , SKINNY_MSGTYPE_EVENT    , "SetHookFlashDetectMessage"},
8129   {0x0088, handle_SetSpeakerModeMessage                   , SKINNY_MSGTYPE_EVENT    , "SetSpeakerModeMessage"},
8130   {0x0089, handle_SetMicroModeMessage                     , SKINNY_MSGTYPE_EVENT    , "SetMicroModeMessage"},
8131   {0x008a, handle_StartMediaTransmissionMessage           , SKINNY_MSGTYPE_REQUEST  , "StartMediaTransmissionMessage"},
8132   {0x008b, handle_StopMediaTransmissionMessage            , SKINNY_MSGTYPE_EVENT    , "StopMediaTransmissionMessage"},
8133   {0x008f, handle_CallInfoMessage                         , SKINNY_MSGTYPE_EVENT    , "CallInfoMessage"},
8134   {0x0090, handle_ForwardStatResMessage                   , SKINNY_MSGTYPE_RESPONSE , "ForwardStatResMessage"},
8135   {0x0091, handle_SpeedDialStatResMessage                 , SKINNY_MSGTYPE_RESPONSE , "SpeedDialStatResMessage"},
8136   {0x0092, handle_LineStatResMessage                      , SKINNY_MSGTYPE_RESPONSE , "LineStatResMessage"},
8137   {0x0093, handle_ConfigStatResMessage                    , SKINNY_MSGTYPE_RESPONSE , "ConfigStatResMessage"},
8138   {0x0094, handle_TimeDateResMessage                      , SKINNY_MSGTYPE_RESPONSE , "TimeDateResMessage"},
8139   {0x0095, handle_StartSessionTransmissionMessage         , SKINNY_MSGTYPE_EVENT    , "StartSessionTransmissionMessage"},
8140   {0x0096, handle_StopSessionTransmissionMessage          , SKINNY_MSGTYPE_EVENT    , "StopSessionTransmissionMessage"},
8141   {0x0097, handle_ButtonTemplateResMessage                , SKINNY_MSGTYPE_RESPONSE , "ButtonTemplateResMessage"},
8142   {0x0098, handle_VersionResMessage                       , SKINNY_MSGTYPE_RESPONSE , "VersionResMessage"},
8143   {0x0099, handle_DisplayTextMessage                      , SKINNY_MSGTYPE_EVENT    , "DisplayTextMessage"},
8144   {0x009a, NULL                                           , SKINNY_MSGTYPE_EVENT    , "ClearDisplay"},
8145   {0x009b, NULL                                           , SKINNY_MSGTYPE_EVENT    , "CapabilitiesReq"},
8146   {0x009d, handle_RegisterRejectMessage                   , SKINNY_MSGTYPE_EVENT    , "RegisterRejectMessage"},
8147   {0x009e, handle_ServerResMessage                        , SKINNY_MSGTYPE_RESPONSE , "ServerResMessage"},
8148   {0x009f, handle_Reset                                   , SKINNY_MSGTYPE_EVENT    , "Reset"},
8149   {0x0100, NULL                                           , SKINNY_MSGTYPE_RESPONSE , "KeepAliveAckMessage"},
8150   {0x0101, handle_StartMulticastMediaReceptionMessage     , SKINNY_MSGTYPE_REQUEST  , "StartMulticastMediaReceptionMessage"},
8151   {0x0102, handle_StartMulticastMediaTransmissionMessage  , SKINNY_MSGTYPE_REQUEST  , "StartMulticastMediaTransmissionMessage"},
8152   {0x0103, handle_StopMulticastMediaReceptionMessage      , SKINNY_MSGTYPE_EVENT    , "StopMulticastMediaReceptionMessage"},
8153   {0x0104, handle_StopMulticastMediaTransmissionMessage   , SKINNY_MSGTYPE_EVENT    , "StopMulticastMediaTransmissionMessage"},
8154   {0x0105, handle_OpenReceiveChannelMessage               , SKINNY_MSGTYPE_REQUEST  , "OpenReceiveChannelMessage"},
8155   {0x0106, handle_CloseReceiveChannelMessage              , SKINNY_MSGTYPE_EVENT    , "CloseReceiveChannelMessage"},
8156   {0x0107, handle_ConnectionStatisticsReqMessage          , SKINNY_MSGTYPE_REQUEST  , "ConnectionStatisticsReqMessage"},
8157   {0x0108, handle_SoftKeyTemplateResMessage               , SKINNY_MSGTYPE_RESPONSE , "SoftKeyTemplateResMessage"},
8158   {0x0109, handle_SoftKeySetResMessage                    , SKINNY_MSGTYPE_RESPONSE , "SoftKeySetResMessage"},
8159   {0x0110, handle_SelectSoftKeysMessage                   , SKINNY_MSGTYPE_EVENT    , "SelectSoftKeysMessage"},
8160   {0x0111, handle_CallStateMessage                        , SKINNY_MSGTYPE_EVENT    , "CallStateMessage"},
8161   {0x0112, handle_DisplayPromptStatusMessage              , SKINNY_MSGTYPE_EVENT    , "DisplayPromptStatusMessage"},
8162   {0x0113, handle_ClearPromptStatusMessage                , SKINNY_MSGTYPE_EVENT    , "ClearPromptStatusMessage"},
8163   {0x0114, handle_DisplayNotifyMessage                    , SKINNY_MSGTYPE_EVENT    , "DisplayNotifyMessage"},
8164   {0x0115, NULL                                           , SKINNY_MSGTYPE_EVENT    , "ClearNotifyMessage"},
8165   {0x0116, handle_ActivateCallPlaneMessage                , SKINNY_MSGTYPE_EVENT    , "ActivateCallPlaneMessage"},
8166   {0x0117, NULL                                           , SKINNY_MSGTYPE_EVENT    , "DeactivateCallPlaneMessage"},
8167   {0x0118, handle_UnregisterAckMessage                    , SKINNY_MSGTYPE_RESPONSE , "UnregisterAckMessage"},
8168   {0x0119, handle_BackSpaceResMessage                     , SKINNY_MSGTYPE_EVENT    , "BackSpaceResMessage"},
8169   {0x011a, NULL                                           , SKINNY_MSGTYPE_RESPONSE , "RegisterTokenAck"},
8170   {0x011b, handle_RegisterTokenReject                     , SKINNY_MSGTYPE_RESPONSE , "RegisterTokenReject"},
8171   {0x011c, handle_StartMediaFailureDetectionMessage       , SKINNY_MSGTYPE_EVENT    , "StartMediaFailureDetectionMessage"},
8172   {0x011d, handle_DialedNumberMessage                     , SKINNY_MSGTYPE_EVENT    , "DialedNumberMessage"},
8173   {0x011e, handle_UserToDeviceDataMessage                 , SKINNY_MSGTYPE_EVENT    , "UserToDeviceDataMessage"},
8174   {0x011f, handle_FeatureStatResMessage                   , SKINNY_MSGTYPE_RESPONSE , "FeatureStatResMessage"},
8175   {0x0120, handle_DisplayPriNotifyMessage                 , SKINNY_MSGTYPE_EVENT    , "DisplayPriNotifyMessage"},
8176   {0x0121, handle_ClearPriNotifyMessage                   , SKINNY_MSGTYPE_EVENT    , "ClearPriNotifyMessage"},
8177   {0x0122, handle_StartAnnouncementMessage                , SKINNY_MSGTYPE_EVENT    , "StartAnnouncementMessage"},
8178   {0x0123, handle_StopAnnouncementMessage                 , SKINNY_MSGTYPE_EVENT    , "StopAnnouncementMessage"},
8179   {0x0124, handle_AnnouncementFinishMessage               , SKINNY_MSGTYPE_EVENT    , "AnnouncementFinishMessage"},
8180   {0x0127, handle_NotifyDtmfToneMessage                   , SKINNY_MSGTYPE_EVENT    , "NotifyDtmfToneMessage"},
8181   {0x0128, handle_SendDtmfToneMessage                     , SKINNY_MSGTYPE_EVENT    , "SendDtmfToneMessage"},
8182   {0x0129, handle_SubscribeDtmfPayloadReqMessage          , SKINNY_MSGTYPE_REQUEST  , "SubscribeDtmfPayloadReqMessage"},
8183   {0x012a, handle_SubscribeDtmfPayloadResMessage          , SKINNY_MSGTYPE_RESPONSE , "SubscribeDtmfPayloadResMessage"},
8184   {0x012b, handle_SubscribeDtmfPayloadErrMessage          , SKINNY_MSGTYPE_RESPONSE , "SubscribeDtmfPayloadErrMessage"},
8185   {0x012c, handle_UnSubscribeDtmfPayloadReqMessage        , SKINNY_MSGTYPE_REQUEST  , "UnSubscribeDtmfPayloadReqMessage"},
8186   {0x012d, handle_UnSubscribeDtmfPayloadResMessage        , SKINNY_MSGTYPE_RESPONSE , "UnSubscribeDtmfPayloadResMessage"},
8187   {0x012e, handle_UnSubscribeDtmfPayloadErrMessage        , SKINNY_MSGTYPE_RESPONSE , "UnSubscribeDtmfPayloadErrMessage"},
8188   {0x012f, handle_ServiceURLStatResMessage                , SKINNY_MSGTYPE_RESPONSE , "ServiceURLStatResMessage"},
8189   {0x0130, handle_CallSelectStatResMessage                , SKINNY_MSGTYPE_EVENT    , "CallSelectStatResMessage"},
8190   {0x0131, handle_OpenMultiMediaReceiveChannelMessage     , SKINNY_MSGTYPE_REQUEST  , "OpenMultiMediaReceiveChannelMessage"},
8191   {0x0132, handle_StartMultiMediaTransmissionMessage      , SKINNY_MSGTYPE_REQUEST  , "StartMultiMediaTransmissionMessage"},
8192   {0x0133, handle_StopMultiMediaTransmissionMessage       , SKINNY_MSGTYPE_EVENT    , "StopMultiMediaTransmissionMessage"},
8193   {0x0134, handle_MiscellaneousCommandMessage             , SKINNY_MSGTYPE_EVENT    , "MiscellaneousCommandMessage"},
8194   {0x0135, handle_FlowControlCommandMessage               , SKINNY_MSGTYPE_EVENT    , "FlowControlCommandMessage"},
8195   {0x0136, handle_CloseMultiMediaReceiveChannelMessage    , SKINNY_MSGTYPE_EVENT    , "CloseMultiMediaReceiveChannelMessage"},
8196   {0x0137, handle_CreateConferenceReqMessage              , SKINNY_MSGTYPE_REQUEST  , "CreateConferenceReqMessage"},
8197   {0x0138, handle_DeleteConferenceReqMessage              , SKINNY_MSGTYPE_REQUEST  , "DeleteConferenceReqMessage"},
8198   {0x0139, handle_ModifyConferenceReqMessage              , SKINNY_MSGTYPE_REQUEST  , "ModifyConferenceReqMessage"},
8199   {0x013a, handle_AddParticipantReqMessage                , SKINNY_MSGTYPE_REQUEST  , "AddParticipantReqMessage"},
8200   {0x013b, handle_DropParticipantReqMessage               , SKINNY_MSGTYPE_REQUEST  , "DropParticipantReqMessage"},
8201   {0x013c, NULL                                           , SKINNY_MSGTYPE_REQUEST  , "AuditConferenceReqMessage"},
8202   {0x013d, handle_AuditParticipantReqMessage              , SKINNY_MSGTYPE_REQUEST  , "AuditParticipantReqMessage"},
8203   {0x013e, handle_ChangeParticipantReqMessage             , SKINNY_MSGTYPE_REQUEST  , "ChangeParticipantReqMessage"},
8204   {0x013f, handle_UserToDeviceDataMessageVersion1         , SKINNY_MSGTYPE_EVENT    , "UserToDeviceDataMessageVersion1"},
8205   {0x0140, handle_VideoDisplayCommandMessage              , SKINNY_MSGTYPE_EVENT    , "VideoDisplayCommandMessage"},
8206   {0x0141, handle_FlowControlNotifyMessage                , SKINNY_MSGTYPE_EVENT    , "FlowControlNotifyMessage"},
8207   {0x0142, handle_ConfigStatV2ResMessage                  , SKINNY_MSGTYPE_RESPONSE , "ConfigStatV2ResMessage"},
8208   {0x0143, handle_DisplayNotifyV2Message                  , SKINNY_MSGTYPE_EVENT    , "DisplayNotifyV2Message"},
8209   {0x0144, handle_DisplayPriNotifyV2Message               , SKINNY_MSGTYPE_EVENT    , "DisplayPriNotifyV2Message"},
8210   {0x0145, handle_DisplayPromptStatusV2Message            , SKINNY_MSGTYPE_EVENT    , "DisplayPromptStatusV2Message"},
8211   {0x0146, handle_FeatureStatV2ResMessage                 , SKINNY_MSGTYPE_RESPONSE , "FeatureStatV2ResMessage"},
8212   {0x0147, handle_LineStatV2ResMessage                    , SKINNY_MSGTYPE_RESPONSE , "LineStatV2ResMessage"},
8213   {0x0148, handle_ServiceURLStatV2ResMessage              , SKINNY_MSGTYPE_RESPONSE , "ServiceURLStatV2ResMessage"},
8214   {0x0149, handle_SpeedDialStatV2ResMessage               , SKINNY_MSGTYPE_RESPONSE , "SpeedDialStatV2ResMessage"},
8215   {0x014a, handle_CallInfoV2Message                       , SKINNY_MSGTYPE_EVENT    , "CallInfoV2Message"},
8216   {0x014b, handle_PortReqMessage                          , SKINNY_MSGTYPE_REQUEST  , "PortReqMessage"},
8217   {0x014c, handle_PortCloseMessage                        , SKINNY_MSGTYPE_EVENT    , "PortCloseMessage"},
8218   {0x014d, handle_QoSListenMessage                        , SKINNY_MSGTYPE_EVENT    , "QoSListenMessage"},
8219   {0x014e, handle_QoSPathMessage                          , SKINNY_MSGTYPE_EVENT    , "QoSPathMessage"},
8220   {0x014f, handle_QoSTeardownMessage                      , SKINNY_MSGTYPE_EVENT    , "QoSTeardownMessage"},
8221   {0x0150, handle_UpdateDSCPMessage                       , SKINNY_MSGTYPE_EVENT    , "UpdateDSCPMessage"},
8222   {0x0151, handle_QoSModifyMessage                        , SKINNY_MSGTYPE_EVENT    , "QoSModifyMessage"},
8223   {0x0152, handle_SubscriptionStatResMessage              , SKINNY_MSGTYPE_RESPONSE , "SubscriptionStatResMessage"},
8224   {0x0153, handle_NotificationMessage                     , SKINNY_MSGTYPE_EVENT    , "NotificationMessage"},
8225   {0x0154, handle_StartMediaTransmissionAckMessage        , SKINNY_MSGTYPE_RESPONSE , "StartMediaTransmissionAckMessage"},
8226   {0x0155, handle_StartMultiMediaTransmissionAckMessage   , SKINNY_MSGTYPE_RESPONSE , "StartMultiMediaTransmissionAckMessage"},
8227   {0x0156, handle_CallHistoryInfoMessage                  , SKINNY_MSGTYPE_EVENT    , "CallHistoryInfoMessage"},
8228   {0x0157, handle_LocationInfoMessage                     , SKINNY_MSGTYPE_EVENT    , "LocationInfoMessage"},
8229   {0x0158, handle_MwiResMessage                           , SKINNY_MSGTYPE_RESPONSE , "MwiResMessage"},
8230   {0x0159, handle_AddOnDeviceCapabilitiesMessage          , SKINNY_MSGTYPE_EVENT    , "AddOnDeviceCapabilitiesMessage"},
8231   {0x015a, handle_EnhancedAlarmMessage                    , SKINNY_MSGTYPE_EVENT    , "EnhancedAlarmMessage"},
8232   {0x015e, NULL                                           , SKINNY_MSGTYPE_REQUEST  , "CallCountReqMessage"},
8233   {0x015f, handle_CallCountRespMessage                    , SKINNY_MSGTYPE_RESPONSE , "CallCountRespMessage"},
8234   {0x0160, handle_RecordingStatusMessage                  , SKINNY_MSGTYPE_EVENT    , "RecordingStatusMessage"},
8235   {0x8000, handle_SPCPRegisterTokenReq                    , SKINNY_MSGTYPE_REQUEST  , "SPCPRegisterTokenReq"},
8236   {0x8100, handle_SPCPRegisterTokenAck                    , SKINNY_MSGTYPE_RESPONSE , "SPCPRegisterTokenAck"},
8237   {0x8101, handle_SPCPRegisterTokenReject                 , SKINNY_MSGTYPE_RESPONSE , "SPCPRegisterTokenReject"},
8238 };
8239 
8240 /* Dissect a single SKINNY PDU */
dissect_skinny_pdu(tvbuff_t * tvb,packet_info * pinfo,proto_tree * tree,void * data _U_)8241 static int dissect_skinny_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
8242 {
8243   guint    offset   = 0;
8244   /*gboolean is_video = FALSE;*/    /* FIX ME: need to indicate video or not */
8245   ptvcursor_t* cursor;
8246   conversation_t *conversation;
8247   skinny_conv_info_t *skinny_conv;
8248   const skinny_opcode_map_t *opcode_entry = NULL;
8249 
8250   /* Header fields */
8251   guint32  hdr_data_length;
8252   guint32  hdr_version;
8253   guint32  hdr_opcode;
8254   guint16  i;
8255 
8256   /* Set up structures we will need to add the protocol subtree and manage it */
8257   proto_tree *skinny_tree = NULL;
8258   proto_item *ti = NULL;
8259 
8260   /* Initialization */
8261   hdr_data_length = tvb_get_letohl(tvb, 0);
8262   hdr_version     = tvb_get_letohl(tvb, 4);
8263   hdr_opcode      = tvb_get_letohl(tvb, 8);
8264 
8265   for (i = 0; i < sizeof(skinny_opcode_map)/sizeof(skinny_opcode_map_t) ; i++) {
8266     if (skinny_opcode_map[i].opcode == hdr_opcode) {
8267       opcode_entry = &skinny_opcode_map[i];
8268     }
8269   }
8270 
8271   conversation = find_or_create_conversation(pinfo);
8272   skinny_conv = (skinny_conv_info_t *)conversation_get_proto_data(conversation, proto_skinny);
8273   if (!skinny_conv) {
8274     skinny_conv = wmem_new0(wmem_file_scope(), skinny_conv_info_t);
8275     //skinny_conv->pending_req_resp = wmem_map_new(wmem_file_scope(), wmem_str_hash, g_str_equal);
8276     skinny_conv->pending_req_resp = wmem_map_new(wmem_file_scope(), g_direct_hash, g_direct_equal);
8277     skinny_conv->requests = wmem_map_new(wmem_file_scope(), g_direct_hash, g_direct_equal);
8278     skinny_conv->responses = wmem_map_new(wmem_file_scope(), g_direct_hash, g_direct_equal);
8279     skinny_conv->lineId = -1;
8280     skinny_conv->mtype = SKINNY_MSGTYPE_EVENT;
8281     conversation_add_proto_data(conversation, proto_skinny, skinny_conv);
8282   }
8283 
8284   /* Initialise stat info for passing to tap */
8285   /* WIP: will be (partially) replaced in favor of conversionation, dependents: ui/voip_calls.c */
8286   pi_current++;
8287   if (pi_current == MAX_SKINNY_MESSAGES_IN_PACKET)
8288   {
8289     /* Overwrite info in first struct if run out of space... */
8290     pi_current = 0;
8291   }
8292   si = &pi_arr[pi_current];
8293   si->messId = hdr_opcode;
8294   si->messageName = val_to_str_ext(hdr_opcode, &message_id_ext, "0x%08X (Unknown)");
8295   si->callId = 0;
8296   si->lineId = 0;
8297   si->passThroughPartyId = 0;
8298   si->callState = 0;
8299   g_free(si->callingParty);
8300   si->callingParty = NULL;
8301   g_free(si->calledParty);
8302   si->calledParty = NULL;
8303   si->mediaReceptionStatus = -1;
8304   si->mediaTransmissionStatus = -1;
8305   si->multimediaReceptionStatus = -1;
8306   si->multimediaTransmissionStatus = -1;
8307   si->multicastReceptionStatus = -1;
8308   g_free(si->additionalInfo);
8309   si->additionalInfo = NULL;
8310 
8311   col_add_fstr(pinfo->cinfo, COL_INFO,"%s ", si->messageName);
8312   col_set_fence(pinfo->cinfo, COL_INFO);
8313 
8314   if (tree) {
8315     ti = proto_tree_add_item(tree, proto_skinny, tvb, offset, hdr_data_length+8, ENC_NA);
8316     skinny_tree = proto_item_add_subtree(ti, ett_skinny);
8317   }
8318 
8319   if (opcode_entry && opcode_entry->type != SKINNY_MSGTYPE_EVENT) {
8320     skinny_conv->mtype = opcode_entry->type;
8321     if (opcode_entry->type == SKINNY_MSGTYPE_REQUEST) {
8322       col_set_str(pinfo->cinfo, COL_PROTOCOL, "SKINNY/REQ");
8323     } else {
8324       col_set_str(pinfo->cinfo, COL_PROTOCOL, "SKINNY/RESP");
8325     }
8326   }
8327 
8328   if (skinny_tree) {
8329     proto_tree_add_uint(skinny_tree, hf_skinny_data_length, tvb, offset  , 4, hdr_data_length);
8330     proto_tree_add_uint(skinny_tree, hf_skinny_hdr_version, tvb, offset+4, 4, hdr_version);
8331     proto_tree_add_uint(skinny_tree, hf_skinny_messageId,   tvb, offset+8, 4, hdr_opcode );
8332   }
8333   offset += 12;
8334 
8335   cursor = ptvcursor_new(pinfo->pool, skinny_tree, tvb, offset);
8336   if (opcode_entry && opcode_entry->handler) {
8337     opcode_entry->handler(cursor, pinfo, skinny_conv);
8338   }
8339   ptvcursor_free(cursor);
8340 
8341   tap_queue_packet(skinny_tap, pinfo, si);
8342 
8343   return tvb_captured_length(tvb);
8344 }
8345 
8346 /* Code to actually dissect the packets */
8347 static int
dissect_skinny(tvbuff_t * tvb,packet_info * pinfo,proto_tree * tree,void * data)8348 dissect_skinny(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
8349 {
8350   /* The general structure of a packet: {IP-Header|TCP-Header|n*SKINNY}
8351    * SKINNY-Packet: {Header(Size, Reserved)|Data(MessageID, Message-Data)}
8352    */
8353   /* Header fields */
8354   guint32 hdr_data_length;
8355   guint32 hdr_version;
8356 
8357   /* check, if this is really an SKINNY packet, they start with a length + 0 */
8358 
8359   if (tvb_captured_length(tvb) < 8)
8360   {
8361     return 0;
8362   }
8363   /* get relevant header information */
8364   hdr_data_length = tvb_get_letohl(tvb, 0);
8365   hdr_version     = tvb_get_letohl(tvb, 4);
8366 
8367   /*  data_size       = MIN(8+hdr_data_length, tvb_length(tvb)) - 0xC; */
8368 
8369   if (
8370       (hdr_data_length < 4) ||
8371       ((hdr_version != BASIC_MSG_TYPE) &&
8372        (hdr_version != V10_MSG_TYPE) &&
8373        (hdr_version != V11_MSG_TYPE) &&
8374        (hdr_version != V15_MSG_TYPE) &&
8375        (hdr_version != V16_MSG_TYPE) &&
8376        (hdr_version != V17_MSG_TYPE) &&
8377        (hdr_version != V18_MSG_TYPE) &&
8378        (hdr_version != V19_MSG_TYPE) &&
8379        (hdr_version != V20_MSG_TYPE) &&
8380        (hdr_version != V21_MSG_TYPE) &&
8381        (hdr_version != V22_MSG_TYPE))
8382      )
8383   {
8384       /* Not an SKINNY packet, just happened to use the same port */
8385       return 0;
8386   }
8387 
8388   /* Make entries in Protocol column and Info column on summary display */
8389   col_set_str(pinfo->cinfo, COL_PROTOCOL, "SKINNY");
8390 
8391   col_set_str(pinfo->cinfo, COL_INFO, "Skinny Client Control Protocol");
8392 
8393   tcp_dissect_pdus(tvb, pinfo, tree, global_skinny_desegment, 4, get_skinny_pdu_len, dissect_skinny_pdu, data);
8394 
8395   return tvb_captured_length(tvb);
8396 }
8397 
8398 /* Register the protocol with Wireshark */
8399 void
proto_register_skinny(void)8400 proto_register_skinny(void)
8401 {
8402   /* Setup list of header fields */
8403   static hf_register_info hf[] = {
8404     { &hf_skinny_data_length,
8405       {
8406         "Data length", "skinny.data_length", FT_UINT32, BASE_DEC, NULL, 0x0,
8407         "Number of bytes in the data portion.", HFILL }},
8408     { &hf_skinny_hdr_version,
8409       {
8410         "Header version", "skinny.hdr_version", FT_UINT32, BASE_HEX, VALS(header_version), 0x0,
8411         NULL, HFILL }},
8412     { &hf_skinny_messageId,
8413       {
8414         "Message ID", "skinny.messageId", FT_UINT32, BASE_DEC|BASE_EXT_STRING, &message_id_ext, 0x0,
8415         NULL, HFILL }},
8416     { &hf_skinny_xmlData,
8417       {
8418         "XML data", "skinny.xmlData", FT_STRING, BASE_NONE, NULL, 0x0,
8419         NULL,  HFILL }},
8420     { &hf_skinny_ipv4or6,
8421       {
8422         "IPv4or6", "skinny.ipv4or6", FT_UINT32, BASE_DEC|BASE_EXT_STRING, &IpAddrType_ext, 0x0,
8423         NULL, HFILL }},
8424     { &hf_skinny_response_in,
8425       {
8426         "Response In", "skinny.response_in", FT_FRAMENUM, BASE_NONE, FRAMENUM_TYPE(FT_FRAMENUM_RESPONSE), 0x0,
8427         "The response to this SKINNY request is in this frame", HFILL }},
8428     { &hf_skinny_response_to,
8429       {
8430         "Request In", "skinny.response_to", FT_FRAMENUM, BASE_NONE, FRAMENUM_TYPE(FT_FRAMENUM_REQUEST), 0x0,
8431         "This is a response to the SKINNY request in this frame", HFILL }},
8432     { &hf_skinny_response_time,
8433       {
8434         "Response Time", "skinny.response_time", FT_RELATIVE_TIME, BASE_NONE, NULL, 0x0,
8435         "The time between the Call and the Reply", HFILL }},
8436     { &hf_skinny_CallingPartyName,
8437       {
8438         "CallingName", "skinny.CallingPartyName", FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x0008,
8439         NULL, HFILL }},
8440     { &hf_skinny_CallingPartyNumber,
8441       {
8442         "CallingNum", "skinny.CallingPartyNumber", FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x0004,
8443         NULL, HFILL }},
8444     { &hf_skinny_DSCPValue,
8445       {
8446         "DSCPValue", "skinny.DSCPValue", FT_UINT32, BASE_DEC, NULL, 0x0,
8447         NULL, HFILL }},
8448     { &hf_skinny_FutureUse1,
8449       {
8450         "FutureUse1", "skinny.FutureUse1", FT_UINT8, BASE_DEC, NULL, 0x0,
8451         NULL, HFILL }},
8452     { &hf_skinny_FutureUse2,
8453       {
8454         "FutureUse2", "skinny.FutureUse2", FT_UINT8, BASE_DEC, NULL, 0x0,
8455         NULL, HFILL }},
8456     { &hf_skinny_FutureUse3,
8457       {
8458         "FutureUse3", "skinny.FutureUse3", FT_UINT8, BASE_DEC, NULL, 0x0,
8459         NULL, HFILL }},
8460     { &hf_skinny_Generic_Bitfield_Bit1,
8461       {
8462         "Bit1", "skinny.Generic.Bitfield.Bit1", FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x0001,
8463         "H263 Capability BitField", HFILL }},
8464     { &hf_skinny_Generic_Bitfield_Bit10,
8465       {
8466         "Bit10", "skinny.Generic.Bitfield.Bit10", FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x0200,
8467         "H263 Capability BitField", HFILL }},
8468     { &hf_skinny_Generic_Bitfield_Bit11,
8469       {
8470         "Bit11", "skinny.Generic.Bitfield.Bit11", FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x0400,
8471         "H263 Capability BitField", HFILL }},
8472     { &hf_skinny_Generic_Bitfield_Bit12,
8473       {
8474         "Bit12", "skinny.Generic.Bitfield.Bit12", FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x0800,
8475         "H263 Capability BitField", HFILL }},
8476     { &hf_skinny_Generic_Bitfield_Bit13,
8477       {
8478         "Bit13", "skinny.Generic.Bitfield.Bit13", FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x1000,
8479         "H263 Capability BitField", HFILL }},
8480     { &hf_skinny_Generic_Bitfield_Bit14,
8481       {
8482         "Bit14", "skinny.Generic.Bitfield.Bit14", FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x2000,
8483         "H263 Capability BitField", HFILL }},
8484     { &hf_skinny_Generic_Bitfield_Bit15,
8485       {
8486         "Bit14", "skinny.Generic.Bitfield.Bit15", FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x4000,
8487         "H263 Capability BitField", HFILL }},
8488     { &hf_skinny_Generic_Bitfield_Bit16,
8489       {
8490         "Bit15", "skinny.Generic.Bitfield.Bit16", FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x8000,
8491         "H263 Capability BitField", HFILL }},
8492     { &hf_skinny_Generic_Bitfield_Bit17,
8493       {
8494         "Bit17", "skinny.Generic.Bitfield.Bit17", FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x10000,
8495         "H263 Capability BitField", HFILL }},
8496     { &hf_skinny_Generic_Bitfield_Bit18,
8497       {
8498         "Bit18", "skinny.Generic.Bitfield.Bit18", FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x20000,
8499         "H263 Capability BitField", HFILL }},
8500     { &hf_skinny_Generic_Bitfield_Bit19,
8501       {
8502         "Bit19", "skinny.Generic.Bitfield.Bit19", FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x40000,
8503         "H263 Capability BitField", HFILL }},
8504     { &hf_skinny_Generic_Bitfield_Bit2,
8505       {
8506         "Bit2", "skinny.Generic.Bitfield.Bit2", FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x0002,
8507         "H263 Capability BitField", HFILL }},
8508     { &hf_skinny_Generic_Bitfield_Bit20,
8509       {
8510         "Bit20", "skinny.Generic.Bitfield.Bit20", FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x80000,
8511         "H263 Capability BitField", HFILL }},
8512     { &hf_skinny_Generic_Bitfield_Bit21,
8513       {
8514         "Bit21", "skinny.Generic.Bitfield.Bit21", FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x100000,
8515         "H263 Capability BitField", HFILL }},
8516     { &hf_skinny_Generic_Bitfield_Bit22,
8517       {
8518         "Bit22", "skinny.Generic.Bitfield.Bit22", FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x200000,
8519         "H263 Capability BitField", HFILL }},
8520     { &hf_skinny_Generic_Bitfield_Bit23,
8521       {
8522         "Bit23", "skinny.Generic.Bitfield.Bit23", FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x400000,
8523         "H263 Capability BitField", HFILL }},
8524     { &hf_skinny_Generic_Bitfield_Bit24,
8525       {
8526         "Bit24", "skinny.Generic.Bitfield.Bit24", FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x800000,
8527         "H263 Capability BitField", HFILL }},
8528     { &hf_skinny_Generic_Bitfield_Bit25,
8529       {
8530         "Bit25", "skinny.Generic.Bitfield.Bit25", FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x1000000,
8531         "H263 Capability BitField", HFILL }},
8532     { &hf_skinny_Generic_Bitfield_Bit26,
8533       {
8534         "Bit26", "skinny.Generic.Bitfield.Bit26", FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x2000000,
8535         "H263 Capability BitField", HFILL }},
8536     { &hf_skinny_Generic_Bitfield_Bit27,
8537       {
8538         "Bit27", "skinny.Generic.Bitfield.Bit27", FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x4000000,
8539         "H263 Capability BitField", HFILL }},
8540     { &hf_skinny_Generic_Bitfield_Bit28,
8541       {
8542         "Bit28", "skinny.Generic.Bitfield.Bit28", FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x8000000,
8543         "H263 Capability BitField", HFILL }},
8544     { &hf_skinny_Generic_Bitfield_Bit29,
8545       {
8546         "Bit29", "skinny.Generic.Bitfield.Bit29", FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x10000000,
8547         "H263 Capability BitField", HFILL }},
8548     { &hf_skinny_Generic_Bitfield_Bit3,
8549       {
8550         "Bit3", "skinny.Generic.Bitfield.Bit3", FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x0004,
8551         "H263 Capability BitField", HFILL }},
8552     { &hf_skinny_Generic_Bitfield_Bit30,
8553       {
8554         "Bit30", "skinny.Generic.Bitfield.Bit30", FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x20000000,
8555         "H263 Capability BitField", HFILL }},
8556     { &hf_skinny_Generic_Bitfield_Bit31,
8557       {
8558         "Bit31", "skinny.Generic.Bitfield.Bit31", FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x40000000,
8559         "H263 Capability BitField", HFILL }},
8560     { &hf_skinny_Generic_Bitfield_Bit32,
8561       {
8562         "Bit32", "skinny.Generic.Bitfield.Bit32", FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x80000000,
8563         "H263 Capability BitField", HFILL }},
8564     { &hf_skinny_Generic_Bitfield_Bit4,
8565       {
8566         "Bit4", "skinny.Generic.Bitfield.Bit4", FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x0008,
8567         "H263 Capability BitField", HFILL }},
8568     { &hf_skinny_Generic_Bitfield_Bit5,
8569       {
8570         "Bit5", "skinny.Generic.Bitfield.Bit5", FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x0010,
8571         "H263 Capability BitField", HFILL }},
8572     { &hf_skinny_Generic_Bitfield_Bit6,
8573       {
8574         "Bit6", "skinny.Generic.Bitfield.Bit6", FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x0020,
8575         "H263 Capability BitField", HFILL }},
8576     { &hf_skinny_Generic_Bitfield_Bit7,
8577       {
8578         "Bit7", "skinny.Generic.Bitfield.Bit7", FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x0040,
8579         "H263 Capability BitField", HFILL }},
8580     { &hf_skinny_Generic_Bitfield_Bit8,
8581       {
8582         "Bit8", "skinny.Generic.Bitfield.Bit8", FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x0080,
8583         "H263 Capability BitField", HFILL }},
8584     { &hf_skinny_Generic_Bitfield_Bit9,
8585       {
8586         "Bit9", "skinny.Generic.Bitfield.Bit9", FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x0100,
8587         "H263 Capability BitField", HFILL }},
8588     { &hf_skinny_MPI,
8589       {
8590         "MPI", "skinny.MPI", FT_UINT32, BASE_DEC, NULL, 0x0,
8591         NULL, HFILL }},
8592     { &hf_skinny_OrigDialed,
8593       {
8594         "Originally Dialed", "skinny.OrigDialed", FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x0001,
8595         NULL, HFILL }},
8596     { &hf_skinny_PhoneFeatures_Abbreviated_Dial,
8597       {
8598         "AbbrevDial", "skinny.PhoneFeatures.Abbreviated.Dial", FT_BOOLEAN, 16, TFS(&tfs_yes_no), 0x8000,
8599         "Features this device supports", HFILL }},
8600     { &hf_skinny_PhoneFeatures_Bit1,
8601       {
8602         "Bit1", "skinny.PhoneFeatures.Bit1", FT_BOOLEAN, 16, TFS(&tfs_yes_no), 0x0001,
8603         "Features this device supports", HFILL }},
8604     { &hf_skinny_PhoneFeatures_Bit11,
8605       {
8606         "Bit11", "skinny.PhoneFeatures.Bit11", FT_BOOLEAN, 16, TFS(&tfs_yes_no), 0x0400,
8607         "Features this device supports", HFILL }},
8608     { &hf_skinny_PhoneFeatures_Bit12,
8609       {
8610         "Bit12", "skinny.PhoneFeatures.Bit12", FT_BOOLEAN, 16, TFS(&tfs_yes_no), 0x0800,
8611         "Features this device supports", HFILL }},
8612     { &hf_skinny_PhoneFeatures_Bit13,
8613       {
8614         "Bit13", "skinny.PhoneFeatures.Bit13", FT_BOOLEAN, 16, TFS(&tfs_yes_no), 0x1000,
8615         "Features this device supports", HFILL }},
8616     { &hf_skinny_PhoneFeatures_Bit14,
8617       {
8618         "Bit14", "skinny.PhoneFeatures.Bit14", FT_BOOLEAN, 16, TFS(&tfs_yes_no), 0x2000,
8619         "Features this device supports", HFILL }},
8620     { &hf_skinny_PhoneFeatures_Bit15,
8621       {
8622         "Bit15", "skinny.PhoneFeatures.Bit15", FT_BOOLEAN, 16, TFS(&tfs_yes_no), 0x4000,
8623         "Features this device supports", HFILL }},
8624     { &hf_skinny_PhoneFeatures_Bit2,
8625       {
8626         "Bit2", "skinny.PhoneFeatures.Bit2", FT_BOOLEAN, 16, TFS(&tfs_yes_no), 0x0002,
8627         "Features this device supports", HFILL }},
8628     { &hf_skinny_PhoneFeatures_Bit3,
8629       {
8630         "Bit3", "skinny.PhoneFeatures.Bit3", FT_BOOLEAN, 16, TFS(&tfs_yes_no), 0x0004,
8631         "Features this device supports", HFILL }},
8632     { &hf_skinny_PhoneFeatures_Bit4,
8633       {
8634         "Bit4", "skinny.PhoneFeatures.Bit4", FT_BOOLEAN, 16, TFS(&tfs_yes_no), 0x0008,
8635         "Features this device supports", HFILL }},
8636     { &hf_skinny_PhoneFeatures_Bit6,
8637       {
8638         "Bit6", "skinny.PhoneFeatures.Bit6", FT_BOOLEAN, 16, TFS(&tfs_yes_no), 0x0020,
8639         "Features this device supports", HFILL }},
8640     { &hf_skinny_PhoneFeatures_Bit7,
8641       {
8642         "Bit7", "skinny.PhoneFeatures.Bit7", FT_BOOLEAN, 16, TFS(&tfs_yes_no), 0x0040,
8643         "Features this device supports", HFILL }},
8644     { &hf_skinny_PhoneFeatures_Bit9,
8645       {
8646         "Bit9", "skinny.PhoneFeatures.Bit9", FT_BOOLEAN, 16, TFS(&tfs_yes_no), 0x0100,
8647         "Features this device supports", HFILL }},
8648     { &hf_skinny_PhoneFeatures_DynamicMessages,
8649       {
8650         "DynamicMessages", "skinny.PhoneFeatures.DynamicMessages", FT_BOOLEAN, 16, TFS(&tfs_yes_no), 0x0080,
8651         "Features this device supports", HFILL }},
8652     { &hf_skinny_PhoneFeatures_RFC2833,
8653       {
8654         "RFC2833", "skinny.PhoneFeatures.RFC2833", FT_BOOLEAN, 16, TFS(&tfs_yes_no), 0x0200,
8655         "Features this device supports", HFILL }},
8656     { &hf_skinny_PhoneFeatures_UTF8,
8657       {
8658         "UTF8Bit5", "skinny.PhoneFeatures.UTF8", FT_BOOLEAN, 16, TFS(&tfs_yes_no), 0x0010,
8659         "Features this device supports", HFILL }},
8660     { &hf_skinny_RFC2833PayloadType,
8661       {
8662         "RFC2833PayloadType", "skinny.RFC2833PayloadType", FT_UINT32, BASE_DEC, NULL, 0x0,
8663         NULL, HFILL }},
8664     { &hf_skinny_RTCPPortNumber,
8665       {
8666         "RTCPPortNumber", "skinny.RTCPPortNumber", FT_UINT32, BASE_DEC, NULL, 0x0,
8667         NULL, HFILL }},
8668     { &hf_skinny_RedirDialed,
8669       {
8670         "Redirected Dialed", "skinny.RedirDialed", FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x0002,
8671         NULL, HFILL }},
8672     { &hf_skinny_RestrictInformationType_BitsReserved,
8673       {
8674         "BitsReserved", "skinny.RestrictInformationType.BitsReserved", FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0xffffff00,
8675         NULL, HFILL }},
8676     { &hf_skinny_RestrictInformationType_CalledParty,
8677       {
8678         "CalledParty", "skinny.RestrictInformationType.CalledParty", FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x000c,
8679         NULL, HFILL }},
8680     { &hf_skinny_RestrictInformationType_CalledPartyName,
8681       {
8682         "CalledPartyName", "skinny.RestrictInformationType.CalledPartyName", FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x0004,
8683         NULL, HFILL }},
8684     { &hf_skinny_RestrictInformationType_CalledPartyNumber,
8685       {
8686         "CalledPartyNumber", "skinny.RestrictInformationType.CalledPartyNumber", FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x0008,
8687         NULL, HFILL }},
8688     { &hf_skinny_RestrictInformationType_CallingParty,
8689       {
8690         "CallingParty", "skinny.RestrictInformationType.CallingParty", FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x0003,
8691         NULL, HFILL }},
8692     { &hf_skinny_RestrictInformationType_CallingPartyName,
8693       {
8694         "CallingPartyName", "skinny.RestrictInformationType.CallingPartyName", FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x0001,
8695         NULL, HFILL }},
8696     { &hf_skinny_RestrictInformationType_CallingPartyNumber,
8697       {
8698         "CallingPartyNumber", "skinny.RestrictInformationType.CallingPartyNumber", FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x0002,
8699         NULL, HFILL }},
8700     { &hf_skinny_RestrictInformationType_LastRedirectParty,
8701       {
8702         "LastRedirectParty", "skinny.RestrictInformationType.LastRedirectParty", FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x00c0,
8703         NULL, HFILL }},
8704     { &hf_skinny_RestrictInformationType_LastRedirectPartyName,
8705       {
8706         "LastRedirectPartyName", "skinny.RestrictInformationType.LastRedirectPartyName", FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x0040,
8707         NULL, HFILL }},
8708     { &hf_skinny_RestrictInformationType_LastRedirectPartyNumber,
8709       {
8710         "LastRedirectPartyNumber", "skinny.RestrictInformationType.LastRedirectPartyNumber", FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x0080,
8711         NULL, HFILL }},
8712     { &hf_skinny_RestrictInformationType_OriginalCalledParty,
8713       {
8714         "OriginalCalledParty", "skinny.RestrictInformationType.OriginalCalledParty", FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x0030,
8715         NULL, HFILL }},
8716     { &hf_skinny_RestrictInformationType_OriginalCalledPartyName,
8717       {
8718         "OriginalCalledPartyName", "skinny.RestrictInformationType.OriginalCalledPartyName", FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x0010,
8719         NULL, HFILL }},
8720     { &hf_skinny_RestrictInformationType_OriginalCalledPartyNumber,
8721       {
8722         "OriginalCalledPartyNumber", "skinny.RestrictInformationType.OriginalCalledPartyNumber", FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x0020,
8723         NULL, HFILL }},
8724     { &hf_skinny_SoftKeyMask_SoftKey1,
8725       {
8726         "SoftKey1", "skinny.SoftKeyMask.SoftKey1", FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x0001,
8727         NULL, HFILL }},
8728     { &hf_skinny_SoftKeyMask_SoftKey10,
8729       {
8730         "SoftKey10", "skinny.SoftKeyMask.SoftKey10", FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x0200,
8731         NULL, HFILL }},
8732     { &hf_skinny_SoftKeyMask_SoftKey11,
8733       {
8734         "SoftKey11", "skinny.SoftKeyMask.SoftKey11", FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x0400,
8735         NULL, HFILL }},
8736     { &hf_skinny_SoftKeyMask_SoftKey12,
8737       {
8738         "SoftKey12", "skinny.SoftKeyMask.SoftKey12", FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x0800,
8739         NULL, HFILL }},
8740     { &hf_skinny_SoftKeyMask_SoftKey13,
8741       {
8742         "SoftKey13", "skinny.SoftKeyMask.SoftKey13", FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x1000,
8743         NULL, HFILL }},
8744     { &hf_skinny_SoftKeyMask_SoftKey14,
8745       {
8746         "SoftKey14", "skinny.SoftKeyMask.SoftKey14", FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x2000,
8747         NULL, HFILL }},
8748     { &hf_skinny_SoftKeyMask_SoftKey15,
8749       {
8750         "SoftKey15", "skinny.SoftKeyMask.SoftKey15", FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x4000,
8751         NULL, HFILL }},
8752     { &hf_skinny_SoftKeyMask_SoftKey16,
8753       {
8754         "SoftKey16", "skinny.SoftKeyMask.SoftKey16", FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x8000,
8755         NULL, HFILL }},
8756     { &hf_skinny_SoftKeyMask_SoftKey2,
8757       {
8758         "SoftKey2", "skinny.SoftKeyMask.SoftKey2", FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x0002,
8759         NULL, HFILL }},
8760     { &hf_skinny_SoftKeyMask_SoftKey3,
8761       {
8762         "SoftKey3", "skinny.SoftKeyMask.SoftKey3", FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x0004,
8763         NULL, HFILL }},
8764     { &hf_skinny_SoftKeyMask_SoftKey4,
8765       {
8766         "SoftKey4", "skinny.SoftKeyMask.SoftKey4", FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x0008,
8767         NULL, HFILL }},
8768     { &hf_skinny_SoftKeyMask_SoftKey5,
8769       {
8770         "SoftKey5", "skinny.SoftKeyMask.SoftKey5", FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x0010,
8771         NULL, HFILL }},
8772     { &hf_skinny_SoftKeyMask_SoftKey6,
8773       {
8774         "SoftKey6", "skinny.SoftKeyMask.SoftKey6", FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x0020,
8775         NULL, HFILL }},
8776     { &hf_skinny_SoftKeyMask_SoftKey7,
8777       {
8778         "SoftKey7", "skinny.SoftKeyMask.SoftKey7", FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x0040,
8779         NULL, HFILL }},
8780     { &hf_skinny_SoftKeyMask_SoftKey8,
8781       {
8782         "SoftKey8", "skinny.SoftKeyMask.SoftKey8", FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x0080,
8783         NULL, HFILL }},
8784     { &hf_skinny_SoftKeyMask_SoftKey9,
8785       {
8786         "SoftKey9", "skinny.SoftKeyMask.SoftKey9", FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x0100,
8787         NULL, HFILL }},
8788     { &hf_skinny_active,
8789       {
8790         "active", "skinny.active", FT_UINT32, BASE_DEC, NULL, 0x0,
8791         NULL, HFILL }},
8792     { &hf_skinny_activeConferenceOnRegistration,
8793       {
8794         "Active Conference", "skinny.activeConferenceOnRegistration", FT_UINT32, BASE_DEC, NULL, 0x0,
8795         "Active conference at Registration", HFILL }},
8796     { &hf_skinny_activeConferences,
8797       {
8798         "Active Conferences", "skinny.activeConferences", FT_UINT32, BASE_DEC, NULL, 0x0,
8799         "Active Conferences at Registration", HFILL }},
8800     { &hf_skinny_activeForward,
8801       {
8802         "activeForward", "skinny.activeForward", FT_UINT32, BASE_DEC, NULL, 0x0,
8803         NULL, HFILL }},
8804     { &hf_skinny_activeStreams,
8805       {
8806         "Active RTP Streams", "skinny.activeStreams", FT_UINT32, BASE_DEC, NULL, 0x0,
8807         "Active RTP Streams at Registration", HFILL }},
8808     { &hf_skinny_activeStreamsOnRegistration,
8809       {
8810         "activeStreamsOnRegistration", "skinny.activeStreamsOnRegistration", FT_UINT32, BASE_DEC, NULL, 0x0,
8811         NULL, HFILL }},
8812     { &hf_skinny_alarmInfo,
8813       {
8814         "alarmInfo", "skinny.alarmInfo", FT_STRING, BASE_NONE, NULL, 0x0,
8815         NULL, HFILL }},
8816     { &hf_skinny_alignmentPadding,
8817       {
8818         "alignmentPadding", "skinny.alignmentPadding", FT_UINT16, BASE_DEC, NULL, 0x0,
8819         NULL, HFILL }},
8820     { &hf_skinny_annexNandWFutureUse,
8821       {
8822         "annexNandWFutureUse", "skinny.annexNandWFutureUse", FT_UINT32, BASE_DEC, NULL, 0x0,
8823         NULL, HFILL }},
8824     { &hf_skinny_appInstanceID,
8825       {
8826         "appInstanceID", "skinny.appInstanceID", FT_UINT32, BASE_DEC, NULL, 0x0,
8827         NULL, HFILL }},
8828     { &hf_skinny_applicationId,
8829       {
8830         "applicationId", "skinny.applicationId", FT_UINT32, BASE_DEC, NULL, 0x0,
8831         NULL, HFILL }},
8832     { &hf_skinny_areMessagesWaiting,
8833       {
8834         "areMessagesWaiting", "skinny.areMessagesWaiting", FT_UINT32, BASE_DEC, NULL, 0x0,
8835         NULL, HFILL }},
8836     { &hf_skinny_associatedStreamId,
8837       {
8838         "associatedStreamId", "skinny.associatedStreamId", FT_UINT32, BASE_DEC, NULL, 0x0,
8839         NULL, HFILL }},
8840     { &hf_skinny_audioCapCount,
8841       {
8842         "audioCapCount", "skinny.audioCapCount", FT_UINT32, BASE_DEC, NULL, 0x0,
8843         NULL, HFILL }},
8844     { &hf_skinny_audioLevelAdjustment,
8845       {
8846         "audioLevelAdjustment", "skinny.audioLevelAdjustment", FT_UINT32, BASE_DEC, NULL, 0x0,
8847         NULL, HFILL }},
8848     { &hf_skinny_averageBitRate,
8849       {
8850         "averageBitRate", "skinny.averageBitRate", FT_UINT32, BASE_DEC, NULL, 0x0,
8851         NULL, HFILL }},
8852     { &hf_skinny_bandwidth,
8853       {
8854         "bandwidth", "skinny.bandwidth", FT_UINT32, BASE_DEC, NULL, 0x0,
8855         NULL, HFILL }},
8856     { &hf_skinny_bitRate,
8857       {
8858         "bitRate", "skinny.bitRate", FT_UINT32, BASE_DEC, NULL, 0x0,
8859         NULL, HFILL }},
8860     { &hf_skinny_burstSize,
8861       {
8862         "burstSize", "skinny.burstSize", FT_UINT32, BASE_DEC, NULL, 0x0,
8863         NULL, HFILL }},
8864     { &hf_skinny_busyTrigger,
8865       {
8866         "busyTrigger", "skinny.busyTrigger", FT_UINT16, BASE_DEC, NULL, 0x0,
8867         NULL, HFILL }},
8868     { &hf_skinny_buttonCount,
8869       {
8870         "buttonCount", "skinny.buttonCount", FT_UINT32, BASE_DEC, NULL, 0x0,
8871         NULL, HFILL }},
8872     { &hf_skinny_buttonOffset,
8873       {
8874         "buttonOffset", "skinny.buttonOffset", FT_UINT32, BASE_DEC, NULL, 0x0,
8875         NULL, HFILL }},
8876     { &hf_skinny_callInstance,
8877       {
8878         "callInstance", "skinny.callInstance", FT_UINT32, BASE_DEC, NULL, 0x0,
8879         "CallId", HFILL }},
8880     { &hf_skinny_callReference,
8881       {
8882         "callReference", "skinny.callReference", FT_UINT32, BASE_DEC, NULL, 0x0,
8883         "CallId", HFILL }},
8884     { &hf_skinny_callSelectStat,
8885       {
8886         "callSelectStat", "skinny.callSelectStat", FT_UINT32, BASE_DEC, NULL, 0x0,
8887         NULL, HFILL }},
8888     { &hf_skinny_capAndVer,
8889       {
8890         "capAndVer", "skinny.capAndVer", FT_UINT32, BASE_DEC, NULL, 0x0,
8891         NULL, HFILL }},
8892     { &hf_skinny_capCount,
8893       {
8894         "capCount", "skinny.capCount", FT_UINT32, BASE_DEC, NULL, 0x0,
8895         NULL, HFILL }},
8896     { &hf_skinny_chan0MaxPayload,
8897       {
8898         "chan0MaxPayload", "skinny.chan0MaxPayload", FT_UINT16, BASE_DEC, NULL, 0x0,
8899         NULL, HFILL }},
8900     { &hf_skinny_chan2MaxPayload,
8901       {
8902         "chan2MaxPayload", "skinny.chan2MaxPayload", FT_UINT16, BASE_DEC, NULL, 0x0,
8903         NULL, HFILL }},
8904     { &hf_skinny_chan2MaxWindow,
8905       {
8906         "chan2MaxWindow", "skinny.chan2MaxWindow", FT_UINT16, BASE_DEC, NULL, 0x0,
8907         NULL, HFILL }},
8908     { &hf_skinny_chan3MaxPayload,
8909       {
8910         "chan3MaxPayload", "skinny.chan3MaxPayload", FT_UINT16, BASE_DEC, NULL, 0x0,
8911         NULL, HFILL }},
8912     { &hf_skinny_clockConversionCode,
8913       {
8914         "clockConversionCode", "skinny.clockConversionCode", FT_UINT32, BASE_DEC, NULL, 0x0,
8915         NULL, HFILL }},
8916     { &hf_skinny_clockDivisor,
8917       {
8918         "clockDivisor", "skinny.clockDivisor", FT_UINT32, BASE_DEC, NULL, 0x0,
8919         NULL, HFILL }},
8920     { &hf_skinny_codecMode,
8921       {
8922         "codecMode", "skinny.codecMode", FT_UINT8, BASE_DEC, NULL, 0x0,
8923         NULL, HFILL }},
8924     { &hf_skinny_codecParam1,
8925       {
8926         "codecParam1", "skinny.codecParam1", FT_UINT8, BASE_DEC, NULL, 0x0,
8927         NULL, HFILL }},
8928     { &hf_skinny_codecParam2,
8929       {
8930         "codecParam2", "skinny.codecParam2", FT_UINT8, BASE_DEC, NULL, 0x0,
8931         NULL, HFILL }},
8932     { &hf_skinny_confServiceNum,
8933       {
8934         "confServiceNum", "skinny.confServiceNum", FT_UINT32, BASE_DEC, NULL, 0x0,
8935         NULL, HFILL }},
8936     { &hf_skinny_conferenceId,
8937       {
8938         "conferenceId", "skinny.conferenceId", FT_UINT32, BASE_DEC, NULL, 0x0,
8939         "Conference ID", HFILL }},
8940     { &hf_skinny_confirmRequired,
8941       {
8942         "confirmRequired", "skinny.confirmRequired", FT_UINT32, BASE_DEC, NULL, 0x0,
8943         NULL, HFILL }},
8944     { &hf_skinny_country,
8945       {
8946         "country", "skinny.country", FT_UINT32, BASE_DEC, NULL, 0x0,
8947         NULL, HFILL }},
8948     { &hf_skinny_customMaxBRandCPB,
8949       {
8950         "customMaxBRandCPB", "skinny.customMaxBRandCPB", FT_UINT32, BASE_DEC, NULL, 0x0,
8951         NULL, HFILL }},
8952     { &hf_skinny_customMaxDPB,
8953       {
8954         "customMaxDPB", "skinny.customMaxDPB", FT_UINT32, BASE_DEC, NULL, 0x0,
8955         NULL, HFILL }},
8956     { &hf_skinny_customMaxFS,
8957       {
8958         "customMaxFS", "skinny.customMaxFS", FT_UINT32, BASE_DEC, NULL, 0x0,
8959         NULL, HFILL }},
8960     { &hf_skinny_customMaxMBPS,
8961       {
8962         "customMaxMBPS", "skinny.customMaxMBPS", FT_UINT32, BASE_DEC, NULL, 0x0,
8963         NULL, HFILL }},
8964     { &hf_skinny_customPictureFormatCount,
8965       {
8966         "customPictureFormatCount", "skinny.customPictureFormatCount", FT_UINT32, BASE_DEC, NULL, 0x0,
8967         NULL, HFILL }},
8968     { &hf_skinny_dataCapCount,
8969       {
8970         "dataCapCount", "skinny.dataCapCount", FT_UINT32, BASE_DEC, NULL, 0x0,
8971         NULL, HFILL }},
8972     { &hf_skinny_dataLength,
8973       {
8974         "dataLength", "skinny.dataLength", FT_UINT32, BASE_DEC, NULL, 0x0,
8975         NULL, HFILL }},
8976     { &hf_skinny_dataSize,
8977       {
8978         "dataSize", "skinny.dataSize", FT_UINT32, BASE_DEC, NULL, 0x0,
8979         "Data Size", HFILL }},
8980     { &hf_skinny_defendingPriority,
8981       {
8982         "defendingPriority", "skinny.defendingPriority", FT_UINT32, BASE_DEC, NULL, 0x0,
8983         NULL, HFILL }},
8984     { &hf_skinny_displayPriority,
8985       {
8986         "displayPriority", "skinny.displayPriority", FT_UINT32, BASE_DEC, NULL, 0x0,
8987         NULL, HFILL }},
8988     { &hf_skinny_dtmfType,
8989       {
8990         "dtmfType", "skinny.dtmfType", FT_UINT32, BASE_DEC, NULL, 0x0,
8991         NULL, HFILL }},
8992     { &hf_skinny_dynamicPayload,
8993       {
8994         "dynamicPayload", "skinny.dynamicPayload", FT_UINT8, BASE_DEC, NULL, 0x0,
8995         NULL, HFILL }},
8996     { &hf_skinny_failureNodeIpAddr,
8997       {
8998         "failureNodeIpAddr", "skinny.failureNodeIpAddr", FT_UINT32, BASE_DEC, NULL, 0x0,
8999         NULL, HFILL }},
9000     { &hf_skinny_featureCapabilities,
9001       {
9002         "featureCapabilities", "skinny.featureCapabilities", FT_UINT32, BASE_DEC, NULL, 0x0,
9003         NULL, HFILL }},
9004     { &hf_skinny_featureIndex,
9005       {
9006         "featureIndex", "skinny.featureIndex", FT_UINT32, BASE_DEC, NULL, 0x0,
9007         NULL, HFILL }},
9008     { &hf_skinny_featureStatus,
9009       {
9010         "featureStatus", "skinny.featureStatus", FT_UINT32, BASE_DEC, NULL, 0x0,
9011         NULL, HFILL }},
9012     { &hf_skinny_features,
9013       {
9014         "features", "skinny.features", FT_UINT32, BASE_DEC, NULL, 0x0,
9015         NULL, HFILL }},
9016     { &hf_skinny_firstGOB,
9017       {
9018         "firstGOB", "skinny.firstGOB", FT_UINT32, BASE_DEC, NULL, 0x0,
9019         NULL, HFILL }},
9020     { &hf_skinny_firstMB,
9021       {
9022         "firstMB", "skinny.firstMB", FT_UINT32, BASE_DEC, NULL, 0x0,
9023         NULL, HFILL }},
9024     { &hf_skinny_format,
9025       {
9026         "format", "skinny.format", FT_UINT32, BASE_DEC, NULL, 0x0,
9027         NULL, HFILL }},
9028     { &hf_skinny_forwardAllActive,
9029       {
9030         "forwardAllActive", "skinny.forwardAllActive", FT_UINT32, BASE_DEC, NULL, 0x0,
9031         NULL, HFILL }},
9032     { &hf_skinny_forwardBusyActive,
9033       {
9034         "forwardBusyActive", "skinny.forwardBusyActive", FT_UINT32, BASE_DEC, NULL, 0x0,
9035         NULL, HFILL }},
9036     { &hf_skinny_forwardNoAnswerActive,
9037       {
9038         "forwardNoAnswerActive", "skinny.forwardNoAnswerActive", FT_UINT32, BASE_DEC, NULL, 0x0,
9039         NULL, HFILL }},
9040     { &hf_skinny_hearingConfPartyMask,
9041       {
9042         "hearingConfPartyMask", "skinny.hearingConfPartyMask", FT_UINT32, BASE_DEC, NULL, 0x0,
9043         NULL, HFILL }},
9044     { &hf_skinny_instance,
9045       {
9046         "instance", "skinny.instance", FT_UINT32, BASE_DEC, NULL, 0x0,
9047         "Device Instance", HFILL }},
9048     { &hf_skinny_instanceNumber,
9049       {
9050         "instanceNumber", "skinny.instanceNumber", FT_UINT8, BASE_DEC, NULL, 0x0,
9051         NULL, HFILL }},
9052     { &hf_skinny_ipAddr_ipv4,
9053      {
9054         "ipAddr IPv4 Address", "skinny.ipAddr.ipv4", FT_IPv4, BASE_NONE, NULL, 0x0,
9055         NULL, HFILL }},
9056     { &hf_skinny_ipAddr_ipv6,
9057      {
9058         "ipAddr IPv6 Address", "skinny.ipAddr.ipv6", FT_IPv6, BASE_NONE, NULL, 0x0,
9059         NULL, HFILL }},
9060     { &hf_skinny_ipV4AddressScope,
9061       {
9062         "ipV4AddressScope", "skinny.ipV4AddressScope", FT_UINT32, BASE_DEC, NULL, 0x0,
9063         "IPv4 Address Scope", HFILL }},
9064     { &hf_skinny_ipV6AddressScope,
9065       {
9066         "ipV6AddressScope", "skinny.ipV6AddressScope", FT_UINT32, BASE_DEC, NULL, 0x0,
9067         "IPv6 Address Scope", HFILL }},
9068     { &hf_skinny_isConferenceCreator,
9069       {
9070         "isConferenceCreator", "skinny.isConferenceCreator", FT_UINT32, BASE_DEC, NULL, 0x0,
9071         NULL, HFILL }},
9072     { &hf_skinny_isMKIPresent,
9073       {
9074         "isMKIPresent", "skinny.isMKIPresent", FT_UINT32, BASE_DEC, NULL, 0x0,
9075         NULL, HFILL }},
9076     { &hf_skinny_jitter,
9077       {
9078         "jitter", "skinny.jitter", FT_UINT32, BASE_DEC, NULL, 0x0,
9079         "Amount of Jitter", HFILL }},
9080     { &hf_skinny_keepAliveInterval,
9081       {
9082         "keepAliveInterval", "skinny.keepAliveInterval", FT_UINT32, BASE_DEC, NULL, 0x0,
9083         NULL, HFILL }},
9084     { &hf_skinny_key,
9085       {
9086         "key", "skinny.key", FT_UINT8, BASE_DEC, NULL, 0x0,
9087         NULL, HFILL }},
9088     { &hf_skinny_keyDerivationRate,
9089       {
9090         "keyDerivationRate", "skinny.keyDerivationRate", FT_UINT32, BASE_DEC, NULL, 0x0,
9091         NULL, HFILL }},
9092     { &hf_skinny_keylen,
9093       {
9094         "keylen", "skinny.keylen", FT_UINT16, BASE_DEC, NULL, 0x0,
9095         NULL, HFILL }},
9096     { &hf_skinny_last,
9097       {
9098         "last", "skinny.last", FT_UINT32, BASE_DEC, NULL, 0x0,
9099         NULL, HFILL }},
9100     { &hf_skinny_lastRedirectingReason,
9101       {
9102         "lastRedirectingReason", "skinny.lastRedirectingReason", FT_UINT32, BASE_DEC, NULL, 0x0,
9103         "Last Redirecting Reason", HFILL }},
9104     { &hf_skinny_latency,
9105       {
9106         "latency", "skinny.latency", FT_UINT32, BASE_DEC, NULL, 0x0,
9107         "Amount of Latency", HFILL }},
9108     { &hf_skinny_layoutCount,
9109       {
9110         "layoutCount", "skinny.layoutCount", FT_UINT32, BASE_DEC, NULL, 0x0,
9111         NULL, HFILL }},
9112     { &hf_skinny_layoutID,
9113       {
9114         "layoutID", "skinny.layoutID", FT_UINT32, BASE_DEC, NULL, 0x0,
9115         NULL, HFILL }},
9116     { &hf_skinny_level,
9117       {
9118         "level", "skinny.level", FT_UINT32, BASE_DEC, NULL, 0x0,
9119         NULL, HFILL }},
9120     { &hf_skinny_levelPreferenceCount,
9121       {
9122         "levelPreferenceCount", "skinny.levelPreferenceCount", FT_UINT32, BASE_DEC, NULL, 0x0,
9123         NULL, HFILL }},
9124     { &hf_skinny_lineDataEntries,
9125       {
9126         "lineDataEntries", "skinny.lineDataEntries", FT_UINT32, BASE_DEC, NULL, 0x0,
9127         "Number of Line Data Entries", HFILL }},
9128     { &hf_skinny_lineDisplayOptions,
9129       {
9130         "lineDisplayOptions", "skinny.lineDisplayOptions", FT_UINT32, BASE_DEC, NULL, 0x0,
9131         NULL, HFILL }},
9132     { &hf_skinny_lineInstance,
9133       {
9134         "lineInstance", "skinny.lineInstance", FT_UINT32, BASE_DEC, NULL, 0x0,
9135         "LineId", HFILL }},
9136     { &hf_skinny_lineNumber,
9137       {
9138         "lineNumber", "skinny.lineNumber", FT_UINT32, BASE_DEC, NULL, 0x0,
9139         NULL, HFILL }},
9140     { &hf_skinny_locale,
9141       {
9142         "locale", "skinny.locale", FT_UINT32, BASE_DEC, NULL, 0x0,
9143         NULL, HFILL }},
9144     { &hf_skinny_longTermPictureIndex,
9145       {
9146         "longTermPictureIndex", "skinny.longTermPictureIndex", FT_UINT32, BASE_DEC, NULL, 0x0,
9147         NULL, HFILL }},
9148     { &hf_skinny_macAddress,
9149       {
9150         "Mac Address", "skinny.macAddress", FT_ETHER, BASE_NONE, NULL, 0x0,
9151         "Ethernet/Mac Address", HFILL }},
9152     { &hf_skinny_matrixConfPartyID,
9153       {
9154         "matrixConfPartyID", "skinny.matrixConfPartyID", FT_UINT32, BASE_DEC, NULL, 0x0,
9155         NULL, HFILL }},
9156     { &hf_skinny_maxBW,
9157       {
9158         "maxBW", "skinny.maxBW", FT_UINT32, BASE_DEC, NULL, 0x0,
9159         NULL, HFILL }},
9160     { &hf_skinny_maxBitRate,
9161       {
9162         "maxBitRate", "skinny.maxBitRate", FT_UINT32, BASE_DEC, NULL, 0x0,
9163         NULL, HFILL }},
9164     { &hf_skinny_maxConferences,
9165       {
9166         "Maximum Number of Concurrent Conferences", "skinny.maxConferences", FT_UINT32, BASE_DEC, NULL, 0x0,
9167         "Indicates the maximum number of simultaneous Conferences, which this client/appliance can handle", HFILL }},
9168     { &hf_skinny_maxFramesPerPacket,
9169       {
9170         "maxFramesPerPacket", "skinny.maxFramesPerPacket", FT_UINT32, BASE_DEC, NULL, 0x0,
9171         NULL, HFILL }},
9172     { &hf_skinny_maxNumCalls,
9173       {
9174         "maxNumCalls", "skinny.maxNumCalls", FT_UINT16, BASE_DEC, NULL, 0x0,
9175         NULL, HFILL }},
9176     { &hf_skinny_maxNumOfAvailLines,
9177       {
9178         "maxNumOfAvailLines", "skinny.maxNumOfAvailLines", FT_UINT32, BASE_DEC, NULL, 0x0,
9179         NULL, HFILL }},
9180     { &hf_skinny_maxNumberOfLines,
9181       {
9182         "maxNumberOfLines", "skinny.maxNumberOfLines", FT_UINT32, BASE_DEC, NULL, 0x0,
9183         "Maximum number of lines", HFILL }},
9184     { &hf_skinny_maxProtocolVer,
9185       {
9186         "maxProtocolVer", "skinny.maxProtocolVer", FT_UINT8, BASE_DEC, NULL, 0x0,
9187         NULL, HFILL }},
9188     { &hf_skinny_maxRetryNumber,
9189       {
9190         "maxRetryNumber", "skinny.maxRetryNumber", FT_UINT32, BASE_DEC, NULL, 0x0,
9191         NULL, HFILL }},
9192     { &hf_skinny_maxStreams,
9193       {
9194         "Maximum Number of Concurrent RTP Streams", "skinny.maxStreams", FT_UINT32, BASE_DEC, NULL, 0x0,
9195         "Indicates the maximum number of simultaneous RTP duplex streams, which this client/appliance can handle.", HFILL }},
9196     { &hf_skinny_maxStreamsPerConf,
9197       {
9198         "maxStreamsPerConf", "skinny.maxStreamsPerConf", FT_UINT32, BASE_DEC, NULL, 0x0,
9199         NULL, HFILL }},
9200     { &hf_skinny_maximumBitRate,
9201       {
9202         "maximumBitRate", "skinny.maximumBitRate", FT_UINT32, BASE_DEC, NULL, 0x0,
9203         NULL, HFILL }},
9204     { &hf_skinny_milliSecondPacketSize,
9205       {
9206         "milliSecondPacketSize", "skinny.milliSecondPacketSize", FT_UINT32, BASE_DEC, NULL, 0x0,
9207         NULL, HFILL }},
9208     { &hf_skinny_minBitRate,
9209       {
9210         "minBitRate", "skinny.minBitRate", FT_UINT32, BASE_DEC, NULL, 0x0,
9211         NULL, HFILL }},
9212     { &hf_skinny_mixingMode,
9213       {
9214         "mixingMode", "skinny.mixingMode", FT_UINT32, BASE_DEC, NULL, 0x0,
9215         NULL, HFILL }},
9216     { &hf_skinny_modAnd2833,
9217       {
9218         "modAnd2833", "skinny.modAnd2833", FT_UINT32, BASE_DEC, NULL, 0x0,
9219         NULL, HFILL }},
9220     { &hf_skinny_modelNumber,
9221       {
9222         "modelNumber", "skinny.modelNumber", FT_UINT32, BASE_DEC, NULL, 0x0,
9223         NULL, HFILL }},
9224     { &hf_skinny_multicastIpAddr_ipv4,
9225      {
9226         "multicastIpAddr IPv4 Address", "skinny.multicastIpAddr.ipv4", FT_IPv4, BASE_NONE, NULL, 0x0,
9227         "ipaddress in big endian", HFILL }},
9228     { &hf_skinny_multicastIpAddr_ipv6,
9229      {
9230         "multicastIpAddr IPv6 Address", "skinny.multicastIpAddr.ipv6", FT_IPv6, BASE_NONE, NULL, 0x0,
9231         "ipaddress in big endian", HFILL }},
9232     { &hf_skinny_multicastPortNumber,
9233       {
9234         "multicastPortNumber", "skinny.multicastPortNumber", FT_UINT32, BASE_DEC, NULL, 0x0,
9235         NULL, HFILL }},
9236     { &hf_skinny_noaudio,
9237       {
9238         "noaudio", "skinny.noaudio", FT_UINT8, BASE_DEC, NULL, 0x0,
9239         NULL, HFILL }},
9240     { &hf_skinny_none,
9241       {
9242         "none", "skinny.none", FT_UINT32, BASE_DEC, NULL, 0x0,
9243         NULL, HFILL }},
9244     { &hf_skinny_notificationStatus,
9245       {
9246         "notificationStatus", "skinny.notificationStatus", FT_UINT32, BASE_DEC, NULL, 0x0,
9247         NULL, HFILL }},
9248     { &hf_skinny_nse,
9249       {
9250         "nse", "skinny.nse", FT_UINT8, BASE_DEC, NULL, 0x0,
9251         NULL, HFILL }},
9252     { &hf_skinny_numNewMsgs,
9253       {
9254         "numNewMsgs", "skinny.numNewMsgs", FT_UINT32, BASE_DEC, NULL, 0x0,
9255         NULL, HFILL }},
9256     { &hf_skinny_numOldMsgs,
9257       {
9258         "numOldMsgs", "skinny.numOldMsgs", FT_UINT32, BASE_DEC, NULL, 0x0,
9259         NULL, HFILL }},
9260     { &hf_skinny_numberOctetsReceived,
9261       {
9262         "numberOctetsReceived", "skinny.numberOctetsReceived", FT_UINT32, BASE_DEC, NULL, 0x0,
9263         "Number of Octets Received", HFILL }},
9264     { &hf_skinny_numberOctetsSent,
9265       {
9266         "numberOctetsSent", "skinny.numberOctetsSent", FT_UINT32, BASE_DEC, NULL, 0x0,
9267         "Number of Octets Sent", HFILL }},
9268     { &hf_skinny_numberOfActiveParticipants,
9269       {
9270         "numberOfActiveParticipants", "skinny.numberOfActiveParticipants", FT_UINT32, BASE_DEC, NULL, 0x0,
9271         NULL, HFILL }},
9272     { &hf_skinny_numberOfEntries,
9273       {
9274         "numberOfEntries", "skinny.numberOfEntries", FT_UINT32, BASE_DEC, NULL, 0x0,
9275         NULL, HFILL }},
9276     { &hf_skinny_numberOfGOBs,
9277       {
9278         "numberOfGOBs", "skinny.numberOfGOBs", FT_UINT32, BASE_DEC, NULL, 0x0,
9279         NULL, HFILL }},
9280     { &hf_skinny_numberOfInServiceStreams,
9281       {
9282         "numberOfInServiceStreams", "skinny.numberOfInServiceStreams", FT_UINT32, BASE_DEC, NULL, 0x0,
9283         NULL, HFILL }},
9284     { &hf_skinny_numberOfLines,
9285       {
9286         "numberOfLines", "skinny.numberOfLines", FT_UINT32, BASE_DEC, NULL, 0x0,
9287         NULL, HFILL }},
9288     { &hf_skinny_numberOfMBs,
9289       {
9290         "numberOfMBs", "skinny.numberOfMBs", FT_UINT32, BASE_DEC, NULL, 0x0,
9291         NULL, HFILL }},
9292     { &hf_skinny_numberOfOutOfServiceStreams,
9293       {
9294         "numberOfOutOfServiceStreams", "skinny.numberOfOutOfServiceStreams", FT_UINT32, BASE_DEC, NULL, 0x0,
9295         NULL, HFILL }},
9296     { &hf_skinny_numberOfReservedParticipants,
9297       {
9298         "numberOfReservedParticipants", "skinny.numberOfReservedParticipants", FT_UINT32, BASE_DEC, NULL, 0x0,
9299         NULL, HFILL }},
9300     { &hf_skinny_numberOfSpeedDials,
9301       {
9302         "numberOfSpeedDials", "skinny.numberOfSpeedDials", FT_UINT32, BASE_DEC, NULL, 0x0,
9303         NULL, HFILL }},
9304     { &hf_skinny_numberPacketsLost,
9305       {
9306         "numberPacketsLost", "skinny.numberPacketsLost", FT_UINT32, BASE_DEC, NULL, 0x0,
9307         "Number of Packets Lost", HFILL }},
9308     { &hf_skinny_numberPacketsReceived,
9309       {
9310         "numberPacketsReceived", "skinny.numberPacketsReceived", FT_UINT32, BASE_DEC, NULL, 0x0,
9311         "Number of Packets Received", HFILL }},
9312     { &hf_skinny_numberPacketsSent,
9313       {
9314         "numberPacketsSent", "skinny.numberPacketsSent", FT_UINT32, BASE_DEC, NULL, 0x0,
9315         "Number of Packets Sent", HFILL }},
9316     { &hf_skinny_originalCdpnRedirectReason,
9317       {
9318         "originalCdpnRedirectReason", "skinny.originalCdpnRedirectReason", FT_UINT32, BASE_DEC, NULL, 0x0,
9319         "Original Called Party Redirect Reason", HFILL }},
9320     { &hf_skinny_padding,
9321       {
9322         "padding", "skinny.padding", FT_UINT16, BASE_DEC, NULL, 0x0,
9323         "Unused/Padding", HFILL }},
9324     { &hf_skinny_parm1,
9325       {
9326         "parm1", "skinny.parm1", FT_UINT32, BASE_DEC, NULL, 0x0,
9327         NULL, HFILL }},
9328     { &hf_skinny_parm2,
9329       {
9330         "parm2", "skinny.parm2", FT_UINT32, BASE_DEC, NULL, 0x0,
9331         NULL, HFILL }},
9332     { &hf_skinny_participantEntry,
9333       {
9334         "participantEntry", "skinny.participantEntry", FT_UINT32, BASE_DEC, NULL, 0x0,
9335         NULL, HFILL }},
9336     { &hf_skinny_partyDirection,
9337       {
9338         "partyDirection", "skinny.partyDirection", FT_UINT32, BASE_DEC, NULL, 0x0,
9339         NULL, HFILL }},
9340     { &hf_skinny_passThroughPartyId,
9341       {
9342         "passThroughPartyId", "skinny.passThroughPartyId", FT_UINT32, BASE_DEC, NULL, 0x0,
9343         "PassThrough PartyId", HFILL }},
9344     { &hf_skinny_passthruPartyID,
9345       {
9346         "passthruPartyID", "skinny.passthruPartyID", FT_UINT32, BASE_DEC, NULL, 0x0,
9347         NULL, HFILL }},
9348     { &hf_skinny_payloadDtmf,
9349       {
9350         "payloadDtmf", "skinny.payloadDtmf", FT_UINT32, BASE_DEC, NULL, 0x0,
9351         NULL, HFILL }},
9352     { &hf_skinny_payloadType,
9353       {
9354         "payloadType", "skinny.payloadType", FT_UINT32, BASE_DEC, NULL, 0x0,
9355         NULL, HFILL }},
9356     { &hf_skinny_payload_rfc_number,
9357       {
9358         "payload_rfc_number", "skinny.payload.rfc.number", FT_UINT32, BASE_DEC, NULL, 0x0,
9359         NULL, HFILL }},
9360     { &hf_skinny_peakRate,
9361       {
9362         "peakRate", "skinny.peakRate", FT_UINT32, BASE_DEC, NULL, 0x0,
9363         NULL, HFILL }},
9364     { &hf_skinny_pictureFormatCount,
9365       {
9366         "pictureFormatCount", "skinny.pictureFormatCount", FT_UINT32, BASE_DEC, NULL, 0x0,
9367         NULL, HFILL }},
9368     { &hf_skinny_pictureHeight,
9369       {
9370         "pictureHeight", "skinny.pictureHeight", FT_UINT32, BASE_DEC, NULL, 0x0,
9371         NULL, HFILL }},
9372     { &hf_skinny_pictureNumber,
9373       {
9374         "pictureNumber", "skinny.pictureNumber", FT_UINT32, BASE_DEC, NULL, 0x0,
9375         NULL, HFILL }},
9376     { &hf_skinny_pictureWidth,
9377       {
9378         "pictureWidth", "skinny.pictureWidth", FT_UINT32, BASE_DEC, NULL, 0x0,
9379         NULL, HFILL }},
9380     { &hf_skinny_pixelAspectRatio,
9381       {
9382         "pixelAspectRatio", "skinny.pixelAspectRatio", FT_UINT32, BASE_DEC, NULL, 0x0,
9383         NULL, HFILL }},
9384     { &hf_skinny_portNumber,
9385       {
9386         "portNumber", "skinny.portNumber", FT_UINT32, BASE_DEC, NULL, 0x0,
9387         NULL, HFILL }},
9388     { &hf_skinny_precedenceDomain,
9389       {
9390         "precedenceDomain", "skinny.precedenceDomain", FT_UINT32, BASE_DEC, NULL, 0x0,
9391         "Precedence Domain", HFILL }},
9392     { &hf_skinny_precedenceLevel,
9393       {
9394         "precedenceLevel", "skinny.precedenceLevel", FT_UINT32, BASE_DEC, NULL, 0x0,
9395         "Precedence Level, MLPP priorities", HFILL }},
9396     { &hf_skinny_precedenceValue,
9397       {
9398         "precedenceValue", "skinny.precedenceValue", FT_UINT32, BASE_DEC, NULL, 0x0,
9399         NULL, HFILL }},
9400     { &hf_skinny_preemptionPriority,
9401       {
9402         "preemptionPriority", "skinny.preemptionPriority", FT_UINT32, BASE_DEC, NULL, 0x0,
9403         NULL, HFILL }},
9404     { &hf_skinny_priority,
9405       {
9406         "priority", "skinny.priority", FT_UINT32, BASE_DEC, NULL, 0x0,
9407         NULL, HFILL }},
9408     { &hf_skinny_profile,
9409       {
9410         "profile", "skinny.profile", FT_UINT32, BASE_DEC, NULL, 0x0,
9411         NULL, HFILL }},
9412     { &hf_skinny_protocolDependentData,
9413       {
9414         "protocolDependentData", "skinny.protocolDependentData", FT_UINT32, BASE_DEC, NULL, 0x0,
9415         NULL, HFILL }},
9416     { &hf_skinny_protocolVer,
9417       {
9418         "Protocol Version", "skinny.protocolVer", FT_UINT8, BASE_DEC, NULL, 0x0,
9419         "Maximum Supported Protocol Version", HFILL }},
9420     { &hf_skinny_recoveryReferencePictureCount,
9421       {
9422         "recoveryReferencePictureCount", "skinny.recoveryReferencePictureCount", FT_UINT32, BASE_DEC, NULL, 0x0,
9423         NULL, HFILL }},
9424     { &hf_skinny_remoteIpAddr_ipv4,
9425      {
9426         "remoteIpAddr IPv4 Address", "skinny.remoteIpAddr.ipv4", FT_IPv4, BASE_NONE, NULL, 0x0,
9427         "ipaddress in big endian", HFILL }},
9428     { &hf_skinny_remoteIpAddr_ipv6,
9429      {
9430         "remoteIpAddr IPv6 Address", "skinny.remoteIpAddr.ipv6", FT_IPv6, BASE_NONE, NULL, 0x0,
9431         "ipaddress in big endian", HFILL }},
9432     { &hf_skinny_remotePortNumber,
9433       {
9434         "remotePortNumber", "skinny.remotePortNumber", FT_UINT32, BASE_DEC, NULL, 0x0,
9435         NULL, HFILL }},
9436     { &hf_skinny_reserved_for_future_use,
9437       {
9438         "reserved_for_future_use", "skinny.reserved.for.future.use", FT_UINT32, BASE_DEC, NULL, 0x0,
9439         "User Id", HFILL }},
9440     { &hf_skinny_retryTimer,
9441       {
9442         "retryTimer", "skinny.retryTimer", FT_UINT32, BASE_DEC, NULL, 0x0,
9443         NULL, HFILL }},
9444     { &hf_skinny_rfc2833,
9445       {
9446         "rfc2833", "skinny.rfc2833", FT_UINT8, BASE_DEC, NULL, 0x0,
9447         NULL, HFILL }},
9448     { &hf_skinny_routingID,
9449       {
9450         "routingID", "skinny.routingID", FT_UINT32, BASE_DEC, NULL, 0x0,
9451         NULL, HFILL }},
9452     { &hf_skinny_rsvpErrorFlag,
9453       {
9454         "rsvpErrorFlag", "skinny.rsvpErrorFlag", FT_UINT32, BASE_DEC, NULL, 0x0,
9455         NULL, HFILL }},
9456     { &hf_skinny_rsvpErrorSubCodeVal,
9457       {
9458         "rsvpErrorSubCodeVal", "skinny.rsvpErrorSubCodeVal", FT_UINT32, BASE_DEC, NULL, 0x0,
9459         NULL, HFILL }},
9460     { &hf_skinny_rtpMediaPort,
9461       {
9462         "rtpMediaPort", "skinny.rtpMediaPort", FT_UINT32, BASE_DEC, NULL, 0x0,
9463         "RTP Media Port", HFILL }},
9464     { &hf_skinny_rtpPayloadFormat,
9465       {
9466         "rtpPayloadFormat", "skinny.rtpPayloadFormat", FT_UINT32, BASE_DEC, NULL, 0x0,
9467         NULL, HFILL }},
9468     { &hf_skinny_salt,
9469       {
9470         "salt", "skinny.salt", FT_UINT8, BASE_DEC, NULL, 0x0,
9471         NULL, HFILL }},
9472     { &hf_skinny_saltlen,
9473       {
9474         "saltlen", "skinny.saltlen", FT_UINT16, BASE_DEC, NULL, 0x0,
9475         NULL, HFILL }},
9476     { &hf_skinny_secondaryKeepAliveInterval,
9477       {
9478         "secondaryKeepAliveInterval", "skinny.secondaryKeepAliveInterval", FT_UINT32, BASE_DEC, NULL, 0x0,
9479         NULL, HFILL }},
9480     { &hf_skinny_serverTcpListenPort,
9481       {
9482         "serverTcpListenPort", "skinny.serverTcpListenPort", FT_UINT32, BASE_DEC, NULL, 0x0,
9483         NULL, HFILL }},
9484     { &hf_skinny_serviceNum,
9485       {
9486         "serviceNum", "skinny.serviceNum", FT_UINT32, BASE_DEC, NULL, 0x0,
9487         NULL, HFILL }},
9488     { &hf_skinny_serviceNumber,
9489       {
9490         "serviceNumber", "skinny.serviceNumber", FT_UINT32, BASE_DEC, NULL, 0x0,
9491         NULL, HFILL }},
9492     { &hf_skinny_serviceResourceCount,
9493       {
9494         "serviceResourceCount", "skinny.serviceResourceCount", FT_UINT32, BASE_DEC, NULL, 0x0,
9495         NULL, HFILL }},
9496     { &hf_skinny_serviceURLIndex,
9497       {
9498         "serviceURLIndex", "skinny.serviceURLIndex", FT_UINT32, BASE_DEC, NULL, 0x0,
9499         NULL, HFILL }},
9500     { &hf_skinny_softKeyCount,
9501       {
9502         "softKeyCount", "skinny.softKeyCount", FT_UINT32, BASE_DEC, NULL, 0x0,
9503         NULL, HFILL }},
9504     { &hf_skinny_softKeyOffset,
9505       {
9506         "softKeyOffset", "skinny.softKeyOffset", FT_UINT32, BASE_DEC, NULL, 0x0,
9507         NULL, HFILL }},
9508     { &hf_skinny_softKeySetCount,
9509       {
9510         "softKeySetCount", "skinny.softKeySetCount", FT_UINT32, BASE_DEC, NULL, 0x0,
9511         NULL, HFILL }},
9512     { &hf_skinny_softKeySetOffset,
9513       {
9514         "softKeySetOffset", "skinny.softKeySetOffset", FT_UINT32, BASE_DEC, NULL, 0x0,
9515         NULL, HFILL }},
9516     { &hf_skinny_sourceIpAddr_ipv4,
9517      {
9518         "sourceIpAddr IPv4 Address", "skinny.sourceIpAddr.ipv4", FT_IPv4, BASE_NONE, NULL, 0x0,
9519         NULL, HFILL }},
9520     { &hf_skinny_sourceIpAddr_ipv6,
9521      {
9522         "sourceIpAddr IPv6 Address", "skinny.sourceIpAddr.ipv6", FT_IPv6, BASE_NONE, NULL, 0x0,
9523         NULL, HFILL }},
9524     { &hf_skinny_sourcePortNumber,
9525       {
9526         "sourcePortNumber", "skinny.sourcePortNumber", FT_UINT32, BASE_DEC, NULL, 0x0,
9527         NULL, HFILL }},
9528     { &hf_skinny_speedDialNumber,
9529       {
9530         "speedDialNumber", "skinny.speedDialNumber", FT_UINT32, BASE_DEC, NULL, 0x0,
9531         NULL, HFILL }},
9532     { &hf_skinny_sse,
9533       {
9534         "sse", "skinny.sse", FT_UINT8, BASE_DEC, NULL, 0x0,
9535         NULL, HFILL }},
9536     { &hf_skinny_standard,
9537       {
9538         "standard", "skinny.standard", FT_UINT32, BASE_DEC, NULL, 0x0,
9539         NULL, HFILL }},
9540     { &hf_skinny_startingLineInstance,
9541       {
9542         "startingLineInstance", "skinny.startingLineInstance", FT_UINT32, BASE_DEC, NULL, 0x0,
9543         "Starting Line Instance", HFILL }},
9544     { &hf_skinny_stationIpAddr,
9545       {
9546         "stationIpAddr", "skinny.stationIpAddr", FT_IPv4, BASE_NONE, NULL, 0x0,
9547         "IPv4 Address", HFILL }},
9548     { &hf_skinny_stationIpAddr_ipv4,
9549      {
9550         "stationIpAddr IPv4 Address", "skinny.stationIpAddr.ipv4", FT_IPv4, BASE_NONE, NULL, 0x0,
9551         "ipaddress in big endian", HFILL }},
9552     { &hf_skinny_stationIpAddr_ipv6,
9553      {
9554         "stationIpAddr IPv6 Address", "skinny.stationIpAddr.ipv6", FT_IPv6, BASE_NONE, NULL, 0x0,
9555         "ipaddress in big endian", HFILL }},
9556     { &hf_skinny_stationIpV6Addr,
9557       {
9558         "stationIpV6Addr", "skinny.stationIpV6Addr", FT_IPv6, BASE_NONE, NULL, 0x0,
9559         "IPv6 Address", HFILL }},
9560     { &hf_skinny_stationIpV6Addr_ipv4,
9561      {
9562         "stationIpV6Addr IPv4 Address", "skinny.stationIpV6Addr.ipv4", FT_IPv4, BASE_NONE, NULL, 0x0,
9563         NULL, HFILL }},
9564     { &hf_skinny_stationIpV6Addr_ipv6,
9565      {
9566         "stationIpV6Addr IPv6 Address", "skinny.stationIpV6Addr.ipv6", FT_IPv6, BASE_NONE, NULL, 0x0,
9567         NULL, HFILL }},
9568     { &hf_skinny_stillImageTransmission,
9569       {
9570         "stillImageTransmission", "skinny.stillImageTransmission", FT_UINT32, BASE_DEC, NULL, 0x0,
9571         "Still Image Transmission", HFILL }},
9572     { &hf_skinny_stimulusInstance,
9573       {
9574         "stimulusInstance", "skinny.stimulusInstance", FT_UINT32, BASE_DEC, NULL, 0x0,
9575         NULL, HFILL }},
9576     { &hf_skinny_stimulusStatus,
9577       {
9578         "stimulusStatus", "skinny.stimulusStatus", FT_UINT32, BASE_DEC, NULL, 0x0,
9579         "Stimulus Status", HFILL }},
9580     { &hf_skinny_streamPassThroughId,
9581       {
9582         "streamPassThroughId", "skinny.streamPassThroughId", FT_UINT32, BASE_DEC, NULL, 0x0,
9583         NULL, HFILL }},
9584     { &hf_skinny_systemTime,
9585       {
9586         "systemTime", "skinny.systemTime", FT_UINT32, BASE_DEC, NULL, 0x0,
9587         NULL, HFILL }},
9588     { &hf_skinny_temporalSpatialTradeOff,
9589       {
9590         "temporalSpatialTradeOff", "skinny.temporalSpatialTradeOff", FT_UINT32, BASE_DEC, NULL, 0x0,
9591         NULL, HFILL }},
9592     { &hf_skinny_temporalSpatialTradeOffCapability,
9593       {
9594         "temporalSpatialTradeOffCapability", "skinny.temporalSpatialTradeOffCapability", FT_UINT32, BASE_DEC, NULL, 0x0,
9595         "Temporal spatial trade off capability", HFILL }},
9596     { &hf_skinny_timeOutValue,
9597       {
9598         "timeOutValue", "skinny.timeOutValue", FT_UINT32, BASE_DEC, NULL, 0x0,
9599         NULL, HFILL }},
9600     { &hf_skinny_timer,
9601       {
9602         "timer", "skinny.timer", FT_UINT32, BASE_DEC, NULL, 0x0,
9603         NULL, HFILL }},
9604     { &hf_skinny_totalButtonCount,
9605       {
9606         "totalButtonCount", "skinny.totalButtonCount", FT_UINT32, BASE_DEC, NULL, 0x0,
9607         NULL, HFILL }},
9608     { &hf_skinny_totalNumOfConfiguredLines,
9609       {
9610         "totalNumOfConfiguredLines", "skinny.totalNumOfConfiguredLines", FT_UINT32, BASE_DEC, NULL, 0x0,
9611         "Total Number of Configured Lines", HFILL }},
9612     { &hf_skinny_totalSoftKeyCount,
9613       {
9614         "totalSoftKeyCount", "skinny.totalSoftKeyCount", FT_UINT32, BASE_DEC, NULL, 0x0,
9615         NULL, HFILL }},
9616     { &hf_skinny_totalSoftKeySetCount,
9617       {
9618         "totalSoftKeySetCount", "skinny.totalSoftKeySetCount", FT_UINT32, BASE_DEC, NULL, 0x0,
9619         NULL, HFILL }},
9620     { &hf_skinny_transactionId,
9621       {
9622         "transactionId", "skinny.transactionId", FT_UINT32, BASE_DEC, NULL, 0x0,
9623         NULL, HFILL }},
9624     { &hf_skinny_transmitIpAddr_ipv4,
9625      {
9626         "transmitIpAddr IPv4 Address", "skinny.transmitIpAddr.ipv4", FT_IPv4, BASE_NONE, NULL, 0x0,
9627         "ipaddress in big endian", HFILL }},
9628     { &hf_skinny_transmitIpAddr_ipv6,
9629      {
9630         "transmitIpAddr IPv6 Address", "skinny.transmitIpAddr.ipv6", FT_IPv6, BASE_NONE, NULL, 0x0,
9631         "ipaddress in big endian", HFILL }},
9632     { &hf_skinny_transmitPreference,
9633       {
9634         "transmitPreference", "skinny.transmitPreference", FT_UINT32, BASE_DEC, NULL, 0x0,
9635         NULL, HFILL }},
9636     { &hf_skinny_unknown,
9637       {
9638         "unknown", "skinny.unknown", FT_UINT8, BASE_DEC, NULL, 0x0,
9639         "unknown (Part of ProtocolVer)", HFILL }},
9640     { &hf_skinny_unknown1_0159,
9641       {
9642         "unknown1_0159", "skinny.unknown1.0159", FT_UINT32, BASE_DEC, NULL, 0x0,
9643         NULL, HFILL }},
9644     { &hf_skinny_unknown2_0159,
9645       {
9646         "unknown2_0159", "skinny.unknown2.0159", FT_UINT32, BASE_DEC, NULL, 0x0,
9647         NULL, HFILL }},
9648     { &hf_skinny_unknown3_0159,
9649       {
9650         "unknown3_0159", "skinny.unknown3.0159", FT_UINT32, BASE_DEC, NULL, 0x0,
9651         NULL, HFILL }},
9652     { &hf_skinny_v150sprt,
9653       {
9654         "v150sprt", "skinny.v150sprt", FT_UINT8, BASE_DEC, NULL, 0x0,
9655         NULL, HFILL }},
9656     { &hf_skinny_vendor,
9657       {
9658         "vendor", "skinny.vendor", FT_UINT32, BASE_DEC, NULL, 0x0,
9659         NULL, HFILL }},
9660     { &hf_skinny_videoCapCount,
9661       {
9662         "videoCapCount", "skinny.videoCapCount", FT_UINT32, BASE_DEC, NULL, 0x0,
9663         NULL, HFILL }},
9664     { &hf_skinny_wDay,
9665       {
9666         "wDay", "skinny.wDay", FT_UINT32, BASE_DEC, NULL, 0x0,
9667         NULL, HFILL }},
9668     { &hf_skinny_wDayOfWeek,
9669       {
9670         "wDayOfWeek", "skinny.wDayOfWeek", FT_UINT32, BASE_DEC, NULL, 0x0,
9671         NULL, HFILL }},
9672     { &hf_skinny_wHour,
9673       {
9674         "wHour", "skinny.wHour", FT_UINT32, BASE_DEC, NULL, 0x0,
9675         NULL, HFILL }},
9676     { &hf_skinny_wMilliseconds,
9677       {
9678         "wMilliseconds", "skinny.wMilliseconds", FT_UINT32, BASE_DEC, NULL, 0x0,
9679         NULL, HFILL }},
9680     { &hf_skinny_wMinute,
9681       {
9682         "wMinute", "skinny.wMinute", FT_UINT32, BASE_DEC, NULL, 0x0,
9683         NULL, HFILL }},
9684     { &hf_skinny_wMonth,
9685       {
9686         "wMonth", "skinny.wMonth", FT_UINT32, BASE_DEC, NULL, 0x0,
9687         NULL, HFILL }},
9688     { &hf_skinny_wSecond,
9689       {
9690         "wSecond", "skinny.wSecond", FT_UINT32, BASE_DEC, NULL, 0x0,
9691         NULL, HFILL }},
9692     { &hf_skinny_wYear,
9693       {
9694         "wYear", "skinny.wYear", FT_UINT32, BASE_DEC, NULL, 0x0,
9695         NULL, HFILL }},
9696     { &hf_skinny_waitTimeBeforeNextReq,
9697       {
9698         "waitTimeBeforeNextReq", "skinny.waitTimeBeforeNextReq", FT_UINT32, BASE_DEC, NULL, 0x0,
9699         NULL, HFILL }},
9700     { &hf_skinny_xmldata,
9701       {
9702         "xmldata", "skinny.xmldata", FT_STRING, BASE_NONE, NULL, 0x0,
9703         NULL, HFILL }},
9704     {&hf_skinny_AlternateCallingParty,
9705       {
9706         "AlternateCallingParty", "skinny.AlternateCallingParty", FT_STRING, BASE_NONE, NULL, 0x0,
9707         "Alternate Calling Party Number", HFILL }},
9708     {&hf_skinny_DeviceName,
9709       {
9710         "DeviceName", "skinny.DeviceName", FT_STRING, BASE_NONE, NULL, 0x0,
9711         "Device Name", HFILL }},
9712     {&hf_skinny_HuntPilotName,
9713       {
9714         "HuntPilotName", "skinny.HuntPilotName", FT_STRING, BASE_NONE, NULL, 0x0,
9715         NULL, HFILL }},
9716     {&hf_skinny_HuntPilotNumber,
9717       {
9718         "HuntPilotNumber", "skinny.HuntPilotNumber", FT_STRING, BASE_NONE, NULL, 0x0,
9719         NULL, HFILL }},
9720     {&hf_skinny_ServerName,
9721       {
9722         "ServerName", "skinny.ServerName", FT_STRING, BASE_NONE, NULL, 0x0,
9723         NULL, HFILL }},
9724     {&hf_skinny_add_participant_result,
9725       {
9726         "add_participant_result", "skinny.add.participant.result", FT_UINT32, BASE_HEX | BASE_EXT_STRING, &AddParticipantResult_ext, 0x0,
9727         NULL, HFILL }},
9728     {&hf_skinny_alarmSeverity,
9729       {
9730         "alarmSeverity", "skinny.alarmSeverity", FT_UINT32, BASE_HEX | BASE_EXT_STRING, &DeviceAlarmSeverity_ext, 0x0,
9731         NULL, HFILL }},
9732     {&hf_skinny_algorithmID,
9733       {
9734         "algorithmID", "skinny.algorithmID", FT_UINT32, BASE_HEX | BASE_EXT_STRING, &MediaEncryptionAlgorithmType_ext, 0x0,
9735         NULL, HFILL }},
9736     {&hf_skinny_annAckReq,
9737       {
9738         "annAckReq", "skinny.annAckReq", FT_UINT32, BASE_HEX | BASE_EXT_STRING, &EndOfAnnAck_ext, 0x0,
9739         NULL, HFILL }},
9740     {&hf_skinny_annPlayMode,
9741       {
9742         "annPlayMode", "skinny.annPlayMode", FT_UINT32, BASE_HEX | BASE_EXT_STRING, &AnnPlayMode_ext, 0x0,
9743         NULL, HFILL }},
9744     {&hf_skinny_annStatus,
9745       {
9746         "annStatus", "skinny.annStatus", FT_UINT32, BASE_HEX | BASE_EXT_STRING, &PlayAnnStatus_ext, 0x0,
9747         NULL, HFILL }},
9748     {&hf_skinny_appConfID,
9749       {
9750         "appConfID", "skinny.appConfID", FT_STRING, BASE_NONE, NULL, 0x0,
9751         NULL, HFILL }},
9752     {&hf_skinny_appData,
9753       {
9754         "appData", "skinny.appData", FT_STRING, BASE_NONE, NULL, 0x0,
9755         NULL, HFILL }},
9756     {&hf_skinny_appName,
9757       {
9758         "appName", "skinny.appName", FT_STRING, BASE_NONE, NULL, 0x0,
9759         NULL, HFILL }},
9760     {&hf_skinny_audit_participant_result,
9761       {
9762         "audit_participant_result", "skinny.audit.participant.result", FT_UINT32, BASE_HEX | BASE_EXT_STRING, &AuditParticipantResult_ext, 0x0,
9763         NULL, HFILL }},
9764     {&hf_skinny_bridgeParticipantId,
9765       {
9766         "bridgeParticipantId", "skinny.bridgeParticipantId", FT_STRING, BASE_NONE, NULL, 0x0,
9767         NULL, HFILL }},
9768     {&hf_skinny_buttonDefinition,
9769       {
9770         "buttonDefinition", "skinny.buttonDefinition", FT_UINT8, BASE_HEX | BASE_EXT_STRING, &ButtonType_ext, 0x0,
9771         NULL, HFILL }},
9772     {&hf_skinny_callHistoryDisposition,
9773       {
9774         "callHistoryDisposition", "skinny.callHistoryDisposition", FT_UINT32, BASE_HEX | BASE_EXT_STRING, &CallHistoryDisposition_ext, 0x0,
9775         NULL, HFILL }},
9776     {&hf_skinny_callSecurityStatus,
9777       {
9778         "callSecurityStatus", "skinny.callSecurityStatus", FT_UINT32, BASE_HEX | BASE_EXT_STRING, &CallSecurityStatusType_ext, 0x0,
9779         NULL, HFILL }},
9780     {&hf_skinny_callState,
9781       {
9782         "callState", "skinny.callState", FT_UINT32, BASE_HEX | BASE_EXT_STRING, &DCallState_ext, 0x0,
9783         NULL, HFILL }},
9784     {&hf_skinny_callType,
9785       {
9786         "callType", "skinny.callType", FT_UINT32, BASE_HEX | BASE_EXT_STRING, &CallType_ext, 0x0,
9787         NULL, HFILL }},
9788     {&hf_skinny_calledParty,
9789       {
9790         "calledParty", "skinny.calledParty", FT_STRING, BASE_NONE, NULL, 0x0,
9791         "CalledPartyNumber", HFILL }},
9792     {&hf_skinny_calledPartyName,
9793       {
9794         "calledPartyName", "skinny.calledPartyName", FT_STRING, BASE_NONE, NULL, 0x0,
9795         "Called Party Name", HFILL }},
9796     {&hf_skinny_callingParty,
9797       {
9798         "callingParty", "skinny.callingParty", FT_STRING, BASE_NONE, NULL, 0x0,
9799         "Calling Party Number", HFILL }},
9800     {&hf_skinny_callingPartyName,
9801       {
9802         "callingPartyName", "skinny.callingPartyName", FT_STRING, BASE_NONE, NULL, 0x0,
9803         "Calling Party Name", HFILL }},
9804     {&hf_skinny_callingPartyNumber,
9805       {
9806         "callingPartyNumber", "skinny.callingPartyNumber", FT_STRING, BASE_NONE, NULL, 0x0,
9807         "Calling Party Number", HFILL }},
9808     {&hf_skinny_cause,
9809       {
9810         "cause", "skinny.cause", FT_UINT32, BASE_HEX | BASE_EXT_STRING, &SubscribeCause_ext, 0x0,
9811         NULL, HFILL }},
9812     {&hf_skinny_cdpnVoiceMailbox,
9813       {
9814         "cdpnVoiceMailbox", "skinny.cdpnVoiceMailbox", FT_STRING, BASE_NONE, NULL, 0x0,
9815         "Called Party Voicemail Box Number", HFILL }},
9816     {&hf_skinny_cgpnVoiceMailbox,
9817       {
9818         "cgpnVoiceMailbox", "skinny.cgpnVoiceMailbox", FT_STRING, BASE_NONE, NULL, 0x0,
9819         "Calling Party Voicemail Box Number", HFILL }},
9820     {&hf_skinny_command,
9821       {
9822         "command", "skinny.command", FT_UINT32, BASE_HEX | BASE_EXT_STRING, &MiscCommandType_ext, 0x0,
9823         NULL, HFILL }},
9824     {&hf_skinny_compressionType,
9825       {
9826         "compressionType", "skinny.compressionType", FT_UINT32, BASE_HEX | BASE_EXT_STRING, &Media_PayloadType_ext, 0x0,
9827         NULL, HFILL }},
9828     {&hf_skinny_conferenceName,
9829       {
9830         "conferenceName", "skinny.conferenceName", FT_STRING, BASE_NONE, NULL, 0x0,
9831         NULL, HFILL }},
9832     {&hf_skinny_configVersionStamp,
9833       {
9834         "configVersionStamp", "skinny.configVersionStamp", FT_STRING, BASE_NONE, NULL, 0x0,
9835         NULL, HFILL }},
9836     {&hf_skinny_data,
9837       {
9838         "Statistics", "skinny.data", FT_STRING, BASE_NONE, NULL, 0x0,
9839         "variable field size (max: 600]", HFILL }},
9840     {&hf_skinny_dataCapabilityDirection,
9841       {
9842         "dataCapabilityDirection", "skinny.dataCapabilityDirection", FT_UINT32, BASE_HEX | BASE_EXT_STRING, &TransmitOrReceive_ext, 0x0,
9843         NULL, HFILL }},
9844     {&hf_skinny_dateTemplate,
9845       {
9846         "dateTemplate", "skinny.dateTemplate", FT_STRING, BASE_NONE, NULL, 0x0,
9847         NULL, HFILL }},
9848     {&hf_skinny_delete_conf_result,
9849       {
9850         "delete_conf_result", "skinny.delete.conf.result", FT_UINT32, BASE_HEX | BASE_EXT_STRING, &DeleteConfResult_ext, 0x0,
9851         NULL, HFILL }},
9852     {&hf_skinny_deviceType,
9853       {
9854         "Device Type", "skinny.deviceType", FT_UINT32, BASE_HEX | BASE_EXT_STRING, &DeviceType_ext, 0x0,
9855         "Device Type of this phone / appliance", HFILL }},
9856     {&hf_skinny_dialedNumber,
9857       {
9858         "dialedNumber", "skinny.dialedNumber", FT_STRING, BASE_NONE, NULL, 0x0,
9859         NULL, HFILL }},
9860     {&hf_skinny_direction,
9861       {
9862         "direction", "skinny.direction", FT_UINT32, BASE_HEX | BASE_EXT_STRING, &RSVPDirection_ext, 0x0,
9863         NULL, HFILL }},
9864     {&hf_skinny_directoryNum,
9865       {
9866         "directoryNum", "skinny.directoryNum", FT_STRING, BASE_NONE, NULL, 0x0,
9867         NULL, HFILL }},
9868     {&hf_skinny_ecValue,
9869       {
9870         "ecValue", "skinny.ecValue", FT_UINT32, BASE_HEX | BASE_EXT_STRING, &Media_EchoCancellation_ext, 0x0,
9871         NULL, HFILL }},
9872     {&hf_skinny_encryptionCapability,
9873       {
9874         "encryptionCapability", "skinny.encryptionCapability", FT_UINT32, BASE_HEX | BASE_EXT_STRING, &Media_Encryption_Capability_ext, 0x0,
9875         NULL, HFILL }},
9876     {&hf_skinny_errorCode,
9877       {
9878         "errorCode", "skinny.errorCode", FT_UINT32, BASE_HEX | BASE_EXT_STRING, &QoSErrorCode_ext, 0x0,
9879         NULL, HFILL }},
9880     {&hf_skinny_featureID,
9881       {
9882         "featureID", "skinny.featureID", FT_UINT32, BASE_HEX | BASE_EXT_STRING, &ButtonType_ext, 0x0,
9883         NULL, HFILL }},
9884     {&hf_skinny_featureTextLabel,
9885       {
9886         "featureTextLabel", "skinny.featureTextLabel", FT_STRING, BASE_NONE, NULL, 0x0,
9887         NULL, HFILL }},
9888     {&hf_skinny_firmwareLoadName,
9889       {
9890         "firmwareLoadName", "skinny.firmwareLoadName", FT_STRING, BASE_NONE, NULL, 0x0,
9891         "Firmware Load Name", HFILL }},
9892     {&hf_skinny_forwardAllDirnum,
9893       {
9894         "forwardAllDirnum", "skinny.forwardAllDirnum", FT_STRING, BASE_NONE, NULL, 0x0,
9895         NULL, HFILL }},
9896     {&hf_skinny_forwardBusyDirnum,
9897       {
9898         "forwardBusyDirnum", "skinny.forwardBusyDirnum", FT_STRING, BASE_NONE, NULL, 0x0,
9899         NULL, HFILL }},
9900     {&hf_skinny_forwardNoAnswerlDirnum,
9901       {
9902         "forwardNoAnswerlDirnum", "skinny.forwardNoAnswerlDirnum", FT_STRING, BASE_NONE, NULL, 0x0,
9903         NULL, HFILL }},
9904     {&hf_skinny_g723BitRate,
9905       {
9906         "g723BitRate", "skinny.g723BitRate", FT_UINT32, BASE_HEX | BASE_EXT_STRING, &Media_G723BitRate_ext, 0x0,
9907         NULL, HFILL }},
9908     {&hf_skinny_headsetStatus,
9909       {
9910         "headsetStatus", "skinny.headsetStatus", FT_UINT32, BASE_HEX | BASE_EXT_STRING, &HeadsetMode_ext, 0x0,
9911         NULL, HFILL }},
9912     {&hf_skinny_ipAddressType,
9913       {
9914         "ipAddressType", "skinny.ipAddressType", FT_UINT32, BASE_HEX | BASE_EXT_STRING, &IpAddrType_ext, 0x0,
9915         NULL, HFILL }},
9916     {&hf_skinny_ipAddressingMode,
9917       {
9918         "ipAddressingMode", "skinny.ipAddressingMode", FT_UINT32, BASE_HEX | BASE_EXT_STRING, &IpAddrMode_ext, 0x0,
9919         NULL, HFILL }},
9920     {&hf_skinny_kpButton,
9921       {
9922         "kpButton", "skinny.kpButton", FT_UINT32, BASE_HEX | BASE_EXT_STRING, &KeyPadButton_ext, 0x0,
9923         "KeyPad Button which was Pressed", HFILL }},
9924     {&hf_skinny_lampMode,
9925       {
9926         "lampMode", "skinny.lampMode", FT_UINT32, BASE_HEX | BASE_EXT_STRING, &LampMode_ext, 0x0,
9927         NULL, HFILL }},
9928     {&hf_skinny_lastRedirectingParty,
9929       {
9930         "lastRedirectingParty", "skinny.lastRedirectingParty", FT_STRING, BASE_NONE, NULL, 0x0,
9931         "Last Redirecting Party Number", HFILL }},
9932     {&hf_skinny_lastRedirectingPartyName,
9933       {
9934         "lastRedirectingPartyName", "skinny.lastRedirectingPartyName", FT_STRING, BASE_NONE, NULL, 0x0,
9935         "Last Redirecting Party Name", HFILL }},
9936     {&hf_skinny_lastRedirectingVoiceMailbox,
9937       {
9938         "lastRedirectingVoiceMailbox", "skinny.lastRedirectingVoiceMailbox", FT_STRING, BASE_NONE, NULL, 0x0,
9939         "Last Redirecting Parties Voicemail Box Number", HFILL }},
9940     {&hf_skinny_layouts,
9941       {
9942         "layouts", "skinny.layouts", FT_UINT32, BASE_HEX | BASE_EXT_STRING, &Layout_ext, 0x0,
9943         NULL, HFILL }},
9944     {&hf_skinny_lineDirNumber,
9945       {
9946         "lineDirNumber", "skinny.lineDirNumber", FT_STRING, BASE_NONE, NULL, 0x0,
9947         NULL, HFILL }},
9948     {&hf_skinny_lineFullyQualifiedDisplayName,
9949       {
9950         "lineFullyQualifiedDisplayName", "skinny.lineFullyQualifiedDisplayName", FT_STRING, BASE_NONE, NULL, 0x0,
9951         NULL, HFILL }},
9952     {&hf_skinny_lineTextLabel,
9953       {
9954         "lineTextLabel", "skinny.lineTextLabel", FT_STRING, BASE_NONE, NULL, 0x0,
9955         NULL, HFILL }},
9956     {&hf_skinny_locationInfo,
9957       {
9958         "locationInfo", "skinny.locationInfo", FT_STRING, BASE_NONE, NULL, 0x0,
9959         NULL, HFILL }},
9960     {&hf_skinny_mediaPathCapabilities,
9961       {
9962         "mediaPathCapabilities", "skinny.mediaPathCapabilities", FT_UINT32, BASE_HEX | BASE_EXT_STRING, &MediaPathCapabilities_ext, 0x0,
9963         NULL, HFILL }},
9964     {&hf_skinny_mediaPathEvent,
9965       {
9966         "mediaPathEvent", "skinny.mediaPathEvent", FT_UINT32, BASE_HEX | BASE_EXT_STRING, &MediaPathEvent_ext, 0x0,
9967         NULL, HFILL }},
9968     {&hf_skinny_mediaPathID,
9969       {
9970         "mediaPathID", "skinny.mediaPathID", FT_UINT32, BASE_HEX | BASE_EXT_STRING, &MediaPathID_ext, 0x0,
9971         NULL, HFILL }},
9972     {&hf_skinny_mediaReceptionStatus,
9973       {
9974         "mediaReceptionStatus", "skinny.mediaReceptionStatus", FT_UINT32, BASE_HEX | BASE_EXT_STRING, &MediaStatus_ext, 0x0,
9975         NULL, HFILL }},
9976     {&hf_skinny_mediaTransmissionStatus,
9977       {
9978         "mediaTransmissionStatus", "skinny.mediaTransmissionStatus", FT_UINT32, BASE_HEX | BASE_EXT_STRING, &MediaStatus_ext, 0x0,
9979         NULL, HFILL }},
9980     {&hf_skinny_mediaTransportType,
9981       {
9982         "mediaTransportType", "skinny.mediaTransportType", FT_UINT32, BASE_HEX | BASE_EXT_STRING, &MediaTransportType_ext, 0x0,
9983         NULL, HFILL }},
9984     {&hf_skinny_mediaType,
9985       {
9986         "mediaType", "skinny.mediaType", FT_UINT32, BASE_HEX | BASE_EXT_STRING, &MediaType_ext, 0x0,
9987         NULL, HFILL }},
9988     {&hf_skinny_micMode,
9989       {
9990         "micMode", "skinny.micMode", FT_UINT32, BASE_HEX | BASE_EXT_STRING, &MicrophoneMode_ext, 0x0,
9991         NULL, HFILL }},
9992     {&hf_skinny_modify_conf_result,
9993       {
9994         "modify_conf_result", "skinny.modify.conf.result", FT_UINT32, BASE_HEX | BASE_EXT_STRING, &ModifyConfResult_ext, 0x0,
9995         NULL, HFILL }},
9996     {&hf_skinny_multicastReceptionStatus,
9997       {
9998         "multicastReceptionStatus", "skinny.multicastReceptionStatus", FT_UINT32, BASE_HEX | BASE_EXT_STRING, &MulticastMediaReceptionStatus_ext, 0x0,
9999         NULL, HFILL }},
10000     {&hf_skinny_multimediaReceptionStatus,
10001       {
10002         "multimediaReceptionStatus", "skinny.multimediaReceptionStatus", FT_UINT32, BASE_HEX | BASE_EXT_STRING, &OpenReceiveChanStatus_ext, 0x0,
10003         NULL, HFILL }},
10004     {&hf_skinny_multimediaTransmissionStatus,
10005       {
10006         "multimediaTransmissionStatus", "skinny.multimediaTransmissionStatus", FT_UINT32, BASE_HEX | BASE_EXT_STRING, &MediaStatus_ext, 0x0,
10007         NULL, HFILL }},
10008     {&hf_skinny_mwiControlNumber,
10009       {
10010         "mwiControlNumber", "skinny.mwiControlNumber", FT_STRING, BASE_NONE, NULL, 0x0,
10011         NULL, HFILL }},
10012     {&hf_skinny_mwiTargetNumber,
10013       {
10014         "mwiTargetNumber", "skinny.mwiTargetNumber", FT_STRING, BASE_NONE, NULL, 0x0,
10015         NULL, HFILL }},
10016     {&hf_skinny_mwi_notification_result,
10017       {
10018         "mwi_notification_result", "skinny.mwi.notification.result", FT_UINT32, BASE_HEX | BASE_EXT_STRING, &MwiNotificationResult_ext, 0x0,
10019         NULL, HFILL }},
10020     {&hf_skinny_notify,
10021       {
10022         "notify", "skinny.notify", FT_STRING, BASE_NONE, NULL, 0x0,
10023         NULL, HFILL }},
10024     {&hf_skinny_originalCalledParty,
10025       {
10026         "originalCalledParty", "skinny.originalCalledParty", FT_STRING, BASE_NONE, NULL, 0x0,
10027         "Original Called Party Number", HFILL }},
10028     {&hf_skinny_originalCalledPartyName,
10029       {
10030         "originalCalledPartyName", "skinny.originalCalledPartyName", FT_STRING, BASE_NONE, NULL, 0x0,
10031         "Original Called Party Name", HFILL }},
10032     {&hf_skinny_originalCdpnVoiceMailbox,
10033       {
10034         "originalCdpnVoiceMailbox", "skinny.originalCdpnVoiceMailbox", FT_STRING, BASE_NONE, NULL, 0x0,
10035         "Original Called Party Voicemail Box Number", HFILL }},
10036     {&hf_skinny_participantName,
10037       {
10038         "participantName", "skinny.participantName", FT_STRING, BASE_NONE, NULL, 0x0,
10039         NULL, HFILL }},
10040     {&hf_skinny_participantNumber,
10041       {
10042         "participantNumber", "skinny.participantNumber", FT_STRING, BASE_NONE, NULL, 0x0,
10043         NULL, HFILL }},
10044     {&hf_skinny_passThruData,
10045       {
10046         "passThruData", "skinny.passThruData", FT_STRING, BASE_NONE, NULL, 0x0,
10047         "variable field size (max: 2000]", HFILL }},
10048     {&hf_skinny_payloadCapability,
10049       {
10050         "payloadCapability", "skinny.payloadCapability", FT_UINT32, BASE_HEX | BASE_EXT_STRING, &Media_PayloadType_ext, 0x0,
10051         NULL, HFILL }},
10052     {&hf_skinny_portHandlingFlag,
10053       {
10054         "portHandlingFlag", "skinny.portHandlingFlag", FT_UINT32, BASE_HEX | BASE_EXT_STRING, &PortHandling_ext, 0x0,
10055         NULL, HFILL }},
10056     {&hf_skinny_privacy,
10057       {
10058         "privacy", "skinny.privacy", FT_UINT32, BASE_HEX | BASE_EXT_STRING, &CallPrivacy_ext, 0x0,
10059         NULL, HFILL }},
10060     {&hf_skinny_promptStatus,
10061       {
10062         "promptStatus", "skinny.promptStatus", FT_STRING, BASE_NONE, NULL, 0x0,
10063         NULL, HFILL }},
10064     {&hf_skinny_recording_status,
10065       {
10066         "recording_status", "skinny.recording.status", FT_UINT32, BASE_HEX | BASE_EXT_STRING, &RecordingStatus_ext, 0x0,
10067         NULL, HFILL }},
10068     {&hf_skinny_requestedIpAddrType,
10069       {
10070         "requestedIpAddrType", "skinny.requestedIpAddrType", FT_UINT32, BASE_HEX | BASE_EXT_STRING, &IpAddrType_ext, 0x0,
10071         NULL, HFILL }},
10072     {&hf_skinny_resetType,
10073       {
10074         "resetType", "skinny.resetType", FT_UINT32, BASE_HEX | BASE_EXT_STRING, &DeviceResetType_ext, 0x0,
10075         NULL, HFILL }},
10076     {&hf_skinny_resourceType,
10077       {
10078         "resourceType", "skinny.resourceType", FT_UINT32, BASE_HEX | BASE_EXT_STRING, &ResourceType_ext, 0x0,
10079         NULL, HFILL }},
10080     {&hf_skinny_result,
10081       {
10082         "result", "skinny.result", FT_UINT32, BASE_HEX | BASE_EXT_STRING, &CreateConfResult_ext, 0x0,
10083         NULL, HFILL }},
10084     {&hf_skinny_resvStyle,
10085       {
10086         "resvStyle", "skinny.resvStyle", FT_UINT32, BASE_HEX | BASE_EXT_STRING, &ResvStyle_ext, 0x0,
10087         NULL, HFILL }},
10088     {&hf_skinny_ringDuration,
10089       {
10090         "ringDuration", "skinny.ringDuration", FT_UINT32, BASE_HEX | BASE_EXT_STRING, &RingDuration_ext, 0x0,
10091         NULL, HFILL }},
10092     {&hf_skinny_ringMode,
10093       {
10094         "ringMode", "skinny.ringMode", FT_UINT32, BASE_HEX | BASE_EXT_STRING, &RingMode_ext, 0x0,
10095         NULL, HFILL }},
10096     {&hf_skinny_rsvpErrorCode,
10097       {
10098         "rsvpErrorCode", "skinny.rsvpErrorCode", FT_UINT32, BASE_HEX | BASE_EXT_STRING, &RSVPErrorCode_ext, 0x0,
10099         NULL, HFILL }},
10100     {&hf_skinny_sequenceFlag,
10101       {
10102         "sequenceFlag", "skinny.sequenceFlag", FT_UINT32, BASE_HEX | BASE_EXT_STRING, &SequenceFlag_ext, 0x0,
10103         NULL, HFILL }},
10104     {&hf_skinny_serverName,
10105       {
10106         "serverName", "skinny.serverName", FT_STRING, BASE_NONE, NULL, 0x0,
10107         NULL, HFILL }},
10108     {&hf_skinny_serviceURL,
10109       {
10110         "serviceURL", "skinny.serviceURL", FT_STRING, BASE_NONE, NULL, 0x0,
10111         NULL, HFILL }},
10112     {&hf_skinny_serviceURLDisplayName,
10113       {
10114         "serviceURLDisplayName", "skinny.serviceURLDisplayName", FT_STRING, BASE_NONE, NULL, 0x0,
10115         NULL, HFILL }},
10116     {&hf_skinny_sessionType,
10117       {
10118         "sessionType", "skinny.sessionType", FT_UINT32, BASE_HEX | BASE_EXT_STRING, &SessionType_ext, 0x0,
10119         NULL, HFILL }},
10120     {&hf_skinny_softKeyEvent,
10121       {
10122         "softKeyEvent", "skinny.softKeyEvent", FT_UINT32, BASE_HEX | BASE_EXT_STRING, &SoftKeyEvent_ext, 0x0,
10123         "SoftKey Event", HFILL }},
10124     {&hf_skinny_softKeyInfoIndex,
10125       {
10126         "softKeyInfoIndex", "skinny.softKeyInfoIndex", FT_UINT16, BASE_HEX | BASE_EXT_STRING, &SoftKeyInfoIndex_ext, 0x0,
10127         NULL, HFILL }},
10128     {&hf_skinny_softKeyLabel,
10129       {
10130         "softKeyLabel", "skinny.softKeyLabel", FT_STRING, BASE_NONE, NULL, 0x0,
10131         NULL, HFILL }},
10132     {&hf_skinny_softKeySetIndex,
10133       {
10134         "softKeySetIndex", "skinny.softKeySetIndex", FT_UINT32, BASE_HEX | BASE_EXT_STRING, &SoftKeySet_ext, 0x0,
10135         NULL, HFILL }},
10136     {&hf_skinny_softKeyTemplateIndex,
10137       {
10138         "softKeyTemplateIndex", "skinny.softKeyTemplateIndex", FT_UINT8, BASE_HEX | BASE_EXT_STRING, &SoftKeyTemplateIndex_ext, 0x0,
10139         NULL, HFILL }},
10140     {&hf_skinny_speakerMode,
10141       {
10142         "speakerMode", "skinny.speakerMode", FT_UINT32, BASE_HEX | BASE_EXT_STRING, &SpeakerMode_ext, 0x0,
10143         NULL, HFILL }},
10144     {&hf_skinny_speedDialDirNumber,
10145       {
10146         "speedDialDirNumber", "skinny.speedDialDirNumber", FT_STRING, BASE_NONE, NULL, 0x0,
10147         NULL, HFILL }},
10148     {&hf_skinny_speedDialDisplayName,
10149       {
10150         "speedDialDisplayName", "skinny.speedDialDisplayName", FT_STRING, BASE_NONE, NULL, 0x0,
10151         NULL, HFILL }},
10152     {&hf_skinny_ssValue,
10153       {
10154         "ssValue", "skinny.ssValue", FT_UINT32, BASE_HEX | BASE_EXT_STRING, &Media_SilenceSuppression_ext, 0x0,
10155         NULL, HFILL }},
10156     {&hf_skinny_statsProcessingMode,
10157       {
10158         "Stats Processing Mode", "skinny.statsProcessingMode", FT_UINT32, BASE_HEX | BASE_EXT_STRING, &StatsProcessingType_ext, 0x0,
10159         "What do do after you send the stats", HFILL }},
10160     {&hf_skinny_status,
10161       {
10162         "status", "skinny.status", FT_UINT32, BASE_HEX | BASE_EXT_STRING, &DeviceUnregisterStatus_ext, 0x0,
10163         NULL, HFILL }},
10164     {&hf_skinny_stimulus,
10165       {
10166         "stimulus", "skinny.stimulus", FT_UINT32, BASE_HEX | BASE_EXT_STRING, &DeviceStimulus_ext, 0x0,
10167         "Device Stimulus", HFILL }},
10168     {&hf_skinny_subAppID,
10169       {
10170         "subAppID", "skinny.subAppID", FT_STRING, BASE_NONE, NULL, 0x0,
10171         NULL, HFILL }},
10172     {&hf_skinny_subscriptionFeatureID,
10173       {
10174         "subscriptionFeatureID", "skinny.subscriptionFeatureID", FT_UINT32, BASE_HEX | BASE_EXT_STRING, &SubscriptionFeatureID_ext, 0x0,
10175         NULL, HFILL }},
10176     {&hf_skinny_subscriptionID,
10177       {
10178         "subscriptionID", "skinny.subscriptionID", FT_STRING, BASE_NONE, NULL, 0x0,
10179         NULL, HFILL }},
10180     {&hf_skinny_text,
10181       {
10182         "text", "skinny.text", FT_STRING, BASE_NONE, NULL, 0x0,
10183         NULL, HFILL }},
10184     {&hf_skinny_tone,
10185       {
10186         "tone", "skinny.tone", FT_UINT32, BASE_HEX | BASE_EXT_STRING, &DeviceTone_ext, 0x0,
10187         NULL, HFILL }},
10188     {&hf_skinny_toneAnnouncement,
10189       {
10190         "toneAnnouncement", "skinny.toneAnnouncement", FT_UINT32, BASE_HEX | BASE_EXT_STRING, &DeviceTone_ext, 0x0,
10191         NULL, HFILL }},
10192     {&hf_skinny_tone_output_direction,
10193       {
10194         "tone_output_direction", "skinny.tone.output.direction", FT_UINT32, BASE_HEX | BASE_EXT_STRING, &ToneOutputDirection_ext, 0x0,
10195         NULL, HFILL }},
10196     {&hf_skinny_unRegReasonCode,
10197       {
10198         "unRegReasonCode", "skinny.unRegReasonCode", FT_UINT32, BASE_HEX | BASE_EXT_STRING, &UnRegReasonCode_ext, 0x0,
10199         NULL, HFILL }},
10200     {&hf_skinny_unknownString_0159,
10201       {
10202         "unknownString_0159", "skinny.unknownString.0159", FT_STRING, BASE_NONE, NULL, 0x0,
10203         NULL, HFILL }},
10204     {&hf_skinny_userName,
10205       {
10206         "userName", "skinny.userName", FT_STRING, BASE_NONE, NULL, 0x0,
10207         NULL, HFILL }},
10208     {&hf_skinny_vendorID,
10209       {
10210         "vendorID", "skinny.vendorID", FT_STRING, BASE_NONE, NULL, 0x0,
10211         NULL, HFILL }},
10212     {&hf_skinny_version,
10213       {
10214         "version", "skinny.version", FT_STRING, BASE_NONE, NULL, 0x0,
10215         NULL, HFILL }},
10216     {&hf_skinny_versionStr,
10217       {
10218         "versionStr", "skinny.versionStr", FT_STRING, BASE_NONE, NULL, 0x0,
10219         NULL, HFILL }},
10220     {&hf_skinny_videoCapabilityDirection,
10221       {
10222         "videoCapabilityDirection", "skinny.videoCapabilityDirection", FT_UINT32, BASE_HEX | BASE_EXT_STRING, &TransmitOrReceive_ext, 0x0,
10223         NULL, HFILL }},
10224   };
10225 
10226   /* Setup protocol subtree array */
10227   static gint *ett[] = {
10228     &ett_skinny,
10229     &ett_skinny_tree,
10230   };
10231 
10232   module_t *skinny_module;
10233 
10234   /* Register the protocol name and description */
10235   proto_skinny = proto_register_protocol("Skinny Client Control Protocol",
10236                                          "SKINNY", "skinny");
10237 
10238   /* Required function calls to register the header fields and subtrees used */
10239   proto_register_field_array(proto_skinny, hf, array_length(hf));
10240   proto_register_subtree_array(ett, array_length(ett));
10241 
10242   skinny_module = prefs_register_protocol(proto_skinny, NULL);
10243   prefs_register_bool_preference(skinny_module, "desegment",
10244     "Reassemble SKINNY messages spanning multiple TCP segments",
10245     "Whether the SKINNY dissector should reassemble messages spanning multiple TCP segments."
10246     " To use this option, you must also enable"
10247     " \"Allow subdissectors to reassemble TCP streams\" in the TCP protocol settings.",
10248     &global_skinny_desegment);
10249 
10250   skinny_handle = register_dissector("skinny", dissect_skinny, proto_skinny);
10251 
10252   skinny_tap = register_tap("skinny");
10253 }
10254 
10255 void
proto_reg_handoff_skinny(void)10256 proto_reg_handoff_skinny(void)
10257 {
10258   /* Skinny content type and internet media type used by other dissectors are the same */
10259   xml_handle = find_dissector_add_dependency("xml", proto_skinny);
10260   dissector_add_uint_with_preference("tcp.port", TCP_PORT_SKINNY, skinny_handle);
10261   ssl_dissector_add(SSL_PORT_SKINNY, skinny_handle);
10262 }
10263 
10264 /*
10265  * Editor modelines  -  https://www.wireshark.org/tools/modelines.html
10266  *
10267  * Local variables:
10268  * c-basic-offset: 2
10269  * tab-width: 8
10270  * indent-tabs-mode: nil
10271  * End:
10272  *
10273  * vi: set shiftwidth=2 tabstop=8 expandtab:
10274  * :indentSize=2:tabSize=8:noTabs=true:
10275  */
10276