Rename the routines that handle dissector tables with unsigned integer
[obnox/wireshark/wip.git] / epan / dissectors / packet-skinny.c
1 /* packet-skinny.c
2  *
3  * Dissector for the Skinny Client Control Protocol
4  *   (The "D-Channel"-Protocol for Cisco Systems' IP-Phones)
5  * Copyright 2001, Joerg Mayer (email: see AUTHORS file)
6  *
7  * Paul E. Erkkila (pee@erkkila.org) - fleshed out the decode
8  * skeleton to report values for most message/message fields.
9  * Much help from Guy Harris on figuring out the wireshark api.
10  *
11  * This file is based on packet-aim.c, which is
12  * Copyright 2000, Ralf Hoelzer <ralf@well.com>
13  *
14  * $Id$
15  *
16  * Wireshark - Network traffic analyzer
17  * By Gerald Combs <gerald@wireshark.org>
18  * Copyright 1998 Gerald Combs
19  *
20  * This program is free software; you can redistribute it and/or
21  * modify it under the terms of the GNU General Public License
22  * as published by the Free Software Foundation; either version 2
23  * of the License, or (at your option) any later version.
24  *
25  * This program is distributed in the hope that it will be useful,
26  * but WITHOUT ANY WARRANTY; without even the implied warranty of
27  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
28  * GNU General Public License for more details.
29  *
30  * You should have received a copy of the GNU General Public License
31  * along with this program; if not, write to the Free Software
32  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
33  */
34
35 /* This implementation is based on a draft version of the 3.0
36  * specification
37  */
38
39 #ifdef HAVE_CONFIG_H
40 # include "config.h"
41 #endif
42
43 #include <epan/packet.h>
44 #include <epan/prefs.h>
45 #include <epan/tap.h>
46
47 #include "packet-rtp.h"
48 #include "packet-tcp.h"
49 #include "packet-skinny.h"
50
51 #define TCP_PORT_SKINNY 2000
52
53 #define SKINNY_SOFTKEY0  0x01
54 #define SKINNY_SOFTKEY1  0x02
55 #define SKINNY_SOFTKEY2  0x04
56 #define SKINNY_SOFTKEY3  0x08
57 #define SKINNY_SOFTKEY4  0x10
58 #define SKINNY_SOFTKEY5  0x20
59 #define SKINNY_SOFTKEY6  0x40
60 #define SKINNY_SOFTKEY7  0x80
61 #define SKINNY_SOFTKEY8  0x100
62 #define SKINNY_SOFTKEY9  0x200
63 #define SKINNY_SOFTKEY10 0x400
64 #define SKINNY_SOFTKEY11 0x800
65 #define SKINNY_SOFTKEY12 0x1000
66 #define SKINNY_SOFTKEY13 0x2000
67 #define SKINNY_SOFTKEY14 0x4000
68 #define SKINNY_SOFTKEY15 0x8000
69
70 /* KeyMap Show/No Show */
71 static const true_false_string softKeyMapValues = {
72   "Show",
73   "Do Not Show"
74 };
75
76
77 /* I will probably need this again when I change things
78  * to function pointers, but let me use the existing
79  * infrastructure for now
80  *
81  * typedef struct {
82  *   guint32    id;
83  *   char *     name;
84  * } message_id_t;
85  */
86
87 static const value_string  message_id[] = {
88
89   /* Station -> Callmanager */
90   {0x0000, "KeepAliveMessage"},
91   {0x0001, "RegisterMessage"},
92   {0x0002, "IpPortMessage"},
93   {0x0003, "KeypadButtonMessage"},
94   {0x0004, "EnblocCallMessage"},
95   {0x0005, "StimulusMessage"},
96   {0x0006, "OffHookMessage"},
97   {0x0007, "OnHookMessage"},
98   {0x0008, "HookFlashMessage"},
99   {0x0009, "ForwardStatReqMessage"},
100   {0x000A, "SpeedDialStatReqMessage"},
101   {0x000B, "LineStatReqMessage"},
102   {0x000C, "ConfigStatReqMessage"},
103   {0x000D, "TimeDateReqMessage"},
104   {0x000E, "ButtonTemplateReqMessage"},
105   {0x000F, "VersionReqMessage"},
106   {0x0010, "CapabilitiesResMessage"},
107   {0x0011, "MediaPortListMessage"},
108   {0x0012, "ServerReqMessage"},
109   {0x0020, "AlarmMessage"},
110   {0x0021, "MulticastMediaReceptionAck"},
111   {0x0022, "OpenReceiveChannelAck"},
112   {0x0023, "ConnectionStatisticsRes"},
113   {0x0024, "OffHookWithCgpnMessage"},
114   {0x0025, "SoftKeySetReqMessage"},
115   {0x0026, "SoftKeyEventMessage"},
116   {0x0027, "UnregisterMessage"},
117   {0x0028, "SoftKeyTemplateReqMessage"},
118   {0x0029, "RegisterTokenReq"},
119   {0x002A, "MediaTransmissionFailure"},
120   {0x002B, "HeadsetStatusMessage"},
121   {0x002C, "MediaResourceNotification"},
122   {0x002D, "RegisterAvailableLinesMessage"},
123   {0x002E, "DeviceToUserDataMessage"},
124   {0x002F, "DeviceToUserDataResponseMessage"},
125   {0x0030, "UpdateCapabilitiesMessage"},
126   {0x0031, "OpenMultiMediaReceiveChannelAckMessage"},
127   {0x0032, "ClearConferenceMessage"},
128   {0x0033, "ServiceURLStatReqMessage"},
129   {0x0034, "FeatureStatReqMessage"},
130   {0x0035, "CreateConferenceResMessage"},
131   {0x0036, "DeleteConferenceResMessage"},
132   {0x0037, "ModifyConferenceResMessage"},
133   {0x0038, "AddParticipantResMessage"},
134   {0x0039, "AuditConferenceResMessage"},
135   {0x0040, "AuditParticipantResMessage"},
136   {0x0041, "DeviceToUserDataVersion1Message"},
137   {0x0042, "DeviceToUserDataResponseVersion1Message"},
138
139   /* Callmanager -> Station */
140   /* 0x0000, 0x0003? */
141   {0x0081, "RegisterAckMessage"},
142   {0x0082, "StartToneMessage"},
143   {0x0083, "StopToneMessage"},
144   {0x0085, "SetRingerMessage"},
145   {0x0086, "SetLampMessage"},
146   {0x0087, "SetHkFDetectMessage"},
147   {0x0088, "SetSpeakerModeMessage"},
148   {0x0089, "SetMicroModeMessage"},
149   {0x008A, "StartMediaTransmission"},
150   {0x008B, "StopMediaTransmission"},
151   {0x008C, "StartMediaReception"},
152   {0x008D, "StopMediaReception"},
153   {0x008F, "CallInfoMessage"},
154   {0x0090, "ForwardStatMessage"},
155   {0x0091, "SpeedDialStatMessage"},
156   {0x0092, "LineStatMessage"},
157   {0x0093, "ConfigStatMessage"},
158   {0x0094, "DefineTimeDate"},
159   {0x0095, "StartSessionTransmission"},
160   {0x0096, "StopSessionTransmission"},
161   {0x0097, "ButtonTemplateMessage"},
162   {0x0098, "VersionMessage"},
163   {0x0099, "DisplayTextMessage"},
164   {0x009A, "ClearDisplay"},
165   {0x009B, "CapabilitiesReqMessage"},
166   {0x009C, "EnunciatorCommandMessage"},
167   {0x009D, "RegisterRejectMessage"},
168   {0x009E, "ServerResMessage"},
169   {0x009F, "Reset"},
170   {0x0100, "KeepAliveAckMessage"},
171   {0x0101, "StartMulticastMediaReception"},
172   {0x0102, "StartMulticastMediaTransmission"},
173   {0x0103, "StopMulticastMediaReception"},
174   {0x0104, "StopMulticastMediaTransmission"},
175   {0x0105, "OpenReceiveChannel"},
176   {0x0106, "CloseReceiveChannel"},
177   {0x0107, "ConnectionStatisticsReq"},
178   {0x0108, "SoftKeyTemplateResMessage"},
179   {0x0109, "SoftKeySetResMessage"},
180   {0x0110, "SelectSoftKeysMessage"},
181   {0x0111, "CallStateMessage"},
182   {0x0112, "DisplayPromptStatusMessage"},
183   {0x0113, "ClearPromptStatusMessage"},
184   {0x0114, "DisplayNotifyMessage"},
185   {0x0115, "ClearNotifyMessage"},
186   {0x0116, "ActivateCallPlaneMessage"},
187   {0x0117, "DeactivateCallPlaneMessage"},
188   {0x0118, "UnregisterAckMessage"},
189   {0x0119, "BackSpaceReqMessage"},
190   {0x011A, "RegisterTokenAck"},
191   {0x011B, "RegisterTokenReject"},
192
193   {0x011C, "StartMediaFailureDetection"},
194   {0x011D, "DialedNumberMessage"},
195   {0x011E, "UserToDeviceDataMessage"},
196   {0x011F, "FeatureStatMessage"},
197   {0x0120, "DisplayPriNotifyMessage"},
198   {0x0121, "ClearPriNotifyMessage"},
199   {0x0122, "StartAnnouncementMessage"},
200   {0x0123, "StopAnnouncementMessage"},
201   {0x0124, "AnnouncementFinishMessage"},
202   {0x0127, "NotifyDtmfToneMessage"},
203   {0x0128, "SendDtmfToneMessage"},
204   {0x0129, "SubscribeDtmfPayloadReqMessage"},
205   {0x012A, "SubscribeDtmfPayloadResMessage"},
206   {0x012B, "SubscribeDtmfPayloadErrMessage"},
207   {0x012C, "UnSubscribeDtmfPayloadReqMessage"},
208   {0x012D, "UnSubscribeDtmfPayloadResMessage"},
209   {0x012E, "UnSubscribeDtmfPayloadErrMessage"},
210   {0x012F, "ServiceURLStatMessage"},
211   {0x0130, "CallSelectStatMessage"},
212   {0x0131, "OpenMultiMediaChannelMessage"},
213   {0x0132, "StartMultiMediaTransmission"},
214   {0x0133, "StopMultiMediaTransmission"},
215   {0x0134, "MiscellaneousCommandMessage"},
216   {0x0135, "FlowControlCommandMessage"},
217   {0x0136, "CloseMultiMediaReceiveChannel"},
218   {0x0137, "CreateConferenceReqMessage"},
219   {0x0138, "DeleteConferenceReqMessage"},
220   {0x0139, "ModifyConferenceReqMessage"},
221   {0x013A, "AddParticipantReqMessage"},
222   {0x013B, "DropParticipantReqMessage"},
223   {0x013C, "AuditConferenceReqMessage"},
224   {0x013D, "AuditParticipantReqMessage"},
225   {0x013F, "UserToDeviceDataVersion1Message"},
226
227   {0     , NULL}        /* terminator */
228 };
229 static value_string_ext message_id_ext = VALUE_STRING_EXT_INIT(message_id);
230
231 /*
232  * Device type to text conversion table
233  */
234 static const value_string  deviceTypes[] = {
235   {1  , "30SPplus"},
236   {2  , "12SPplus"},
237   {3  , "12SP"},
238   {4  , "12"},
239   {5  , "30VIP"},
240   {6  , "Telecaster"},
241   {7  , "TelecasterMgr"},
242   {8  , "TelecasterBus"},
243   {9  , "Polycom"},
244   {10 , "VGC"},
245   {12 , "ATA"},
246   {20 , "Virtual30SPplus"},
247   {21 , "PhoneApplication"},
248   {30 , "AnalogAccess"},
249   {40 , "DigitalAccessPRI"},
250   {41 , "DigitalAccessT1"},
251   {42 , "DigitalAccessTitan2"},
252   {43 , "DigitalAccessLennon"},
253   {47 , "AnalogAccessElvis"},
254   {50 , "ConferenceBridge"},
255   {51 , "ConferenceBridgeYoko"},
256   {52 , "ConferenceBridgeDixieLand"},
257   {53 , "ConferenceBridgeSummit"},
258   {60 , "H225"},
259   {61 , "H323Phone"},
260   {62 , "H323Trunk"},
261   {70 , "MusicOnHold"},
262   {71 , "Pilot"},
263   {72 , "TapiPort"},
264   {73 , "TapiRoutePoint"},
265   {80 , "VoiceInBox"},
266   {81 , "VoiceInboxAdmin"},
267   {82 , "LineAnnunciator"},
268   {83 , "SoftwareMtpDixieLand"},
269   {84 , "CiscoMediaServer"},
270   {85 , "ConferenceBridgeFlint"},
271   {90 , "RouteList"},
272   {100, "LoadSimulator"},
273   {110, "MediaTerminationPoint"},
274   {111, "MediaTerminationPointYoko"},
275   {112, "MediaTerminationPointDixieLand"},
276   {113, "MediaTerminationPointSummit"},
277   {120, "MGCPStation"},
278   {121, "MGCPTrunk"},
279   {122, "RASProxy"},
280   {125, "Trunk"},
281   {126, "Annunciator"},
282   {127, "MonitorBridge"},
283   {128, "Recorder"},
284   {129, "MonitorBridgeYoko"},
285   {131, "SipTrunk"},
286   {254, "UnknownMGCPGateway"},
287   {255, "NotDefined"},
288   { 0    , NULL}
289 };
290 static value_string_ext deviceTypes_ext = VALUE_STRING_EXT_INIT(deviceTypes);
291
292 /*
293  * keypad button -> text conversion
294  */
295 static const value_string keypadButtons[] = {
296   {0x0   , "Zero"},
297   {0x1   , "One"},
298   {0x2   , "Two"},
299   {0x3   , "Three"},
300   {0x4   , "Four"},
301   {0x5   , "Five"},
302   {0x6   , "Six"},
303   {0x7   , "Seven"},
304   {0x8   , "Eight"},
305   {0x9   , "Nine"},
306   {0xa   , "A"},
307   {0xb   , "B"},
308   {0xc   , "C"},
309   {0xd   , "D"},
310   {0xe   , "Star"},
311   {0xf   , "Pound"},
312   {0     , NULL}
313 };
314 static value_string_ext keypadButtons_ext = VALUE_STRING_EXT_INIT(keypadButtons);
315
316 static const value_string deviceStimuli[] = {
317   {0x1  , "LastNumberRedial"},
318   {0x2  , "SpeedDial"},
319   {0x3  , "Hold"},
320   {0x4  , "Transfer"},
321   {0x5  , "ForwardAll"},
322   {0x6  , "ForwardBusy"},
323   {0x7  , "ForwardNoAnswer"},
324   {0x8  , "Display"},
325   {0x9  , "Line"},
326   {0xa  , "T120Chat"},
327   {0xb  , "T120Whiteboard"},
328   {0xc  , "T120ApplicationSharing"},
329   {0xd  , "T120FileTransfer"},
330   {0xe  , "Video"},
331   {0xf  , "VoiceMail"},
332   {0x10 , "AutoAnswerRelease"},
333   {0x11 , "AutoAnswer"},
334   {0x12 , "Select"},
335   {0x13 , "Privacy"},
336   {0x14 , "ServiceURL"},
337   {0x1B , "MaliciousCall"},
338   {0x21 , "GenericAppB1"},
339   {0x22 , "GenericAppB2"},
340   {0x23 , "GenericAppB3"},
341   {0x24 , "GenericAppB4"},
342   {0x25 , "GenericAppB5"},
343   {0x7b , "MeetMeConference"},
344   {0x7d , "Conference"},
345   {0x7e , "CallPark"},
346   {0x7f , "CallPickup"},
347   {0x80 , "GroupCallPickup"},
348   {0,NULL}
349 };
350 static value_string_ext deviceStimuli_ext = VALUE_STRING_EXT_INIT(deviceStimuli);
351
352
353 /* Note i'm only using 7 later on cuz i'm lazy ;) */
354 #define DeviceMaxCapabilities 18 /* max capabilities allowed in Cap response message */
355
356 static const value_string mediaPayloads[] = {
357   {1   , "Non-standard codec"},
358   {2   , "G.711 A-law 64k"},
359   {3   , "G.711 A-law 56k"},
360   {4   , "G.711 u-law 64k"},
361   {5   , "G.711 u-law 56k"},
362   {6   , "G.722 64k"},
363   {7   , "G.722 56k"},
364   {8   , "G.722 48k"},
365   {9   , "G.723.1"},
366   {10  , "G.728"},
367   {11  , "G.729"},
368   {12  , "G.729 Annex A"},
369   {13  , "IS11172 AudioCap"},   /* IS11172 is an ISO MPEG standard */
370   {14  , "IS13818 AudioCap"},   /* IS13818 is an ISO MPEG standard */
371   {15  , "G.729 Annex B"},
372   {16  , "G.729 Annex A+Annex B"},
373   {18  , "GSM Full Rate"},
374   {19  , "GSM Half Rate"},
375   {20  , "GSM Enhanced Full Rate"},
376   {25  , "Wideband 256k"},
377   {32  , "Data 64k"},
378   {33  , "Data 56k"},
379   {80  , "GSM"},
380   {81  , "ActiveVoice"},
381   {82  , "G.726 32K"},
382   {83  , "G.726 24K"},
383   {84  , "G.726 16K"},
384   {85  , "G.729B"},
385   {86  , "G.729B Low Complexity"},
386   {100 , "H261"},
387   {101 , "H263"},
388   {102 , "Video"},
389   {105 , "T120"},
390   {106 , "H224"},
391   {257 , "RFC2833_DynPayload"},
392   {0  , NULL}
393 };
394 static value_string_ext mediaPayloads_ext = VALUE_STRING_EXT_INIT(mediaPayloads);
395
396 static const value_string alarmSeverities[] = {
397   {0   , "Critical"},
398   {1   , "Warning"},
399   {2   , "Informational"},
400   {4   , "Unknown"},
401   {7   , "Major"},
402   {8   , "Minor"},
403   {10  , "Marginal"},
404   {20  , "TraceInfo"},
405   {0  , NULL}
406 };
407 static value_string_ext alarmSeverities_ext = VALUE_STRING_EXT_INIT(alarmSeverities);
408
409 static const value_string multicastMediaReceptionStatus[] = {
410   {0  , "Ok"},
411   {1  , "Error"},
412   {0  , NULL}
413 };
414
415 static const value_string openReceiveChanStatus[] = {
416   {0   , "orcOk"},
417   {1   , "orcError"},
418   {0   , NULL}
419 };
420
421
422 static const value_string statsProcessingTypes[] = {
423   {0   , "clearStats"},
424   {1   , "doNotClearStats"},
425   {0   , NULL}
426 };
427
428 #define SkMaxSoftKeyCount 18 /* this value should be the same as the max soft key value */
429 static const value_string softKeyEvents[] = {
430   {1   , "Redial"},
431   {2   , "NewCall"},
432   {3   , "Hold"},
433   {4   , "Transfer"},
434   {5   , "CFwdAll"},
435   {6   , "CFwdBusy"},
436   {7   , "CFwdNoAnswer"},
437   {8   , "BackSpace"},
438   {9   , "EndCall"},
439   {10  , "Resume"},
440   {11  , "Answer"},
441   {12  , "Info"},
442   {13  , "Confrn"},
443   {14  , "Park"},
444   {15  , "Join"},
445   {16  , "MeetMeConfrn"},
446   {17  , "CallPickUp"},
447   {18  , "GrpCallPickUp"},
448   {0   , NULL}
449 };
450 static value_string_ext softKeyEvents_ext = VALUE_STRING_EXT_INIT(softKeyEvents);
451
452 /* Define info index for each softkey event for Telecaster station. */
453 static const value_string softKeyIndexes[] = {
454   {301  , "RedialInfoIndex"},
455   {302  , "NewCallInfoIndex"},
456   {303  , "HoldInfoIndex"},
457   {304  , "TrnsferInfoIndex"},
458   {305  , "CFwdAllInfoIndex"},
459   {306  , "CFwdBusyInfoIndex"},     /* not used yet */
460   {307  , "CFwdNoAnswerInfoIndex"}, /* not used yet */
461   {308  , "BackSpaceInfoIndex"},
462   {309  , "EndCallInfoIndex"},
463   {310  , "ResumeInfoIndex"},
464   {311  , "AnswerInfoIndex"},
465   {312  , "InfoInfoIndex"},
466   {313  , "ConfrnInfoIndex"},
467   {314  , "ParkInfoIndex"},
468   {315  , "JoinInfoIndex"},
469   {316  , "MeetMeConfrnInfoIndex"},
470   {317  , "CallPickUpInfoIndex"},
471   {318  , "GrpCallPickUpInfoIndex"},
472   {0   , NULL}
473 };
474 static value_string_ext softKeyIndexes_ext = VALUE_STRING_EXT_INIT(softKeyIndexes);
475
476
477 static const value_string buttonDefinitions[] = {
478   {0x1  , "LastNumberRedial"},
479   {0x2  , "SpeedDial"},
480   {0x3  , "Hold"},
481   {0x4  , "Transfer"},
482   {0x5  , "ForwardAll"},
483   {0x6  , "ForwardBusy"},
484   {0x7  , "ForwardNoAnswer"},
485   {0x8  , "Display"},
486   {0x9  , "Line"},
487   {0xa  , "T120Chat"},
488   {0xb  , "T120Whiteboard"},
489   {0xc  , "T120ApplicationSharing"},
490   {0xd  , "T120FileTransfer"},
491   {0xe  , "Video"},
492   {0x10 , "AnswerRelease"},
493   {0xf0 , "Keypad"},
494   {0xfd , "AEC"},
495   {0xff , "Undefined"},
496   {0   , NULL}
497 };
498 static value_string_ext buttonDefinitions_ext = VALUE_STRING_EXT_INIT(buttonDefinitions);
499
500 #define StationTotalSoftKeySets 10 /* total number of the soft key sets */
501 static const value_string keySetNames[] = {
502   {0   , "OnHook"},
503   {1   , "Connected"},
504   {2   , "OnHold"},
505   {3   , "RingIn"},
506   {4   , "OffHook"},
507   {5   , "Connected with transfer"},
508   {6   , "Digits after dialing first digit"},
509   {7   , "Connected with conference"},
510   {8   , "RingOut"},
511   {9   , "OffHook with features"},
512   {0   , NULL}
513 };
514 static value_string_ext keySetNames_ext = VALUE_STRING_EXT_INIT(keySetNames);
515
516 #if 0
517 /* Define soft key labels for the Telecaster station */
518 static const value_string softKeyLabel[] _U_ = {
519   {0   , "undefined"},
520   {1   , "Redial"},
521   {2   , "NewCall"},
522   {3   , "Hold"},
523   {4   , "Trnsfer"},
524   {5   , "CFwdAll"},
525   {6   , "CFwdBusy"},
526   {7   , "CFwdNoAnswer"},
527   {8   , "<<"},
528   {9   , "EndCall"},
529   {10  , "Resume"},
530   {11  , "Answer"},
531   {12  , "Info"},
532   {13  , "Confrn"},
533   {14  , "Park"},
534   {15  , "Join"},
535   {16  , "MeetMe"},
536   {17  , "PickUp"},
537   {18  , "GPickUp"},
538   {0   , NULL}
539 };
540 #endif
541
542 /*
543  * define lamp modes;
544  * lamp cadence is defined as follows
545  * Wink (on 80%) = 448msec on / 64msec off
546  * Flash (fast flash) = 32msec on / 32msec off
547  * Blink (on 50%) = 512msec on / 512msec off
548  * On (on steady)
549  */
550 static const value_string stationLampModes[] = {
551   {0   , "Undefined"},
552   {0x1 , "Off"},
553   {0x2 , "On"},
554   {0x3 , "Wink"},
555   {0x4 , "Flash"},
556   {0x5 , "Blink"},
557   {0   , NULL}
558 };
559 static value_string_ext stationLampModes_ext = VALUE_STRING_EXT_INIT(stationLampModes);
560
561 /* Defined the Call States to be sent to the Telecaste station.
562  * These are NOT the call states used in CM internally. Instead,
563  * they are the call states sent from CM and understood by the Telecaster station
564  */
565 static const value_string skinny_stationCallStates[] = {
566   {1   , "OffHook"},
567   {2   , "OnHook"},
568   {3   , "RingOut"},
569   {4   , "RingIn"},
570   {5   , "Connected"},
571   {6   , "Busy"},
572   {7   , "Congestion"},
573   {8   , "Hold"},
574   {9   , "CallWaiting"},
575   {10  , "CallTransfer"},
576   {11  , "CallPark"},
577   {12  , "Proceed"},
578   {13  , "CallRemoteMultiline"},
579   {14  , "InvalidNumber"},
580   {0   , NULL}
581 };
582 static value_string_ext skinny_stationCallStates_ext = VALUE_STRING_EXT_INIT(skinny_stationCallStates);
583
584 /* Defined Call Type */
585 static const value_string skinny_callTypes[] = {
586   {1   , "InBoundCall"},
587   {2   , "OutBoundCall"},
588   {3   , "ForwardCall"},
589   {0   , NULL}
590 };
591
592 /*
593  * define station-playable tones;
594  * for tone definitions see SR-TSV-002275, "BOC Notes on the LEC Networks -- 1994"
595  */
596 static const value_string skinny_deviceTones[] = {
597   {0x0  , "Silence"},
598   {0x1  , "Dtmf1"},
599   {0x2  , "Dtmf2"},
600   {0x3  , "Dtmf3"},
601   {0x4  , "Dtmf4"},
602   {0x5  , "Dtmf5"},
603   {0x6  , "Dtmf6"},
604   {0x7  , "Dtmf7"},
605   {0x8  , "Dtmf8"},
606   {0x9  , "Dtmf9"},
607   {0xa  , "Dtmf0"},
608   {0xe  , "DtmfStar"},
609   {0xf  , "DtmfPound"},
610   {0x10 , "DtmfA"},
611   {0x11 , "DtmfB"},
612   {0x12 , "DtmfC"},
613   {0x13 , "DtmfD"},
614   {0x21 , "InsideDialTone"},
615   {0x22 , "OutsideDialTone"},
616   {0x23 , "LineBusyTone"},
617   {0x24 , "AlertingTone"},
618   {0x25 , "ReorderTone"},
619   {0x26 , "RecorderWarningTone"},
620   {0x27 , "RecorderDetectedTone"},
621   {0x28 , "RevertingTone"},
622   {0x29 , "ReceiverOffHookTone"},
623   {0x2a , "PartialDialTone"},
624   {0x2b , "NoSuchNumberTone"},
625   {0x2c , "BusyVerificationTone"},
626   {0x2d , "CallWaitingTone"},
627   {0x2e , "ConfirmationTone"},
628   {0x2f , "CampOnIndicationTone"},
629   {0x30 , "RecallDialTone"},
630   {0x31 , "ZipZip"},
631   {0x32 , "Zip"},
632   {0x33 , "BeepBonk"},
633   {0x34 , "MusicTone"},
634   {0x35 , "HoldTone"},
635   {0x36 , "TestTone"},
636   {0x37 , "DtMoniterWarningTone"},
637   {0x40 , "AddCallWaiting"},
638   {0x41 , "PriorityCallWait"},
639   {0x42 , "RecallDial"},
640   {0x43 , "BargIn"},
641   {0x44 , "DistinctAlert"},
642   {0x45 , "PriorityAlert"},
643   {0x46 , "ReminderRing"},
644   {0x47 , "PrecedenceRingBack"},
645   {0x48 , "PreemptionTone"},
646   {0x50 , "MF1"},
647   {0x51 , "MF2"},
648   {0x52 , "MF3"},
649   {0x53 , "MF4"},
650   {0x54 , "MF5"},
651   {0x55 , "MF6"},
652   {0x56 , "MF7"},
653   {0x57 , "MF8"},
654   {0x58 , "MF9"},
655   {0x59 , "MF0"},
656   {0x5a , "MFKP1"},
657   {0x5b , "MFST"},
658   {0x5c , "MFKP2"},
659   {0x5d , "MFSTP"},
660   {0x5e , "MFST3P"},
661   {0x5f , "MILLIWATT"},
662   {0x60 , "MILLIWATTTEST"},
663   {0x61 , "HIGHTONE"},
664   {0x62 , "FLASHOVERRIDE"},
665   {0x63 , "FLASH"},
666   {0x64 , "PRIORITY"},
667   {0x65 , "IMMEDIATE"},
668   {0x66 , "PREAMPWARN"},
669   {0x67 , "2105HZ"},
670   {0x68 , "2600HZ"},
671   {0x69 , "440HZ"},
672   {0x6a , "300HZ"},
673   {0x77 , "MLPP_PALA"},
674   {0x78 , "MLPP_ICA"},
675   {0x79 , "MLPP_VCA"},
676   {0x7A , "MLPP_BPA"},
677   {0x7B , "MLPP_BNEA"},
678   {0x7C , "MLPP_UPA"},
679   {0x7f , "NoTone"},
680   {0   , NULL}
681 };
682 static value_string_ext skinny_deviceTones_ext = VALUE_STRING_EXT_INIT(skinny_deviceTones);
683
684 /* define ring types */
685 static const value_string skinny_ringTypes[] = {
686   {0x1  , "RingOff"},
687   {0x2  , "InsideRing"},
688   {0x3  , "OutsideRing"},
689   {0x4  , "FeatureRing"},
690   {0x5  , "FlashOnly"},
691   {0x6  , "PrecedenceRing"},
692   {0   , NULL}
693 };
694 static value_string_ext skinny_ringTypes_ext = VALUE_STRING_EXT_INIT(skinny_ringTypes);
695
696 static const value_string skinny_ringModes[] = {
697   {0x1  , "RingForever"},
698   {0x2  , "RingOnce"},
699   {0   , NULL}
700 };
701
702 static const value_string skinny_speakerModes[] = {
703   {1   , "SpeakerOn"},
704   {2   , "SpeakerOff"},
705   {0   , NULL}
706 };
707
708 static const value_string skinny_silenceSuppressionModes[] = {
709   {0   , "Media_SilenceSuppression_Off"},
710   {1   , "Media_SilenceSuppression_On"},
711   {0   , NULL}
712 };
713
714 static const value_string skinny_g723BitRates[] = {
715   {1   , "Media_G723BRate_5_3"},
716   {2   , "Media_G723BRate_6_4"},
717   {0   , NULL}
718 };
719
720 /* define device reset types  */
721 static const value_string skinny_deviceResetTypes[] = {
722   {1   , "DEVICE_RESET"},
723   {2   , "DEVICE_RESTART"},
724   {0   , NULL}
725 };
726
727 static const value_string skinny_echoCancelTypes[] = {
728   {0    , "Media_EchoCancellation_Off"},
729   {1    , "Media_EchoCancellation_On"},
730   {0    , NULL}
731 };
732
733 static const value_string skinny_deviceUnregisterStatusTypes[] = {
734   {0   , "Ok"},
735   {1   , "Error"},
736   {2   , "NAK"}, /* Unregister request is rejected for reaso n such as existence of a call */
737   {0   , NULL}
738 };
739
740 static const value_string skinny_createConfResults[] = {
741   {0   , "Ok"},
742   {1   , "ResourceNotAvailable"},
743   {2   , "ConferenceAlreadyExist"},
744   {3   , "SystemErr"},
745   {0   , NULL}
746 };
747
748 static const value_string skinny_modifyConfResults[] = {
749   {0   , "Ok"},
750   {1   , "ResourceNotAvailable"},
751   {2   , "ConferenceNotExist"},
752   {3   , "InvalidParameter"},
753   {4   , "MoreActiveCallsThanReserved"},
754   {5   , "InvalidResourceType"},
755   {6   , "SystemErr"},
756   {0   , NULL}
757 };
758 static value_string_ext skinny_modifyConfResults_ext = VALUE_STRING_EXT_INIT(skinny_modifyConfResults);
759
760 static const value_string skinny_deleteConfResults[] = {
761   {0   , "Ok"},
762   {1   , "ConferenceNotExist"},
763   {2   , "SystemErr"},
764   {0   , NULL}
765 };
766
767 static const value_string skinny_addParticipantResults[] = {
768   {0   , "Ok"},
769   {1   , "ResourceNotAvailable"},
770   {2   , "ConferenceNotExist"},
771   {3   , "DuplicateCallRef"},
772   {4   , "SystemErr"},
773   {0   , NULL}
774 };
775 static value_string_ext skinny_addParticipantResults_ext = VALUE_STRING_EXT_INIT(skinny_addParticipantResults);
776
777 static const value_string skinny_auditParticipantResults[] = {
778   {0   , "Ok"},
779   {1   , "ConferenceNotExist"},
780   {0   , NULL}
781 };
782
783 /* define hook flash detection mode */
784 static const value_string skinny_hookFlashDetectModes[] = {
785   {1   , "HookFlashOn"},
786   {2   , "HookFlashOff"},
787   {0   , NULL}
788 };
789
790 /* define headset mode */
791 static const value_string skinny_headsetModes[] = {
792   {1   , "HeadsetOn"},
793   {2   , "HeadsetOff"},
794   {0   , NULL}
795 };
796
797 /* define station microphone modes;
798  * Mic On - The speakerphone's microphone is turned on ONLY if the phone is in the "Speaker On (Off Hook)"
799  * state (see above).
800  * Mic Off - The microphone is turned off or, if it's not on, the command is ignored.
801  */
802 static const value_string skinny_microphoneModes[] = {
803   {1   , "MicOn"},
804   {2   , "MicOff"},
805   {0   , NULL}
806 };
807
808 /* define the session request types */
809 static const value_string skinny_sessionTypes[] = {
810   {1   , "Chat"},
811   {2   , "Whiteboard"},
812   {4   , "ApplicationSharing"},
813   {8   , "FileTransfer"},
814   {10  , "Video"},
815   {0   , NULL}
816 };
817 static value_string_ext skinny_sessionTypes_ext = VALUE_STRING_EXT_INIT(skinny_sessionTypes);
818
819 static const value_string skinny_mediaEnunciationTypes[] = {
820   {1  , "None"},
821   {2  , "CallPark"},
822   {0  , NULL}
823 };
824
825 static const value_string skinny_resourceTypes[] = {
826   {1  , "Conference"},
827   {2  , "IVR"},
828   {0  , NULL}
829 };
830
831 static const value_string skinny_sequenceFlags[] = {
832   {0  , "StationSequenceFirst"},
833   {1  , "StationSequenceMore"},
834   {2  , "StationSequenceLast"},
835   {0  , NULL}
836 };
837
838 static const value_string skinny_Layouts[] = {
839   {0  , "NoLayout"},
840   {1  , "OneByOne"},
841   {2  , "OneByTwo"},
842   {3  , "TwoByTwo"},
843   {4  , "TwoByTwo3Alt1"},
844   {5  , "TwoByTwo3Alt2"},
845   {6  , "ThreeByThree"},
846   {7  , "ThreeByThree6Alt1"},
847   {8  , "ThreeByThree6Alt2"},
848   {9  , "ThreeByThree4Alt1"},
849   {10 , "ThreeByThree4Alt2"},
850   {0  , NULL}
851 };
852 static value_string_ext skinny_Layouts_ext = VALUE_STRING_EXT_INIT(skinny_Layouts);
853
854 static const value_string skinny_transmitOrReceive[] = {
855   {1  , "Station_Receive_only"},
856   {2  , "Station_Transmit_only"},
857   {3  , "Station_Receive_Transmit"},
858   {0  , NULL}
859 };
860
861 static const value_string skinny_endOfAnnAck[] = {
862   {0  , "NoAnnAckRequired"},
863   {1  , "AnnAckRequired"},
864   {0  , NULL}
865 };
866
867 static const value_string skinny_annPlayMode[] = {
868   {0  , "AnnXmlConfigMode"},
869   {1  , "AnnOneShotMode"},
870   {2  , "AnnContinuousMode"},
871   {0  , NULL}
872 };
873
874 static const value_string skinny_annPlayStatus[] = {
875   {0  , "PlayToneOK"},
876   {1  , "PlayToneErr"},
877   {0  , NULL}
878 };
879
880 static const value_string skinny_miscCommandType[] = {
881   {0  , "videoFreezePicture"},
882   {1  , "videoFastUpdatePicture"},
883   {2  , "videoFastUpdateGOB"},
884   {3  , "videoFastUpdateMB"},
885   {4  , "lostPicture"},
886   {5  , "lostPartialPicture"},
887   {6  , "recoveryReferencePicture"},
888   {7  , "temporalSpatialTradeOff"},
889   {0  , NULL}
890 };
891 static value_string_ext skinny_miscCommandType_ext = VALUE_STRING_EXT_INIT(skinny_miscCommandType);
892
893 static const value_string skinny_formatTypes[] = {
894   {1  , "sqcif (128x96)"},
895   {2  , "qcif (176x144)"},
896   {3  , "cif (352x288)"},
897   {4  , "4cif (704x576)"},
898   {5  , "16cif (1408x1152)"},
899   {6  , "custom_base"},
900   {0  , NULL}
901 };
902 static value_string_ext skinny_formatTypes_ext = VALUE_STRING_EXT_INIT(skinny_formatTypes);
903
904 static const value_string cast_callSecurityStatusTypes[] = {
905   {0   , "CallSecurityStatusUnknown"},
906   {1   , "CallSecurityStatusNotAuthenticated"},
907   {2   , "CallSecurityStatusAuthenticated"},
908   {0   , NULL}
909 };
910
911 #define StationMaxDirnumSize 24         /* max size of calling or called party dirnum  */
912 #define StationMaxNameSize 40           /* max size of calling party's name  */
913 #define StationMaxDisplayNameSize 44    /* max size of display name  */
914 #define StationMaxDeviceNameSize 16     /* max size of station's IP name  */
915 #define StationMaxSpeedDials 10         /* max number of speed dial numbers allowed on a station */
916 #define StationMaxVersionSize 16        /* max chars in version string  */
917 #define StationMaxButtonTemplateSize 42 /* max button template size */
918 #define StationMaxDisplayTextSize 33    /* max text size in DisplayText message */
919 #define StationMaxPorts 10              /* max number of ports on one device */
920 #define StationDateTemplateSize 6       /* date template in the form M/D/Y, D/M/Y, ... */
921 #define StationMaxServerNameSize 48     /* max size of server name */
922 #define StationMaxServers 5             /* max servers */
923 #define StationMaxDeviceDirnums 1024    /* max dir numbers per SCM device */
924 #define StationMaxDirnums 64            /* max dir numbers per physical station (also used in db request msg); */
925 #define StationMaxSoftKeyLabelSize 16   /* max label size in the message */
926 #define StationMaxSoftKeyDefinition 32       /* max number of soft key definition in the message */
927 #define StationMaxSoftKeySetDefinition 16    /* max number of soft key set definition in the message */
928 #define StationMaxSoftKeyIndex 16            /* max number of soft key indices in a station soft key set */
929 #define StationMaxDisplayPromptStatusSize 32 /* max status text size in the display status message */
930 #define StationMaxDisplayNotifySize 32       /* max prompt text size in the display prompt message */
931 #define StationMaxAlarmMessageSize 80        /* max size for an alarm message */
932 #define StationMaxUserDeviceDataSize 2000    /* max size of user data between application and device */
933 #define StationMaxConference 32
934 #define AppConferenceIDSize 32
935 #define AppDataSize 24
936 #define MAX_CUSTOM_PICTURES 6
937 #define MAX_LAYOUT_WITH_SAME_SERVICE 5
938 #define MAX_SERVICE_TYPE 4
939 #define DeviceMaxCapabilities 18         /* max capabilities allowed in Cap response message */
940 #define StationMaxCapabilities       DeviceMaxCapabilities
941 #define StationMaxVideoCapabilities 10
942 #define StationMaxDataCapabilities  5
943 #define MAX_LEVEL_PREFERENCE 4
944 #define MaxAnnouncementList 32
945 #define StationMaxMonitorParties 16      /* Max Monitor Bridge whisper matrix parties,  rm, M&R in Parche */
946 #define StationMaxServiceURLSize 256     /* max number of service URLs length */
947 #define MAX_PICTURE_FORMAT 5
948 #define MAX_REFERENCE_PICTURE 4
949
950 /* Initialize the protocol and registered fields */
951 static int proto_skinny          = -1;
952 static int hf_skinny_data_length = -1;
953 static int hf_skinny_reserved    = -1;
954 static int hf_skinny_messageid   = -1;
955 static int hf_skinny_deviceName  = -1;
956 static int hf_skinny_stationUserId = -1;
957 static int hf_skinny_stationInstance = -1;
958 static int hf_skinny_deviceType = -1;
959 static int hf_skinny_maxStreams = -1;
960 static int hf_skinny_stationIpPort = -1;
961 static int hf_skinny_stationKeypadButton = -1;
962 static int hf_skinny_calledParty = -1;
963 static int hf_skinny_stimulus = -1;
964 static int hf_skinny_stimulusInstance = -1;
965 static int hf_skinny_lineNumber = -1;
966 static int hf_skinny_speedDialNumber = -1;
967 static int hf_skinny_capCount = -1;
968 static int hf_skinny_payloadCapability = -1;
969 static int hf_skinny_maxFramesPerPacket = -1;
970 static int hf_skinny_alarmSeverity = -1;
971 static int hf_skinny_alarmParam1 = -1;
972 static int hf_skinny_alarmParam2 = -1;
973 static int hf_skinny_receptionStatus = -1;
974 static int hf_skinny_passThruPartyID = -1;
975 static int hf_skinny_ORCStatus = -1;
976 static int hf_skinny_ipAddress = -1;
977 static int hf_skinny_portNumber = -1;
978 static int hf_skinny_statsProcessingType = -1;
979 static int hf_skinny_callIdentifier = -1;
980 static int hf_skinny_packetsSent = -1;
981 static int hf_skinny_octetsSent  = -1;
982 static int hf_skinny_packetsRecv = -1;
983 static int hf_skinny_octetsRecv  = -1;
984 static int hf_skinny_packetsLost = -1;
985 static int hf_skinny_latency     = -1;
986 static int hf_skinny_jitter      = -1;
987 static int hf_skinny_directoryNumber = -1;
988 static int hf_skinny_softKeyEvent = -1;
989 static int hf_skinny_lineInstance = -1;
990 static int hf_skinny_keepAliveInterval = -1;
991 static int hf_skinny_dateTemplate = -1;
992 static int hf_skinny_secondaryKeepAliveInterval = -1;
993 static int hf_skinny_buttonOffset = -1;
994 static int hf_skinny_buttonCount = -1;
995 static int hf_skinny_totalButtonCount = -1;
996 static int hf_skinny_buttonInstanceNumber = -1;
997 static int hf_skinny_buttonDefinition = -1;
998 static int hf_skinny_softKeyOffset = -1;
999 static int hf_skinny_softKeyCount = -1;
1000 static int hf_skinny_totalSoftKeyCount = -1;
1001 static int hf_skinny_softKeyLabel = -1;
1002 static int hf_skinny_softKeySetOffset = -1;
1003 static int hf_skinny_softKeySetCount = -1;
1004 static int hf_skinny_totalSoftKeySetCount = -1;
1005 static int hf_skinny_softKeyTemplateIndex = -1;
1006 static int hf_skinny_softKeyInfoIndex = -1;
1007 static int hf_skinny_softKeySetDescription = -1;
1008 static int hf_skinny_softKeyMap = -1;
1009 static int hf_skinny_softKey0 = -1;
1010 static int hf_skinny_softKey1 = -1;
1011 static int hf_skinny_softKey2 = -1;
1012 static int hf_skinny_softKey3 = -1;
1013 static int hf_skinny_softKey4 = -1;
1014 static int hf_skinny_softKey5 = -1;
1015 static int hf_skinny_softKey6 = -1;
1016 static int hf_skinny_softKey7 = -1;
1017 static int hf_skinny_softKey8 = -1;
1018 static int hf_skinny_softKey9 = -1;
1019 static int hf_skinny_softKey10 = -1;
1020 static int hf_skinny_softKey11 = -1;
1021 static int hf_skinny_softKey12 = -1;
1022 static int hf_skinny_softKey13 = -1;
1023 static int hf_skinny_softKey14 = -1;
1024 static int hf_skinny_softKey15 = -1;
1025 static int hf_skinny_lampMode = -1;
1026 static int hf_skinny_messageTimeOutValue = -1;
1027 static int hf_skinny_displayMessage = -1;
1028 static int hf_skinny_lineDirNumber = -1;
1029 static int hf_skinny_lineFullyQualifiedDisplayName = -1;
1030 static int hf_skinny_lineDisplayName = -1;
1031 static int hf_skinny_speedDialDirNumber = -1;
1032 static int hf_skinny_speedDialDisplayName = -1;
1033 static int hf_skinny_dateYear = -1;
1034 static int hf_skinny_dateMonth = -1;
1035 static int hf_skinny_dayOfWeek = -1;
1036 static int hf_skinny_dateDay = -1;
1037 static int hf_skinny_dateHour = -1;
1038 static int hf_skinny_dateMinute = -1;
1039 static int hf_skinny_dateSeconds = -1;
1040 static int hf_skinny_dateMilliseconds = -1;
1041 static int hf_skinny_timeStamp = -1;
1042 static int hf_skinny_callState = -1;
1043 static int hf_skinny_deviceTone = -1;
1044 static int hf_skinny_callingPartyName = -1;
1045 static int hf_skinny_callingParty = -1;
1046 static int hf_skinny_calledPartyName = -1;
1047 static int hf_skinny_callType = -1;
1048 static int hf_skinny_originalCalledPartyName = -1;
1049 static int hf_skinny_originalCalledParty = -1;
1050 static int hf_skinny_ringType = -1;
1051 static int hf_skinny_ringMode = -1;
1052 static int hf_skinny_speakerMode = -1;
1053 static int hf_skinny_remoteIpAddr = -1;
1054 static int hf_skinny_remotePortNumber = -1;
1055 static int hf_skinny_millisecondPacketSize = -1;
1056 static int hf_skinny_precedenceValue = -1;
1057 static int hf_skinny_silenceSuppression = -1;
1058 static int hf_skinny_g723BitRate = -1;
1059 static int hf_skinny_conferenceID = -1;
1060 static int hf_skinny_deviceResetType = -1;
1061 static int hf_skinny_echoCancelType = -1;
1062 static int hf_skinny_deviceUnregisterStatus = -1;
1063 static int hf_skinny_hookFlashDetectMode = -1;
1064 static int hf_skinny_detectInterval = -1;
1065 static int hf_skinny_microphoneMode = -1;
1066 static int hf_skinny_headsetMode = -1;
1067 static int hf_skinny_unknown = -1;
1068 static int hf_skinny_data = -1;
1069 static int hf_skinny_activeForward = -1;
1070 static int hf_skinny_forwardAllActive = -1;
1071 static int hf_skinny_forwardBusyActive = -1;
1072 static int hf_skinny_forwardNoAnswerActive = -1;
1073 static int hf_skinny_forwardNumber = -1;
1074 static int hf_skinny_serverName = -1;
1075 static int hf_skinny_numberLines = -1;
1076 static int hf_skinny_numberSpeedDials = -1;
1077 static int hf_skinny_userName = -1;
1078 static int hf_skinny_sessionType = -1;
1079 static int hf_skinny_version = -1;
1080 static int hf_skinny_mediaEnunciationType = -1;
1081 static int hf_skinny_serverIdentifier = -1;
1082 static int hf_skinny_serverListenPort = -1;
1083 static int hf_skinny_serverIpAddress = -1;
1084 static int hf_skinny_multicastIpAddress = -1;
1085 static int hf_skinny_multicastPort = -1;
1086 static int hf_skinny_tokenRejWaitTime = -1;
1087 static int hf_skinny_numberOfInServiceStreams = -1;
1088 static int hf_skinny_maxStreamsPerConf = -1;
1089 static int hf_skinny_numberOfOutOfServiceStreams = -1;
1090 static int hf_skinny_applicationID = -1;
1091 static int hf_skinny_serviceNum = -1;
1092 static int hf_skinny_serviceURLIndex = -1;
1093 static int hf_skinny_featureIndex = -1;
1094 static int hf_skinny_createConfResults = -1;
1095 static int hf_skinny_modifyConfResults = -1;
1096 static int hf_skinny_deleteConfResults = -1;
1097 static int hf_skinny_addParticipantResults = -1;
1098 static int hf_skinny_passThruData = -1;
1099 static int hf_skinny_last = -1;
1100 static int hf_skinny_numberOfEntries = -1;
1101 static int hf_skinny_auditParticipantResults = -1;
1102 static int hf_skinny_participantEntry = -1;
1103 static int hf_skinny_resourceTypes = -1;
1104 static int hf_skinny_numberOfReservedParticipants = -1;
1105 static int hf_skinny_numberOfActiveParticipants = -1;
1106 static int hf_skinny_appID = -1;
1107 static int hf_skinny_appData = -1;
1108 static int hf_skinny_appConfID = -1;
1109 static int hf_skinny_sequenceFlag = -1;
1110 static int hf_skinny_displayPriority = -1;
1111 static int hf_skinny_appInstanceID = -1;
1112 static int hf_skinny_routingID = -1;
1113 static int hf_skinny_audioCapCount = -1;
1114 static int hf_skinny_videoCapCount = -1;
1115 static int hf_skinny_dataCapCount = -1;
1116 static int hf_skinny_RTPPayloadFormat = -1;
1117 static int hf_skinny_customPictureFormatCount = -1;
1118 static int hf_skinny_pictureWidth = -1;
1119 static int hf_skinny_pictureHeight = -1;
1120 static int hf_skinny_pixelAspectRatio = -1;
1121 static int hf_skinny_clockConversionCode = -1;
1122 static int hf_skinny_clockDivisor = -1;
1123 static int hf_skinny_activeStreamsOnRegistration = -1;
1124 static int hf_skinny_maxBW = -1;
1125 static int hf_skinny_serviceResourceCount = -1;
1126 static int hf_skinny_layoutCount = -1;
1127 static int hf_skinny_layout = -1;
1128 static int hf_skinny_maxConferences = -1;
1129 static int hf_skinny_activeConferenceOnRegistration = -1;
1130 static int hf_skinny_transmitOrReceive = -1;
1131 static int hf_skinny_levelPreferenceCount = -1;
1132 static int hf_skinny_transmitPreference = -1;
1133 static int hf_skinny_format = -1;
1134 static int hf_skinny_maxBitRate = -1;
1135 static int hf_skinny_minBitRate = -1;
1136 static int hf_skinny_MPI = -1;
1137 static int hf_skinny_serviceNumber = -1;
1138 static int hf_skinny_temporalSpatialTradeOffCapability = -1;
1139 static int hf_skinny_stillImageTransmission = -1;
1140 static int hf_skinny_h263_capability_bitfield = -1;
1141 static int hf_skinny_annexNandWFutureUse = -1;
1142 static int hf_skinny_modelNumber = -1;
1143 static int hf_skinny_bandwidth = -1;
1144 static int hf_skinny_protocolDependentData = -1;
1145 static int hf_skinny_priority = -1;
1146 static int hf_skinny_payloadDtmf = -1;
1147 static int hf_skinny_featureID = -1;
1148 static int hf_skinny_featureTextLabel = -1;
1149 static int hf_skinny_featureStatus = -1;
1150 static int hf_skinny_notify = -1;
1151 static int hf_skinny_endOfAnnAck = -1;
1152 static int hf_skinny_annPlayMode = -1;
1153 static int hf_skinny_annPlayStatus = -1;
1154 static int hf_skinny_locale = -1;
1155 static int hf_skinny_country = -1;
1156 static int hf_skinny_matrixConfPartyID = -1;
1157 static int hf_skinny_hearingConfPartyMask = -1;
1158 static int hf_skinny_serviceURL = -1;
1159 static int hf_skinny_serviceURLDisplayName = -1;
1160 static int hf_skinny_callSelectStat = -1;
1161 static int hf_skinny_isConferenceCreator = -1;
1162 static int hf_skinny_payload_rfc_number = -1;
1163 static int hf_skinny_payloadType = -1;
1164 static int hf_skinny_bitRate = -1;
1165 static int hf_skinny_pictureFormatCount = -1;
1166 static int hf_skinny_confServiceNum = -1;
1167 static int hf_skinny_DSCPValue = -1;
1168 static int hf_skinny_miscCommandType = -1;
1169 static int hf_skinny_temporalSpatialTradeOff = -1;
1170 static int hf_skinny_firstGOB = -1;
1171 static int hf_skinny_numberOfGOBs = -1;
1172 static int hf_skinny_firstMB = -1;
1173 static int hf_skinny_numberOfMBs = -1;
1174 static int hf_skinny_pictureNumber = -1;
1175 static int hf_skinny_longTermPictureIndex = -1;
1176 static int hf_skinny_recoveryReferencePictureCount = -1;
1177 static int hf_skinny_transactionID = -1;
1178 static int hf_cast_lastRedirectingPartyName = -1;
1179 static int hf_cast_lastRedirectingParty = -1;
1180 static int hf_cast_cgpnVoiceMailbox = -1;
1181 static int hf_cast_cdpnVoiceMailbox = -1;
1182 static int hf_cast_originalCdpnVoiceMailbox = -1;
1183 static int hf_cast_lastRedirectingVoiceMailbox = -1;
1184 static int hf_cast_originalCdpnRedirectReason = -1;
1185 static int hf_cast_lastRedirectingReason = -1;
1186 static int hf_cast_callInstance = -1;
1187 static int hf_cast_callSecurityStatus = -1;
1188
1189
1190 /* Initialize the subtree pointers */
1191 static gint ett_skinny          = -1;
1192 static gint ett_skinny_tree     = -1;
1193 static gint ett_skinny_softKeyMap = -1;
1194
1195 /* desegmentation of SCCP */
1196 static gboolean skinny_desegment = TRUE;
1197
1198 static dissector_handle_t rtp_handle=NULL;
1199
1200 /* tap register id */
1201 static int skinny_tap = -1;
1202
1203 /* skinny protocol tap info */
1204 #define MAX_SKINNY_MESSAGES_IN_PACKET 10
1205 static skinny_info_t pi_arr[MAX_SKINNY_MESSAGES_IN_PACKET];
1206 static int pi_current = 0;
1207 static skinny_info_t *si;
1208
1209 /* Get the length of a single SCCP PDU */
1210 static guint get_skinny_pdu_len(packet_info *pinfo _U_, tvbuff_t *tvb, int offset)
1211 {
1212   guint32 hdr_data_length;
1213
1214   /*
1215    * Get the length of the SCCP packet.
1216    */
1217   hdr_data_length = tvb_get_letohl(tvb, offset);
1218
1219   /*
1220    * That length doesn't include the length of the header itself;
1221    * add that in.
1222    */
1223   return hdr_data_length + 8;
1224 }
1225
1226 /* Dissect a single SCCP PDU */
1227 static void
1228 dissect_skinny_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
1229 {
1230   int offset = 0;
1231   gboolean is_video = FALSE; /* FIX ME: need to indicate video or not */
1232
1233   /* Header fields */
1234   guint32 hdr_data_length;
1235   guint32 hdr_reserved;
1236   guint32 data_messageid;
1237   /*  guint32 data_size; */
1238
1239   guint i = 0;
1240   guint t = 0;
1241   int j = 0;
1242   guint count;
1243   int val;
1244
1245   guint32 capCount;
1246   guint32 softKeyCount;
1247   guint32 softKeySetCount;
1248   guint16 validKeyMask;
1249
1250   /* Set up structures we will need to add the protocol subtree and manage it */
1251   proto_item *ti;
1252   proto_tree *skinny_tree = NULL;
1253   proto_item *ti_sub;
1254   proto_tree *skinny_sub_tree;
1255   proto_tree *skinny_sub_tree_sav;
1256   proto_tree *skinny_sub_tree_sav_sav;
1257
1258   proto_item *skm = NULL;
1259   proto_item *skm_tree = NULL;
1260
1261   hdr_data_length = tvb_get_letohl(tvb, offset);
1262   hdr_reserved    = tvb_get_letohl(tvb, offset+4);
1263   data_messageid  = tvb_get_letohl(tvb, offset+8);
1264
1265   /* Initialise stat info for passing to tap */
1266   pi_current++;
1267   if (pi_current == MAX_SKINNY_MESSAGES_IN_PACKET)
1268   {
1269         /* Overwrite info in first struct if run out of space... */
1270         pi_current = 0;
1271   }
1272   si = &pi_arr[pi_current];
1273   si->messId = data_messageid;
1274   si->messageName = val_to_str_ext(data_messageid, &message_id_ext, "0x%08X (Unknown)");
1275   si->callId = 0;
1276   si->lineId = 0;
1277   si->passThruId = 0;
1278   si->callState = 0;
1279   g_free(si->callingParty);
1280   si->callingParty = NULL;
1281   g_free(si->calledParty);
1282   si->calledParty = NULL;
1283
1284   /* In the interest of speed, if "tree" is NULL, don't do any work not
1285    * necessary to generate protocol tree items. */
1286   if (tree) {
1287     ti = proto_tree_add_item(tree, proto_skinny, tvb, offset, hdr_data_length+8, FALSE);
1288     skinny_tree = proto_item_add_subtree(ti, ett_skinny);
1289     proto_tree_add_uint(skinny_tree, hf_skinny_data_length, tvb, offset, 4, hdr_data_length);
1290     proto_tree_add_uint(skinny_tree, hf_skinny_reserved, tvb, offset+4, 4, hdr_reserved);
1291   }
1292
1293   if (check_col(pinfo->cinfo, COL_INFO)) {
1294     col_add_fstr(pinfo->cinfo, COL_INFO,"%s ", si->messageName);
1295         col_set_fence(pinfo->cinfo, COL_INFO);
1296   }
1297
1298   if (tree) {
1299     proto_tree_add_uint(skinny_tree, hf_skinny_messageid, tvb,offset+8, 4, data_messageid );
1300   }
1301
1302   if (tree) {
1303     switch(data_messageid) {
1304
1305     /* cases that do not need to be decoded */
1306     case 0x0 :    /* keepAlive */
1307       break;
1308
1309     case 0x8 :    /* hookFlash */
1310       break;
1311
1312     case 0xc :    /* configStateReqMessage */
1313       break;
1314
1315     case 0xd :    /* timeDateReqMessage */
1316       break;
1317
1318     case 0xe :    /* buttoneTemplateReqMessage */
1319       break;
1320
1321     case 0xf :    /* stationVersionReqMessage */
1322       break;
1323
1324     case 0x12 :   /* stationServerReqMessage */
1325       break;
1326
1327     case 0x25 :   /* softKeySetReqMessage */
1328       break;
1329
1330     case 0x27 :   /* unregisterMessage */
1331       break;
1332
1333     case 0x28 :   /* softKeyTemplateRequest */
1334       break;
1335
1336     case 0x9a :   /* clearDisplay */
1337       break;
1338
1339     case 0x9b :   /* capabilitiesReqMessage */
1340       break;
1341
1342     case 0x100 :    /* keepAliveAck */
1343       break;
1344
1345     case 0x115 :  /* clearNotifyDisplay */
1346       break;
1347
1348     case 0x117 :  /* deactivateCallPlane */
1349       break;
1350
1351     case 0x11a :  /* registerTokenAck */
1352       break;
1353
1354     case 0x13C : /* AuditConferenceReqMessage */
1355       break;
1356
1357     /*
1358      ** cases that need decode
1359      **
1360      */
1361
1362     case 0x1 :   /* register message */
1363       proto_tree_add_item(skinny_tree, hf_skinny_deviceName, tvb, offset+12, StationMaxDeviceNameSize, TRUE);
1364       proto_tree_add_item(skinny_tree, hf_skinny_stationUserId, tvb, offset+28, 4, TRUE);
1365       proto_tree_add_item(skinny_tree, hf_skinny_stationInstance, tvb, offset+32, 4, TRUE);
1366       proto_tree_add_item(skinny_tree, hf_skinny_ipAddress, tvb, offset+36, 4, FALSE);
1367       proto_tree_add_item(skinny_tree, hf_skinny_deviceType, tvb, offset+40, 4, TRUE);
1368       proto_tree_add_item(skinny_tree, hf_skinny_maxStreams, tvb, offset+44, 4, TRUE);
1369       break;
1370
1371     case 0x2 :  /* ipPortMessage */
1372       proto_tree_add_item(skinny_tree, hf_skinny_stationIpPort, tvb, offset+12, 2, FALSE);
1373       break;
1374
1375     case 0x3 :  /* keyPadButtonMessage */
1376       proto_tree_add_item(skinny_tree, hf_skinny_stationKeypadButton, tvb, offset+12, 4, TRUE);
1377       if (hdr_data_length > 8) {
1378                   proto_tree_add_item(skinny_tree, hf_skinny_lineInstance, tvb, offset+16, 4, TRUE);
1379                   proto_tree_add_item(skinny_tree, hf_skinny_callIdentifier, tvb, offset+20, 4, TRUE);
1380                   si->lineId = tvb_get_letohl(tvb, offset+16);
1381                   si->callId = tvb_get_letohl(tvb, offset+20);
1382       }
1383       break;
1384
1385     case 0x4 :  /* stationEnblocCallMessage -- This decode NOT verified*/
1386       proto_tree_add_item(skinny_tree, hf_skinny_calledParty, tvb, offset+12, StationMaxDirnumSize, TRUE);
1387       break;
1388
1389     case 0x5 : /* stationStimulusMessage */
1390       proto_tree_add_item(skinny_tree, hf_skinny_stimulus, tvb, offset+12, 4, TRUE);
1391       proto_tree_add_item(skinny_tree, hf_skinny_stimulusInstance, tvb, offset+16, 4, TRUE);
1392       if (hdr_data_length > 12) {
1393                   proto_tree_add_item(skinny_tree, hf_skinny_callIdentifier, tvb, offset+20, 4, TRUE);
1394               si->callId = tvb_get_letohl(tvb, offset+20);
1395       }
1396       break;
1397
1398     case 0x6 :    /* offHook */
1399       if (hdr_data_length > 4) {
1400                   proto_tree_add_item(skinny_tree, hf_skinny_lineInstance, tvb, offset+12, 4, TRUE);
1401                   proto_tree_add_item(skinny_tree, hf_skinny_callIdentifier, tvb, offset+16, 4, TRUE);
1402                   si->lineId = tvb_get_letohl(tvb, offset+12);
1403                   si->callId = tvb_get_letohl(tvb, offset+16);
1404       }
1405       break;
1406
1407     case 0x7 :    /* onHook    */
1408       if (hdr_data_length > 4) {
1409                   proto_tree_add_item(skinny_tree, hf_skinny_lineInstance, tvb, offset+12, 4, TRUE);
1410                   proto_tree_add_item(skinny_tree, hf_skinny_callIdentifier, tvb, offset+16, 4, TRUE);
1411                   si->lineId = tvb_get_letohl(tvb, offset+12);
1412                   si->callId = tvb_get_letohl(tvb, offset+16);
1413       }
1414       break;
1415
1416     case 0x9  : /* stationForwardStatReqMessage */
1417       proto_tree_add_item(skinny_tree, hf_skinny_lineNumber, tvb, offset+12, 4, TRUE);
1418       break;
1419
1420     case 0xa :  /* speedDialStatReqMessage */
1421       proto_tree_add_item(skinny_tree, hf_skinny_speedDialNumber, tvb, offset+12, 4, TRUE);
1422       break;
1423
1424     case 0xb :  /* LineStatReqMessage */
1425       proto_tree_add_item(skinny_tree, hf_skinny_lineNumber, tvb, offset+12, 4, TRUE);
1426       break;
1427
1428     case 0x10 :  /* capabilitiesResMessage  - VERIFIED AS IS*/
1429       /* FIXME -- we are only going to decode the first 7 protocol fields for now cuz that's all it sent me
1430        * on the phone i was working with. I should probably skip the struct decode and use a more piece
1431        * type method using the capCount definition to control the decode loop
1432        *
1433        * basically changing StationMaxCapabilities definition
1434        *
1435        */
1436       capCount = tvb_get_letohl(tvb, offset+12);
1437       proto_tree_add_uint(skinny_tree, hf_skinny_capCount, tvb, offset+12, 4, capCount);
1438       for (i = 0; i < capCount; i++) {
1439               proto_tree_add_item(skinny_tree, hf_skinny_payloadCapability, tvb, offset+(i*16)+16, 4, TRUE);
1440               proto_tree_add_item(skinny_tree, hf_skinny_maxFramesPerPacket, tvb, offset+(i*16)+20, 2, TRUE);
1441               /* FIXME -- decode the union under here as required, is always 0 on my equipment */
1442       }
1443       break;
1444
1445     case 0x11 : /* mediaPortList */
1446       break;
1447
1448     case 0x20 :   /* stationAlarmMessage */
1449       proto_tree_add_item(skinny_tree, hf_skinny_alarmSeverity, tvb, offset+12, 4, TRUE);
1450       proto_tree_add_item(skinny_tree, hf_skinny_displayMessage, tvb, offset+16, StationMaxAlarmMessageSize, TRUE);
1451       proto_tree_add_item(skinny_tree, hf_skinny_alarmParam1, tvb, offset+96, 4, TRUE);
1452       proto_tree_add_item(skinny_tree, hf_skinny_alarmParam2, tvb, offset+100, 4, FALSE);
1453       break;
1454
1455     case 0x21 : /* stationMulticastMediaReceptionAck - This decode NOT verified*/
1456       proto_tree_add_item(skinny_tree, hf_skinny_receptionStatus, tvb, offset+12, 4, TRUE);
1457       proto_tree_add_item(skinny_tree, hf_skinny_passThruPartyID, tvb, offset+16, 4, TRUE);
1458       si->passThruId = tvb_get_letohl(tvb, offset+16);
1459       break;
1460
1461     case 0x22 : /* stationOpenReceiveChannelAck */
1462       proto_tree_add_item(skinny_tree, hf_skinny_ORCStatus, tvb, offset+12, 4, TRUE);
1463       proto_tree_add_item(skinny_tree, hf_skinny_ipAddress, tvb, offset+16, 4, FALSE);
1464       proto_tree_add_item(skinny_tree, hf_skinny_portNumber, tvb, offset+20, 4, TRUE);
1465       proto_tree_add_item(skinny_tree, hf_skinny_passThruPartyID, tvb, offset+24, 4, TRUE);
1466       if((!pinfo->fd->flags.visited) && rtp_handle){
1467             address src_addr;
1468             guint32 ipv4_address;
1469
1470             src_addr.type=AT_IPv4;
1471             src_addr.len=4;
1472             src_addr.data=(guint8 *)&ipv4_address;
1473             ipv4_address = tvb_get_ipv4(tvb, offset+16);
1474             rtp_add_address(pinfo, &src_addr, tvb_get_letohl(tvb, offset+20), 0, "Skinny", pinfo->fd->num, is_video, NULL);
1475       }
1476       si->passThruId = tvb_get_letohl(tvb, offset+24);
1477       break;
1478
1479     case 0x23    :  /* stationConnectionStatisticsRes */
1480       proto_tree_add_item(skinny_tree, hf_skinny_directoryNumber, tvb, offset+12, StationMaxDirnumSize, TRUE);
1481       proto_tree_add_item(skinny_tree, hf_skinny_callIdentifier, tvb, offset+36, 4, TRUE);
1482       proto_tree_add_item(skinny_tree, hf_skinny_statsProcessingType, tvb, offset+40, 4, TRUE);
1483       proto_tree_add_item(skinny_tree, hf_skinny_packetsSent, tvb, offset+44, 4, TRUE);
1484       proto_tree_add_item(skinny_tree, hf_skinny_octetsSent, tvb, offset+48, 4, TRUE);
1485       proto_tree_add_item(skinny_tree, hf_skinny_packetsRecv, tvb, offset+52, 4, TRUE);
1486       proto_tree_add_item(skinny_tree, hf_skinny_octetsRecv, tvb, offset+56, 4, TRUE);
1487       proto_tree_add_item(skinny_tree, hf_skinny_packetsLost, tvb, offset+60, 4, TRUE);
1488       proto_tree_add_item(skinny_tree, hf_skinny_jitter, tvb, offset+64, 4, TRUE);
1489       proto_tree_add_item(skinny_tree, hf_skinny_latency, tvb, offset+68, 4, TRUE);
1490       si->callId = tvb_get_letohl(tvb, offset+36);
1491       break;
1492
1493     case 0x24 : /* offHookWithCgpn */
1494       proto_tree_add_item(skinny_tree, hf_skinny_calledParty, tvb, offset+12,StationMaxDirnumSize, TRUE);
1495       break;
1496
1497     case 0x26 :  /* softKeyEventMessage */
1498       proto_tree_add_item(skinny_tree, hf_skinny_softKeyEvent, tvb, offset+12, 4, TRUE);
1499       proto_tree_add_item(skinny_tree, hf_skinny_lineInstance, tvb, offset+16, 4, TRUE);
1500       proto_tree_add_item(skinny_tree, hf_skinny_callIdentifier, tvb, offset+20, 4, TRUE);
1501       si->lineId = tvb_get_letohl(tvb, offset+16);
1502       si->callId = tvb_get_letohl(tvb, offset+20);
1503       break;
1504
1505     case 0x29 : /* registerTokenREq */
1506       proto_tree_add_item(skinny_tree, hf_skinny_deviceName, tvb, offset+12, 4, TRUE);
1507       i = offset+12+StationMaxDeviceNameSize;
1508       proto_tree_add_item(skinny_tree, hf_skinny_stationUserId, tvb, i, 4, TRUE);
1509       proto_tree_add_item(skinny_tree, hf_skinny_stationInstance, tvb, i+4, 4, TRUE);
1510       proto_tree_add_item(skinny_tree, hf_skinny_ipAddress, tvb, i+8, 4, FALSE);
1511       proto_tree_add_item(skinny_tree, hf_skinny_deviceType, tvb, i+12, 4, TRUE);
1512       break;
1513
1514     case 0x2A : /* MediaTransmissionFailure */
1515       proto_tree_add_item(skinny_tree, hf_skinny_conferenceID, tvb, offset+12, 4, TRUE);
1516       proto_tree_add_item(skinny_tree, hf_skinny_passThruPartyID, tvb, offset+16, 4, TRUE);
1517       proto_tree_add_item(skinny_tree, hf_skinny_ipAddress, tvb, offset+20, 4, FALSE);
1518       proto_tree_add_item(skinny_tree, hf_skinny_portNumber, tvb, offset+24, 4, TRUE);
1519       proto_tree_add_item(skinny_tree, hf_skinny_callIdentifier, tvb, offset+28, 4, TRUE);
1520       si->passThruId = tvb_get_letohl(tvb, offset+16);
1521       si->callId = tvb_get_letohl(tvb, offset+28);
1522       break;
1523
1524     case 0x2B : /* HeadsetStatusMessage */
1525       proto_tree_add_item(skinny_tree, hf_skinny_headsetMode, tvb, offset+12, 4, TRUE);
1526       break;
1527
1528     case 0x2C : /* MediaResourceNotification */
1529       proto_tree_add_item(skinny_tree, hf_skinny_deviceType, tvb, offset+12, 4, TRUE);
1530       proto_tree_add_item(skinny_tree, hf_skinny_numberOfInServiceStreams, tvb, offset+16, 4, TRUE);
1531       proto_tree_add_item(skinny_tree, hf_skinny_maxStreamsPerConf, tvb, offset+20, 4, TRUE);
1532       proto_tree_add_item(skinny_tree, hf_skinny_numberOfOutOfServiceStreams, tvb, offset+24, 4, TRUE);
1533       break;
1534
1535     case 0x2D : /* RegisterAvailableLinesMessage */
1536       proto_tree_add_item(skinny_tree, hf_skinny_numberLines, tvb, offset+12, 4, TRUE);
1537       break;
1538
1539     case 0x2E : /* DeviceToUserDataMessage */
1540       proto_tree_add_item(skinny_tree, hf_skinny_applicationID, tvb, offset+12, 4, TRUE);
1541       proto_tree_add_item(skinny_tree, hf_skinny_lineInstance, tvb, offset+16, 4, TRUE);
1542       proto_tree_add_item(skinny_tree, hf_skinny_callIdentifier, tvb, offset+20, 4, TRUE);
1543       proto_tree_add_item(skinny_tree, hf_skinny_transactionID, tvb, offset+24, 4, TRUE);
1544       proto_tree_add_item(skinny_tree, hf_skinny_data_length, tvb, offset+28, 4, TRUE);
1545       count = tvb_get_letohl( tvb, offset+28);
1546       proto_tree_add_uint(skinny_tree, hf_skinny_data, tvb, offset+30, 1, count);
1547       si->lineId = tvb_get_letohl(tvb, offset+16);
1548       si->callId = tvb_get_letohl(tvb, offset+20);
1549       break;
1550
1551     case 0x2F : /* DeviceToUserDataResponseMessage */
1552       proto_tree_add_item(skinny_tree, hf_skinny_applicationID, tvb, offset+12, 4, TRUE);
1553       proto_tree_add_item(skinny_tree, hf_skinny_lineInstance, tvb, offset+16, 4, TRUE);
1554       proto_tree_add_item(skinny_tree, hf_skinny_callIdentifier, tvb, offset+20, 4, TRUE);
1555       proto_tree_add_item(skinny_tree, hf_skinny_transactionID, tvb, offset+24, 4, TRUE);
1556       proto_tree_add_item(skinny_tree, hf_skinny_data_length, tvb, offset+28, 4, TRUE);
1557       count = tvb_get_letohl( tvb, offset+28);
1558       proto_tree_add_uint(skinny_tree, hf_skinny_data, tvb, offset+30, 1, count);
1559       si->lineId = tvb_get_letohl(tvb, offset+12);
1560       si->callId = tvb_get_letohl(tvb, offset+16);
1561       break;
1562
1563     case 0x30 : /* UpdateCapabilitiesMessage */
1564       /* to do - this message is very large and will span multiple packets, it would be nice to someday */
1565       /* find out a way to join the next packet and get the complete message to decode */
1566       proto_tree_add_item(skinny_tree, hf_skinny_audioCapCount, tvb, offset+12, 4, TRUE);
1567       proto_tree_add_item(skinny_tree, hf_skinny_videoCapCount, tvb, offset+16, 4, TRUE);
1568       proto_tree_add_item(skinny_tree, hf_skinny_dataCapCount, tvb, offset+20, 4, TRUE);
1569       proto_tree_add_item(skinny_tree, hf_skinny_RTPPayloadFormat, tvb, offset+24, 4, TRUE);
1570       proto_tree_add_item(skinny_tree, hf_skinny_customPictureFormatCount, tvb, offset+28, 4, TRUE);
1571       count = offset+32;
1572       for ( i = 0; i < MAX_CUSTOM_PICTURES; i++ ) {
1573         ti_sub = proto_tree_add_text(skinny_tree, tvb, offset, 20, "customPictureFormat[%d]", i);
1574         skinny_sub_tree = proto_item_add_subtree(ti_sub, ett_skinny_tree);
1575         proto_tree_add_item(skinny_sub_tree, hf_skinny_pictureWidth, tvb, count, 4, TRUE);
1576         count+= 4;
1577         proto_tree_add_item(skinny_sub_tree, hf_skinny_pictureHeight, tvb, count, 4, TRUE);
1578         count+= 4;
1579         proto_tree_add_item(skinny_sub_tree, hf_skinny_pixelAspectRatio, tvb, count, 4, TRUE);
1580         count+= 4;
1581         proto_tree_add_item(skinny_sub_tree, hf_skinny_clockConversionCode, tvb, count, 4, TRUE);
1582         count+= 4;
1583         proto_tree_add_item(skinny_sub_tree, hf_skinny_clockDivisor, tvb, count, 4, TRUE);
1584         count+= 4;
1585       }
1586       ti_sub = proto_tree_add_text(skinny_tree, tvb, offset, 8, "confResources");
1587       skinny_sub_tree = proto_item_add_subtree(ti_sub, ett_skinny_tree);
1588       proto_tree_add_item(skinny_sub_tree, hf_skinny_activeStreamsOnRegistration, tvb, count, 4, TRUE);
1589       count+= 4;
1590       proto_tree_add_item(skinny_sub_tree, hf_skinny_maxBW, tvb, count, 4, TRUE);
1591       count+= 4;
1592       proto_tree_add_item(skinny_sub_tree, hf_skinny_serviceResourceCount, tvb, count, 4, TRUE);
1593       count+= 4;
1594       skinny_sub_tree_sav = skinny_sub_tree;
1595       for ( i = 0; i < MAX_SERVICE_TYPE; i++ ) {
1596         ti_sub = proto_tree_add_text(skinny_sub_tree_sav, tvb, offset, 20, "serviceResource[%d]", i);
1597         skinny_sub_tree = proto_item_add_subtree(ti_sub, ett_skinny_tree);
1598         proto_tree_add_item(skinny_sub_tree, hf_skinny_layoutCount, tvb, count, 4, TRUE);
1599         count+= 4;
1600         skinny_sub_tree_sav_sav = skinny_sub_tree_sav;
1601         for ( t = 0; t < MAX_LAYOUT_WITH_SAME_SERVICE; t++ ) {
1602           ti_sub = proto_tree_add_text(skinny_sub_tree_sav, tvb, offset, 20, "layouts[%d]", t);
1603           skinny_sub_tree = proto_item_add_subtree(ti_sub, ett_skinny_tree);
1604           proto_tree_add_item(skinny_sub_tree, hf_skinny_layout, tvb, count, 4, TRUE);
1605           count+= 4;
1606         }
1607         skinny_sub_tree = skinny_sub_tree_sav_sav;
1608         proto_tree_add_item(skinny_sub_tree, hf_skinny_serviceNum, tvb, count, 4, TRUE);
1609         count+= 4;
1610         proto_tree_add_item(skinny_sub_tree, hf_skinny_maxStreams, tvb, count, 4, TRUE);
1611         count+= 4;
1612         proto_tree_add_item(skinny_sub_tree, hf_skinny_maxConferences, tvb, count, 4, TRUE);
1613         count+= 4;
1614         proto_tree_add_item(skinny_sub_tree, hf_skinny_activeConferenceOnRegistration, tvb, count, 4, TRUE);
1615         count+= 4;
1616       }
1617       for ( i = 0; i < StationMaxCapabilities; i++ ) {
1618         ti_sub = proto_tree_add_text(skinny_tree, tvb, offset, 20, "audiocaps[%d]", i);
1619         skinny_sub_tree = proto_item_add_subtree(ti_sub, ett_skinny_tree);
1620         proto_tree_add_item(skinny_sub_tree, hf_skinny_payloadCapability, tvb, count, 4, TRUE);
1621         count+= 4;
1622         proto_tree_add_item(skinny_sub_tree, hf_skinny_maxFramesPerPacket, tvb, count, 2, TRUE);
1623         count+= 4;
1624         /* skip past union it is only for G723 */
1625         count+= 8;
1626       }
1627       for ( i = 0; i < StationMaxVideoCapabilities; i++ ) {
1628         ti_sub = proto_tree_add_text(skinny_tree, tvb, offset, 20, "vidCaps[%d]", i);
1629         skinny_sub_tree = proto_item_add_subtree(ti_sub, ett_skinny_tree);
1630         proto_tree_add_item(skinny_sub_tree, hf_skinny_payloadCapability, tvb, count, 4, TRUE);
1631         count+= 4;
1632         proto_tree_add_item(skinny_sub_tree, hf_skinny_transmitOrReceive, tvb, count, 4, TRUE);
1633         count+= 4;
1634         proto_tree_add_item(skinny_sub_tree, hf_skinny_levelPreferenceCount, tvb, count, 4, TRUE);
1635         count+= 4;
1636         skinny_sub_tree_sav = skinny_sub_tree;
1637         for ( t = 0; t < MAX_LEVEL_PREFERENCE; t++ ) {
1638           ti_sub = proto_tree_add_text(skinny_sub_tree_sav, tvb, offset, 20, "levelPreference[%d]", t);
1639           skinny_sub_tree = proto_item_add_subtree(ti_sub, ett_skinny_tree);
1640           proto_tree_add_item(skinny_sub_tree, hf_skinny_transmitPreference, tvb, count, 4, TRUE);
1641           count+= 4;
1642           proto_tree_add_item(skinny_sub_tree, hf_skinny_format, tvb, count, 4, TRUE);
1643           count+= 4;
1644           proto_tree_add_item(skinny_sub_tree, hf_skinny_maxBitRate, tvb, count, 4, TRUE);
1645           count+= 4;
1646           proto_tree_add_item(skinny_sub_tree, hf_skinny_minBitRate, tvb, count, 4, TRUE);
1647           count+= 4;
1648           proto_tree_add_item(skinny_sub_tree, hf_skinny_MPI, tvb, count, 4, TRUE);
1649           count+= 4;
1650           proto_tree_add_item(skinny_sub_tree, hf_skinny_serviceNumber, tvb, count, 4, TRUE);
1651           count+= 4;
1652         }
1653         val = count;
1654
1655         /* H.261 */
1656         ti_sub = proto_tree_add_text(skinny_sub_tree_sav, tvb, offset, 8, "h261VideoCapability");
1657         skinny_sub_tree = proto_item_add_subtree(ti_sub, ett_skinny_tree);
1658         proto_tree_add_item(skinny_sub_tree, hf_skinny_temporalSpatialTradeOffCapability, tvb, count, 4, TRUE);
1659         count+= 4;
1660         proto_tree_add_item(skinny_sub_tree, hf_skinny_stillImageTransmission, tvb, count, 4, TRUE);
1661         count+= 4;
1662
1663         /* H.263 */
1664         count = val;
1665         ti_sub = proto_tree_add_text(skinny_sub_tree_sav, tvb, offset, 8, "h263VideoCapability");
1666         skinny_sub_tree = proto_item_add_subtree(ti_sub, ett_skinny_tree);
1667         proto_tree_add_item(skinny_sub_tree, hf_skinny_h263_capability_bitfield, tvb, count, 4, TRUE);
1668         count+= 4;
1669         proto_tree_add_item(skinny_sub_tree, hf_skinny_annexNandWFutureUse, tvb, count, 4, TRUE);
1670         count+= 4;
1671
1672         /* Video */
1673         count = val;
1674         ti_sub = proto_tree_add_text(skinny_sub_tree_sav, tvb, offset, 8, "vieoVideoCapability");
1675         skinny_sub_tree = proto_item_add_subtree(ti_sub, ett_skinny_tree);
1676         proto_tree_add_item(skinny_sub_tree, hf_skinny_modelNumber, tvb, count, 4, TRUE);
1677         count+= 4;
1678         proto_tree_add_item(skinny_sub_tree, hf_skinny_bandwidth, tvb, count, 4, TRUE);
1679         count+= 4;
1680       }
1681       for ( i = 0; i < StationMaxDataCapabilities; i++ ) {
1682         ti_sub = proto_tree_add_text(skinny_tree, tvb, offset, 20, "dataCaps[%d]", i);
1683         skinny_sub_tree = proto_item_add_subtree(ti_sub, ett_skinny_tree);
1684         proto_tree_add_item(skinny_sub_tree, hf_skinny_payloadCapability, tvb, count, 4, TRUE);
1685         count+= 4;
1686         proto_tree_add_item(skinny_sub_tree, hf_skinny_transmitOrReceive, tvb, count, 4, TRUE);
1687         count+= 4;
1688         proto_tree_add_item(skinny_sub_tree, hf_skinny_protocolDependentData, tvb, count, 4, TRUE);
1689         count+= 4;
1690         proto_tree_add_item(skinny_sub_tree, hf_skinny_maxBitRate, tvb, count, 4, TRUE);
1691         count+= 4;
1692       }
1693       break;
1694
1695     case 0x31 : /* OpenMultiMediaReceiveChannelAckMessage */
1696       proto_tree_add_item(skinny_tree, hf_skinny_ORCStatus, tvb, offset+12, 4, TRUE);
1697       proto_tree_add_item(skinny_tree, hf_skinny_ipAddress, tvb, offset+16, 4, FALSE);
1698       proto_tree_add_item(skinny_tree, hf_skinny_portNumber, tvb, offset+20, 4, TRUE);
1699       proto_tree_add_item(skinny_tree, hf_skinny_passThruPartyID, tvb, offset+24, 4, TRUE);
1700       proto_tree_add_item(skinny_tree, hf_skinny_callIdentifier, tvb, offset+28, 4, TRUE);
1701       si->passThruId = tvb_get_letohl(tvb, offset+24);
1702       si->callId = tvb_get_letohl(tvb, offset+28);
1703       break;
1704
1705     case 0x32 : /* ClearConferenceMessage */
1706       proto_tree_add_item(skinny_tree, hf_skinny_conferenceID, tvb, offset+12, 4, TRUE);
1707       proto_tree_add_item(skinny_tree, hf_skinny_serviceNum, tvb, offset+16, 4, TRUE);
1708       break;
1709
1710     case 0x33 : /* ServiceURLStatReqMessage */
1711       proto_tree_add_item(skinny_tree, hf_skinny_serviceURLIndex, tvb, offset+12, 4, TRUE);
1712       break;
1713
1714     case 0x34 : /* FeatureStatReqMessage */
1715       proto_tree_add_item(skinny_tree, hf_skinny_featureIndex, tvb, offset+12, 4, TRUE);
1716       break;
1717
1718     case 0x35 : /* CreateConferenceResMessage */
1719       proto_tree_add_item(skinny_tree, hf_skinny_conferenceID, tvb, offset+12, 4, TRUE);
1720       proto_tree_add_item(skinny_tree, hf_skinny_createConfResults, tvb, offset+16, 4, TRUE);
1721       proto_tree_add_item(skinny_tree, hf_skinny_data_length, tvb, offset+20, 4, TRUE);
1722       count = tvb_get_letohl( tvb, offset+20);
1723       proto_tree_add_uint(skinny_tree, hf_skinny_passThruData, tvb, offset+24, 1, count);
1724       break;
1725
1726     case 0x36 : /* DeleteConferenceResMessage */
1727       proto_tree_add_item(skinny_tree, hf_skinny_conferenceID, tvb, offset+12, 4, TRUE);
1728       proto_tree_add_item(skinny_tree, hf_skinny_deleteConfResults, tvb, offset+16, 4, TRUE);
1729       break;
1730
1731     case 0x37 : /* ModifyConferenceResMessage */
1732       proto_tree_add_item(skinny_tree, hf_skinny_conferenceID, tvb, offset+12, 4, TRUE);
1733       proto_tree_add_item(skinny_tree, hf_skinny_createConfResults, tvb, offset+16, 4, TRUE);
1734       proto_tree_add_item(skinny_tree, hf_skinny_data_length, tvb, offset+20, 4, TRUE);
1735       count = tvb_get_letohl( tvb, offset+20);
1736       proto_tree_add_uint(skinny_tree, hf_skinny_passThruData, tvb, offset+24, 1, count);
1737       break;
1738
1739     case 0x38 : /* AddParticipantResMessage */
1740       proto_tree_add_item(skinny_tree, hf_skinny_conferenceID, tvb, offset+12, 4, TRUE);
1741       proto_tree_add_item(skinny_tree, hf_skinny_callIdentifier, tvb, offset+16, 4, TRUE);
1742       proto_tree_add_item(skinny_tree, hf_skinny_addParticipantResults, tvb, offset+20, 4, TRUE);
1743       si->callId = tvb_get_letohl(tvb, offset+16);
1744       break;
1745
1746     case 0x39 : /* AuditConferenceResMessage */
1747       proto_tree_add_item(skinny_tree, hf_skinny_last, tvb, offset+12, 4, TRUE);
1748       proto_tree_add_item(skinny_tree, hf_skinny_numberOfEntries, tvb, offset+16, 4, TRUE);
1749       count = offset+20;
1750       for ( i = 0; i < StationMaxConference; i++ ) {
1751         proto_tree_add_item(skinny_tree, hf_skinny_conferenceID, tvb, count, 4, TRUE);
1752         count += 4;
1753         proto_tree_add_item(skinny_tree, hf_skinny_resourceTypes, tvb, count, 4, TRUE);
1754         count += 4;
1755         proto_tree_add_item(skinny_tree, hf_skinny_numberOfReservedParticipants, tvb, count, 4, TRUE);
1756         count += 4;
1757         proto_tree_add_item(skinny_tree, hf_skinny_numberOfActiveParticipants, tvb, count, 4, TRUE);
1758         count += 4;
1759         proto_tree_add_item(skinny_tree, hf_skinny_appID, tvb, count, 4, TRUE);
1760         count += 4;
1761         proto_tree_add_uint(skinny_tree, hf_skinny_appConfID, tvb, count, 1, AppConferenceIDSize);
1762         count += AppConferenceIDSize;
1763         proto_tree_add_uint(skinny_tree, hf_skinny_appData, tvb, count, 1, AppDataSize);
1764         count += AppDataSize;
1765       }
1766       break;
1767
1768     case 0x40 : /* AuditParticipantResMessage */
1769       proto_tree_add_item(skinny_tree, hf_skinny_auditParticipantResults, tvb, offset+12, 4, TRUE);
1770       proto_tree_add_item(skinny_tree, hf_skinny_last, tvb, offset+16, 4, TRUE);
1771       proto_tree_add_item(skinny_tree, hf_skinny_conferenceID, tvb, offset+20, 4, TRUE);
1772       proto_tree_add_item(skinny_tree, hf_skinny_numberOfEntries, tvb, offset+24, 4, TRUE);
1773       count = tvb_get_letohl( tvb, offset+24);
1774       for ( i = 0; i < count; i++ ) {
1775         proto_tree_add_item(skinny_tree, hf_skinny_participantEntry, tvb, offset+28+(i*4), 4, TRUE);
1776       }
1777       break;
1778
1779     case 0x41 : /* DeviceToUserDataVersion1Message */
1780       proto_tree_add_item(skinny_tree, hf_skinny_applicationID, tvb, offset+12, 4, TRUE);
1781       proto_tree_add_item(skinny_tree, hf_skinny_lineInstance, tvb, offset+16, 4, TRUE);
1782       proto_tree_add_item(skinny_tree, hf_skinny_callIdentifier, tvb, offset+20, 4, TRUE);
1783       proto_tree_add_item(skinny_tree, hf_skinny_transactionID, tvb, offset+24, 4, TRUE);
1784       proto_tree_add_item(skinny_tree, hf_skinny_data_length, tvb, offset+28, 4, TRUE);
1785       count = tvb_get_letohl( tvb, offset+28);
1786       proto_tree_add_item(skinny_tree, hf_skinny_sequenceFlag, tvb, offset+30, 4, TRUE);
1787       proto_tree_add_item(skinny_tree, hf_skinny_displayPriority, tvb, offset+34, 4, TRUE);
1788       proto_tree_add_item(skinny_tree, hf_skinny_conferenceID, tvb, offset+38, 4, TRUE);
1789       proto_tree_add_item(skinny_tree, hf_skinny_appInstanceID, tvb, offset+42, 4, TRUE);
1790       proto_tree_add_item(skinny_tree, hf_skinny_routingID, tvb, offset+46, 4, TRUE);
1791       proto_tree_add_uint(skinny_tree, hf_skinny_data, tvb, offset+50, 1, count);
1792       si->lineId = tvb_get_letohl(tvb, offset+16);
1793       si->callId = tvb_get_letohl(tvb, offset+20);
1794       break;
1795
1796     case 0x42 : /* DeviceToUserDataResponseVersion1Message */
1797       proto_tree_add_item(skinny_tree, hf_skinny_applicationID, tvb, offset+12, 4, TRUE);
1798       proto_tree_add_item(skinny_tree, hf_skinny_lineInstance, tvb, offset+16, 4, TRUE);
1799       proto_tree_add_item(skinny_tree, hf_skinny_callIdentifier, tvb, offset+20, 4, TRUE);
1800       proto_tree_add_item(skinny_tree, hf_skinny_transactionID, tvb, offset+24, 4, TRUE);
1801       proto_tree_add_item(skinny_tree, hf_skinny_data_length, tvb, offset+28, 4, TRUE);
1802       count = tvb_get_letohl( tvb, offset+28);
1803       proto_tree_add_item(skinny_tree, hf_skinny_sequenceFlag, tvb, offset+30, 4, TRUE);
1804       proto_tree_add_item(skinny_tree, hf_skinny_displayPriority, tvb, offset+34, 4, TRUE);
1805       proto_tree_add_item(skinny_tree, hf_skinny_conferenceID, tvb, offset+38, 4, TRUE);
1806       proto_tree_add_item(skinny_tree, hf_skinny_appInstanceID, tvb, offset+42, 4, TRUE);
1807       proto_tree_add_item(skinny_tree, hf_skinny_routingID, tvb, offset+46, 4, TRUE);
1808       proto_tree_add_uint(skinny_tree, hf_skinny_data, tvb, offset+50, 1, count);
1809       si->lineId = tvb_get_letohl(tvb, offset+16);
1810       si->callId = tvb_get_letohl(tvb, offset+20);
1811       break;
1812
1813
1814       /*
1815        *
1816        *  Call manager -> client messages start here(ish)
1817        *
1818        */
1819     case 0x81 :  /* registerAck */
1820       proto_tree_add_item(skinny_tree, hf_skinny_keepAliveInterval, tvb, offset+12, 4, TRUE);
1821       proto_tree_add_item(skinny_tree, hf_skinny_dateTemplate, tvb, offset+16, StationDateTemplateSize, TRUE);
1822       proto_tree_add_item(skinny_tree, hf_skinny_secondaryKeepAliveInterval, tvb, offset+24, 4, TRUE);
1823       break;
1824
1825     case 0x82 :  /* startTone */
1826       proto_tree_add_item(skinny_tree, hf_skinny_deviceTone, tvb, offset+12, 4, TRUE);
1827       /* offset 16 to 19: reserved */
1828       if (hdr_data_length > 12) {
1829                   proto_tree_add_item(skinny_tree, hf_skinny_lineInstance, tvb, offset+20, 4, TRUE);
1830                   proto_tree_add_item(skinny_tree, hf_skinny_callIdentifier, tvb, offset+24, 4, TRUE);
1831                   si->lineId = tvb_get_letohl(tvb, offset+20);
1832                   si->callId = tvb_get_letohl(tvb, offset+24);
1833       }
1834       break;
1835
1836     case 0x83 :   /* stopTone */
1837       if (hdr_data_length > 4) {
1838                   proto_tree_add_item(skinny_tree, hf_skinny_lineInstance, tvb, offset+12, 4, TRUE);
1839                   proto_tree_add_item(skinny_tree, hf_skinny_callIdentifier, tvb, offset+16, 4, TRUE);
1840                   si->lineId = tvb_get_letohl(tvb, offset+12);
1841                   si->callId = tvb_get_letohl(tvb, offset+16);
1842       }
1843       break;
1844
1845     case 0x85 : /* setRingerMessage */
1846       proto_tree_add_item(skinny_tree, hf_skinny_ringType, tvb, offset+12, 4, TRUE);
1847       proto_tree_add_item(skinny_tree, hf_skinny_ringMode, tvb, offset+16, 4, TRUE);
1848       if (hdr_data_length > 12) {
1849                   proto_tree_add_item(skinny_tree, hf_skinny_lineInstance, tvb, offset+20, 4, TRUE);
1850                   proto_tree_add_item(skinny_tree, hf_skinny_callIdentifier, tvb, offset+24, 4, TRUE);
1851                   si->lineId = tvb_get_letohl(tvb, offset+20);
1852                   si->callId = tvb_get_letohl(tvb, offset+24);
1853       }
1854       break;
1855
1856     case 0x86 : /* setLampMessage */
1857       proto_tree_add_item(skinny_tree, hf_skinny_stimulus, tvb, offset+12, 4, TRUE);
1858       proto_tree_add_item(skinny_tree, hf_skinny_stimulusInstance, tvb, offset+16, 4, TRUE);
1859       proto_tree_add_item(skinny_tree, hf_skinny_lampMode, tvb, offset+20, 4, TRUE);
1860       break;
1861
1862     case 0x87 : /* stationHookFlashDetectMode */
1863       proto_tree_add_item(skinny_tree, hf_skinny_hookFlashDetectMode, tvb, offset+12, 4, TRUE);
1864       proto_tree_add_item(skinny_tree, hf_skinny_detectInterval, tvb, offset+16, 4, TRUE);
1865       break;
1866
1867     case 0x88 : /* setSpeakerMode */
1868
1869       proto_tree_add_item(skinny_tree, hf_skinny_speakerMode, tvb, offset+12, 4, TRUE);
1870       break;
1871
1872     case 0x89 : /* setMicroMode */
1873       proto_tree_add_item(skinny_tree, hf_skinny_microphoneMode, tvb, offset+12, 4, TRUE);
1874       break;
1875
1876     case 0x8a : /* startMediaTransmistion */
1877       proto_tree_add_item(skinny_tree, hf_skinny_conferenceID,          tvb, offset+12, 4, TRUE);
1878       proto_tree_add_item(skinny_tree, hf_skinny_passThruPartyID,       tvb, offset+16, 4, TRUE);
1879       proto_tree_add_item(skinny_tree, hf_skinny_remoteIpAddr,          tvb, offset+20, 4, FALSE);
1880       proto_tree_add_item(skinny_tree, hf_skinny_remotePortNumber,      tvb, offset+24, 4, TRUE);
1881       proto_tree_add_item(skinny_tree, hf_skinny_millisecondPacketSize, tvb, offset+28, 4, TRUE);
1882       proto_tree_add_item(skinny_tree, hf_skinny_payloadCapability,     tvb, offset+32, 4, TRUE);
1883       proto_tree_add_item(skinny_tree, hf_skinny_precedenceValue,       tvb, offset+36, 4, TRUE);
1884       proto_tree_add_item(skinny_tree, hf_skinny_silenceSuppression,    tvb, offset+40, 4, TRUE);
1885       proto_tree_add_item(skinny_tree, hf_skinny_maxFramesPerPacket,    tvb, offset+44, 2, TRUE);
1886       proto_tree_add_item(skinny_tree, hf_skinny_g723BitRate,           tvb, offset+48, 4, TRUE);
1887       if((!pinfo->fd->flags.visited) && rtp_handle){
1888             address src_addr;
1889             guint32 ipv4_address;
1890
1891             src_addr.type=AT_IPv4;
1892             src_addr.len=4;
1893             src_addr.data=(char *)&ipv4_address;
1894             ipv4_address = tvb_get_ipv4(tvb, offset+20);
1895             rtp_add_address(pinfo, &src_addr, tvb_get_letohl(tvb, offset+24), 0, "Skinny", pinfo->fd->num, is_video, NULL);
1896       }
1897       si->passThruId = tvb_get_letohl(tvb, offset+16);
1898       break;
1899
1900     case 0x8b :  /* stopMediaTransmission */
1901
1902       proto_tree_add_item(skinny_tree, hf_skinny_conferenceID, tvb, offset+12, 4, TRUE);
1903       proto_tree_add_item(skinny_tree, hf_skinny_passThruPartyID, tvb, offset+16, 4, TRUE);
1904       si->passThruId = tvb_get_letohl(tvb, offset+16);
1905       break;
1906
1907     case 0x8c : /* startMediaReception */
1908       break;
1909
1910     case 0x8d : /* stopMediaReception */
1911       break;
1912
1913     case 0x8e : /* reservered */
1914       break;
1915
1916     case 0x8f : /* callInfo */
1917       i = offset+12;
1918       proto_tree_add_item(skinny_tree, hf_skinny_callingPartyName, tvb, i, StationMaxNameSize, TRUE);
1919       proto_tree_add_item(skinny_tree, hf_skinny_callingParty, tvb, i, StationMaxDirnumSize, TRUE);
1920       i += StationMaxNameSize;
1921       si->callingParty = g_strdup(tvb_format_stringzpad(tvb, i, StationMaxDirnumSize));
1922       i += StationMaxDirnumSize;
1923       proto_tree_add_item(skinny_tree, hf_skinny_calledPartyName, tvb, i, StationMaxNameSize, TRUE);
1924       i += StationMaxNameSize;
1925       proto_tree_add_item(skinny_tree, hf_skinny_calledParty, tvb, i, StationMaxDirnumSize, TRUE);
1926       si->calledParty = g_strdup(tvb_format_stringzpad(tvb, i, StationMaxDirnumSize));
1927       i += StationMaxDirnumSize;
1928       proto_tree_add_item(skinny_tree, hf_skinny_lineInstance, tvb, i, 4, TRUE);
1929       si->lineId = tvb_get_letohl(tvb, i);
1930       i += 4;
1931       proto_tree_add_item(skinny_tree, hf_skinny_callIdentifier, tvb, i, 4, TRUE);
1932       si->callId = tvb_get_letohl(tvb, i);
1933       i += 4;
1934       proto_tree_add_item(skinny_tree, hf_skinny_callType, tvb, i, 4, TRUE);
1935       i += 4;
1936       proto_tree_add_item(skinny_tree, hf_skinny_originalCalledPartyName, tvb, i, StationMaxNameSize, TRUE);
1937       i += StationMaxNameSize;
1938       proto_tree_add_item(skinny_tree, hf_skinny_originalCalledParty, tvb, i, StationMaxDirnumSize, TRUE);
1939       i += StationMaxDirnumSize;
1940       proto_tree_add_item(skinny_tree, hf_cast_lastRedirectingPartyName, tvb, i, StationMaxNameSize, TRUE);
1941       i += StationMaxNameSize;
1942       proto_tree_add_item(skinny_tree, hf_cast_lastRedirectingParty, tvb, i, StationMaxDirnumSize, TRUE);
1943       i += StationMaxDirnumSize;
1944       proto_tree_add_item(skinny_tree, hf_cast_originalCdpnRedirectReason, tvb, i, 4, TRUE);
1945       i += 4;
1946       proto_tree_add_item(skinny_tree, hf_cast_lastRedirectingReason, tvb, i, 4, TRUE);
1947       i += 4;
1948       proto_tree_add_item(skinny_tree, hf_cast_cgpnVoiceMailbox, tvb, i, StationMaxDirnumSize, TRUE);
1949       i += StationMaxDirnumSize;
1950       proto_tree_add_item(skinny_tree, hf_cast_cdpnVoiceMailbox, tvb, i, StationMaxDirnumSize, TRUE);
1951       i += StationMaxDirnumSize;
1952       proto_tree_add_item(skinny_tree, hf_cast_originalCdpnVoiceMailbox, tvb, i, StationMaxDirnumSize, TRUE);
1953       i += StationMaxDirnumSize;
1954       proto_tree_add_item(skinny_tree, hf_cast_lastRedirectingVoiceMailbox, tvb, i, StationMaxDirnumSize, TRUE);
1955       i += StationMaxDirnumSize;
1956       proto_tree_add_item(skinny_tree, hf_cast_callInstance, tvb, i, 4, TRUE);
1957       i += 4;
1958       proto_tree_add_item(skinny_tree, hf_cast_callSecurityStatus, tvb, i, 4, TRUE);
1959       i += 4;
1960       val = tvb_get_letohl( tvb, i);
1961       ti_sub = proto_tree_add_text(skinny_tree, tvb, i, 8, "partyPIRestrictionBits");
1962       skinny_sub_tree = proto_item_add_subtree(ti_sub, ett_skinny_tree);
1963       proto_tree_add_text(skinny_sub_tree, tvb, i, 4, "%s",
1964               decode_boolean_bitfield( val, 0x01, 4*8, "Does RestrictCallingPartyName", "Doesn't RestrictCallingPartyName"));
1965       proto_tree_add_text(skinny_sub_tree, tvb, i, 4, "%s",
1966               decode_boolean_bitfield( val, 0x02, 4*8, "Does RestrictCallingPartyNumber", "Doesn't RestrictCallingPartyNumber"));
1967       proto_tree_add_text(skinny_sub_tree, tvb, i, 4, "%s",
1968               decode_boolean_bitfield( val, 0x04, 4*8, "Does RestrictCalledPartyName", "Doesn't RestrictCalledPartyName"));
1969       proto_tree_add_text(skinny_sub_tree, tvb, i, 4, "%s",
1970               decode_boolean_bitfield( val, 0x08, 4*8, "Does RestrictCalledPartyNumber", "Doesn't RestrictCalledPartyNumber"));
1971       proto_tree_add_text(skinny_sub_tree, tvb, i, 4, "%s",
1972               decode_boolean_bitfield( val, 0x10, 4*8, "Does RestrictOriginalCalledPartyName", "Doesn't RestrictOriginalCalledPartyName"));
1973       proto_tree_add_text(skinny_sub_tree, tvb, i, 4, "%s",
1974               decode_boolean_bitfield( val, 0x20, 4*8, "Does RestrictOriginalCalledPartyNumber", "Doesn't RestrictOriginalCalledPartyNumber"));
1975       proto_tree_add_text(skinny_sub_tree, tvb, i, 4, "%s",
1976               decode_boolean_bitfield( val, 0x40, 4*8, "Does RestrictLastRedirectPartyName", "Doesn't RestrictLastRedirectPartyName"));
1977       proto_tree_add_text(skinny_sub_tree, tvb, i, 4, "%s",
1978               decode_boolean_bitfield( val, 0x80, 4*8, "Does RestrictLastRedirectPartyNumber", "Doesn't RestrictLastRedirectPartyNumber"));
1979       break;
1980
1981     case 0x90 : /* forwardStat */
1982       proto_tree_add_item(skinny_tree, hf_skinny_activeForward, tvb, offset+12, 4, TRUE);
1983       proto_tree_add_item(skinny_tree, hf_skinny_lineNumber, tvb, offset+16, 4, TRUE);
1984       proto_tree_add_item(skinny_tree, hf_skinny_forwardAllActive, tvb, offset+20, 4, TRUE);
1985       proto_tree_add_item(skinny_tree, hf_skinny_forwardNumber, tvb, offset+24, StationMaxDirnumSize, TRUE);
1986       i = offset+24+StationMaxDirnumSize;
1987       proto_tree_add_item(skinny_tree, hf_skinny_forwardBusyActive, tvb, i, 4, TRUE);
1988       i += 4;
1989       proto_tree_add_item(skinny_tree, hf_skinny_forwardNumber, tvb, i, StationMaxDirnumSize, TRUE);
1990       i += StationMaxDirnumSize;
1991       proto_tree_add_item(skinny_tree, hf_skinny_forwardNoAnswerActive, tvb, i, 4, TRUE);
1992       i += 4;
1993       proto_tree_add_item(skinny_tree, hf_skinny_forwardNumber, tvb, i, StationMaxDirnumSize, TRUE);
1994       break;
1995
1996     case 0x91 : /* speedDialStatMessage */
1997       proto_tree_add_item(skinny_tree, hf_skinny_speedDialNumber, tvb, offset+12, 4, TRUE);
1998       proto_tree_add_item(skinny_tree, hf_skinny_speedDialDirNumber, tvb, offset+16, StationMaxDirnumSize, TRUE);
1999       proto_tree_add_item(skinny_tree, hf_skinny_speedDialDisplayName, tvb, offset+40, StationMaxNameSize, TRUE);
2000       break;
2001
2002     case 0x92 : /* lineStatMessage */
2003       proto_tree_add_item(skinny_tree, hf_skinny_lineNumber, tvb, offset+12, 4, TRUE);
2004       proto_tree_add_item(skinny_tree, hf_skinny_lineDirNumber, tvb, offset+16, StationMaxDirnumSize, TRUE);
2005       proto_tree_add_item(skinny_tree, hf_skinny_lineFullyQualifiedDisplayName, tvb, offset+16+StationMaxDirnumSize, StationMaxNameSize, TRUE);
2006       proto_tree_add_item(skinny_tree, hf_skinny_lineDisplayName, tvb, offset+16+StationMaxDirnumSize+StationMaxNameSize, StationMaxDisplayNameSize, TRUE);
2007       break;
2008
2009     case 0x93 : /* configStat */
2010       proto_tree_add_item(skinny_tree, hf_skinny_deviceName, tvb, offset+12, StationMaxDeviceNameSize, TRUE);
2011       i = offset+12+StationMaxDeviceNameSize;
2012       proto_tree_add_item(skinny_tree, hf_skinny_stationUserId, tvb, i, 4, TRUE);
2013       i += 4;
2014       proto_tree_add_item(skinny_tree, hf_skinny_stationInstance, tvb, i, 4, TRUE);
2015       i += 4;
2016       proto_tree_add_item(skinny_tree, hf_skinny_userName, tvb, i, StationMaxNameSize, TRUE);
2017       i += StationMaxNameSize;
2018       proto_tree_add_item(skinny_tree, hf_skinny_serverName, tvb, i, StationMaxNameSize, TRUE);
2019       i += StationMaxNameSize;
2020       proto_tree_add_item(skinny_tree, hf_skinny_numberLines, tvb, i, 4, TRUE);
2021       proto_tree_add_item(skinny_tree, hf_skinny_numberSpeedDials, tvb, i+4, 4, TRUE);
2022       break;
2023
2024     case 0x94 : /* stationDefineTimeDate */
2025       proto_tree_add_item(skinny_tree, hf_skinny_dateYear,   tvb, offset+12, 4, TRUE);
2026       proto_tree_add_item(skinny_tree, hf_skinny_dateMonth,  tvb, offset+16, 4, TRUE);
2027       proto_tree_add_item(skinny_tree, hf_skinny_dayOfWeek,  tvb, offset+20, 4, TRUE);
2028       proto_tree_add_item(skinny_tree, hf_skinny_dateDay,    tvb, offset+24, 4, TRUE);
2029       proto_tree_add_item(skinny_tree, hf_skinny_dateHour,   tvb, offset+28, 4, TRUE);
2030       proto_tree_add_item(skinny_tree, hf_skinny_dateMinute, tvb, offset+32, 4, TRUE);
2031       proto_tree_add_item(skinny_tree, hf_skinny_dateSeconds,tvb, offset+36, 4, TRUE);
2032       proto_tree_add_item(skinny_tree, hf_skinny_dateMilliseconds,tvb, offset+40, 4, TRUE);
2033       proto_tree_add_item(skinny_tree, hf_skinny_timeStamp, tvb, offset+44, 4, TRUE);
2034       break;
2035
2036     case 0x95 : /* startSessionTransmission */
2037       proto_tree_add_item(skinny_tree, hf_skinny_remoteIpAddr,  tvb, offset+12, 4, FALSE);
2038       proto_tree_add_item(skinny_tree, hf_skinny_sessionType, tvb, offset+16, 4, TRUE);
2039       break;
2040
2041     case 0x96 : /* stopSessionTransmission */
2042       proto_tree_add_item(skinny_tree, hf_skinny_remoteIpAddr,  tvb, offset+12, 4, FALSE);
2043       proto_tree_add_item(skinny_tree, hf_skinny_sessionType, tvb, offset+16, 4, TRUE);
2044       break;
2045
2046     case 0x97 :  /* buttonTemplateMessage  */
2047       /*
2048        * FIXME
2049        * This decode prints out oogly subtree maybe? or something besides the VALS...
2050        * note to self: uint8 != 4 kk thx info ^_^
2051        *
2052        */
2053       proto_tree_add_item(skinny_tree, hf_skinny_buttonOffset, tvb, offset+12, 4, TRUE);
2054       proto_tree_add_item(skinny_tree, hf_skinny_buttonCount,  tvb, offset+16, 4, TRUE);
2055       proto_tree_add_item(skinny_tree, hf_skinny_totalButtonCount, tvb, offset+20, 4, TRUE);
2056       for (i = 0; i < StationMaxButtonTemplateSize; i++) {
2057               proto_tree_add_item(skinny_tree, hf_skinny_buttonInstanceNumber, tvb, offset+(i*2)+24, 1, TRUE);
2058               proto_tree_add_item(skinny_tree, hf_skinny_buttonDefinition, tvb, offset+(i*2)+25, 1, TRUE);
2059       }
2060       break;
2061
2062     case 0x98 : /* version */
2063       proto_tree_add_item(skinny_tree, hf_skinny_version, tvb, offset+12, StationMaxVersionSize, TRUE);
2064       break;
2065
2066     case 0x99 :  /* displayTextMessage */
2067       proto_tree_add_item(skinny_tree, hf_skinny_displayMessage, tvb, offset+12, StationMaxDisplayTextSize, TRUE);
2068       break;
2069
2070     case 0x9c : /* enunciatorCommand */
2071       proto_tree_add_item(skinny_tree, hf_skinny_mediaEnunciationType, tvb, offset+12, 4, TRUE);
2072       for (i = 0; i < StationMaxDirnumSize; i++) {
2073               proto_tree_add_item(skinny_tree, hf_skinny_unknown, tvb, offset+16+(i*4), 4, TRUE);
2074       }
2075       i = offset+16+StationMaxDirnumSize;
2076       proto_tree_add_item(skinny_tree, hf_skinny_mediaEnunciationType, tvb, i, 4, TRUE);
2077       break;
2078
2079     case 0x9d : /* stationRegisterReject */
2080       proto_tree_add_item(skinny_tree, hf_skinny_displayMessage, tvb, offset+12, StationMaxDisplayTextSize, TRUE);
2081       break;
2082
2083     case 0x9e : /* serverRes */
2084       for (i = 0; i < StationMaxServers; i++) {
2085               proto_tree_add_item(skinny_tree, hf_skinny_serverIdentifier, tvb, offset+12+(i*StationMaxServers), StationMaxServerNameSize, TRUE);
2086       }
2087       j = offset+12+(i*StationMaxServers);
2088       for (i = 0; i < StationMaxServers; i++) {
2089               proto_tree_add_item(skinny_tree, hf_skinny_serverListenPort, tvb, j+(i*4), 4,  TRUE);
2090       }
2091       j = j+(i*4);
2092       for (i = 0; i < StationMaxServers; i++) {
2093               proto_tree_add_item(skinny_tree, hf_skinny_serverIpAddress, tvb, j+(i*4), 4, FALSE);
2094       }
2095       break;
2096
2097     case 0x9f :   /* reset */
2098       proto_tree_add_item(skinny_tree, hf_skinny_deviceResetType, tvb, offset+12, 4, TRUE);
2099       break;
2100
2101     case 0x101 : /* startMulticastMediaReception*/
2102       proto_tree_add_item(skinny_tree, hf_skinny_conferenceID, tvb, offset+12, 4, TRUE);
2103       proto_tree_add_item(skinny_tree, hf_skinny_passThruPartyID, tvb, offset+16, 4, TRUE);
2104       proto_tree_add_item(skinny_tree, hf_skinny_multicastIpAddress, tvb, offset+20, 4, FALSE);
2105       proto_tree_add_item(skinny_tree, hf_skinny_multicastPort, tvb, offset+24, 4, TRUE);
2106       proto_tree_add_item(skinny_tree, hf_skinny_millisecondPacketSize, tvb, offset+28, 4, TRUE);
2107       proto_tree_add_item(skinny_tree, hf_skinny_payloadCapability, tvb, offset+32, 4, TRUE);
2108       proto_tree_add_item(skinny_tree, hf_skinny_echoCancelType, tvb, offset+36, 4, TRUE);
2109       proto_tree_add_item(skinny_tree, hf_skinny_g723BitRate, tvb, offset+40, 4, TRUE);
2110       si->passThruId = tvb_get_letohl(tvb, offset+16);
2111       break;
2112
2113     case 0x102 : /* startMulticateMediaTermination*/
2114       proto_tree_add_item(skinny_tree, hf_skinny_conferenceID, tvb, offset+12, 4, TRUE);
2115       proto_tree_add_item(skinny_tree, hf_skinny_passThruPartyID, tvb, offset+16, 4, TRUE);
2116       proto_tree_add_item(skinny_tree, hf_skinny_multicastIpAddress, tvb, offset+20, 4, FALSE);
2117       proto_tree_add_item(skinny_tree, hf_skinny_multicastPort, tvb, offset+24, 4, TRUE);
2118       proto_tree_add_item(skinny_tree, hf_skinny_millisecondPacketSize, tvb, offset+28, 4, TRUE);
2119       proto_tree_add_item(skinny_tree, hf_skinny_payloadCapability, tvb, offset+32, 4, TRUE);
2120       proto_tree_add_item(skinny_tree, hf_skinny_precedenceValue, tvb, offset+36, 4, TRUE);
2121       proto_tree_add_item(skinny_tree, hf_skinny_silenceSuppression, tvb, offset+40, 4, TRUE);
2122       proto_tree_add_item(skinny_tree, hf_skinny_maxFramesPerPacket, tvb, offset+44, 2, TRUE);
2123       proto_tree_add_item(skinny_tree, hf_skinny_g723BitRate, tvb, offset+48, 4, TRUE);
2124       si->passThruId = tvb_get_letohl(tvb, offset+16);
2125       break;
2126
2127     case 0x103 : /* stopMulticastMediaReception*/
2128       proto_tree_add_item(skinny_tree, hf_skinny_conferenceID, tvb, offset+12, 4, TRUE);
2129       proto_tree_add_item(skinny_tree, hf_skinny_passThruPartyID, tvb, offset+16, 4, TRUE);
2130       si->passThruId = tvb_get_letohl(tvb, offset+16);
2131       break;
2132
2133     case 0x104 : /* stopMulticastMediaTermination*/
2134       proto_tree_add_item(skinny_tree, hf_skinny_conferenceID, tvb, offset+12, 4, TRUE);
2135       proto_tree_add_item(skinny_tree, hf_skinny_passThruPartyID, tvb, offset+16, 4, TRUE);
2136       si->passThruId = tvb_get_letohl(tvb, offset+16);
2137       break;
2138
2139     case 0x105 : /* open receive channel */
2140       proto_tree_add_item(skinny_tree, hf_skinny_conferenceID,            tvb, offset+12, 4, TRUE);
2141       proto_tree_add_item(skinny_tree, hf_skinny_passThruPartyID,         tvb, offset+16, 4, TRUE);
2142       proto_tree_add_item(skinny_tree, hf_skinny_millisecondPacketSize,   tvb, offset+20, 4, TRUE);
2143       proto_tree_add_item(skinny_tree, hf_skinny_payloadCapability,       tvb, offset+24, 4, TRUE);
2144       proto_tree_add_item(skinny_tree, hf_skinny_echoCancelType,          tvb, offset+28, 4, TRUE);
2145       proto_tree_add_item(skinny_tree, hf_skinny_g723BitRate,             tvb, offset+32, 4, TRUE);
2146       si->passThruId = tvb_get_letohl(tvb, offset+16);
2147       break;
2148
2149     case 0x106 :  /* closeReceiveChannel */
2150       proto_tree_add_item(skinny_tree, hf_skinny_conferenceID, tvb, offset+12, 4, TRUE);
2151       proto_tree_add_item(skinny_tree, hf_skinny_passThruPartyID, tvb, offset+16, 4, TRUE);
2152       si->passThruId = tvb_get_letohl(tvb, offset+16);
2153       break;
2154
2155     case 0x107 :  /* connectionStatisticsReq */
2156
2157       i = 12;
2158       proto_tree_add_item(skinny_tree, hf_skinny_directoryNumber, tvb, i, StationMaxDirnumSize, TRUE);
2159       i = 12 + StationMaxDirnumSize;
2160       proto_tree_add_item(skinny_tree, hf_skinny_callIdentifier, tvb, i, 4, TRUE);
2161       si->callId = tvb_get_letohl(tvb, i);
2162       i = i+4;
2163       proto_tree_add_item(skinny_tree, hf_skinny_statsProcessingType, tvb, i, 4, TRUE);
2164       break;
2165
2166     case 0x108 :   /* softkeyTemplateResMessage */
2167       proto_tree_add_item(skinny_tree, hf_skinny_softKeyOffset, tvb, offset+12, 4, TRUE);
2168       softKeyCount = tvb_get_letohl(tvb, offset+16);
2169       proto_tree_add_uint(skinny_tree, hf_skinny_softKeyCount, tvb, offset+16, 4, softKeyCount);
2170       proto_tree_add_item(skinny_tree, hf_skinny_totalSoftKeyCount, tvb, offset+20, 4, TRUE);
2171       for (i = 0; ((i < StationMaxSoftKeyDefinition) && (i < softKeyCount)); i++){
2172               proto_tree_add_item(skinny_tree, hf_skinny_softKeyLabel, tvb, offset+(i*20)+24, StationMaxSoftKeyLabelSize, TRUE);
2173               proto_tree_add_item(skinny_tree, hf_skinny_softKeyEvent, tvb, offset+(i*20)+40, 4, TRUE);
2174       }
2175       /* there is more data here, but it doesn't make a whole lot of sense, I imagine
2176        * it's just some not zero'd out stuff in the packet or...
2177        */
2178       break;
2179
2180     case 0x109 : /* softkeysetres */
2181       proto_tree_add_item(skinny_tree, hf_skinny_softKeySetOffset, tvb, offset+12, 4, TRUE);
2182       softKeySetCount = tvb_get_letohl(tvb, offset+16);
2183       proto_tree_add_uint(skinny_tree, hf_skinny_softKeySetCount, tvb, offset+16, 4, softKeySetCount);
2184       proto_tree_add_item(skinny_tree, hf_skinny_totalSoftKeySetCount, tvb, offset+20, 4, TRUE);
2185       for (i = 0; ((i < StationMaxSoftKeySetDefinition) && (i < softKeySetCount)); i++) {
2186               proto_tree_add_uint(skinny_tree, hf_skinny_softKeySetDescription, tvb, offset+24+(i*48) , 1, i);
2187               for (j = 0; j < StationMaxSoftKeyIndex; j++) {
2188                 proto_tree_add_item(skinny_tree, hf_skinny_softKeyTemplateIndex, tvb, offset+24+(i*48)+j, 1, TRUE);
2189               }
2190               for (j = 0; j < StationMaxSoftKeyIndex; j++) {
2191                 proto_tree_add_item(skinny_tree, hf_skinny_softKeyInfoIndex, tvb, offset+24+(i*48)+StationMaxSoftKeyIndex+(j*2), 2, TRUE);
2192               }
2193       }
2194       break;
2195
2196     case 0x110 : /* selectSoftKeys */
2197       proto_tree_add_item(skinny_tree, hf_skinny_lineInstance, tvb, offset+12, 4, TRUE);
2198       proto_tree_add_item(skinny_tree, hf_skinny_callIdentifier, tvb, offset+16, 4, TRUE);
2199       proto_tree_add_item(skinny_tree, hf_skinny_softKeySetDescription, tvb, offset+20, 4, TRUE);
2200       validKeyMask = tvb_get_letohs(tvb, offset + 24);
2201       skm = proto_tree_add_uint(skinny_tree, hf_skinny_softKeyMap, tvb, offset + 24, 4, validKeyMask);
2202       skm_tree = proto_item_add_subtree(skm, ett_skinny_softKeyMap);
2203       proto_tree_add_boolean(skm_tree, hf_skinny_softKey0,  tvb, offset + 24, 4, validKeyMask);
2204       proto_tree_add_boolean(skm_tree, hf_skinny_softKey1,  tvb, offset + 24, 4, validKeyMask);
2205       proto_tree_add_boolean(skm_tree, hf_skinny_softKey2,  tvb, offset + 24, 4, validKeyMask);
2206       proto_tree_add_boolean(skm_tree, hf_skinny_softKey3,  tvb, offset + 24, 4, validKeyMask);
2207       proto_tree_add_boolean(skm_tree, hf_skinny_softKey4,  tvb, offset + 24, 4, validKeyMask);
2208       proto_tree_add_boolean(skm_tree, hf_skinny_softKey5,  tvb, offset + 24, 4, validKeyMask);
2209       proto_tree_add_boolean(skm_tree, hf_skinny_softKey6,  tvb, offset + 24, 4, validKeyMask);
2210       proto_tree_add_boolean(skm_tree, hf_skinny_softKey7,  tvb, offset + 24, 4, validKeyMask);
2211       proto_tree_add_boolean(skm_tree, hf_skinny_softKey8,  tvb, offset + 24, 4, validKeyMask);
2212       proto_tree_add_boolean(skm_tree, hf_skinny_softKey9,  tvb, offset + 24, 4, validKeyMask);
2213       proto_tree_add_boolean(skm_tree, hf_skinny_softKey10, tvb, offset + 24, 4, validKeyMask);
2214       proto_tree_add_boolean(skm_tree, hf_skinny_softKey11, tvb, offset + 24, 4, validKeyMask);
2215       proto_tree_add_boolean(skm_tree, hf_skinny_softKey12, tvb, offset + 24, 4, validKeyMask);
2216       proto_tree_add_boolean(skm_tree, hf_skinny_softKey13, tvb, offset + 24, 4, validKeyMask);
2217       proto_tree_add_boolean(skm_tree, hf_skinny_softKey14, tvb, offset + 24, 4, validKeyMask);
2218       proto_tree_add_boolean(skm_tree, hf_skinny_softKey15, tvb, offset + 24, 4, validKeyMask);
2219       si->lineId = tvb_get_letohl(tvb, offset+12);
2220       si->callId = tvb_get_letohl(tvb, offset+16);
2221       break;
2222
2223     case 0x111 : /* callState */
2224       proto_tree_add_item(skinny_tree, hf_skinny_callState, tvb, offset+12, 4, TRUE);
2225       proto_tree_add_item(skinny_tree, hf_skinny_lineInstance, tvb, offset+16, 4, TRUE);
2226       proto_tree_add_item(skinny_tree, hf_skinny_callIdentifier, tvb, offset+20, 4, TRUE);
2227       si->lineId = tvb_get_letohl(tvb, offset+16);
2228       si->callId = tvb_get_letohl(tvb, offset+20);
2229       si->callState = tvb_get_letohl(tvb, offset+12);
2230       break;
2231
2232     case 0x112 : /* displayPromptStatus */
2233       proto_tree_add_item(skinny_tree, hf_skinny_messageTimeOutValue, tvb, offset+12, 4, TRUE);
2234       proto_tree_add_item(skinny_tree, hf_skinny_displayMessage, tvb, offset+16, StationMaxDisplayPromptStatusSize, TRUE);
2235       proto_tree_add_item(skinny_tree, hf_skinny_lineInstance, tvb, offset+48, 4, TRUE);
2236       proto_tree_add_item(skinny_tree, hf_skinny_callIdentifier, tvb, offset+52, 4, TRUE);
2237       si->lineId = tvb_get_letohl(tvb, offset+48);
2238       si->callId = tvb_get_letohl(tvb, offset+52);
2239       break;
2240
2241     case 0x113: /* clearPrompt */
2242       proto_tree_add_item(skinny_tree, hf_skinny_lineInstance  , tvb, offset+12, 4, TRUE);
2243       proto_tree_add_item(skinny_tree, hf_skinny_callIdentifier, tvb, offset+16, 4, TRUE);
2244       si->lineId = tvb_get_letohl(tvb, offset+12);
2245       si->callId = tvb_get_letohl(tvb, offset+16);
2246       break;
2247
2248     case 0x114 : /* displayNotify */
2249       proto_tree_add_item(skinny_tree, hf_skinny_messageTimeOutValue, tvb, offset+12, 4, TRUE);
2250       proto_tree_add_item(skinny_tree, hf_skinny_displayMessage, tvb, offset+16, StationMaxDisplayNotifySize , TRUE);
2251       break;
2252
2253     case 0x116 : /* activateCallPlane */
2254       proto_tree_add_item(skinny_tree, hf_skinny_lineInstance, tvb, offset+12, 4, TRUE);
2255       si->lineId = tvb_get_letohl(tvb, offset+12);
2256       break;
2257
2258     case 0x118 :    /* unregisterAckMessage */
2259       proto_tree_add_item(skinny_tree, hf_skinny_deviceUnregisterStatus, tvb, offset+12, 4, TRUE);
2260       break;
2261
2262     case 0x119 : /* backSpaceReq */
2263       proto_tree_add_item(skinny_tree, hf_skinny_lineInstance, tvb, offset+12, 4, TRUE);
2264       proto_tree_add_item(skinny_tree, hf_skinny_callIdentifier, tvb, offset+16, 4, TRUE);
2265       si->lineId = tvb_get_letohl(tvb, offset+12);
2266       si->callId = tvb_get_letohl(tvb, offset+16);
2267       break;
2268
2269     case 0x11B : /* registerTokenReject */
2270       proto_tree_add_item(skinny_tree, hf_skinny_tokenRejWaitTime, tvb, offset+12, 4, TRUE);
2271       break;
2272
2273     case 0x11C : /* StartMediaFailureDetection */
2274       proto_tree_add_item(skinny_tree, hf_skinny_conferenceID, tvb, offset+12, 4, TRUE);
2275       proto_tree_add_item(skinny_tree, hf_skinny_passThruPartyID, tvb, offset+16, 4, TRUE);
2276       proto_tree_add_item(skinny_tree, hf_skinny_millisecondPacketSize, tvb, offset+20, 4, TRUE);
2277       proto_tree_add_item(skinny_tree, hf_skinny_payloadCapability, tvb, offset+24, 4, TRUE);
2278       proto_tree_add_item(skinny_tree, hf_skinny_echoCancelType, tvb, offset+28, 4, TRUE);
2279       proto_tree_add_item(skinny_tree, hf_skinny_g723BitRate, tvb, offset+32, 4, TRUE);
2280       proto_tree_add_item(skinny_tree, hf_skinny_callIdentifier, tvb, offset+34, 4, TRUE);
2281       si->passThruId = tvb_get_letohl(tvb, offset+16);
2282       si->callId = tvb_get_letohl(tvb, offset+34);
2283       break;
2284
2285     case 0x11D : /* DialedNumberMessage */
2286       proto_tree_add_item(skinny_tree, hf_skinny_calledParty, tvb, offset+12, StationMaxDirnumSize, TRUE);
2287       proto_tree_add_item(skinny_tree, hf_skinny_lineInstance, tvb, offset+12+StationMaxDirnumSize, 4, TRUE);
2288       proto_tree_add_item(skinny_tree, hf_skinny_callIdentifier, tvb, offset+12+StationMaxDirnumSize+4, 4, TRUE);
2289       si->lineId = tvb_get_letohl(tvb, offset+12+StationMaxDirnumSize);
2290       si->callId = tvb_get_letohl(tvb, offset+16+StationMaxDirnumSize);
2291       break;
2292
2293     case 0x11E : /* UserToDeviceDataMessage */
2294       proto_tree_add_item(skinny_tree, hf_skinny_applicationID, tvb, offset+12, 4, TRUE);
2295       proto_tree_add_item(skinny_tree, hf_skinny_lineInstance, tvb, offset+16, 4, TRUE);
2296       proto_tree_add_item(skinny_tree, hf_skinny_callIdentifier, tvb, offset+20, 4, TRUE);
2297       proto_tree_add_item(skinny_tree, hf_skinny_transactionID, tvb, offset+24, 4, TRUE);
2298       proto_tree_add_item(skinny_tree, hf_skinny_data_length, tvb, offset+28, 4, TRUE);
2299       count = tvb_get_letohl( tvb, offset+28);
2300       proto_tree_add_uint(skinny_tree, hf_skinny_data, tvb, offset+30, 1, count);
2301       si->lineId = tvb_get_letohl(tvb, offset+16);
2302       si->callId = tvb_get_letohl(tvb, offset+20);
2303       break;
2304
2305     case 0x11F : /* FeatureStatMessage */
2306       proto_tree_add_item(skinny_tree, hf_skinny_featureIndex, tvb, offset+12, 4, TRUE);
2307       proto_tree_add_item(skinny_tree, hf_skinny_featureID, tvb, offset+16, 4, TRUE);
2308       proto_tree_add_item(skinny_tree, hf_skinny_featureTextLabel, tvb, offset+20, StationMaxNameSize, TRUE);
2309       proto_tree_add_item(skinny_tree, hf_skinny_featureStatus, tvb, offset+20+StationMaxNameSize, 4, TRUE);
2310       break;
2311
2312     case 0x120 : /* DisplayPriNotifyMessage */
2313       proto_tree_add_item(skinny_tree, hf_skinny_messageTimeOutValue, tvb, offset+12, 4, TRUE);
2314       proto_tree_add_item(skinny_tree, hf_skinny_priority, tvb, offset+16, 4, TRUE);
2315       proto_tree_add_item(skinny_tree, hf_skinny_notify, tvb, offset+16, StationMaxDisplayNotifySize, TRUE);
2316       break;
2317
2318     case 0x121 : /* ClearPriNotifyMessage */
2319       proto_tree_add_item(skinny_tree, hf_skinny_priority, tvb, offset+12, 4, TRUE);
2320       break;
2321
2322     case 0x122 : /* StartAnnouncementMessage */
2323       count = offset+12;
2324       for ( i = 0; i < MaxAnnouncementList; i++ ) {
2325         proto_tree_add_item(skinny_tree, hf_skinny_locale, tvb, count, 4, TRUE);
2326         count += 4;
2327         proto_tree_add_item(skinny_tree, hf_skinny_country, tvb, count, 4, TRUE);
2328         count += 4;
2329         proto_tree_add_item(skinny_tree, hf_skinny_deviceTone, tvb, count, 4, TRUE);
2330         count += 4;
2331       }
2332       proto_tree_add_item(skinny_tree, hf_skinny_endOfAnnAck, tvb, count, 4, TRUE);
2333       count += 4;
2334       proto_tree_add_item(skinny_tree, hf_skinny_conferenceID, tvb, count, 4, TRUE);
2335       count += 4;
2336
2337       for ( i = 0; i < StationMaxMonitorParties; i++ ) {
2338         proto_tree_add_item(skinny_tree, hf_skinny_matrixConfPartyID, tvb, count, 4, TRUE);
2339         count += 4;
2340       }
2341       proto_tree_add_item(skinny_tree, hf_skinny_hearingConfPartyMask, tvb, count, 4, TRUE);
2342       count += 4;
2343       proto_tree_add_item(skinny_tree, hf_skinny_annPlayMode, tvb, count, 4, TRUE);
2344       break;
2345
2346     case 0x123 : /* StopAnnouncementMessage */
2347       proto_tree_add_item(skinny_tree, hf_skinny_conferenceID, tvb, offset+12, 4, TRUE);
2348       break;
2349
2350     case 0x124 : /* AnnouncementFinishMessage */
2351       proto_tree_add_item(skinny_tree, hf_skinny_conferenceID, tvb, offset+12, 4, TRUE);
2352       proto_tree_add_item(skinny_tree, hf_skinny_annPlayStatus, tvb, offset+16, 4, TRUE);
2353       break;
2354
2355     case 0x127 : /* NotifyDtmfToneMessage */
2356       proto_tree_add_item(skinny_tree, hf_skinny_deviceTone, tvb, offset+12, 4, TRUE);
2357       proto_tree_add_item(skinny_tree, hf_skinny_conferenceID, tvb, offset+16, 4, TRUE);
2358       proto_tree_add_item(skinny_tree, hf_skinny_passThruPartyID, tvb, offset+20, 4, TRUE);
2359       si->passThruId = tvb_get_letohl(tvb, offset+20);
2360       break;
2361
2362     case 0x128 : /* SendDtmfToneMessage */
2363       proto_tree_add_item(skinny_tree, hf_skinny_deviceTone, tvb, offset+12, 4, TRUE);
2364       proto_tree_add_item(skinny_tree, hf_skinny_conferenceID, tvb, offset+16, 4, TRUE);
2365       proto_tree_add_item(skinny_tree, hf_skinny_passThruPartyID, tvb, offset+20, 4, TRUE);
2366       si->passThruId = tvb_get_letohl(tvb, offset+20);
2367       break;
2368
2369     case 0x129 : /* SubscribeDtmfPayloadReqMessage */
2370       proto_tree_add_item(skinny_tree, hf_skinny_payloadDtmf, tvb, offset+12, 4, TRUE);
2371       proto_tree_add_item(skinny_tree, hf_skinny_conferenceID, tvb, offset+16, 4, TRUE);
2372       proto_tree_add_item(skinny_tree, hf_skinny_passThruPartyID, tvb, offset+20, 4, TRUE);
2373       si->passThruId = tvb_get_letohl(tvb, offset+20);
2374       break;
2375
2376     case 0x12A : /* SubscribeDtmfPayloadResMessage */
2377       proto_tree_add_item(skinny_tree, hf_skinny_payloadDtmf, tvb, offset+12, 4, TRUE);
2378       proto_tree_add_item(skinny_tree, hf_skinny_conferenceID, tvb, offset+16, 4, TRUE);
2379       proto_tree_add_item(skinny_tree, hf_skinny_passThruPartyID, tvb, offset+20, 4, TRUE);
2380       si->passThruId = tvb_get_letohl(tvb, offset+20);
2381       break;
2382
2383     case 0x12B : /* SubscribeDtmfPayloadErrMessage */
2384       proto_tree_add_item(skinny_tree, hf_skinny_payloadDtmf, tvb, offset+12, 4, TRUE);
2385       proto_tree_add_item(skinny_tree, hf_skinny_conferenceID, tvb, offset+16, 4, TRUE);
2386       proto_tree_add_item(skinny_tree, hf_skinny_passThruPartyID, tvb, offset+20, 4, TRUE);
2387       si->passThruId = tvb_get_letohl(tvb, offset+20);
2388       break;
2389
2390     case 0x12C : /* UnSubscribeDtmfPayloadReqMessage */
2391       proto_tree_add_item(skinny_tree, hf_skinny_payloadDtmf, tvb, offset+12, 4, TRUE);
2392       proto_tree_add_item(skinny_tree, hf_skinny_conferenceID, tvb, offset+16, 4, TRUE);
2393       proto_tree_add_item(skinny_tree, hf_skinny_passThruPartyID, tvb, offset+20, 4, TRUE);
2394       si->passThruId = tvb_get_letohl(tvb, offset+20);
2395       break;
2396
2397     case 0x12D : /* UnSubscribeDtmfPayloadResMessage */
2398       proto_tree_add_item(skinny_tree, hf_skinny_payloadDtmf, tvb, offset+12, 4, TRUE);
2399       proto_tree_add_item(skinny_tree, hf_skinny_conferenceID, tvb, offset+16, 4, TRUE);
2400       proto_tree_add_item(skinny_tree, hf_skinny_passThruPartyID, tvb, offset+20, 4, TRUE);
2401       si->passThruId = tvb_get_letohl(tvb, offset+20);
2402       break;
2403
2404     case 0x12E : /* UnSubscribeDtmfPayloadErrMessage */
2405       proto_tree_add_item(skinny_tree, hf_skinny_payloadDtmf, tvb, offset+12, 4, TRUE);
2406       proto_tree_add_item(skinny_tree, hf_skinny_conferenceID, tvb, offset+16, 4, TRUE);
2407       proto_tree_add_item(skinny_tree, hf_skinny_passThruPartyID, tvb, offset+20, 4, TRUE);
2408       si->passThruId = tvb_get_letohl(tvb, offset+20);
2409       break;
2410
2411     case 0x12F : /* ServiceURLStatMessage */
2412       proto_tree_add_item(skinny_tree, hf_skinny_serviceURLIndex, tvb, offset+12, 4, TRUE);
2413       proto_tree_add_item(skinny_tree, hf_skinny_serviceURL, tvb, offset+12, StationMaxServiceURLSize, TRUE);
2414       proto_tree_add_item(skinny_tree, hf_skinny_serviceURLDisplayName, tvb, offset+12, StationMaxNameSize, TRUE);
2415       break;
2416
2417     case 0x130 : /* CallSelectStatMessage */
2418       proto_tree_add_item(skinny_tree, hf_skinny_callSelectStat, tvb, offset+12, 4, TRUE);
2419       proto_tree_add_item(skinny_tree, hf_skinny_callIdentifier, tvb, offset+16, 4, TRUE);
2420       proto_tree_add_item(skinny_tree, hf_skinny_lineInstance, tvb, offset+20, 4, TRUE);
2421       si->lineId = tvb_get_letohl(tvb, offset+16);
2422       si->callId = tvb_get_letohl(tvb, offset+20);
2423       break;
2424
2425     case 0x131 : /* OpenMultiMediaChannelMessage */
2426       proto_tree_add_item(skinny_tree, hf_skinny_conferenceID, tvb, offset+12, 4, TRUE);
2427       proto_tree_add_item(skinny_tree, hf_skinny_passThruPartyID, tvb, offset+16, 4, TRUE);
2428       proto_tree_add_item(skinny_tree, hf_skinny_payloadCapability, tvb, offset+20, 4, TRUE);
2429       proto_tree_add_item(skinny_tree, hf_skinny_lineInstance, tvb, offset+24, 4, TRUE);
2430       proto_tree_add_item(skinny_tree, hf_skinny_callIdentifier, tvb, offset+28, 4, TRUE);
2431       proto_tree_add_item(skinny_tree, hf_skinny_payload_rfc_number, tvb, offset+32, 4, TRUE);
2432       proto_tree_add_item(skinny_tree, hf_skinny_payloadType, tvb, offset+36, 4, TRUE);
2433       proto_tree_add_item(skinny_tree, hf_skinny_isConferenceCreator, tvb, offset+40, 4, TRUE);
2434       si->passThruId = tvb_get_letohl(tvb, offset+16);
2435       si->lineId = tvb_get_letohl(tvb, offset+24);
2436       si->callId = tvb_get_letohl(tvb, offset+28);
2437
2438       /* add audio part of union */
2439                   ti_sub = proto_tree_add_text(skinny_tree, tvb, offset, 12, "audioParameters");
2440                   skinny_sub_tree = proto_item_add_subtree(ti_sub, ett_skinny_tree);
2441       proto_tree_add_item(skinny_sub_tree, hf_skinny_millisecondPacketSize, tvb, offset+44, 4, TRUE);
2442       proto_tree_add_item(skinny_sub_tree, hf_skinny_echoCancelType, tvb, offset+48, 4, TRUE);
2443       proto_tree_add_item(skinny_sub_tree, hf_skinny_g723BitRate, tvb, offset+52, 4, TRUE);
2444
2445       /* add video part of union */
2446                   ti_sub = proto_tree_add_text(skinny_tree, tvb, offset, 30, "vidParameters");
2447                   skinny_sub_tree = proto_item_add_subtree(ti_sub, ett_skinny_tree);
2448       proto_tree_add_item(skinny_sub_tree, hf_skinny_bitRate, tvb, offset+44, 4, TRUE);
2449       proto_tree_add_item(skinny_sub_tree, hf_skinny_pictureFormatCount, tvb, offset+48, 4, TRUE);
2450       skinny_sub_tree_sav = skinny_sub_tree;
2451       count = offset+52;
2452       for ( i = 0; i < MAX_PICTURE_FORMAT; i++ ) {
2453                     ti_sub = proto_tree_add_text(skinny_sub_tree_sav, tvb, offset, 8 * MAX_PICTURE_FORMAT, "pictureFormat[%d]", i);
2454                     skinny_sub_tree = proto_item_add_subtree(ti_sub, ett_skinny_tree);
2455         proto_tree_add_item(skinny_sub_tree, hf_skinny_format, tvb, count, 4, TRUE);
2456         count += 4;
2457         proto_tree_add_item(skinny_sub_tree, hf_skinny_MPI, tvb, count, 4, TRUE);
2458         count += 4;
2459       }
2460       skinny_sub_tree = skinny_sub_tree_sav;
2461       proto_tree_add_item(skinny_sub_tree, hf_skinny_confServiceNum, tvb, count, 4, TRUE);
2462       count += 4;
2463
2464       val = count;
2465       /* add H261 part of union */
2466                   ti_sub = proto_tree_add_text(skinny_sub_tree_sav, tvb, offset, 8, "h261VideoCapability");
2467                   skinny_sub_tree = proto_item_add_subtree(ti_sub, ett_skinny_tree);
2468             proto_tree_add_item(skinny_sub_tree, hf_skinny_temporalSpatialTradeOffCapability, tvb, count, 4, TRUE);
2469       count += 4;
2470             proto_tree_add_item(skinny_sub_tree, hf_skinny_stillImageTransmission, tvb, count, 4, TRUE);
2471
2472       /* add H263 part of union */
2473       count = val;
2474                   ti_sub = proto_tree_add_text(skinny_sub_tree_sav, tvb, offset, 8, "h263VideoCapability");
2475                   skinny_sub_tree = proto_item_add_subtree(ti_sub, ett_skinny_tree);
2476             proto_tree_add_item(skinny_sub_tree, hf_skinny_h263_capability_bitfield, tvb, count, 4, TRUE);
2477       count += 4;
2478             proto_tree_add_item(skinny_sub_tree, hf_skinny_annexNandWFutureUse, tvb, count, 4, TRUE);
2479
2480       /* add Vieo part of union */
2481       count = val;
2482                   ti_sub = proto_tree_add_text(skinny_sub_tree_sav, tvb, offset, 8, "vieoVideoCapability");
2483                   skinny_sub_tree = proto_item_add_subtree(ti_sub, ett_skinny_tree);
2484             proto_tree_add_item(skinny_sub_tree, hf_skinny_modelNumber, tvb, count, 4, TRUE);
2485       count += 4;
2486             proto_tree_add_item(skinny_sub_tree, hf_skinny_bandwidth, tvb, count, 4, TRUE);
2487
2488       /* add data part of union */
2489                   ti_sub = proto_tree_add_text(skinny_tree, tvb, offset, 8, "dataParameters");
2490                   skinny_sub_tree = proto_item_add_subtree(ti_sub, ett_skinny_tree);
2491             proto_tree_add_item(skinny_sub_tree, hf_skinny_protocolDependentData, tvb, offset+44, 4, TRUE);
2492             proto_tree_add_item(skinny_sub_tree, hf_skinny_maxBitRate, tvb, offset+48, 4, TRUE);
2493       break;
2494
2495     case 0x132 : /* StartMultiMediaTransmission */
2496       proto_tree_add_item(skinny_tree, hf_skinny_conferenceID, tvb, offset+12, 4, TRUE);
2497       proto_tree_add_item(skinny_tree, hf_skinny_passThruPartyID, tvb, offset+16, 4, TRUE);
2498       proto_tree_add_item(skinny_tree, hf_skinny_payloadCapability, tvb, offset+20, 4, TRUE);
2499       proto_tree_add_item(skinny_tree, hf_skinny_ipAddress, tvb, offset+24, 4, FALSE);
2500       proto_tree_add_item(skinny_tree, hf_skinny_portNumber, tvb, offset+28, 4, TRUE);
2501       proto_tree_add_item(skinny_tree, hf_skinny_callIdentifier, tvb, offset+32, 4, TRUE);
2502       proto_tree_add_item(skinny_tree, hf_skinny_payload_rfc_number, tvb, offset+36, 4, TRUE);
2503       proto_tree_add_item(skinny_tree, hf_skinny_payloadType, tvb, offset+40, 4, TRUE);
2504       proto_tree_add_item(skinny_tree, hf_skinny_DSCPValue, tvb, offset+44, 4, TRUE);
2505       si->passThruId = tvb_get_letohl(tvb, offset+16);
2506       si->callId = tvb_get_letohl(tvb, offset+32);
2507
2508       /* add audio part of union */
2509                   ti_sub = proto_tree_add_text(skinny_tree, tvb, offset, 12, "audioParameters");
2510                   skinny_sub_tree = proto_item_add_subtree(ti_sub, ett_skinny_tree);
2511       proto_tree_add_item(skinny_sub_tree, hf_skinny_millisecondPacketSize, tvb, offset+48, 4, TRUE);
2512       proto_tree_add_item(skinny_sub_tree, hf_skinny_echoCancelType, tvb, offset+52, 4, TRUE);
2513       proto_tree_add_item(skinny_sub_tree, hf_skinny_g723BitRate, tvb, offset+56, 4, TRUE);
2514
2515       /* add video part of union */
2516                   ti_sub = proto_tree_add_text(skinny_tree, tvb, offset, 30, "vidParameters");
2517                   skinny_sub_tree = proto_item_add_subtree(ti_sub, ett_skinny_tree);
2518       proto_tree_add_item(skinny_sub_tree, hf_skinny_bitRate, tvb, offset+48, 4, TRUE);
2519       proto_tree_add_item(skinny_sub_tree, hf_skinny_pictureFormatCount, tvb, offset+52, 4, TRUE);
2520       skinny_sub_tree_sav = skinny_sub_tree;
2521       count = offset+56;
2522       for ( i = 0; i < MAX_PICTURE_FORMAT; i++ ) {
2523                     ti_sub = proto_tree_add_text(skinny_sub_tree_sav, tvb, offset, 8 * MAX_PICTURE_FORMAT, "pictureFormat[%d]", i);
2524                     skinny_sub_tree = proto_item_add_subtree(ti_sub, ett_skinny_tree);
2525         proto_tree_add_item(skinny_sub_tree, hf_skinny_format, tvb, count, 4, TRUE);
2526         count += 4;
2527         proto_tree_add_item(skinny_sub_tree, hf_skinny_MPI, tvb, count, 4, TRUE);
2528         count += 4;
2529       }
2530       skinny_sub_tree = skinny_sub_tree_sav;
2531       proto_tree_add_item(skinny_sub_tree, hf_skinny_confServiceNum, tvb, count, 4, TRUE);
2532       count += 4;
2533
2534       val = count;
2535       /* add H261 part of union */
2536                   ti_sub = proto_tree_add_text(skinny_sub_tree_sav, tvb, offset, 8, "h261VideoCapability");
2537                   skinny_sub_tree = proto_item_add_subtree(ti_sub, ett_skinny_tree);
2538             proto_tree_add_item(skinny_sub_tree, hf_skinny_temporalSpatialTradeOffCapability, tvb, count, 4, TRUE);
2539       count += 4;
2540             proto_tree_add_item(skinny_sub_tree, hf_skinny_stillImageTransmission, tvb, count, 4, TRUE);
2541
2542       /* add H263 part of union */
2543       count = val;
2544                   ti_sub = proto_tree_add_text(skinny_sub_tree_sav, tvb, offset, 8, "h263VideoCapability");
2545                   skinny_sub_tree = proto_item_add_subtree(ti_sub, ett_skinny_tree);
2546             proto_tree_add_item(skinny_sub_tree, hf_skinny_h263_capability_bitfield, tvb, count, 4, TRUE);
2547       count += 4;
2548             proto_tree_add_item(skinny_sub_tree, hf_skinny_annexNandWFutureUse, tvb, count, 4, TRUE);
2549
2550       /* add Vieo part of union */
2551       count = val;
2552                   ti_sub = proto_tree_add_text(skinny_sub_tree_sav, tvb, offset, 8, "vieoVideoCapability");
2553                   skinny_sub_tree = proto_item_add_subtree(ti_sub, ett_skinny_tree);
2554             proto_tree_add_item(skinny_sub_tree, hf_skinny_modelNumber, tvb, count, 4, TRUE);
2555       count += 4;
2556             proto_tree_add_item(skinny_sub_tree, hf_skinny_bandwidth, tvb, count, 4, TRUE);
2557
2558       /* add data part of union */
2559                   ti_sub = proto_tree_add_text(skinny_tree, tvb, offset, 8, "dataParameters");
2560                   skinny_sub_tree = proto_item_add_subtree(ti_sub, ett_skinny_tree);
2561             proto_tree_add_item(skinny_sub_tree, hf_skinny_protocolDependentData, tvb, offset+48, 4, TRUE);
2562             proto_tree_add_item(skinny_sub_tree, hf_skinny_maxBitRate, tvb, offset+52, 4, TRUE);
2563       break;
2564
2565     case 0x133 : /* StopMultiMediaTransmission */
2566       proto_tree_add_item(skinny_tree, hf_skinny_conferenceID, tvb, offset+12, 4, TRUE);
2567       proto_tree_add_item(skinny_tree, hf_skinny_passThruPartyID, tvb, offset+16, 4, TRUE);
2568       proto_tree_add_item(skinny_tree, hf_skinny_callIdentifier, tvb, offset+20, 4, TRUE);
2569       si->passThruId = tvb_get_letohl(tvb, offset+16);
2570       si->callId = tvb_get_letohl(tvb, offset+20);
2571       break;
2572
2573     case 0x134 : /* MiscellaneousCommandMessage */
2574       proto_tree_add_item(skinny_tree, hf_skinny_conferenceID, tvb, offset+12, 4, TRUE);
2575       proto_tree_add_item(skinny_tree, hf_skinny_passThruPartyID, tvb, offset+16, 4, TRUE);
2576       proto_tree_add_item(skinny_tree, hf_skinny_callIdentifier, tvb, offset+20, 4, TRUE);
2577       proto_tree_add_item(skinny_tree, hf_skinny_miscCommandType, tvb, offset+24, 4, TRUE);
2578       si->passThruId = tvb_get_letohl(tvb, offset+16);
2579       si->callId = tvb_get_letohl(tvb, offset+20);
2580
2581       /* show videoFreezePicture */
2582       /* not sure of format */
2583
2584       /* show videoFastUpdatePicture */
2585       /* not sure of format */
2586
2587       /* show videoFastUpdateGOB */
2588                   ti_sub = proto_tree_add_text(skinny_tree, tvb, offset, 8, "videoFastUpdateGOB");
2589                   skinny_sub_tree = proto_item_add_subtree(ti_sub, ett_skinny_tree);
2590       proto_tree_add_item(skinny_sub_tree, hf_skinny_firstGOB, tvb, offset+28, 4, TRUE);
2591       proto_tree_add_item(skinny_sub_tree, hf_skinny_numberOfGOBs, tvb, offset+32, 4, TRUE);
2592
2593       /* show videoFastUpdateMB */
2594                   ti_sub = proto_tree_add_text(skinny_tree, tvb, offset, 8, "videoFastUpdateGOB");
2595                   skinny_sub_tree = proto_item_add_subtree(ti_sub, ett_skinny_tree);
2596       proto_tree_add_item(skinny_sub_tree, hf_skinny_firstGOB, tvb, offset+28, 4, TRUE);
2597       proto_tree_add_item(skinny_sub_tree, hf_skinny_firstMB, tvb, offset+32, 4, TRUE);
2598       proto_tree_add_item(skinny_sub_tree, hf_skinny_numberOfMBs, tvb, offset+36, 4, TRUE);
2599
2600       /* show lostPicture */
2601                   ti_sub = proto_tree_add_text(skinny_tree, tvb, offset, 8, "lostPicture");
2602                   skinny_sub_tree = proto_item_add_subtree(ti_sub, ett_skinny_tree);
2603       proto_tree_add_item(skinny_sub_tree, hf_skinny_pictureNumber, tvb, offset+28, 4, TRUE);
2604       proto_tree_add_item(skinny_sub_tree, hf_skinny_longTermPictureIndex, tvb, offset+32, 4, TRUE);
2605
2606       /* show lostPartialPicture */
2607                   ti_sub = proto_tree_add_text(skinny_tree, tvb, offset, 8, "lostPartialPicture");
2608                   skinny_sub_tree = proto_item_add_subtree(ti_sub, ett_skinny_tree);
2609       proto_tree_add_item(skinny_sub_tree, hf_skinny_pictureNumber, tvb, offset+28, 4, TRUE);
2610       proto_tree_add_item(skinny_sub_tree, hf_skinny_longTermPictureIndex, tvb, offset+32, 4, TRUE);
2611       proto_tree_add_item(skinny_sub_tree, hf_skinny_firstMB, tvb, offset+36, 4, TRUE);
2612       proto_tree_add_item(skinny_sub_tree, hf_skinny_numberOfMBs, tvb, offset+40, 4, TRUE);
2613
2614       /* show recoveryReferencePicture */
2615                   ti_sub = proto_tree_add_text(skinny_tree, tvb, offset, 8, "recoveryReferencePicture");
2616                   skinny_sub_tree = proto_item_add_subtree(ti_sub, ett_skinny_tree);
2617       proto_tree_add_item(skinny_sub_tree, hf_skinny_recoveryReferencePictureCount, tvb, offset+28, 4, TRUE);
2618       skinny_sub_tree_sav = skinny_sub_tree;
2619       for ( i = 0; i < MAX_REFERENCE_PICTURE; i++ ) {
2620                     ti_sub = proto_tree_add_text(skinny_sub_tree_sav, tvb, offset, 8, "recoveryReferencePicture[%d]", i);
2621                     skinny_sub_tree = proto_item_add_subtree(ti_sub, ett_skinny_tree);
2622         proto_tree_add_item(skinny_sub_tree, hf_skinny_pictureNumber, tvb, offset+32+(i*8), 4, TRUE);
2623         proto_tree_add_item(skinny_sub_tree, hf_skinny_longTermPictureIndex, tvb, offset+36+(i*8), 4, TRUE);
2624       }
2625
2626       /* show temporalSpatialTradeOff */
2627                   ti_sub = proto_tree_add_text(skinny_tree, tvb, offset, 4, "temporalSpatialTradeOff");
2628                   skinny_sub_tree = proto_item_add_subtree(ti_sub, ett_skinny_tree);
2629       proto_tree_add_item(skinny_sub_tree, hf_skinny_temporalSpatialTradeOff, tvb, offset+28, 4, TRUE);
2630       break;
2631
2632     case 0x135 : /* FlowControlCommandMessage */
2633       proto_tree_add_item(skinny_tree, hf_skinny_conferenceID, tvb, offset+12, 4, TRUE);
2634       proto_tree_add_item(skinny_tree, hf_skinny_passThruPartyID, tvb, offset+16, 4, TRUE);
2635       proto_tree_add_item(skinny_tree, hf_skinny_callIdentifier, tvb, offset+20, 4, TRUE);
2636       proto_tree_add_item(skinny_tree, hf_skinny_maxBitRate, tvb, offset+24, 4, TRUE);
2637       si->passThruId = tvb_get_letohl(tvb, offset+16);
2638       si->callId = tvb_get_letohl(tvb, offset+20);
2639       break;
2640
2641     case 0x136 : /* CloseMultiMediaReceiveChannel */
2642       proto_tree_add_item(skinny_tree, hf_skinny_conferenceID, tvb, offset+12, 4, TRUE);
2643       proto_tree_add_item(skinny_tree, hf_skinny_passThruPartyID, tvb, offset+16, 4, TRUE);
2644       proto_tree_add_item(skinny_tree, hf_skinny_callIdentifier, tvb, offset+20, 4, TRUE);
2645       si->passThruId = tvb_get_letohl(tvb, offset+16);
2646       si->callId = tvb_get_letohl(tvb, offset+20);
2647       break;
2648
2649     case 0x137 : /* CreateConferenceReqMessage */
2650       proto_tree_add_item(skinny_tree, hf_skinny_conferenceID, tvb, offset+12, 4, TRUE);
2651       proto_tree_add_item(skinny_tree, hf_skinny_numberOfReservedParticipants, tvb, offset+16, 4, TRUE);
2652       proto_tree_add_item(skinny_tree, hf_skinny_resourceTypes, tvb, offset+16, 4, TRUE);
2653       proto_tree_add_item(skinny_tree, hf_skinny_appID, tvb, offset+20, 4, TRUE);
2654       count = offset+24;
2655       proto_tree_add_uint(skinny_tree, hf_skinny_appConfID, tvb, count, 1, AppConferenceIDSize);
2656       count += AppConferenceIDSize;
2657       proto_tree_add_uint(skinny_tree, hf_skinny_appData, tvb, count, 1, AppDataSize);
2658       count += AppDataSize;
2659       proto_tree_add_item(skinny_tree, hf_skinny_data_length, tvb, count, 4, TRUE);
2660       val = tvb_get_letohl( tvb, count);
2661       count += 4;
2662       proto_tree_add_uint(skinny_tree, hf_skinny_passThruData, tvb, count, 1, val);
2663       break;
2664
2665     case 0x138 : /* DeleteConferenceReqMessage */
2666       proto_tree_add_item(skinny_tree, hf_skinny_conferenceID, tvb, offset+12, 4, TRUE);
2667       break;
2668
2669     case 0x139 : /* ModifyConferenceReqMessage */
2670       proto_tree_add_item(skinny_tree, hf_skinny_conferenceID, tvb, offset+12, 4, TRUE);
2671       proto_tree_add_item(skinny_tree, hf_skinny_numberOfReservedParticipants, tvb, offset+16, 4, TRUE);
2672       proto_tree_add_item(skinny_tree, hf_skinny_appID, tvb, offset+20, 4, TRUE);
2673       count = offset+24;
2674       proto_tree_add_uint(skinny_tree, hf_skinny_appConfID, tvb, count, 1, AppConferenceIDSize);
2675       count += AppConferenceIDSize;
2676       proto_tree_add_uint(skinny_tree, hf_skinny_appData, tvb, count, 1, AppDataSize);
2677       count += AppDataSize;
2678       proto_tree_add_item(skinny_tree, hf_skinny_data_length, tvb, count, 4, TRUE);
2679       val = tvb_get_letohl( tvb, count);
2680       count += 4;
2681       proto_tree_add_uint(skinny_tree, hf_skinny_passThruData, tvb, count, 1, val);
2682       break;
2683
2684     case 0x13A : /* AddParticipantReqMessage */
2685       proto_tree_add_item(skinny_tree, hf_skinny_conferenceID, tvb, offset+12, 4, TRUE);
2686       proto_tree_add_item(skinny_tree, hf_skinny_callIdentifier, tvb, offset+16, 4, TRUE);
2687       si->callId = tvb_get_letohl(tvb, offset+16);
2688       break;
2689
2690     case 0x13B : /* DropParticipantReqMessage */
2691       proto_tree_add_item(skinny_tree, hf_skinny_conferenceID, tvb, offset+12, 4, TRUE);
2692       proto_tree_add_item(skinny_tree, hf_skinny_callIdentifier, tvb, offset+16, 4, TRUE);
2693       si->callId = tvb_get_letohl(tvb, offset+16);
2694       break;
2695
2696     case 0x13D : /* AuditParticipantReqMessage */
2697       proto_tree_add_item(skinny_tree, hf_skinny_conferenceID, tvb, offset+12, 4, TRUE);
2698       break;
2699
2700     case 0x13F : /* UserToDeviceDataVersion1Message */
2701       proto_tree_add_item(skinny_tree, hf_skinny_applicationID, tvb, offset+12, 4, TRUE);
2702       proto_tree_add_item(skinny_tree, hf_skinny_lineInstance, tvb, offset+16, 4, TRUE);
2703       proto_tree_add_item(skinny_tree, hf_skinny_callIdentifier, tvb, offset+20, 4, TRUE);
2704       proto_tree_add_item(skinny_tree, hf_skinny_transactionID, tvb, offset+24, 4, TRUE);
2705       proto_tree_add_item(skinny_tree, hf_skinny_data_length, tvb, offset+28, 4, TRUE);
2706       count = tvb_get_letohl( tvb, offset+28);
2707       proto_tree_add_item(skinny_tree, hf_skinny_sequenceFlag, tvb, offset+30, 4, TRUE);
2708       proto_tree_add_item(skinny_tree, hf_skinny_displayPriority, tvb, offset+34, 4, TRUE);
2709       proto_tree_add_item(skinny_tree, hf_skinny_conferenceID, tvb, offset+38, 4, TRUE);
2710       proto_tree_add_item(skinny_tree, hf_skinny_appInstanceID, tvb, offset+42, 4, TRUE);
2711       proto_tree_add_item(skinny_tree, hf_skinny_routingID, tvb, offset+46, 4, TRUE);
2712       proto_tree_add_uint(skinny_tree, hf_skinny_data, tvb, offset+50, 1, count);
2713       si->lineId = tvb_get_letohl(tvb, offset+16);
2714       si->callId = tvb_get_letohl(tvb, offset+20);
2715       break;
2716
2717
2718     default:
2719       break;
2720     }
2721   }
2722   tap_queue_packet(skinny_tap, pinfo, si);
2723 }
2724
2725
2726 /* Code to actually dissect the packets */
2727 static gboolean
2728 dissect_skinny(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
2729 {
2730   /* The general structure of a packet: {IP-Header|TCP-Header|n*SKINNY}
2731    * SKINNY-Packet: {Header(Size, Reserved)|Data(MessageID, Message-Data)}
2732    */
2733   /* Header fields */
2734   guint32 hdr_data_length;
2735   guint32 hdr_version;
2736
2737   /* check, if this is really an SKINNY packet, they start with a length + 0 */
2738
2739   /* get relevant header information */
2740   hdr_data_length = tvb_get_letohl(tvb, 0);
2741   hdr_version     = tvb_get_letohl(tvb, 4);
2742
2743   /*  data_size       = MIN(8+hdr_data_length, tvb_length(tvb)) - 0xC; */
2744
2745   if (hdr_data_length < 4 || (hdr_version != 0 && hdr_version != 0x11)) {
2746     /* Not an SKINNY packet, just happened to use the same port */
2747     return FALSE;
2748   }
2749
2750   /* Make entries in Protocol column and Info column on summary display */
2751   col_set_str(pinfo->cinfo, COL_PROTOCOL, "SKINNY");
2752
2753   col_set_str(pinfo->cinfo, COL_INFO, "Skinny Client Control Protocol");
2754
2755   tcp_dissect_pdus(tvb, pinfo, tree, skinny_desegment, 4,
2756         get_skinny_pdu_len, dissect_skinny_pdu);
2757
2758   return TRUE;
2759 }
2760
2761 /* Register the protocol with Wireshark */
2762 void
2763 proto_register_skinny(void)
2764 {
2765
2766   /* Setup list of header fields */
2767   static hf_register_info hf[] = {
2768     { &hf_skinny_data_length,
2769       { "Data Length", "skinny.data_length",
2770         FT_UINT32, BASE_DEC, NULL, 0x0,
2771         "Number of bytes in the data portion.",
2772         HFILL }
2773     },
2774     { &hf_skinny_reserved,
2775       { "Reserved", "skinny.reserved",
2776         FT_UINT32, BASE_HEX, NULL, 0x0,
2777         "Reserved for future(?) use.",
2778         HFILL }
2779     },
2780     /* FIXME: Enable use of message name ???  */
2781     { &hf_skinny_messageid,
2782       { "Message ID", "skinny.messageid",
2783         FT_UINT32, BASE_HEX|BASE_EXT_STRING, &message_id_ext, 0x0,
2784         "The function requested/done with this message.",
2785         HFILL }
2786     },
2787
2788     { &hf_skinny_deviceName,
2789       { "DeviceName", "skinny.deviceName",
2790         FT_STRING, BASE_NONE, NULL, 0x0,
2791         "The device name of the phone.",
2792         HFILL }
2793     },
2794
2795     { &hf_skinny_stationUserId,
2796       { "StationUserId", "skinny.stationUserId",
2797         FT_UINT32, BASE_DEC, NULL, 0x0,
2798         "The station user id.",
2799         HFILL }
2800     },
2801
2802     { &hf_skinny_stationInstance,
2803       { "StationInstance", "skinny.stationInstance",
2804         FT_UINT32, BASE_DEC, NULL, 0x0,
2805         "The stations instance.",
2806         HFILL }
2807     },
2808
2809     { &hf_skinny_deviceType,
2810       { "DeviceType", "skinny.deviceType",
2811         FT_UINT32, BASE_DEC|BASE_EXT_STRING, &deviceTypes_ext, 0x0,
2812         "DeviceType of the station.",
2813         HFILL }
2814     },
2815
2816     { &hf_skinny_maxStreams,
2817       { "MaxStreams", "skinny.maxStreams",
2818         FT_UINT32, BASE_DEC, NULL, 0x0,
2819         "32 bit unsigned integer indicating the maximum number of simultansous RTP duplex streams that the client can handle.",
2820         HFILL }
2821     },
2822
2823     { &hf_skinny_stationIpPort,
2824       { "StationIpPort", "skinny.stationIpPort",
2825         FT_UINT16, BASE_DEC, NULL, 0x0,
2826         "The station IP port",
2827         HFILL }
2828     },
2829
2830     { &hf_skinny_stationKeypadButton,
2831       { "KeypadButton", "skinny.stationKeypadButton",
2832         FT_UINT32, BASE_HEX|BASE_EXT_STRING, &keypadButtons_ext, 0x0,
2833         "The button pressed on the phone.",
2834         HFILL }
2835     },
2836
2837     { &hf_skinny_calledParty,
2838       { "CalledParty", "skinny.calledParty",
2839         FT_STRING, BASE_NONE, NULL, 0x0,
2840         "The number called.",
2841         HFILL }
2842     },
2843
2844     { &hf_skinny_stimulus,
2845       { "Stimulus", "skinny.stimulus",
2846         FT_UINT32, BASE_HEX|BASE_EXT_STRING, &deviceStimuli_ext, 0x0,
2847         "Reason for the device stimulus message.",
2848         HFILL }
2849     },
2850
2851     { &hf_skinny_stimulusInstance,
2852       { "StimulusInstance", "skinny.stimulusInstance",
2853         FT_UINT32, BASE_DEC, NULL, 0x0,
2854         "The instance of the stimulus",
2855         HFILL }
2856     },
2857
2858     { &hf_skinny_lineNumber,
2859       { "LineNumber", "skinny.lineNumber",
2860         FT_UINT32, BASE_DEC, NULL, 0x0,
2861         "Line Number",
2862         HFILL }
2863     },
2864
2865     { &hf_skinny_speedDialNumber,
2866       { "SpeedDialNumber", "skinny.speedDialNumber",
2867         FT_UINT32, BASE_DEC, NULL, 0x0,
2868         "Which speed dial number",
2869         HFILL }
2870     },
2871
2872     { &hf_skinny_capCount,
2873       { "CapCount", "skinny.capCount",
2874         FT_UINT32, BASE_DEC, NULL, 0x0,
2875         "How many capabilities",
2876         HFILL }
2877     },
2878
2879     { &hf_skinny_payloadCapability,
2880       { "PayloadCapability", "skinny.payloadCapability",
2881         FT_UINT32, BASE_DEC|BASE_EXT_STRING, &mediaPayloads_ext, 0x0,
2882         "The payload capability for this media capability structure.",
2883         HFILL }
2884     },
2885
2886     { &hf_skinny_maxFramesPerPacket,
2887       { "MaxFramesPerPacket", "skinny.maxFramesPerPacket",
2888         FT_UINT16, BASE_DEC, NULL, 0x0,
2889         "Max frames per packet",
2890         HFILL }
2891     },
2892
2893     { &hf_skinny_alarmSeverity,
2894       { "AlarmSeverity", "skinny.alarmSeverity",
2895         FT_UINT32, BASE_DEC|BASE_EXT_STRING, &alarmSeverities_ext, 0x0,
2896         "The severity of the reported alarm.",
2897         HFILL }
2898     },
2899
2900     { &hf_skinny_alarmParam1,
2901       { "AlarmParam1", "skinny.alarmParam1",
2902         FT_UINT32, BASE_HEX, NULL, 0x0,
2903         "An as yet undecoded param1 value from the alarm message",
2904         HFILL }
2905     },
2906
2907     { &hf_skinny_alarmParam2,
2908       { "AlarmParam2", "skinny.alarmParam2",
2909         FT_IPv4, BASE_NONE, NULL, 0x0,
2910         "This is the second alarm parameter i think it's an ip address",
2911         HFILL }
2912     },
2913
2914     { &hf_skinny_receptionStatus,
2915       { "ReceptionStatus", "skinny.receptionStatus",
2916         FT_UINT32, BASE_DEC, VALS(multicastMediaReceptionStatus), 0x0,
2917         "The current status of the multicast media.",
2918         HFILL }
2919     },
2920
2921     { &hf_skinny_passThruPartyID,
2922       { "PassThruPartyID", "skinny.passThruPartyID",
2923         FT_UINT32, BASE_DEC, NULL, 0x0,
2924         "The pass thru party id",
2925         HFILL }
2926     },
2927
2928     { &hf_skinny_ORCStatus,
2929       { "OpenReceiveChannelStatus", "skinny.openReceiveChannelStatus",
2930         FT_UINT32, BASE_DEC, VALS(openReceiveChanStatus), 0x0,
2931         "The status of the opened receive channel.",
2932         HFILL }
2933     },
2934
2935     { &hf_skinny_ipAddress,
2936       { "IP Address", "skinny.ipAddress",
2937         FT_IPv4, BASE_NONE, NULL, 0x0,
2938         "An IP address",
2939         HFILL }
2940     },
2941
2942     { &hf_skinny_portNumber,
2943       { "Port Number", "skinny.portNumber",
2944         FT_UINT32, BASE_DEC, NULL, 0x0,
2945         "A port number",
2946         HFILL }
2947     },
2948
2949     { &hf_skinny_statsProcessingType,
2950       { "StatsProcessingType", "skinny.statsProcessingType",
2951         FT_UINT32, BASE_DEC, VALS(statsProcessingTypes), 0x0,
2952         "What do do after you send the stats.",
2953         HFILL }
2954     },
2955
2956     { &hf_skinny_callIdentifier,
2957       { "Call Identifier", "skinny.callIdentifier",
2958         FT_UINT32, BASE_DEC, NULL, 0x0,
2959         "Call identifier for this call.",
2960         HFILL }
2961     },
2962
2963     { &hf_skinny_packetsSent,
2964       { "Packets Sent", "skinny.packetsSent",
2965         FT_UINT32, BASE_DEC, NULL, 0x0,
2966         "Packets Sent during the call.",
2967         HFILL }
2968     },
2969
2970     { &hf_skinny_octetsSent,
2971       { "Octets Sent", "skinny.octetsSent",
2972         FT_UINT32, BASE_DEC, NULL, 0x0,
2973         "Octets sent during the call.",
2974         HFILL }
2975     },
2976
2977     { &hf_skinny_packetsRecv,
2978       { "Packets Received", "skinny.packetsRecv",
2979         FT_UINT32, BASE_DEC, NULL, 0x0,
2980         "Packets received during the call.",
2981         HFILL }
2982     },
2983
2984     { &hf_skinny_octetsRecv,
2985       { "Octets Received", "skinny.octetsRecv",
2986         FT_UINT32, BASE_DEC, NULL, 0x0,
2987         "Octets received during the call.",
2988         HFILL }
2989     },
2990
2991     { &hf_skinny_packetsLost,
2992       { "Packets Lost", "skinny.packetsLost",
2993         FT_UINT32, BASE_DEC, NULL, 0x0,
2994         "Packets lost during the call.",
2995         HFILL }
2996     },
2997
2998     { &hf_skinny_latency,
2999       { "Latency(ms)", "skinny.latency",
3000         FT_UINT32, BASE_DEC, NULL, 0x0,
3001         "Average packet latency during the call.",
3002         HFILL }
3003     },
3004
3005     { &hf_skinny_jitter,
3006       { "Jitter", "skinny.jitter",
3007         FT_UINT32, BASE_DEC, NULL, 0x0,
3008         "Average jitter during the call.",
3009         HFILL }
3010     },
3011
3012     { &hf_skinny_directoryNumber,
3013       { "Directory Number", "skinny.directoryNumber",
3014         FT_STRING, BASE_NONE, NULL, 0x0,
3015         "The number we are reporting statistics for.",
3016         HFILL }
3017     },
3018
3019     { &hf_skinny_lineInstance,
3020       { "Line Instance", "skinny.lineInstance",
3021         FT_UINT32, BASE_DEC, NULL, 0x0,
3022         "The display call plane associated with this call.",
3023         HFILL }
3024     },
3025
3026     { &hf_skinny_softKeyEvent,
3027       { "SoftKeyEvent", "skinny.softKeyEvent",
3028         FT_UINT32, BASE_DEC|BASE_EXT_STRING, &softKeyEvents_ext, 0x0,
3029         "Which softkey event is being reported.",
3030         HFILL }
3031     },
3032
3033     { &hf_skinny_keepAliveInterval,
3034       { "KeepAliveInterval", "skinny.keepAliveInterval",
3035         FT_UINT32, BASE_DEC, NULL, 0x0,
3036         "How often are keep alives exchanges between the client and the call manager.",
3037         HFILL }
3038     },
3039
3040     { &hf_skinny_secondaryKeepAliveInterval,
3041       { "SecondaryKeepAliveInterval", "skinny.secondaryKeepAliveInterval",
3042         FT_UINT32, BASE_DEC, NULL, 0x0,
3043         "How often are keep alives exchanges between the client and the secondary call manager.",
3044         HFILL }
3045     },
3046
3047     { &hf_skinny_dateTemplate,
3048       { "DateTemplate", "skinny.dateTemplate",
3049         FT_STRING, BASE_NONE, NULL, 0x0,
3050         "The display format for the date/time on the phone.",
3051         HFILL }
3052     },
3053
3054     { &hf_skinny_buttonOffset,
3055       { "ButtonOffset", "skinny.buttonOffset",
3056         FT_UINT32, BASE_DEC, NULL, 0x0,
3057         "Offset is the number of the first button referenced by this message.",
3058         HFILL }
3059     },
3060
3061     { &hf_skinny_buttonCount,
3062       { "ButtonCount", "skinny.buttonCount",
3063         FT_UINT32, BASE_DEC, NULL, 0x0,
3064         "Number of (VALID) button definitions in this message.",
3065         HFILL }
3066     },
3067
3068     { &hf_skinny_totalButtonCount,
3069       { "TotalButtonCount", "skinny.totalButtonCount",
3070         FT_UINT32, BASE_DEC, NULL, 0x0,
3071         "The total number of buttons defined for this phone.",
3072         HFILL }
3073     },
3074
3075     { &hf_skinny_buttonInstanceNumber,
3076       { "InstanceNumber", "skinny.buttonInstanceNumber",
3077         FT_UINT8, BASE_HEX|BASE_EXT_STRING, &keypadButtons_ext, 0x0,
3078         "The button instance number for a button or the StationKeyPad value, repeats allowed.",
3079         HFILL }
3080     },
3081
3082     { &hf_skinny_buttonDefinition,
3083       { "ButtonDefinition", "skinny.buttonDefinition",
3084         FT_UINT8, BASE_HEX|BASE_EXT_STRING, &buttonDefinitions_ext, 0x0,
3085         "The button type for this instance (ie line, speed dial, ....",
3086         HFILL }
3087     },
3088
3089     { &hf_skinny_softKeyOffset,
3090       { "SoftKeyOffset", "skinny.softKeyOffset",
3091         FT_UINT32, BASE_DEC, NULL, 0x0,
3092         "The offset for the first soft key in this message.",
3093         HFILL }
3094     },
3095
3096     { &hf_skinny_softKeyCount,
3097       { "SoftKeyCount", "skinny.softKeyCount",
3098         FT_UINT32, BASE_DEC, NULL, 0x0,
3099         "The number of valid softkeys in this message.",
3100         HFILL }
3101     },
3102
3103     { &hf_skinny_totalSoftKeyCount,
3104       { "TotalSoftKeyCount", "skinny.totalSoftKeyCount",
3105         FT_UINT32, BASE_DEC, NULL, 0x0,
3106         "The total number of softkeys for this device.",
3107         HFILL }
3108     },
3109
3110     { &hf_skinny_softKeyLabel,
3111       { "SoftKeyLabel", "skinny.softKeyLabel",
3112         FT_STRING, BASE_NONE, NULL, 0x0,
3113         "The text label for this soft key.",
3114         HFILL }
3115     },
3116
3117     { &hf_skinny_softKeySetOffset,
3118       { "SoftKeySetOffset", "skinny.softKeySetOffset",
3119         FT_UINT32, BASE_DEC, NULL, 0x0,
3120         "The offset for the first soft key set in this message.",
3121         HFILL }
3122     },
3123
3124     { &hf_skinny_softKeySetCount,
3125       { "SoftKeySetCount", "skinny.softKeySetCount",
3126         FT_UINT32, BASE_DEC, NULL, 0x0,
3127         "The number of valid softkey sets in this message.",
3128         HFILL }
3129     },
3130
3131     { &hf_skinny_totalSoftKeySetCount,
3132       { "TotalSoftKeySetCount", "skinny.totalSoftKeySetCount",
3133         FT_UINT32, BASE_DEC, NULL, 0x0,
3134         "The total number of softkey sets for this device.",
3135         HFILL }
3136     },
3137
3138     { &hf_skinny_softKeyTemplateIndex,
3139       { "SoftKeyTemplateIndex", "skinny.softKeyTemplateIndex",
3140         FT_UINT8, BASE_DEC|BASE_EXT_STRING, &softKeyEvents_ext, 0x0,
3141         "Array of size 16 8-bit unsigned ints containing an index into the softKeyTemplate.",
3142         HFILL }
3143     },
3144
3145     { &hf_skinny_softKeyInfoIndex,
3146       { "SoftKeyInfoIndex", "skinny.softKeyInfoIndex",
3147         FT_UINT16, BASE_DEC|BASE_EXT_STRING, &softKeyIndexes_ext, 0x0,
3148         "Array of size 16 16-bit unsigned integers containing an index into the soft key description information.",
3149         HFILL }
3150     },
3151
3152     { &hf_skinny_softKeySetDescription,
3153       { "SoftKeySet", "skinny.softKeySetDescription",
3154         FT_UINT8, BASE_DEC|BASE_EXT_STRING, &keySetNames_ext, 0x0,
3155         "A text description of what this softkey when this softkey set is displayed",
3156         HFILL }
3157     },
3158
3159     { &hf_skinny_softKeyMap,
3160       { "SoftKeyMap","skinny.softKeyMap",
3161         FT_UINT16, BASE_HEX, NULL, 0x0,
3162         NULL,
3163         HFILL }
3164     },
3165
3166     { &hf_skinny_softKey0,
3167       { "SoftKey0", "skinny.softKeyMap.0",
3168         FT_BOOLEAN, 16, TFS(&softKeyMapValues), SKINNY_SOFTKEY0,
3169         NULL,
3170         HFILL }
3171     },
3172
3173     { &hf_skinny_softKey1,
3174       { "SoftKey1", "skinny.softKeyMap.1",
3175         FT_BOOLEAN, 16, TFS(&softKeyMapValues), SKINNY_SOFTKEY1,
3176         NULL,
3177         HFILL }
3178     },
3179
3180     { &hf_skinny_softKey2,
3181       { "SoftKey2", "skinny.softKeyMap.2",
3182         FT_BOOLEAN, 16, TFS(&softKeyMapValues), SKINNY_SOFTKEY2,
3183         NULL,
3184         HFILL }
3185     },
3186
3187     { &hf_skinny_softKey3,
3188       { "SoftKey3", "skinny.softKeyMap.3",
3189         FT_BOOLEAN, 16, TFS(&softKeyMapValues), SKINNY_SOFTKEY3,
3190         NULL,
3191         HFILL }
3192     },
3193
3194     { &hf_skinny_softKey4,
3195       { "SoftKey4", "skinny.softKeyMap.4",
3196         FT_BOOLEAN, 16, TFS(&softKeyMapValues), SKINNY_SOFTKEY4,
3197         NULL,
3198         HFILL }
3199     },
3200
3201     { &hf_skinny_softKey5,
3202       { "SoftKey5", "skinny.softKeyMap.5",
3203         FT_BOOLEAN, 16, TFS(&softKeyMapValues), SKINNY_SOFTKEY5,
3204         NULL,
3205         HFILL }
3206     },
3207
3208     { &hf_skinny_softKey6,
3209       { "SoftKey6", "skinny.softKeyMap.6",
3210         FT_BOOLEAN, 16, TFS(&softKeyMapValues), SKINNY_SOFTKEY6,
3211         NULL,
3212         HFILL }
3213     },
3214
3215     { &hf_skinny_softKey7,
3216       { "SoftKey7", "skinny.softKeyMap.7",
3217         FT_BOOLEAN, 16, TFS(&softKeyMapValues), SKINNY_SOFTKEY7,
3218         NULL,
3219         HFILL }
3220     },
3221
3222     { &hf_skinny_softKey8,
3223       { "SoftKey8", "skinny.softKeyMap.8",
3224         FT_BOOLEAN, 16, TFS(&softKeyMapValues), SKINNY_SOFTKEY8,
3225         NULL,
3226         HFILL }
3227     },
3228
3229     { &hf_skinny_softKey9,
3230       { "SoftKey9", "skinny.softKeyMap.9",
3231         FT_BOOLEAN, 16, TFS(&softKeyMapValues), SKINNY_SOFTKEY9,
3232         NULL,
3233         HFILL }
3234     },
3235
3236     { &hf_skinny_softKey10,
3237       { "SoftKey10", "skinny.softKeyMap.10",
3238         FT_BOOLEAN, 16, TFS(&softKeyMapValues), SKINNY_SOFTKEY10,
3239         NULL,
3240         HFILL }
3241     },
3242
3243     { &hf_skinny_softKey11,
3244       { "SoftKey11", "skinny.softKeyMap.11",
3245         FT_BOOLEAN, 16, TFS(&softKeyMapValues), SKINNY_SOFTKEY11,
3246         NULL,
3247         HFILL }
3248     },
3249
3250     { &hf_skinny_softKey12,
3251       { "SoftKey12", "skinny.softKeyMap.12",
3252         FT_BOOLEAN, 16, TFS(&softKeyMapValues), SKINNY_SOFTKEY12,
3253         NULL,
3254         HFILL }
3255     },
3256
3257     { &hf_skinny_softKey13,
3258       { "SoftKey13", "skinny.softKeyMap.13",
3259         FT_BOOLEAN, 16, TFS(&softKeyMapValues), SKINNY_SOFTKEY13,
3260         NULL,
3261         HFILL }
3262     },
3263
3264     { &hf_skinny_softKey14,
3265       { "SoftKey14", "skinny.softKeyMap.14",
3266         FT_BOOLEAN, 16, TFS(&softKeyMapValues), SKINNY_SOFTKEY14,
3267         NULL,
3268         HFILL }
3269     },
3270
3271     { &hf_skinny_softKey15,
3272       { "SoftKey15", "skinny.softKeyMap.15",
3273         FT_BOOLEAN, 16, TFS(&softKeyMapValues), SKINNY_SOFTKEY15,
3274         NULL,
3275         HFILL }
3276     },
3277
3278     { &hf_skinny_lampMode,
3279       { "LampMode", "skinny.lampMode",
3280         FT_UINT32, BASE_DEC|BASE_EXT_STRING, &stationLampModes_ext, 0x0,
3281         "The lamp mode",
3282         HFILL }
3283     },
3284
3285     { &hf_skinny_messageTimeOutValue,
3286       { "Message Timeout", "skinny.messageTimeOutValue",
3287         FT_UINT32, BASE_DEC, NULL, 0x0,
3288         "The timeout in seconds for this message",
3289         HFILL }
3290     },
3291
3292     { &hf_skinny_displayMessage,
3293       { "DisplayMessage", "skinny.displayMessage",
3294         FT_STRING, BASE_NONE, NULL, 0x0,
3295         "The message displayed on the phone.",
3296         HFILL }
3297     },
3298
3299     { &hf_skinny_lineDirNumber,
3300       { "Line Dir Number", "skinny.lineDirNumber",
3301         FT_STRING, BASE_NONE, NULL, 0x0,
3302         "The directory number for this line.",
3303         HFILL }
3304     },
3305
3306     { &hf_skinny_lineFullyQualifiedDisplayName,
3307       { "FullyQualifiedDisplayName", "skinny.fqdn",
3308         FT_STRING, BASE_NONE, NULL, 0x0,
3309         "The full display name for this line.",
3310         HFILL }
3311     },
3312
3313     { &hf_skinny_lineDisplayName,
3314       { "DisplayName", "skinny.displayName",
3315         FT_STRING, BASE_NONE, NULL, 0x0,
3316         "The display name for this line.",
3317         HFILL }
3318     },
3319
3320     { &hf_skinny_speedDialDirNumber,
3321       { "SpeedDial Number", "skinny.speedDialDirNum",
3322         FT_STRING, BASE_NONE, NULL, 0x0,
3323         "the number to dial for this speed dial.",
3324         HFILL }
3325     },
3326
3327     { &hf_skinny_speedDialDisplayName,
3328       { "SpeedDial Display", "skinny.speedDialDisplay",
3329         FT_STRING, BASE_NONE, NULL, 0x0,
3330         "The text to display for this speed dial.",
3331         HFILL }
3332     },
3333
3334     { &hf_skinny_dateYear,
3335       { "Year", "skinny.year",
3336         FT_UINT32, BASE_DEC, NULL, 0x0,
3337         "The current year",
3338         HFILL }
3339     },
3340
3341     { &hf_skinny_dateMonth,
3342       { "Month", "skinny.month",
3343         FT_UINT32, BASE_DEC, NULL, 0x0,
3344         "The current month",
3345         HFILL }
3346     },
3347
3348     { &hf_skinny_dayOfWeek,
3349       { "DayOfWeek", "skinny.dayOfWeek",
3350         FT_UINT32, BASE_DEC, NULL, 0x0,
3351         "The day of the week",
3352         HFILL }
3353     },
3354
3355     { &hf_skinny_dateDay,
3356       { "Day", "skinny.day",
3357         FT_UINT32, BASE_DEC, NULL, 0x0,
3358         "The day of the current month",
3359         HFILL }
3360     },
3361
3362     { &hf_skinny_dateHour,
3363       { "Hour", "skinny.hour",
3364         FT_UINT32, BASE_DEC, NULL, 0x0,
3365         "Hour of the day",
3366         HFILL }
3367     },
3368
3369     { &hf_skinny_dateMinute,
3370       { "Minute", "skinny.minute",
3371         FT_UINT32, BASE_DEC, NULL, 0x0,
3372         NULL,
3373         HFILL }
3374     },
3375
3376     { &hf_skinny_dateSeconds,
3377       { "Seconds", "skinny.dateSeconds",
3378         FT_UINT32, BASE_DEC, NULL, 0x0,
3379         NULL,
3380         HFILL }
3381     },
3382
3383     { &hf_skinny_dateMilliseconds,
3384       { "Milliseconds", "skinny.dateMilliseconds",
3385         FT_UINT32, BASE_DEC, NULL, 0x0,
3386         NULL,
3387         HFILL }
3388     },
3389
3390     { &hf_skinny_timeStamp,
3391       { "Timestamp", "skinny.timeStamp",
3392         FT_UINT32, BASE_DEC, NULL, 0x0,
3393         "Time stamp for the call reference",
3394         HFILL }
3395     },
3396     { &hf_skinny_callState,
3397       { "CallState", "skinny.callState",
3398         FT_UINT32, BASE_DEC|BASE_EXT_STRING, &skinny_stationCallStates_ext, 0x0,
3399         "The D channel call state of the call",
3400         HFILL }
3401     },
3402
3403     { &hf_skinny_deviceTone,
3404       { "Tone", "skinny.deviceTone",
3405         FT_UINT32, BASE_HEX|BASE_EXT_STRING, &skinny_deviceTones_ext, 0x0,
3406         "Which tone to play",
3407         HFILL }
3408     },
3409
3410     { &hf_skinny_callingPartyName,
3411       { "Calling Party Name", "skinny.callingPartyName",
3412         FT_STRING, BASE_NONE, NULL, 0x0,
3413         "The passed name of the calling party.",
3414         HFILL }
3415     },
3416
3417     { &hf_skinny_callingParty,
3418       { "Calling Party", "skinny.callingPartyName",
3419         FT_STRING, BASE_NONE, NULL, 0x0,
3420         "The passed number of the calling party.",
3421         HFILL }
3422     },
3423
3424     { &hf_skinny_calledPartyName,
3425       { "Called Party Name", "skinny.calledPartyName",
3426         FT_STRING, BASE_NONE, NULL, 0x0,
3427         "The name of the party we are calling.",
3428         HFILL }
3429     },
3430
3431     { &hf_skinny_callType,
3432       { "Call Type", "skinny.callType",
3433         FT_UINT32, BASE_DEC, VALS(skinny_callTypes), 0x0,
3434         "What type of call, in/out/etc",
3435         HFILL }
3436     },
3437
3438     { &hf_skinny_originalCalledPartyName,
3439       { "Original Called Party Name", "skinny.originalCalledPartyName",
3440         FT_STRING, BASE_NONE, NULL, 0x0,
3441         "name of the original person who placed the call.",
3442         HFILL }
3443     },
3444
3445     { &hf_skinny_originalCalledParty,
3446       { "Original Called Party", "skinny.originalCalledParty",
3447         FT_STRING, BASE_NONE, NULL, 0x0,
3448         "The number of the original calling party.",
3449         HFILL }
3450     },
3451
3452     { &hf_skinny_ringType,
3453       { "Ring Type", "skinny.ringType",
3454         FT_UINT32, BASE_HEX|BASE_EXT_STRING, &skinny_ringTypes_ext, 0x0,
3455         "What type of ring to play",
3456         HFILL }
3457     },
3458
3459     { &hf_skinny_ringMode,
3460       { "Ring Mode", "skinny.ringMode",
3461         FT_UINT32, BASE_HEX, VALS(skinny_ringModes), 0x0,
3462         "What mode of ring to play",
3463         HFILL }
3464     },
3465
3466     { &hf_skinny_speakerMode,
3467       { "Speaker", "skinny.speakerMode",
3468         FT_UINT32, BASE_HEX, VALS(skinny_speakerModes), 0x0,
3469         "This message sets the speaker mode on/off",
3470         HFILL }
3471     },
3472
3473     { &hf_skinny_remoteIpAddr,
3474       { "Remote Ip Address", "skinny.remoteIpAddr",
3475         FT_IPv4, BASE_NONE, NULL, 0x0,
3476         "The remote end ip address for this stream",
3477         HFILL }
3478     },
3479
3480     { &hf_skinny_remotePortNumber,
3481       { "Remote Port", "skinny.remotePortNumber",
3482         FT_UINT32, BASE_DEC, NULL, 0x0,
3483         "The remote port number listening for this stream",
3484         HFILL }
3485     },
3486
3487     { &hf_skinny_millisecondPacketSize,
3488       { "MS/Packet", "skinny.millisecondPacketSize",
3489         FT_UINT32, BASE_DEC, NULL, 0x0,
3490         "The number of milliseconds of conversation in each packet",
3491         HFILL }
3492     },
3493
3494     { &hf_skinny_precedenceValue,
3495       { "Precedence", "skinny.precedenceValue",
3496         FT_UINT32, BASE_DEC, NULL, 0x0,
3497         "Precedence value",
3498         HFILL }
3499     },
3500
3501     { &hf_skinny_silenceSuppression,
3502       { "Silence Suppression", "skinny.silenceSuppression",
3503         FT_UINT32, BASE_HEX, VALS(skinny_silenceSuppressionModes), 0x0,
3504         "Mode for silence suppression",
3505         HFILL }
3506     },
3507
3508     { &hf_skinny_g723BitRate,
3509       { "G723 BitRate", "skinny.g723BitRate",
3510         FT_UINT32, BASE_DEC, VALS(skinny_g723BitRates), 0x0,
3511         "The G723 bit rate for this stream/JUNK if not g723 stream",
3512         HFILL }
3513     },
3514
3515     { &hf_skinny_conferenceID,
3516       { "Conference ID", "skinny.conferenceID",
3517         FT_UINT32, BASE_DEC, NULL, 0x0,
3518         "The conference ID",
3519         HFILL }
3520     },
3521
3522     { &hf_skinny_deviceResetType,
3523       { "Reset Type", "skinny.deviceResetType",
3524         FT_UINT32, BASE_DEC, VALS(skinny_deviceResetTypes), 0x0,
3525         "How the devices it to be reset (reset/restart)",
3526         HFILL }
3527     },
3528
3529     { &hf_skinny_echoCancelType,
3530       { "Echo Cancel Type", "skinny.echoCancelType",
3531         FT_UINT32, BASE_DEC, VALS(skinny_echoCancelTypes), 0x0,
3532         "Is echo cancelling enabled or not",
3533         HFILL }
3534     },
3535
3536     { &hf_skinny_deviceUnregisterStatus,
3537       { "Unregister Status", "skinny.deviceUnregisterStatus",
3538         FT_UINT32, BASE_DEC, VALS(skinny_deviceUnregisterStatusTypes), 0x0,
3539         "The status of the device unregister request (*CAN* be refused)",
3540         HFILL }
3541     },
3542
3543     { &hf_skinny_hookFlashDetectMode,
3544       { "Hook Flash Mode", "skinny.hookFlashDetectMode",
3545         FT_UINT32, BASE_DEC, VALS(skinny_hookFlashDetectModes), 0x0,
3546         "Which method to use to detect that a hook flash has occured",
3547         HFILL }
3548     },
3549
3550     { &hf_skinny_detectInterval,
3551       { "HF Detect Interval", "skinny.detectInterval",
3552         FT_UINT32, BASE_DEC, NULL, 0x0,
3553         "The number of milliseconds that determines a hook flash has occured",
3554         HFILL }
3555     },
3556
3557     { &hf_skinny_headsetMode,
3558       { "Headset Mode", "skinny.headsetMode",
3559         FT_UINT32, BASE_DEC, VALS(skinny_headsetModes), 0x0,
3560         "Turns on and off the headset on the set",
3561         HFILL }
3562     },
3563
3564     { &hf_skinny_microphoneMode,
3565       { "Microphone Mode", "skinny.microphoneMode",
3566         FT_UINT32, BASE_DEC, VALS(skinny_microphoneModes), 0x0,
3567         "Turns on and off the microphone on the set",
3568         HFILL }
3569     },
3570
3571     { &hf_skinny_activeForward,
3572       { "Active Forward", "skinny.activeForward",
3573         FT_UINT32, BASE_DEC, NULL, 0x0,
3574         "This is non zero to indicate that a forward is active on the line",
3575         HFILL }
3576     },
3577
3578     { &hf_skinny_forwardAllActive,
3579       { "Forward All", "skinny.forwardAllActive",
3580         FT_UINT32, BASE_DEC, NULL, 0x0,
3581         "Forward all calls",
3582         HFILL }
3583     },
3584
3585     { &hf_skinny_forwardBusyActive,
3586       { "Forward Busy", "skinny.forwardBusyActive",
3587         FT_UINT32, BASE_DEC, NULL, 0x0,
3588         "Forward calls when busy",
3589         HFILL }
3590     },
3591
3592     { &hf_skinny_forwardNoAnswerActive,
3593       { "Forward NoAns", "skinny.forwardNoAnswerActive",
3594         FT_UINT32, BASE_DEC, NULL, 0x0,
3595         "Forward only when no answer",
3596         HFILL }
3597     },
3598
3599     { &hf_skinny_forwardNumber,
3600       { "Forward Number", "skinny.forwardNumber",
3601         FT_STRING, BASE_NONE, NULL, 0x0,
3602         "The number to forward calls to.",
3603         HFILL }
3604     },
3605
3606     { &hf_skinny_userName,
3607       { "Username", "skinny.userName",
3608         FT_STRING, BASE_NONE, NULL, 0x0,
3609         "Username for this device.",
3610         HFILL }
3611     },
3612
3613     { &hf_skinny_serverName,
3614       { "Server Name", "skinny.serverName",
3615         FT_STRING, BASE_NONE, NULL, 0x0,
3616         "The server name for this device.",
3617         HFILL }
3618     },
3619
3620     { &hf_skinny_numberLines,
3621       { "Number of Lines", "skinny.numberLines",
3622         FT_UINT32, BASE_DEC, NULL, 0x0,
3623         "How many lines this device has",
3624         HFILL }
3625     },
3626
3627     { &hf_skinny_numberSpeedDials,
3628       { "Number of SpeedDials", "skinny.numberSpeedDials",
3629         FT_UINT32, BASE_DEC, NULL, 0x0,
3630         "The number of speed dials this device has",
3631         HFILL }
3632     },
3633
3634     { &hf_skinny_sessionType,
3635       { "Session Type", "skinny.sessionType",
3636         FT_UINT32, BASE_DEC|BASE_EXT_STRING, &skinny_sessionTypes_ext, 0x0,
3637         "The type of this session.",
3638         HFILL }
3639     },
3640
3641     { &hf_skinny_version,
3642       { "Version", "skinny.version",
3643         FT_STRING, BASE_NONE, NULL, 0x0,
3644         "Version.",
3645         HFILL }
3646     },
3647
3648     { &hf_skinny_mediaEnunciationType,
3649       { "Enunciation Type", "skinny.mediaEnunciationType",
3650         FT_UINT32, BASE_DEC, VALS(skinny_mediaEnunciationTypes), 0x0,
3651         "No clue.",
3652         HFILL }
3653     },
3654
3655     { &hf_skinny_serverIdentifier,
3656       { "Server Identifier", "skinny.serverIdentifier",
3657         FT_STRING, BASE_NONE, NULL, 0x0,
3658         "Server Identifier.",
3659         HFILL }
3660     },
3661
3662     { &hf_skinny_serverListenPort,
3663       { "Server Port", "skinny.serverListenPort",
3664         FT_UINT32, BASE_DEC, NULL, 0x0,
3665         "The port the server listens on.",
3666         HFILL }
3667     },
3668
3669     { &hf_skinny_serverIpAddress,
3670       { "Server Ip Address", "skinny.serverIpAddress",
3671         FT_IPv4, BASE_NONE, NULL, 0x0,
3672         "The IP address for this server",
3673         HFILL }
3674     },
3675
3676     { &hf_skinny_multicastPort,
3677       { "Multicast Port", "skinny.multicastPort",
3678         FT_UINT32, BASE_DEC, NULL, 0x0,
3679         "The multicast port the to listens on.",
3680         HFILL }
3681     },
3682
3683     { &hf_skinny_multicastIpAddress,
3684       { "Multicast Ip Address", "skinny.multicastIpAddress",
3685         FT_IPv4, BASE_NONE, NULL, 0x0,
3686         "The multicast address for this conference",
3687         HFILL }
3688     },
3689
3690     { &hf_skinny_tokenRejWaitTime,
3691       { "Retry Wait Time", "skinny.tokenRejWaitTime",
3692         FT_UINT32, BASE_DEC, NULL, 0x0,
3693         "The time to wait before retrying this token request.",
3694         HFILL }
3695     },
3696
3697     { &hf_skinny_unknown,
3698       { "Data", "skinny.unknown",
3699         FT_UINT32, BASE_HEX, NULL, 0x0,
3700         "Place holder for unknown data.",
3701         HFILL }
3702     },
3703
3704     { &hf_skinny_data,
3705       { "Data", "skinny.data",
3706         FT_UINT8, BASE_HEX, NULL, 0x0,
3707         "dataPlace holder for unknown data.",
3708         HFILL }
3709     },
3710
3711     { &hf_skinny_numberOfInServiceStreams,
3712       { "NumberOfInServiceStreams", "skinny.numberOfInServiceStreams",
3713         FT_UINT32, BASE_DEC, NULL, 0x0,
3714         "Number of in service streams.",
3715         HFILL }
3716     },
3717
3718     { &hf_skinny_maxStreamsPerConf,
3719       { "MaxStreamsPerConf", "skinny.maxStreamsPerConf",
3720         FT_UINT32, BASE_DEC, NULL, 0x0,
3721         "Maximum number of streams per conference.",
3722         HFILL }
3723     },
3724
3725     { &hf_skinny_numberOfOutOfServiceStreams,
3726       { "NumberOfOutOfServiceStreams", "skinny.numberOfOutOfServiceStreams",
3727         FT_UINT32, BASE_DEC, NULL, 0x0,
3728         "Number of out of service streams.",
3729         HFILL }
3730     },
3731
3732     { &hf_skinny_applicationID,
3733       { "ApplicationID", "skinny.applicationID",
3734         FT_UINT32, BASE_DEC, NULL, 0x0,
3735         "Application ID.",
3736         HFILL }
3737     },
3738
3739     { &hf_skinny_transactionID,
3740       { "TransactionID", "skinny.transactionID",
3741         FT_UINT32, BASE_DEC, NULL, 0x0,
3742         "Transaction ID.",
3743         HFILL }
3744     },
3745
3746     { &hf_skinny_serviceNum,
3747       { "ServiceNum", "skinny.serviceNum",
3748         FT_UINT32, BASE_DEC, NULL, 0x0,
3749         "ServiceNum.",
3750         HFILL }
3751     },
3752
3753     { &hf_skinny_serviceURLIndex,
3754       { "serviceURLIndex", "skinny.serviceURLIndex",
3755         FT_UINT32, BASE_DEC, NULL, 0x0,
3756         "serviceURLIndex.",
3757         HFILL }
3758     },
3759
3760     { &hf_skinny_featureIndex,
3761       { "FeatureIndex", "skinny.featureIndex",
3762         FT_UINT32, BASE_DEC, NULL, 0x0,
3763         "FeatureIndex.",
3764         HFILL }
3765     },
3766
3767     { &hf_skinny_createConfResults,
3768       { "CreateConfResults", "skinny.createConfResults",
3769         FT_UINT32, BASE_DEC, VALS(skinny_createConfResults), 0x0,
3770         "The create conference results",
3771         HFILL }
3772     },
3773
3774     { &hf_skinny_modifyConfResults,
3775       { "ModifyConfResults", "skinny.modifyConfResults",
3776         FT_UINT32, BASE_DEC|BASE_EXT_STRING, &skinny_modifyConfResults_ext, 0x0,
3777         "The modify conference results",
3778         HFILL }
3779     },
3780
3781     { &hf_skinny_deleteConfResults,
3782       { "DeleteConfResults", "skinny.deleteConfResults",
3783         FT_UINT32, BASE_DEC, VALS(skinny_deleteConfResults), 0x0,
3784         "The delete conference results",
3785         HFILL }
3786     },
3787
3788     { &hf_skinny_addParticipantResults,
3789       { "AddParticipantResults", "skinny.addParticipantResults",
3790         FT_UINT32, BASE_DEC|BASE_EXT_STRING, &skinny_addParticipantResults_ext, 0x0,
3791         "The add conference participant results",
3792         HFILL }
3793     },
3794
3795     { &hf_skinny_passThruData,
3796       { "PassThruData", "skinny.passThruData",
3797         FT_UINT8, BASE_HEX, NULL, 0x0,
3798         "Pass Through data.",
3799         HFILL }
3800     },
3801
3802     { &hf_skinny_auditParticipantResults,
3803       { "AuditParticipantResults", "skinny.auditParticipantResults",
3804         FT_UINT32, BASE_DEC, VALS(skinny_auditParticipantResults), 0x0,
3805         "The audit participant results",
3806         HFILL }
3807     },
3808
3809     { &hf_skinny_last,
3810       { "Last", "skinny.last",
3811         FT_UINT32, BASE_DEC, NULL, 0x0,
3812         "Last.",
3813         HFILL }
3814     },
3815
3816     { &hf_skinny_numberOfEntries,
3817       { "NumberOfEntries", "skinny.numberOfEntries",
3818         FT_UINT32, BASE_DEC, NULL, 0x0,
3819         "Number of entries in list.",
3820         HFILL }
3821     },
3822
3823     { &hf_skinny_participantEntry,
3824       { "ParticipantEntry", "skinny.participantEntry",
3825         FT_UINT32, BASE_DEC, NULL, 0x0,
3826         "Participant Entry.",
3827         HFILL }
3828     },
3829
3830     { &hf_skinny_resourceTypes,
3831       { "ResourceType", "skinny.resourceTypes",
3832         FT_UINT32, BASE_DEC, VALS(skinny_resourceTypes), 0x0,
3833         "Resource Type",
3834         HFILL }
3835     },
3836
3837     { &hf_skinny_numberOfReservedParticipants,
3838       { "NumberOfReservedParticipants", "skinny.numberOfReservedParticipants",
3839         FT_UINT32, BASE_DEC, NULL, 0x0,
3840         "numberOfReservedParticipants.",
3841         HFILL }
3842     },
3843
3844     { &hf_skinny_numberOfActiveParticipants,
3845       { "NumberOfActiveParticipants", "skinny.numberOfActiveParticipants",
3846         FT_UINT32, BASE_DEC, NULL, 0x0,
3847         "numberOfActiveParticipants.",
3848         HFILL }
3849     },
3850
3851     { &hf_skinny_appID,
3852       { "AppID", "skinny.appID",
3853         FT_UINT32, BASE_DEC, NULL, 0x0,
3854         "AppID.",
3855         HFILL }
3856     },
3857
3858     { &hf_skinny_appData,
3859       { "AppData", "skinny.appData",
3860         FT_UINT8, BASE_HEX, NULL, 0x0,
3861         "App data.",
3862         HFILL }
3863     },
3864
3865     { &hf_skinny_appConfID,
3866       { "AppConfID", "skinny.appConfID",
3867         FT_UINT8, BASE_HEX, NULL, 0x0,
3868         "App Conf ID Data.",
3869         HFILL }
3870     },
3871
3872     { &hf_skinny_sequenceFlag,
3873       { "SequenceFlag", "skinny.sequenceFlag",
3874         FT_UINT32, BASE_DEC, VALS(skinny_sequenceFlags), 0x0,
3875         "Sequence Flag",
3876         HFILL }
3877     },
3878
3879     { &hf_skinny_displayPriority,
3880       { "DisplayPriority", "skinny.displayPriority",
3881         FT_UINT32, BASE_DEC, NULL, 0x0,
3882         "Display Priority.",
3883         HFILL }
3884     },
3885
3886     { &hf_skinny_appInstanceID,
3887       { "AppInstanceID", "skinny.appInstanceID",
3888         FT_UINT32, BASE_DEC, NULL, 0x0,
3889         "appInstanceID.",
3890         HFILL }
3891     },
3892
3893     { &hf_skinny_routingID,
3894       { "routingID", "skinny.routingID",
3895         FT_UINT32, BASE_DEC, NULL, 0x0,
3896         "routingID.",
3897         HFILL }
3898     },
3899
3900     { &hf_skinny_audioCapCount,
3901       { "AudioCapCount", "skinny.audioCapCount",
3902         FT_UINT32, BASE_DEC, NULL, 0x0,
3903         "AudioCapCount.",
3904         HFILL }
3905     },
3906
3907     { &hf_skinny_videoCapCount,
3908       { "VideoCapCount", "skinny.videoCapCount",
3909         FT_UINT32, BASE_DEC, NULL, 0x0,
3910         "VideoCapCount.",
3911         HFILL }
3912     },
3913
3914     { &hf_skinny_dataCapCount,
3915       { "DataCapCount", "skinny.dataCapCount",
3916         FT_UINT32, BASE_DEC, NULL, 0x0,
3917         "DataCapCount.",
3918         HFILL }
3919     },
3920
3921     { &hf_skinny_RTPPayloadFormat,
3922       { "RTPPayloadFormat", "skinny.RTPPayloadFormat",
3923         FT_UINT32, BASE_DEC, NULL, 0x0,
3924         "RTPPayloadFormat.",
3925         HFILL }
3926     },
3927
3928     { &hf_skinny_customPictureFormatCount,
3929       { "CustomPictureFormatCount", "skinny.customPictureFormatCount",
3930         FT_UINT32, BASE_DEC, NULL, 0x0,
3931         "CustomPictureFormatCount.",
3932         HFILL }
3933     },
3934
3935     { &hf_skinny_pictureWidth,
3936       { "PictureWidth", "skinny.pictureWidth",
3937         FT_UINT32, BASE_DEC, NULL, 0x0,
3938         "PictureWidth.",
3939         HFILL }
3940     },
3941
3942     { &hf_skinny_pictureHeight,
3943       { "PictureHeight", "skinny.pictureHeight",
3944         FT_UINT32, BASE_DEC, NULL, 0x0,
3945         "PictureHeight.",
3946         HFILL }
3947     },
3948
3949     { &hf_skinny_pixelAspectRatio,
3950       { "PixelAspectRatio", "skinny.pixelAspectRatio",
3951         FT_UINT32, BASE_DEC, NULL, 0x0,
3952         "PixelAspectRatio.",
3953         HFILL }
3954     },
3955
3956     { &hf_skinny_clockConversionCode,
3957       { "ClockConversionCode", "skinny.clockConversionCode",
3958         FT_UINT32, BASE_DEC, NULL, 0x0,
3959         "ClockConversionCode.",
3960         HFILL }
3961     },
3962
3963     { &hf_skinny_clockDivisor,
3964       { "ClockDivisor", "skinny.clockDivisor",
3965         FT_UINT32, BASE_DEC, NULL, 0x0,
3966         "Clock Divisor.",
3967         HFILL }
3968     },
3969
3970     { &hf_skinny_activeStreamsOnRegistration,
3971       { "ActiveStreamsOnRegistration", "skinny.activeStreamsOnRegistration",
3972         FT_UINT32, BASE_DEC, NULL, 0x0,
3973         "ActiveStreamsOnRegistration.",
3974         HFILL }
3975     },
3976
3977     { &hf_skinny_maxBW,
3978       { "MaxBW", "skinny.maxBW",
3979         FT_UINT32, BASE_DEC, NULL, 0x0,
3980         "MaxBW.",
3981         HFILL }
3982     },
3983
3984     { &hf_skinny_serviceResourceCount,
3985       { "ServiceResourceCount", "skinny.serviceResourceCount",
3986         FT_UINT32, BASE_DEC, NULL, 0x0,
3987         "ServiceResourceCount.",
3988         HFILL }
3989     },
3990
3991     { &hf_skinny_layoutCount,
3992       { "LayoutCount", "skinny.layoutCount",
3993         FT_UINT32, BASE_DEC, NULL, 0x0,
3994         "LayoutCount.",
3995         HFILL }
3996     },
3997
3998     { &hf_skinny_layout,
3999       { "Layout", "skinny.layout",
4000         FT_UINT32, BASE_DEC|BASE_EXT_STRING, &skinny_Layouts_ext, 0x0,
4001         NULL,
4002         HFILL }
4003     },
4004
4005     { &hf_skinny_maxConferences,
4006       { "MaxConferences", "skinny.maxConferences",
4007         FT_UINT32, BASE_DEC, NULL, 0x0,
4008         "MaxConferences.",
4009         HFILL }
4010     },
4011
4012     { &hf_skinny_activeConferenceOnRegistration,
4013       { "ActiveConferenceOnRegistration", "skinny.activeConferenceOnRegistration",
4014         FT_UINT32, BASE_DEC, NULL, 0x0,
4015         "ActiveConferenceOnRegistration.",
4016         HFILL }
4017     },
4018
4019     { &hf_skinny_transmitOrReceive,
4020       { "TransmitOrReceive", "skinny.transmitOrReceive",
4021         FT_UINT32, BASE_DEC, VALS(skinny_transmitOrReceive), 0x0,
4022         NULL,
4023         HFILL }
4024     },
4025
4026     { &hf_skinny_levelPreferenceCount,
4027       { "LevelPreferenceCount", "skinny.levelPreferenceCount",
4028         FT_UINT32, BASE_DEC, NULL, 0x0,
4029         "LevelPreferenceCount.",
4030         HFILL }
4031     },
4032
4033     { &hf_skinny_transmitPreference,
4034       { "TransmitPreference", "skinny.transmitPreference",
4035         FT_UINT32, BASE_DEC, NULL, 0x0,
4036         "TransmitPreference.",
4037         HFILL }
4038     },
4039
4040     { &hf_skinny_format,
4041       { "Format", "skinny.format",
4042         FT_UINT32, BASE_DEC|BASE_EXT_STRING, &skinny_formatTypes_ext, 0x0,
4043         "Format.",
4044         HFILL }
4045     },
4046
4047     { &hf_skinny_maxBitRate,
4048       { "MaxBitRate", "skinny.maxBitRate",
4049         FT_UINT32, BASE_DEC, NULL, 0x0,
4050         "MaxBitRate.",
4051         HFILL }
4052     },
4053
4054     { &hf_skinny_minBitRate,
4055       { "MinBitRate", "skinny.minBitRate",
4056         FT_UINT32, BASE_DEC, NULL, 0x0,
4057         "MinBitRate.",
4058         HFILL }
4059     },
4060
4061     { &hf_skinny_MPI,
4062       { "MPI", "skinny.MPI",
4063         FT_UINT32, BASE_DEC, NULL, 0x0,
4064         "MPI.",
4065         HFILL }
4066     },
4067
4068     { &hf_skinny_serviceNumber,
4069       { "ServiceNumber", "skinny.serviceNumber",
4070         FT_UINT32, BASE_DEC, NULL, 0x0,
4071         "ServiceNumber.",
4072         HFILL }
4073     },
4074
4075     { &hf_skinny_temporalSpatialTradeOffCapability,
4076       { "TemporalSpatialTradeOffCapability", "skinny.temporalSpatialTradeOffCapability",
4077         FT_UINT32, BASE_DEC, NULL, 0x0,
4078         "TemporalSpatialTradeOffCapability.",
4079         HFILL }
4080     },
4081
4082     { &hf_skinny_stillImageTransmission,
4083       { "StillImageTransmission", "skinny.stillImageTransmission",
4084         FT_UINT32, BASE_DEC, NULL, 0x0,
4085         "StillImageTransmission.",
4086         HFILL }
4087     },
4088
4089     { &hf_skinny_h263_capability_bitfield,
4090       { "H263_capability_bitfield", "skinny.h263_capability_bitfield",
4091         FT_UINT32, BASE_DEC, NULL, 0x0,
4092         "H263_capability_bitfield.",
4093         HFILL }
4094     },
4095
4096     { &hf_skinny_annexNandWFutureUse,
4097       { "AnnexNandWFutureUse", "skinny.annexNandWFutureUse",
4098         FT_UINT32, BASE_DEC, NULL, 0x0,
4099         "AnnexNandWFutureUse.",
4100         HFILL }
4101     },
4102
4103     { &hf_skinny_modelNumber,
4104       { "ModelNumber", "skinny.modelNumber",
4105         FT_UINT32, BASE_DEC, NULL, 0x0,
4106         "ModelNumber.",
4107         HFILL }
4108     },
4109
4110     { &hf_skinny_bandwidth,
4111       { "Bandwidth", "skinny.bandwidth",
4112         FT_UINT32, BASE_DEC, NULL, 0x0,
4113         "Bandwidth.",
4114         HFILL }
4115     },
4116
4117     { &hf_skinny_protocolDependentData,
4118       { "ProtocolDependentData", "skinny.protocolDependentData",
4119         FT_UINT32, BASE_DEC, NULL, 0x0,
4120         "ProtocolDependentData.",
4121         HFILL }
4122     },
4123
4124     { &hf_skinny_priority,
4125       { "Priority", "skinny.priority",
4126         FT_UINT32, BASE_DEC, NULL, 0x0,
4127         "Priority.",
4128         HFILL }
4129     },
4130
4131     { &hf_skinny_payloadDtmf,
4132       { "PayloadDtmf", "skinny.payloadDtmf",
4133         FT_UINT32, BASE_DEC, NULL, 0x0,
4134         "RTP payload type.",
4135         HFILL }
4136     },
4137
4138     { &hf_skinny_featureID,
4139       { "FeatureID", "skinny.featureID",
4140         FT_UINT32, BASE_DEC, NULL, 0x0,
4141         "FeatureID.",
4142         HFILL }
4143     },
4144
4145     { &hf_skinny_featureTextLabel,
4146       { "FeatureTextLabel", "skinny.featureTextLabel",
4147         FT_STRING, BASE_NONE, NULL, 0x0,
4148         "The feature lable text that is displayed on the phone.",
4149         HFILL }
4150     },
4151
4152     { &hf_skinny_featureStatus,
4153       { "FeatureStatus", "skinny.featureStatus",
4154         FT_UINT32, BASE_DEC, NULL, 0x0,
4155         "FeatureStatus.",
4156         HFILL }
4157     },
4158
4159     { &hf_skinny_notify,
4160       { "Notify", "skinny.notify",
4161         FT_STRING, BASE_NONE, NULL, 0x0,
4162         "The message notify text that is displayed on the phone.",
4163         HFILL }
4164     },
4165
4166     { &hf_skinny_endOfAnnAck,
4167       { "EndOfAnnAck", "skinny.endOfAnnAck",
4168         FT_UINT32, BASE_DEC, VALS(skinny_endOfAnnAck), 0x0,
4169         NULL,
4170         HFILL }
4171     },
4172
4173     { &hf_skinny_annPlayMode,
4174       { "annPlayMode", "skinny.annPlayMode",
4175         FT_UINT32, BASE_DEC, VALS(skinny_annPlayMode), 0x0,
4176         NULL,
4177         HFILL }
4178     },
4179
4180     { &hf_skinny_annPlayStatus,
4181       { "AnnPlayStatus", "skinny.annPlayStatus",
4182         FT_UINT32, BASE_DEC, VALS(skinny_annPlayStatus), 0x0,
4183         NULL,
4184         HFILL }
4185     },
4186
4187     { &hf_skinny_locale,
4188       { "Locale", "skinny.locale",
4189         FT_UINT32, BASE_DEC, NULL, 0x0,
4190         "User locale ID.",
4191         HFILL }
4192     },
4193
4194     { &hf_skinny_country,
4195       { "Country", "skinny.country",
4196         FT_UINT32, BASE_DEC, NULL, 0x0,
4197         "Country ID (Network locale).",
4198         HFILL }
4199     },
4200
4201     { &hf_skinny_matrixConfPartyID,
4202       { "MatrixConfPartyID", "skinny.matrixConfPartyID",
4203         FT_UINT32, BASE_DEC, NULL, 0x0,
4204         "existing conference parties.",
4205         HFILL }
4206     },
4207
4208     { &hf_skinny_hearingConfPartyMask,
4209       { "HearingConfPartyMask", "skinny.hearingConfPartyMask",
4210         FT_UINT32, BASE_DEC, NULL, 0x0,
4211         "Bit mask of conference parties to hear media received on this stream.  Bit0 = matrixConfPartyID[0], Bit1 = matrixConfPartiID[1].",
4212         HFILL }
4213     },
4214
4215     { &hf_skinny_serviceURL,
4216       { "ServiceURL", "skinny.serviceURL",
4217         FT_STRING, BASE_NONE, NULL, 0x0,
4218         "ServiceURL.",
4219         HFILL }
4220     },
4221
4222     { &hf_skinny_serviceURLDisplayName,
4223       { "ServiceURLDisplayName", "skinny.serviceURLDisplayName",
4224         FT_STRING, BASE_NONE, NULL, 0x0,
4225         "ServiceURLDisplayName.",
4226         HFILL }
4227     },
4228
4229     { &hf_skinny_callSelectStat,
4230       { "CallSelectStat", "skinny.callSelectStat",
4231         FT_UINT32, BASE_DEC, NULL, 0x0,
4232         "CallSelectStat.",
4233         HFILL }
4234     },
4235
4236     { &hf_skinny_isConferenceCreator,
4237       { "IsConferenceCreator", "skinny.isConferenceCreator",
4238         FT_UINT32, BASE_DEC, NULL, 0x0,
4239         "IsConferenceCreator.",
4240         HFILL }
4241     },
4242
4243     { &hf_skinny_payload_rfc_number,
4244       { "Payload_rfc_number", "skinny.payload_rfc_number",
4245         FT_UINT32, BASE_DEC, NULL, 0x0,
4246         "Payload_rfc_number.",
4247         HFILL }
4248     },
4249
4250     { &hf_skinny_payloadType,
4251       { "PayloadType", "skinny.payloadType",
4252         FT_UINT32, BASE_DEC, NULL, 0x0,
4253         "PayloadType.",
4254         HFILL }
4255     },
4256
4257     { &hf_skinny_bitRate,
4258       { "BitRate", "skinny.bitRate",
4259         FT_UINT32, BASE_DEC, NULL, 0x0,
4260         "BitRate.",
4261         HFILL }
4262     },
4263
4264     { &hf_skinny_pictureFormatCount,
4265       { "PictureFormatCount", "skinny.pictureFormatCount",
4266         FT_UINT32, BASE_DEC, NULL, 0x0,
4267         "PictureFormatCount.",
4268         HFILL }
4269     },
4270
4271     { &hf_skinny_confServiceNum,
4272       { "ConfServiceNum", "skinny.confServiceNum",
4273         FT_UINT32, BASE_DEC, NULL, 0x0,
4274         "ConfServiceNum.",
4275         HFILL }
4276     },
4277
4278     { &hf_skinny_DSCPValue,
4279       { "DSCPValue", "skinny.DSCPValue",
4280         FT_UINT32, BASE_DEC, NULL, 0x0,
4281         "DSCPValue.",
4282         HFILL }
4283     },
4284
4285     { &hf_skinny_miscCommandType,
4286       { "MiscCommandType", "skinny.miscCommandType",
4287         FT_UINT32, BASE_DEC|BASE_EXT_STRING, &skinny_miscCommandType_ext, 0x0,
4288         NULL,
4289         HFILL }
4290     },
4291
4292     { &hf_skinny_temporalSpatialTradeOff,
4293       { "TemporalSpatialTradeOff", "skinny.temporalSpatialTradeOff",
4294         FT_UINT32, BASE_DEC, NULL, 0x0,
4295         "TemporalSpatialTradeOff.",
4296         HFILL }
4297     },
4298
4299     { &hf_skinny_firstGOB,
4300       { "FirstGOB", "skinny.firstGOB",
4301         FT_UINT32, BASE_DEC, NULL, 0x0,
4302         "FirstGOB.",
4303         HFILL }
4304     },
4305
4306     { &hf_skinny_numberOfGOBs,
4307       { "NumberOfGOBs", "skinny.numberOfGOBs",
4308         FT_UINT32, BASE_DEC, NULL, 0x0,
4309         "NumberOfGOBs.",
4310         HFILL }
4311     },
4312
4313     { &hf_skinny_firstMB,
4314       { "FirstMB", "skinny.firstMB",
4315         FT_UINT32, BASE_DEC, NULL, 0x0,
4316         "FirstMB.",
4317         HFILL }
4318     },
4319
4320     { &hf_skinny_numberOfMBs,
4321       { "NumberOfMBs", "skinny.numberOfMBs",
4322         FT_UINT32, BASE_DEC, NULL, 0x0,
4323         "NumberOfMBs.",
4324         HFILL }
4325     },
4326
4327     { &hf_skinny_pictureNumber,
4328       { "PictureNumber", "skinny.pictureNumber",
4329         FT_UINT32, BASE_DEC, NULL, 0x0,
4330         "PictureNumber.",
4331         HFILL }
4332     },
4333
4334     { &hf_skinny_longTermPictureIndex,
4335       { "LongTermPictureIndex", "skinny.longTermPictureIndex",
4336         FT_UINT32, BASE_DEC, NULL, 0x0,
4337         "LongTermPictureIndex.",
4338         HFILL }
4339     },
4340
4341     { &hf_skinny_recoveryReferencePictureCount,
4342       { "RecoveryReferencePictureCount", "skinny.recoveryReferencePictureCount",
4343         FT_UINT32, BASE_DEC, NULL, 0x0,
4344         "RecoveryReferencePictureCount.",
4345         HFILL }
4346     },
4347
4348     { &hf_cast_lastRedirectingPartyName,
4349       { "LastRedirectingPartyName", "cast.lastRedirectingPartyName",
4350         FT_STRING, BASE_NONE, NULL, 0x0,
4351         "LastRedirectingPartyName.",
4352         HFILL }
4353     },
4354
4355     { &hf_cast_lastRedirectingParty,
4356       { "LastRedirectingParty", "cast.lastRedirectingParty",
4357         FT_STRING, BASE_NONE, NULL, 0x0,
4358         "LastRedirectingParty.",
4359         HFILL }
4360     },
4361
4362     { &hf_cast_cgpnVoiceMailbox,
4363       { "CgpnVoiceMailbox", "cast.cgpnVoiceMailbox",
4364         FT_STRING, BASE_NONE, NULL, 0x0,
4365         "CgpnVoiceMailbox.",
4366         HFILL }
4367     },
4368
4369     { &hf_cast_cdpnVoiceMailbox,
4370       { "CdpnVoiceMailbox", "cast.cdpnVoiceMailbox",
4371         FT_STRING, BASE_NONE, NULL, 0x0,
4372         "CdpnVoiceMailbox.",
4373         HFILL }
4374     },
4375
4376     { &hf_cast_originalCdpnVoiceMailbox,
4377       { "OriginalCdpnVoiceMailbox", "cast.originalCdpnVoiceMailbox",
4378         FT_STRING, BASE_NONE, NULL, 0x0,
4379         "OriginalCdpnVoiceMailbox.",
4380         HFILL }
4381     },
4382
4383     { &hf_cast_lastRedirectingVoiceMailbox,
4384       { "LastRedirectingVoiceMailbox", "cast.lastRedirectingVoiceMailbox",
4385         FT_STRING, BASE_NONE, NULL, 0x0,
4386         "LastRedirectingVoiceMailbox.",
4387         HFILL }
4388     },
4389
4390     { &hf_cast_originalCdpnRedirectReason,
4391       { "OriginalCdpnRedirectReason", "cast.originalCdpnRedirectReason",
4392         FT_UINT32, BASE_DEC, NULL, 0x0,
4393         "OriginalCdpnRedirectReason.",
4394         HFILL }
4395     },
4396
4397     { &hf_cast_lastRedirectingReason,
4398       { "LastRedirectingReason", "cast.lastRedirectingReason",
4399         FT_UINT32, BASE_DEC, NULL, 0x0,
4400         "LastRedirectingReason.",
4401         HFILL }
4402     },
4403
4404     { &hf_cast_callInstance,
4405       { "CallInstance", "cast.callInstance",
4406         FT_UINT32, BASE_DEC, NULL, 0x0,
4407         "CallInstance.",
4408         HFILL }
4409     },
4410
4411     { &hf_cast_callSecurityStatus,
4412       { "CallSecurityStatus", "cast.callSecurityStatus",
4413         FT_UINT32, BASE_DEC, VALS(cast_callSecurityStatusTypes), 0x0,
4414         "CallSecurityStatus.",
4415         HFILL }
4416     },
4417
4418   };
4419
4420   /* Setup protocol subtree array */
4421   static gint *ett[] = {
4422     &ett_skinny,
4423     &ett_skinny_tree,
4424     &ett_skinny_softKeyMap,
4425   };
4426
4427   module_t *skinny_module;
4428
4429   /* Register the protocol name and description */
4430   proto_skinny = proto_register_protocol("Skinny Client Control Protocol",
4431                                          "SKINNY", "skinny");
4432
4433   /* Required function calls to register the header fields and subtrees used */
4434   proto_register_field_array(proto_skinny, hf, array_length(hf));
4435   proto_register_subtree_array(ett, array_length(ett));
4436
4437   skinny_module = prefs_register_protocol(proto_skinny, NULL);
4438   prefs_register_bool_preference(skinny_module, "desegment",
4439     "Reassemble SCCP messages spanning multiple TCP segments",
4440     "Whether the SCCP dissector should reassemble messages spanning multiple TCP segments."
4441     " To use this option, you must also enable \"Allow subdissectors to reassemble TCP streams\" in the TCP protocol settings.",
4442     &skinny_desegment);
4443
4444   skinny_tap = register_tap("skinny");
4445 }
4446
4447 void
4448 proto_reg_handoff_skinny(void)
4449 {
4450   dissector_handle_t skinny_handle;
4451
4452   rtp_handle = find_dissector("rtp");
4453   skinny_handle = new_create_dissector_handle(dissect_skinny, proto_skinny);
4454   dissector_add_uint("tcp.port", TCP_PORT_SKINNY, skinny_handle);
4455 }
4456
4457 /*
4458  * FIXME:
4459  *
4460  * This is the status of this decode.
4461  * Items marked as N/A in the decode field have no params to test
4462  * implemented for N/A means they exist in the switch statement
4463  * S = stubbed
4464  *
4465  *  id     message                     implemented  decode tested (via capture)
4466  *  ---------------------------------------------------------------------------
4467  *  0x0    keepAlive                       Y        N/A
4468  *  0x1    register                        Y        Y
4469  *  0x2    ipPort                          Y        Y
4470  *  0x3    keypadButton                    Y        Y
4471  *  0x4    enblocCall                      Y        N
4472  *  0x5    stimulus                        Y        Y
4473  *  0x6    offHook                         Y        Y
4474  *  0x7    onHook                          Y        Y
4475  *  0x8    hookFlash                       Y        N/A
4476  *  0x9    forwardStatReq                  Y        N
4477  *  0xa    speedDialStatReq                Y        Y
4478  *  0xb    lineStatReq                     Y        Y
4479  *  0xc    configStatReq                   Y        N/A
4480  *  0xd    timeDateReq                     Y        N/A
4481  *  0xe    buttonTemplateReq               Y        N/A
4482  *  0xf    versionReq                      Y        N/A
4483  *  0x10   capabilitiesRes                 Y        Y -- would like more decodes
4484  *  0x11   mediaPortList                   S        N -- no info
4485  *  0x12   serverReq                       Y        N/A
4486  *  0x20   alarmMessage                    Y        Y
4487  *  0x21   multicastMediaReceptionAck      Y        N
4488  *  0x22   openReceiveChannelAck           Y        Y
4489  *  0x23   connectionStatisticsRes         Y        Y
4490  *  0x24   offHookWithCgpn                 Y        N
4491  *  0x25   softKeySetReq                   Y        N/A
4492  *  0x26   softKeyEvent                    Y        Y
4493  *  0x27   unregister                      Y        N/A
4494  *  0x28   softKeytemplateReq              Y        N/A
4495  *  0x29   registerTokenReq                Y        N
4496  *  0x2A   mediaTransmissionFailure
4497  *  0x2B   headsetStatus
4498  *  0x2C   mediaResourceNotification
4499  *  0x2D   registerAvailableLines
4500  *  0x2E   deviceToUserData
4501  *  0x2F   deviceToUserDataResponse
4502  *  0x30   updateCapabilities
4503  *  0x31   openMultiMediaReceiveChannelAck
4504  *  0x32   clearConference
4505  *  0x33   serviceURLStatReq
4506  *  0x34   featureStatReq
4507  *  0x35   createConferenceRes
4508  *  0x36   deleteConferenceRes
4509  *  0x37   modifyConferenceRes
4510  *  0x38   addParticipantRes
4511  *  0x39   auditConferenceRes
4512  *  0x40   auditParticipantRes
4513  *  0x41   deviceToUserDataVersion1
4514  *  0x42   deviceToUserDataResponseVersion1
4515  *  0x81   registerAck                     Y        Y
4516  *  0x82   startTone                       Y        Y
4517  *  0x83   stopTone                        Y        Y
4518  *  0x85   setRinger                       Y        Y
4519  *  0x86   setLamp                         Y        Y
4520  *  0x87   setHkFDetect                    Y        N
4521  *  0x88   setSpeakerMode                  Y        Y
4522  *  0x89   setMicroMode                    Y        N
4523  *  0x8A   startMediaTransmission          Y        Y
4524  *  0x8B   stopMediaTransmission           Y        Y
4525  *  0x8C   startMediaReception             S        N
4526  *  0x8D   stopMediaReception              S        N
4527  *  0x8E   *reserved*                      S        *
4528  *  0x8F   callInfo                        Y        Y
4529  *  0x90   forwardStat                     Y        N
4530  *  0x91   speedDialStat                   Y        Y
4531  *  0x92   lineStat                        Y        Y
4532  *  0x93   configStat                      Y        N
4533  *  0x94   defineTimeDate                  Y        Y
4534  *  0x95   startSessionTransmission        Y        N
4535  *  0x96   stopSessionTransmission         Y        N
4536  *  0x97   buttonTemplate                  Y        Y -- ugly =)
4537  *  0x98   version                         Y        N
4538  *  0x99   displayText                     Y        Y
4539  *  0x9A   clearDisplay                    Y        N/A
4540  *  0x9B   capabilitiesReq                 Y        N/A
4541  *  0x9C   enunciatorCommand               Y        N (inner loop unknown)
4542  *  0x9D   registerReject                  Y        N
4543  *  0x9E   serverRes                       Y        N
4544  *  0x9F   reset                           Y        Y
4545  *  0x100  keepAliveAck                    Y        N/A
4546  *  0x101  startMulticastMediaReception    Y        N
4547  *  0x102  startMulticastMediaTransmission Y        N
4548  *  0x103  stopMulticastMediaReception     Y        N
4549  *  0x104  stopMulticastMediaTransmission  Y        N
4550  *  0x105  openreceiveChannel              Y        Y
4551  *  0x106  closeReceiveChannel             Y        Y
4552  *  0x107  connectionStatisticsReq         Y        Y
4553  *  0x108  softKeyTemplateRes              Y        Y
4554  *  0x109  softKeySetRes                   Y        Y
4555  *  0x110  selectSoftKeys                  Y        Y
4556  *  0x111  callState                       Y        Y
4557  *  0x112  displayPromptStatus             Y        Y
4558  *  0x113  clearPromptStatus               Y        Y
4559  *  0x114  displayNotify                   Y        Y
4560  *  0x115  clearNotify                     Y        Y
4561  *  0x116  activateCallPlane               Y        Y
4562  *  0x117  deactivateCallPlane             Y        N/A
4563  *  0x118  unregisterAck                   Y        Y
4564  *  0x119  backSpaceReq                    Y        Y
4565  *  0x11A  registerTokenAck                Y        N
4566  *  0x11B  registerTokenReject             Y        N
4567  *  0x11C  startMediaFailureDetection
4568  *  0x11D  dialedNumber
4569  *  0x11E  userToDeviceData
4570  *  0x11F  featureStat
4571  *  0x120  displayPriNotify
4572  *  0x121  clearPriNotify
4573  *  0x122  startAnnouncement
4574  *  0x123  stopAnnouncement
4575  *  0x124  announcementFinish
4576  *  0x127  notifyDtmfTone
4577  *  0x128  sendDtmfTone
4578  *  0x129  subscribeDtmfPayloadReq
4579  *  0x12A  subscribeDtmfPayloadRes
4580  *  0x12B  subscribeDtmfPayloadErr
4581  *  0x12C  unSubscribeDtmfPayloadReq
4582  *  0x12D  unSubscribeDtmfPayloadRes
4583  *  0x12E  unSubscribeDtmfPayloadErr
4584  *  0x12F  serviceURLStat
4585  *  0x130  callSelectStat
4586  *  0x131  openMultiMediaChannel
4587  *  0x132  startMultiMediaTransmission
4588  *  0x133  stopMultiMediaTransmission
4589  *  0x134  miscellaneousCommand
4590  *  0x135  flowControlCommand
4591  *  0x136  closeMultiMediaReceiveChannel
4592  *  0x137  createConferenceReq
4593  *  0x138  deleteConferenceReq
4594  *  0x139  modifyConferenceReq
4595  *  0x13A  addParticipantReq
4596  *  0x13B  dropParticipantReq
4597  *  0x13C  auditConferenceReq
4598  *  0x13D  auditParticipantReq
4599  *  0x13F  userToDeviceDataVersion1
4600  *
4601  *
4602  */