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