name change
[obnox/wireshark/wip.git] / asn1 / h450 / packet-h450-template.c
1 /* packet-h450.c
2  * Routines for h450 packet dissection
3  * Based on the previous h450 dissector by:
4  * 2003  Graeme Reid (graeme.reid@norwoodsystems.com)
5  * Copyright 2005, Anders Broman <anders.broman@ericsson.com>
6  *
7  * $Id$
8  *
9  * Wireshark - Network traffic analyzer
10  * By Gerald Combs <gerald@wireshark.org>
11  * Copyright 1998 Gerald Combs
12  *
13  * This program is free software; you can redistribute it and/or
14  * modify it under the terms of the GNU General Public License
15  * as published by the Free Software Foundation; either version 2
16  * of the License, or (at your option) any later version.
17  *
18  * This program is distributed in the hope that it will be useful,
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
21  * GNU General Public License for more details.
22  *
23  * You should have received a copy of the GNU General Public License
24  * along with this program; if not, write to the Free Software
25  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
26  *
27  * Credit to Tomas Kukosa for developing the Asn2eth compiler.
28  *
29  */
30
31 #ifdef HAVE_CONFIG_H
32 # include "config.h"
33 #endif
34
35 #include <glib.h>
36 #include <epan/packet.h>
37 #include <epan/conversation.h>
38
39 #include <stdio.h>
40 #include <string.h>
41
42 #include "packet-h450.h"
43
44 #include "packet-ber.h"
45 #include "packet-per.h"
46 #include "packet-h225.h"
47
48 #define PNAME  "h450"
49 #define PSNAME "h450"
50 #define PFNAME "h450"
51 /* H.450.2 Call Transfer constants */
52 #define CallTransferIdentify        7
53 #define CallTransferAbandon         8
54 #define CallTransferInitiate        9
55 #define CallTransferSetup           10
56 #define CallTransferUpdate          13
57 #define SubaddressTransfer          14
58 #define CallTransferComplete        12
59 #define CallTransferActive          11
60
61 /* H.450.3 Call Diversion constants */
62 #define ActivateDiversionQ          15
63 #define DeactivateDiversionQ        16
64 #define InterrogateDiversionQ       17
65 #define CheckRestriction            18
66 #define CallRerouting               19
67 #define DivertingLegInformation1    20
68 #define DivertingLegInformation2    21
69 #define DivertingLegInformation3    22
70 #define DivertingLegInformation4    100
71 #define CfnrDivertedLegFailed       23
72
73 /* H.450.4 Call Hold constants */
74 #define HoldNotific                 101
75 #define RetrieveNotific             102
76 #define RemoteHold                  103
77 #define RemoteRetrieve              104
78
79 /* H.450.5 Call Park and Pickup constants */
80 #define CpRequest                   106
81 #define CpSetup                     107
82 #define GroupIndicationOn           108
83 #define GroupIndicationOff          109
84 #define Pickrequ                    110
85 #define Pickup                      111
86 #define PickExe                     112
87 #define CpNotify                    113
88 #define CpickupNotify               114
89
90 /* H.450.6 Call Waiting constants */
91 #define CallWaiting                 105
92
93 /* H.450.7 Message Waiting Indication constants */
94 #define MWIActivate                 80
95 #define MWIDeactivate               81
96 #define MWIInterrogate              82 
97
98 /* H.450.8 Name Identification constants */
99 #define NIcallingName               0
100 #define NIalertingName              1
101 #define NIconnectedName             2
102 #define NIbusyName                  3 
103
104 /* H.450.9 Call Completion constants */
105 #define CCBSRequest                 40
106 #define CCNRRequest                 27
107 #define CCCancel                    28
108 #define CCExecPossible              29
109 #define CCRingout                   31
110 #define CCSuspend                   32
111 #define CCResume                    33 
112
113 /* H.450.10 Call Offer constants */
114 #define CallOfferRequest            34
115 #define RemoteUserAlerting          115
116 #define CFBOverride                 49 
117
118 /* H.450.11 Call Intrusion constants */
119 #define CallIntrusionRequest        43
120 #define CallIntrusionGetCIPL        44
121 #define CallIntrusionIsolate        45
122 #define CallIntrusionForcedRelease  46
123 #define CallIntrusionWOBRequest     47
124 #define CallIntrusionSilentMonitor  116
125 #define CallIntrusionNotification   117
126
127 /* H.450.12 Common Information Operations constants */
128 #define CmnRequest                                      84
129 #define CmnInform                                       85
130
131 /* TODO - define other H.450.x constants here */
132 static dissector_handle_t h4501_handle=NULL;
133
134 /* Initialize the protocol and registered fields */
135 static int proto_h4501 = -1;
136
137 static int hf_h4501 = -1;
138 static int hf_h4501_constrained_invokeId = -1;
139 static int hf_h4501_invokeId = -1;
140 static int hf_h4501_localOpcode = -1;
141 static int hf_h4501_globalCode = -1;
142 static int hf_h4501_globalargument = -1;
143 static int hf_h4501_opcode = -1;
144 static int hf_h4501_ReturnResult_result = -1;
145 static int hf_h4501_result = -1;
146 static int hf_h4501_ReturnResult = -1;
147 static int hf_h4501_localErrorCode = -1;
148 static int hf_h4501_errorCode = -1;
149 static int hf_h4501_parameter = -1;
150 static int hf_h4501_ReturnError = -1;
151 static int hf_h4501_GeneralProblem = -1;
152 static int hf_h4501_InvokeProblem = -1;
153 static int hf_h4501_ReturnResultProblem = -1;
154 static int hf_h4501_ReturnErrorProblem = -1;
155 static int hf_h4501_problem = -1;
156 static int hf_h4501_Reject = -1;
157
158 static int hf_h4502_CTIdentifyRes = -1;
159 static int hf_h4502_DummyRes = -1;
160 static int hf_h4502_DummyArg = -1;
161
162 static int hf_h4503DeactivateDiversionQArg = -1;
163 static int hf_h4503InterrogateDiversionQ = -1;
164 static int hf_h4503CheckRestrictionArg = -1;
165 static int hf_h4503CallReroutingArg = -1;
166 static int hf_h4503DivertingLegInformation1Arg = -1;
167 static int hf_h4503DivertingLegInformation2Arg = -1;
168 static int hf_h4503DivertingLegInformation3Arg = -1;
169 static int hf_h4503DivertingLegInformation4Arg = -1;
170 static int hf_h4503CfnrDivertedLegFailedArg = -1;
171
172 static int hf_h4504_HoldNotificArg = -1;
173 static int hf_h4504_RetrieveNotificArg = -1;
174 static int hf_h4504_RemoteHoldArg = -1;
175 static int hf_h4504_RemoteRetrieveArg = -1;
176 static int hf_h4504_RemoteRetrieveRes = -1;
177
178 static int hf_h4507_MWIActivateArg = -1;
179 static int hf_h4507_MWIDeactivateArg = -1;
180 static int hf_h4507_MwiDummyRes = -1;
181 static int hf_h4507_MWIInterrogateArg = -1;
182 static int hf_h4507_MWIInterrogateRes = -1;
183
184 static int hf_h4508_CallingNameArg = -1;
185 static int hf_h4508_AlertingNameArg = -1;
186 static int hf_h4508_ConnectedNameArg = -1;
187 static int hf_h4508_BusyNameArg = -1;
188 static int hf_h45012_CmnRequest = -1;
189 static int hf_h45012_CmnInform = -1;
190
191 static int hf_h4501_Invoke = -1;
192 static int hf_h4501_ROS = -1;
193
194 #include "packet-h450-hf.c"
195
196 /* Initialize the subtree pointers */
197 static gint ett_h4501 = -1;
198 static gint ett_h4501_opcode = -1;
199 static gint ett_h4501_result = -1;
200 static gint ett_h4501_errorCode = -1;
201
202 static gint ett_h4501_problem = -1;
203 static gint ett_h4501_Reject = -1;
204 static gint ett_h4501_ReturnError = -1;
205 static gint ett_h4501_ReturnResult = -1;
206 static gint ett_h4501_Invoke = -1;
207 static gint ett_h4501_ROS = -1;
208
209 #include "packet-h450-ett.c"
210
211 /* Global variables */
212 static guint32 localOpcode;
213 static guint32 localErrorCode;
214 static const char *globalcode_oid_str;
215 static gboolean is_globalcode;
216
217 static const value_string localOpcode_vals[] = {
218    /* H.450.2 Call Transfer opcodes */
219    { CallTransferIdentify,    "callTransferIdentify"},
220    { CallTransferAbandon,     "callTransferAbandon"},
221    { CallTransferInitiate,    "callTransferInitiate"},
222    { CallTransferSetup,       "callTransferSetup"},
223    { CallTransferUpdate,      "callTransferUpdate"},
224    { SubaddressTransfer,      "subaddressTransfer"},
225    { CallTransferComplete,    "callTransferComplete"},
226    { CallTransferActive,      "callTransferActive"},
227
228    /* H.450.3 Call Diversion opcodes */
229    { ActivateDiversionQ,      "activateDiversionQ"},
230    { DeactivateDiversionQ,    "deactivateDiversionQ"},
231    { InterrogateDiversionQ,   "interrogateDiversionQ"},
232    { CheckRestriction,        "checkRestriction"},
233    { CallRerouting,           "callRerouting"},
234    { DivertingLegInformation1,"divertingLegInformation1"},
235    { DivertingLegInformation2,"divertingLegInformation2"},
236    { DivertingLegInformation3,"divertingLegInformation3"},
237    { DivertingLegInformation4,"divertingLegInformation4"},
238    { CfnrDivertedLegFailed,   "cfnrDivertedLegFailed"},
239
240    /* H.450.4 Call Hold opcodes */
241    { HoldNotific,             "holdNotific"},
242    { RetrieveNotific,         "retrieveNotific"},
243    { RemoteHold,              "remoteHold"},
244    { RemoteRetrieve,          "remoteRetrieve"},
245
246    /* H.450.5 Call Park and Pickup opcodes */
247    { CpRequest,               "cpRequest"},
248    { CpSetup,                 "cpSetup"},
249    { GroupIndicationOn,       "groupIndicationOn"},
250    { GroupIndicationOff,      "groupIndicationOff"},
251    { Pickrequ,                "pickrequ"},
252    { Pickup,                  "pickup"},
253    { PickExe,                 "pickExe"},
254    { CpNotify,                "cpNotify"},
255    { CpickupNotify,           "cpickupNotify"},
256
257    /* H.450.6 Call Waiting opcodes */
258    { CallWaiting,             "callWaiting"},
259
260    /* H.450.7 Message Waiting Indication constants */
261    { MWIActivate,             "mwiActivate"},
262    { MWIDeactivate,           "mwiDeactivate"},
263    { MWIInterrogate,          "mwiInterrogate"}, 
264
265    /* H.450.8 Name Identification constants */
266    { NIcallingName,           "niCallingName"},
267    { NIalertingName,          "niAlertingName"},
268    { NIconnectedName,         "niConnectedName"},
269    { NIbusyName,              "niBusyName"}, 
270
271    /* H.450.9 Call Completion constants */
272    { CCBSRequest,             "ccbsRequest"},
273    { CCNRRequest,             "ccnrRequest"},
274    { CCCancel,                "ccCancel"},
275    { CCExecPossible,          "ccExecPossible"},
276    { CCRingout,               "ccRingout"},
277    { CCSuspend,               "ccSuspend"},
278    { CCResume,                "ccResume"}, 
279
280    /* H.450.10 Call Offer constants */
281    { CallOfferRequest,        "callOfferRequest"},
282    { RemoteUserAlerting,      "remoteUserAlerting"},
283    { CFBOverride,             "cfbOverride"}, 
284
285    /* H.450.11 Call Intrusion constants */
286    { CallIntrusionRequest,      "callIntrusionRequest"},
287    { CallIntrusionGetCIPL,      "callIntrusionGetCIPL"},
288    { CallIntrusionIsolate,      "callIntrusionIsolate"},
289    { CallIntrusionForcedRelease,"callIntrusionForcedRelease"},
290    { CallIntrusionWOBRequest,   "callIntrusionWOBRequest"},
291    { CallIntrusionSilentMonitor,"callIntrusionSilentMonitor"},
292    { CallIntrusionNotification, "callIntrusionNotification"},
293
294    /* TODO - add other H.450.x invoke opcodes here */
295 /* H.450.12 Common Information Operations constants */
296    { CmnRequest,                                "CmnRequest"},
297    { CmnInform,                                 "CmnInform"},
298         {  0, NULL }
299 };
300
301 static int dissect_h4501_argument(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree);
302 static int dissect_ros_ROSxxx(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, int hf_ind _U_);
303
304
305
306 #include "packet-h450-fn.c"
307
308 static const value_string InvokeProblem_vals[] = {
309    {  0, "duplicateInvocation"},
310    {  1, "unrecognizedOperation"},
311    {  2, "mistypedArgument"},
312    {  3, "resourceLimitation"},
313    {  4, "releaseInProgress"},
314    {  5, "unrecognizedLinkedId"},
315    {  6, "linkedResponseUnexpected"},
316    {  7, "unexpectedLinkedOperation"},
317    {  0, NULL }
318 };
319 static int
320 dissect_h4501_InvokeProblem(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
321 {
322    offset=dissect_per_constrained_integer(tvb, offset, pinfo, tree, hf_h4501_InvokeProblem, 0, 7, NULL, NULL, FALSE);
323    return offset;
324 }
325
326
327 static const value_string ReturnResultProblem_vals[] = {
328    {  0, "unrecognizedInvocation"},
329    {  1, "resultResponseUnexpected"},
330    {  2, "mistypedResult"},
331    {  0, NULL }
332 };
333 static int
334 dissect_h4501_ReturnResultProblem(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
335 {
336    offset=dissect_per_constrained_integer(tvb, offset, pinfo, tree, hf_h4501_ReturnResultProblem, 0, 2, NULL, NULL, FALSE);
337    return offset;
338 }
339
340
341 static const value_string ReturnErrorProblem_vals[] = {
342    {  0, "unrecognizedInvocation"},
343    {  1, "errorResponseUnexpected"},
344    {  2, "unrecognizedError"},
345    {  3, "unexpectedError"},
346    {  4, "mistypedParameter"},
347    {  0, NULL }
348 };
349 static int
350 dissect_h4501_ReturnErrorProblem(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
351 {
352    offset=dissect_per_constrained_integer(tvb, offset, pinfo, tree, hf_h4501_ReturnErrorProblem, 0, 4, NULL, NULL, FALSE);
353    return offset;
354 }
355
356 static const value_string GeneralProblem_vals[] = {
357    {  0, "unrecognizedCompenent"},
358    {  1, "mistypedCompenent"},
359    {  2, "badlyStructuredCompenent"},
360    {  0, NULL }
361 };
362 static int
363 dissect_h4501_GeneralProblem(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
364 {
365    offset=dissect_per_constrained_integer(tvb, offset, pinfo, tree, hf_h4501_GeneralProblem, 0, 2, NULL, NULL, FALSE);
366    return offset;
367 }
368 static int
369 dissect_h4501_ReturnResult_result(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
370 {
371    tvbuff_t *result_tvb = NULL;
372
373    offset=dissect_per_octet_string(tvb, offset, pinfo, tree, -1, NO_BOUND, NO_BOUND, &result_tvb);
374
375    if(tvb_length(result_tvb)){
376       switch (localOpcode) {
377       case CallTransferIdentify:
378          dissect_h450_CTIdentifyRes(result_tvb, 0, pinfo, tree, hf_h4502_CTIdentifyRes);
379          break;
380
381       case CallTransferInitiate:
382       case CallTransferSetup:
383          dissect_h450_DummyRes(result_tvb, 0, pinfo , tree, hf_h4502_DummyRes);
384          break;
385
386           case ActivateDiversionQ:
387                   dissect_ActivateDiversionQRes_PDU(result_tvb, pinfo, tree);
388                   break;
389           case DeactivateDiversionQ:
390                   dissect_DeactivateDiversionQRes_PDU(result_tvb, pinfo, tree);
391                   break;
392           case InterrogateDiversionQ:
393                   dissect_InterrogateDiversionQRes_PDU(result_tvb, pinfo, tree);
394                   break;
395           case CheckRestriction:
396                   dissect_CheckRestrictionRes_PDU(result_tvb, pinfo, tree);
397                   break;
398           case CallRerouting:
399                   dissect_CallReroutingRes_PDU(result_tvb, pinfo, tree);
400                   break;
401
402         case RemoteRetrieve:
403          dissect_h450_RemoteRetrieveRes(result_tvb, 0, pinfo , tree, hf_h4504_RemoteRetrieveRes);
404          break;
405         case MWIActivate:
406                 dissect_h450_MwiDummyRes(result_tvb, 0, pinfo , tree, hf_h4507_MwiDummyRes);
407                 break;
408         case MWIDeactivate:
409                 dissect_h450_MwiDummyRes(result_tvb, 0, pinfo , tree, hf_h4507_MwiDummyRes);
410                 break;
411         case MWIInterrogate:
412                 dissect_h450_MWIInterrogateRes(result_tvb, 0, pinfo , tree, hf_h4507_MWIInterrogateRes);
413                 break;
414
415       default:
416 PER_NOT_DECODED_YET("Unrecognized H.450.x return result");
417          break;
418       }
419    }
420
421    return offset;
422 }
423
424 static int
425 dissect_h4501_localOpcode(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
426 {
427    offset=dissect_per_integer(tvb, offset, pinfo, tree, hf_h4501_localOpcode, &localOpcode, NULL);
428    is_globalcode = FALSE;
429         return offset;
430 }
431
432
433 static int
434 dissect_h4501_globalCode(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
435 {
436         offset=dissect_per_object_identifier_str(tvb, offset, pinfo, tree, hf_h4501_globalCode, &globalcode_oid_str);
437         is_globalcode = TRUE;
438    return offset;
439 }
440
441
442 static const value_string opcode_vals[] = {
443         { 0, "local" },
444         { 1, "global" },
445         { 0, NULL}
446 };
447 static const per_choice_t opcode_choice[] = {
448         { 0, "local", ASN1_NO_EXTENSIONS,
449                 dissect_h4501_localOpcode },
450         { 1, "global", ASN1_NO_EXTENSIONS,
451                 dissect_h4501_globalCode },
452         { 0, NULL, 0, NULL }
453 };
454 static int
455 dissect_h4501_opcode(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
456 {
457    offset=dissect_per_choice(tvb, offset, pinfo, tree, hf_h4501_opcode, ett_h4501_opcode, opcode_choice, NULL);
458    return offset;
459 }
460
461 static const per_sequence_t result_sequence[] = {
462         { "opcode", ASN1_EXTENSION_ROOT, ASN1_NOT_OPTIONAL,
463                 dissect_h4501_opcode },
464         { "result", ASN1_EXTENSION_ROOT, ASN1_NOT_OPTIONAL,
465                 dissect_h4501_ReturnResult_result },
466         { NULL, 0, 0, NULL }
467 };
468 static int
469 dissect_h4501_result(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
470 {
471    offset=dissect_per_sequence(tvb, offset, pinfo, tree, hf_h4501_result, ett_h4501_result, result_sequence);
472    return offset;
473 }
474
475 static int
476 dissect_h4501_parameter(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
477 {
478    /* TODO - decode return error parameter based on localErrorCode */
479    offset=dissect_per_octet_string(tvb, offset, pinfo, tree, hf_h4501_parameter, NO_BOUND, NO_BOUND, NULL);
480    return offset;
481 }
482 static const value_string localErrorCode_vals[] = {
483    /* H.450.1 general error list */
484    {    0, "userNotSubscribed"},
485    {    1, "RejectedByNetwork"},
486    {    2, "RejectedByUser"},
487    {    3, "NotAvailable"},
488    {    5, "InsufficientInformation"},
489    {    6, "InvalidServedUserNumber"},
490    {    7, "InvalidCallState"},
491    {    8, "BasicServiceNotProvided"},
492    {    9, "NotIncomingCall"},
493    {   10, "SupplementaryServiceInteractionNotAllowed"},
494    {   11, "ResourceUnavailable"},
495    {   25, "CallFailure"},
496    {   43, "ProceduralError"},
497
498    /* H.450.2 Call Transfer return errors */
499    { 1004, "invalidReroutingNumber"},
500    { 1005, "unrecognizedCallIdentity"},
501    { 1006, "establishmentFailure"},
502    { 1008, "unspecified"},
503
504    /* H.450.4 Call Hold return errors */
505    { 2002, "undefined"},
506
507    /* H.450.5 Call Park and Pickup return errors */
508    { 2000, "callPickupIdInvalid"},
509    { 2001, "callAlreadyPickedUp"},
510
511    /* H.450.7 Message Waiting Indication return errors */
512    { 1018, "invalidMsgCentreId"},
513    {   31, "notActivated"},    
514
515    /* H.450.9 Call Completion return errors */
516    { 1010, "shortTermRejection"},
517    { 1011, "longTermRejection"},
518    { 1012, "remoteUserBusyAgain"},
519    { 1013, "failureToMatch"},    
520
521    /* H.450.11 Call Intrusion return errors */
522    { 1009, "notBusy"},
523    { 1000, "temporarilyUnavailable"},
524    { 1007, "notAuthorized"},
525
526    /* TODO - add other H.450.x error codes here */
527
528    {  0, NULL }
529 };
530 static int
531 dissect_h4501_localErrorCode(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
532 {
533    offset=dissect_per_integer(tvb, offset, pinfo, tree, hf_h4501_localErrorCode, &localErrorCode, NULL);
534         return offset;
535 }
536
537
538 static const value_string errorCode_vals[] = {
539         { 0, "local" },
540         { 1, "global" },
541         { 0, NULL}
542 };
543 static const per_choice_t errorCode_choice[] = {
544         { 0, "local", ASN1_NO_EXTENSIONS,
545                 dissect_h4501_localErrorCode },
546         { 1, "global", ASN1_NO_EXTENSIONS,
547                 dissect_h4501_globalCode },
548         { 0, NULL, 0, NULL }
549 };
550 static int
551 dissect_h4501_errorCode(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
552 {
553    offset=dissect_per_choice(tvb, offset, pinfo, tree, hf_h4501_errorCode, ett_h4501_errorCode, errorCode_choice, NULL);
554    return offset;
555 }
556
557 static const value_string problem_vals[] = {
558         { 0, "general" },
559         { 1, "invoke" },
560         { 2, "returnResult" },
561         { 3, "returnError" },
562         { 0, NULL}
563 };
564 static const per_choice_t problem_choice[] = {
565         { 0, "general", ASN1_NO_EXTENSIONS,
566                 dissect_h4501_GeneralProblem },
567         { 1, "invoke", ASN1_NO_EXTENSIONS,
568                 dissect_h4501_InvokeProblem },
569         { 2, "returnResult", ASN1_NO_EXTENSIONS,
570                 dissect_h4501_ReturnResultProblem },
571         { 3, "returnError", ASN1_NO_EXTENSIONS,
572                 dissect_h4501_ReturnErrorProblem },
573         { 0, NULL, 0, NULL }
574 };
575 static int
576 dissect_h4501_problem(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
577 {
578    offset=dissect_per_choice(tvb, offset, pinfo, tree, hf_h4501_problem, ett_h4501_problem, problem_choice, NULL);
579    return offset;
580 }
581 static int
582 dissect_h4501_constrained_invokeId(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
583 {
584    offset=dissect_per_constrained_integer(tvb, offset, pinfo, tree, hf_h4501_constrained_invokeId, 0, 65535, NULL, NULL, FALSE);
585         return offset;
586 }
587
588
589 static int
590 dissect_h4501_invokeId(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
591 {
592    offset=dissect_per_integer(tvb, offset, pinfo, tree, hf_h4501_invokeId, NULL, NULL);
593         return offset;
594 }
595
596 static const per_sequence_t Reject_sequence[] = {
597         { "invokeID", ASN1_NO_EXTENSIONS, ASN1_NOT_OPTIONAL,
598                 dissect_h4501_invokeId },
599         { "problem", ASN1_NO_EXTENSIONS, ASN1_NOT_OPTIONAL,
600                 dissect_h4501_problem },
601         { NULL, 0, 0, NULL }
602 };
603 static int
604 dissect_h4501_Reject(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
605 {
606    offset=dissect_per_sequence(tvb, offset, pinfo, tree, hf_h4501_Reject, ett_h4501_Reject, Reject_sequence);
607    return offset;
608 }
609
610 static const per_sequence_t ReturnError_sequence[] = {
611         { "invokeID", ASN1_NO_EXTENSIONS, ASN1_NOT_OPTIONAL,
612                 dissect_h4501_invokeId },
613         { "errorCode", ASN1_NO_EXTENSIONS, ASN1_NOT_OPTIONAL,
614                 dissect_h4501_errorCode },
615         { "parameter", ASN1_NO_EXTENSIONS, ASN1_OPTIONAL,
616                 dissect_h4501_parameter },
617         { NULL, 0, 0, NULL }
618 };
619 static int
620 dissect_h4501_ReturnError(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
621 {
622    offset=dissect_per_sequence(tvb, offset, pinfo, tree, hf_h4501_ReturnError, ett_h4501_ReturnError, ReturnError_sequence);
623    return offset;
624 }
625
626 static const per_sequence_t ReturnResult_sequence[] = {
627         { "invokeID", ASN1_NO_EXTENSIONS, ASN1_NOT_OPTIONAL,
628                 dissect_h4501_invokeId },
629         { "result", ASN1_NO_EXTENSIONS, ASN1_OPTIONAL,
630                 dissect_h4501_result },
631         { NULL, 0, 0, NULL }
632 };
633 static int
634 dissect_h4501_ReturnResult(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
635 {
636    offset=dissect_per_sequence(tvb, offset, pinfo, tree, hf_h4501_ReturnResult, ett_h4501_ReturnResult, ReturnResult_sequence);
637    return offset;
638 }
639
640 static const per_sequence_t Invoke_sequence[] = {
641         { "invokeID", ASN1_NO_EXTENSIONS, ASN1_NOT_OPTIONAL,
642                 dissect_h4501_constrained_invokeId },
643         { "linkedId", ASN1_NO_EXTENSIONS, ASN1_OPTIONAL,
644                 dissect_h4501_invokeId },
645         { "opcode", ASN1_NO_EXTENSIONS, ASN1_NOT_OPTIONAL,
646                 dissect_h4501_opcode },
647         { "argument", ASN1_NO_EXTENSIONS, ASN1_OPTIONAL,
648                 dissect_h4501_argument },
649         { NULL, 0, 0, NULL }
650 };
651 static int
652 dissect_h4501_Invoke(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
653 {
654    offset=dissect_per_sequence(tvb, offset, pinfo, tree, hf_h4501_Invoke, ett_h4501_Invoke, Invoke_sequence);
655    return offset;
656 }
657
658 static const value_string ROS_vals[] = {
659         { 1, "invoke" },
660         { 2, "returnResult" },
661         { 3, "returnError" },
662         { 4, "reject" },
663         { 0, NULL}
664 };
665 static const per_choice_t ROS_choice[] = {
666         { 1, "invoke", ASN1_NO_EXTENSIONS,
667                 dissect_h4501_Invoke },
668         { 2, "returnResult", ASN1_NO_EXTENSIONS,
669                 dissect_h4501_ReturnResult },
670         { 3, "returnError", ASN1_NO_EXTENSIONS,
671                 dissect_h4501_ReturnError },
672         { 4, "reject", ASN1_NO_EXTENSIONS,
673                 dissect_h4501_Reject },
674         { 0, NULL, 0, NULL }
675 };
676 static int
677 dissect_h4501_ROS(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
678 {
679    offset=dissect_per_choice(tvb, offset, pinfo, tree, hf_h4501_ROS, ett_h4501_ROS, ROS_choice, NULL);
680    return offset;
681 }
682
683 static int
684 dissect_h4501_argument(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
685 {
686    tvbuff_t *argument_tvb = NULL;
687
688   if ( is_globalcode ){
689           /* TODO call oid dissector
690            * call_ber_oid_callback isn't realy apropriate ?
691            */
692           offset = dissect_per_octet_string(tvb, offset, pinfo, tree, hf_h4501_globalargument, NO_BOUND, NO_BOUND, NULL);
693           is_globalcode = FALSE;
694           return offset;
695
696   }
697
698    offset=dissect_per_octet_string(tvb, offset, pinfo, tree, -1, NO_BOUND, NO_BOUND, &argument_tvb);
699
700    if(tvb_length(argument_tvb)){
701       switch (localOpcode) {
702                   /* h450.2 */
703                   case CallTransferIdentify:  /* Localvalue 7 */
704                           dissect_CallTransferIdentify_PDU(argument_tvb, pinfo, tree);
705                           break;
706               case CallTransferAbandon:   /* Localvalue 8 */
707                           dissect_CallTransferAbandon_PDU(argument_tvb, pinfo, tree);
708                           break;
709                    case CallTransferInitiate:  /* Localvalue 9 */
710                           dissect_CallTransferInitiate_PDU(argument_tvb, pinfo, tree);
711                           break;
712               case CallTransferSetup:           /* Localvalue 10 */
713                           dissect_CallTransferSetup_PDU(argument_tvb, pinfo, tree);
714                           break;
715               case CallTransferUpdate:          /* Localvalue 13 */
716                           dissect_CallTransferUpdate_PDU(argument_tvb, pinfo, tree);
717                           break;
718                   case SubaddressTransfer:              /* Localvalue 14 */
719                           dissect_SubaddressTransfer_PDU(argument_tvb, pinfo, tree);
720                           break;
721               case CallTransferComplete:        /* Localvalue 12 */
722                           dissect_CallTransferComplete_PDU(argument_tvb, pinfo, tree);
723                           break;
724               case CallTransferActive:          /* Localvalue 11 */
725                           dissect_CallTransferActive_PDU(argument_tvb, pinfo, tree);
726                           break;
727                   /* h450.3*/
728                   case ActivateDiversionQ:          /* Localvalue 15 */
729                           dissect_ActivateDiversionQArg_PDU(argument_tvb, pinfo, tree);
730                           break;
731                   case DeactivateDiversionQ:        /* Localvalue 16 */
732                  dissect_h450_DeactivateDiversionQArg(argument_tvb, 0, pinfo , tree, hf_h4503DeactivateDiversionQArg);
733                      break;
734                   case InterrogateDiversionQ:       /* Localvalue 17 */
735                  dissect_h450_InterrogateDiversionQ(argument_tvb, 0, pinfo , tree, hf_h4503InterrogateDiversionQ);
736                      break;
737                   case CheckRestriction:            /* Localvalue 18 */
738                  dissect_h450_CheckRestrictionArg(argument_tvb, 0, pinfo , tree, hf_h4503CheckRestrictionArg);
739                      break;
740                   case CallRerouting:               /* Localvalue 19 */
741                  dissect_h450_CallReroutingArg(argument_tvb, 0, pinfo , tree, hf_h4503CallReroutingArg);
742                      break;
743                   case DivertingLegInformation1:    /* Localvalue 20 */
744                  dissect_h450_DivertingLegInformation1Arg(argument_tvb, 0, pinfo , tree, hf_h4503DivertingLegInformation1Arg);
745                      break;
746                   case DivertingLegInformation2:   /* Localvalue 21 */
747                  dissect_h450_DivertingLegInformation2Arg(argument_tvb, 0, pinfo , tree, hf_h4503DivertingLegInformation2Arg);
748                      break;
749                   case DivertingLegInformation3:   /* Localvalue 22 */
750                  dissect_h450_DivertingLegInformation3Arg(argument_tvb, 0, pinfo , tree, hf_h4503DivertingLegInformation3Arg);
751                      break;
752                   case DivertingLegInformation4:    /* Localvalue 100 */
753                  dissect_h450_DivertingLegInformation4Arg(argument_tvb, 0, pinfo , tree, hf_h4503DivertingLegInformation4Arg);
754                      break;
755                   case CfnrDivertedLegFailed:       /* Localvalue 23 */
756                  dissect_h450_CfnrDivertedLegFailedArg(argument_tvb, 0, pinfo , tree, hf_h4503CfnrDivertedLegFailedArg);
757                      break;
758                   /* H.450.4 Call Hold */
759               case HoldNotific:                         /* Localvalue 101 */
760                            dissect_h450_HoldNotificArg(argument_tvb, 0, pinfo , tree, hf_h4504_HoldNotificArg);
761                      break;
762               case RetrieveNotific:                     /* Localvalue 102 */
763                            dissect_h450_RetrieveNotificArg(argument_tvb, 0, pinfo , tree, hf_h4504_RetrieveNotificArg);
764                      break;
765               case RemoteHold:                          /* Localvalue 103 */
766                            dissect_h450_RemoteHoldArg(argument_tvb, 0, pinfo , tree, hf_h4504_RemoteHoldArg);
767                      break;
768               case RemoteRetrieve:                      /* Localvalue 104 */
769                            dissect_h450_RemoteRetrieveArg(argument_tvb, 0, pinfo , tree, hf_h4504_RemoteRetrieveArg);
770                      break;
771
772 /* H.450.5 Call Park and Pickup constants */
773                   case CpRequest:                   /* Localvalue 106 */
774                   case CpSetup:                     /* Localvalue 107 */
775                   case GroupIndicationOn:           /* Localvalue 108 */
776                   case GroupIndicationOff:          /* Localvalue 109 */
777                   case Pickrequ:                    /* Localvalue 110 */
778                   case Pickup:                      /* Localvalue 111 */
779                   case PickExe:                     /* Localvalue 112 */
780                   case CpNotify:                    /* Localvalue 113 */
781                   case CpickupNotify:               /* Localvalue 114 */
782
783 /* H.450.6 Call Waiting constants */
784                   case CallWaiting:                 /* Localvalue 105 */
785 PER_NOT_DECODED_YET("Unrecognized H.450.x operation");
786                  break;
787
788                   /* H.450.7 Message Waiting Indication  */
789                   case MWIActivate:                             /* Localvalue 80 */
790                            dissect_h450_MWIActivateArg(argument_tvb, 0, pinfo , tree, hf_h4507_MWIActivateArg);
791                      break;
792                   case MWIDeactivate:                   /* Localvalue 81 */
793                            dissect_h450_MWIDeactivateArg(argument_tvb, 0, pinfo , tree, hf_h4507_MWIDeactivateArg);
794                      break;
795                   case MWIInterrogate:                  /* Localvalue 82 */
796                            dissect_h450_MWIInterrogateArg(argument_tvb, 0, pinfo , tree, hf_h4507_MWIInterrogateArg);
797                      break;
798
799                   /* H.450.8 Name Identification */
800                   case NIcallingName:                   /* Localvalue 0 */
801                           dissect_h450_NameArg(argument_tvb, 0, pinfo , tree, hf_h4508_CallingNameArg);
802                           break;
803                   case NIalertingName:                  /* Localvalue 1 */
804                           dissect_h450_NameArg(argument_tvb, 0, pinfo , tree, hf_h4508_AlertingNameArg);
805                           break;
806                   case NIconnectedName:                 /* Localvalue 2 */
807                           dissect_h450_NameArg(argument_tvb, 0, pinfo , tree, hf_h4508_ConnectedNameArg);
808                           break;
809                   case NIbusyName:                      /* Localvalue 3 */
810                           dissect_h450_NameArg(argument_tvb, 0, pinfo , tree, hf_h4508_BusyNameArg);
811                           break;
812
813 /* H.450.9 Call Completion constants */
814                   case CCBSRequest:                 /* Localvalue 40 */
815                   case CCNRRequest:                 /* Localvalue 27 */
816                   case CCCancel:                    /* Localvalue 28 */
817                   case CCExecPossible:              /* Localvalue 29 */
818                   case CCRingout:                   /* Localvalue 31 */
819                   case CCSuspend:                   /* Localvalue 32 */
820                   case CCResume:                    /* Localvalue 33 */ 
821
822 /* H.450.10 Call Offer constants */
823                   case CallOfferRequest:            /* Localvalue 34 */
824                   case RemoteUserAlerting:          /* Localvalue 115 */
825                   case CFBOverride:                 /* Localvalue 49  */
826
827 /* H.450.11 Call Intrusion constants */
828                   case CallIntrusionRequest:        /* Localvalue 43 */
829                   case CallIntrusionGetCIPL:        /* Localvalue 44 */
830                   case CallIntrusionIsolate:        /* Localvalue 45 */
831                   case CallIntrusionForcedRelease:  /* Localvalue 46 */
832                   case CallIntrusionWOBRequest:     /* Localvalue 47 */
833                   case CallIntrusionSilentMonitor:  /* Localvalue 116 */
834                   case CallIntrusionNotification:   /* Localvalue 117 */
835 PER_NOT_DECODED_YET("Unrecognized H.450.x operation");
836 break;
837 /* H.450.12 Common Information Operations constants */
838                   case CmnRequest:                                      /* Localvalue 84 */
839                           dissect_h450_CmnRequestArg(argument_tvb, 0, pinfo , tree, hf_h45012_CmnRequest);
840                           break;
841                   case CmnInform:                                       /* Localvalue 85 */
842                           dissect_h450_CmnArg(argument_tvb, 0, pinfo , tree, hf_h45012_CmnInform);
843                           break;
844
845               /* TODO - decode other H.450.x invoke arguments here */
846              default:
847 PER_NOT_DECODED_YET("Unrecognized H.450.x operation");
848                  break;
849           }
850   }
851    return offset;
852 }
853 static int 
854 dissect_ros_ROSxxx(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, int hf_ind _U_){
855
856         offset = dissect_h4501_ROS(tvb, offset, pinfo, tree);
857         return offset;
858
859 }
860 static void
861 dissect_h4501(tvbuff_t *tvb, packet_info *pinfo, proto_tree* tree)
862 {
863    proto_item *it;
864    proto_tree *tr;
865    guint32 offset=0;
866
867    it=proto_tree_add_protocol_format(tree, proto_h4501, tvb, 0, -1, "H.450.1");
868    tr=proto_item_add_subtree(it, ett_h4501);
869
870    dissect_h450_H4501SupplementaryService(tvb, offset, pinfo, tr, hf_h4501);
871 }
872
873 /*--- proto_register_h450 -------------------------------------------*/
874 void proto_register_h450(void) {
875
876   /* List of fields */
877         static hf_register_info hf[] = {
878    { &hf_h4501,
879       { "SupplementaryService", "h4501.SupplementaryService", FT_NONE, BASE_NONE,
880       NULL, 0, "SupplementaryService sequence", HFILL }},
881   { &hf_h4501_constrained_invokeId,
882       { "invokeId", "h4501.invokeId", FT_UINT32, BASE_DEC,
883       NULL, 0, "invokeId", HFILL }},
884    { &hf_h4501_invokeId,
885       { "invokeId", "h4501.invokeId", FT_INT32, BASE_DEC,
886       NULL, 0, "invokeId", HFILL }},
887    { &hf_h4501_localOpcode,
888       { "opcode", "h4501.opcode", FT_INT32, BASE_DEC,
889       VALS(localOpcode_vals), 0, "local", HFILL }},
890    { &hf_h4501_globalCode,
891       { "global", "h4501.global", FT_STRING, BASE_HEX,
892       NULL, 0, "global", HFILL }},
893    { &hf_h4501_globalargument,
894       { "argument", "h4501.argument", FT_BYTES, BASE_HEX,
895       NULL, 0, "argument", HFILL }},
896    { &hf_h4501_opcode,
897       { "opcode", "h4501.opcode", FT_UINT32, BASE_DEC,
898       VALS(opcode_vals), 0, "opcode choice", HFILL }},
899    { &hf_h4501_ReturnResult_result,
900       { "result", "h4501.ReturnResult.result", FT_BYTES, BASE_HEX,
901       NULL, 0, "result", HFILL }},
902    { &hf_h4501_result,
903       { "result", "h4501.result", FT_NONE, BASE_NONE,
904       NULL, 0, "result sequence of", HFILL }},
905    { &hf_h4501_ReturnResult,
906       { "ReturnResult", "h4501.ReturnResult", FT_NONE, BASE_NONE,
907       NULL, 0, "ReturnResult sequence of", HFILL }},
908    { &hf_h4501_localErrorCode,
909       { "errorCode", "h4501.errorCode", FT_INT32, BASE_DEC,
910       VALS(localErrorCode_vals), 0, "local", HFILL }},
911    { &hf_h4501_errorCode,
912       { "errorCode", "h4501.errorCode", FT_UINT32, BASE_DEC,
913       VALS(errorCode_vals), 0, "errorCode", HFILL }},
914    { &hf_h4501_parameter,
915       { "parameter", "h4501.parameter", FT_BYTES, BASE_HEX,
916       NULL, 0, "parameter", HFILL }},
917    { &hf_h4501_ReturnError,
918       { "ReturnError", "h4501.ReturnError", FT_NONE, BASE_NONE,
919       NULL, 0, "ReturnError sequence of", HFILL }},
920    { &hf_h4501_GeneralProblem,
921       { "GeneralProblem", "h4501.GeneralProblem", FT_UINT32, BASE_DEC,
922       VALS(GeneralProblem_vals), 0, "GeneralProblem", HFILL }},
923    { &hf_h4501_InvokeProblem,
924       { "InvokeProblem", "h4501.InvokeProblem", FT_UINT32, BASE_DEC,
925       VALS(InvokeProblem_vals), 0, "InvokeProblem", HFILL }},
926    { &hf_h4501_ReturnResultProblem,
927       { "ReturnResultProblem", "h4501.ReturnResultProblem", FT_UINT32, BASE_DEC,
928       VALS(ReturnResultProblem_vals), 0, "ReturnResultProblem", HFILL }},
929    { &hf_h4501_ReturnErrorProblem,
930       { "ReturnErrorProblem", "h4501.ReturnErrorProblem", FT_UINT32, BASE_DEC,
931       VALS(ReturnErrorProblem_vals), 0, "ReturnErrorProblem", HFILL }},
932    { &hf_h4501_problem,
933       { "problem", "h4501.problem", FT_UINT32, BASE_DEC,
934       VALS(problem_vals), 0, "problem choice", HFILL }},
935    { &hf_h4501_Reject,
936       { "Reject", "h4501.Reject", FT_NONE, BASE_NONE,
937       NULL, 0, "Reject sequence of", HFILL }},
938    { &hf_h4501_ROS,
939       { "ROS", "h4501.ROS", FT_UINT32, BASE_DEC,
940       VALS(ROS_vals), 0, "ROS choice", HFILL }},
941    { &hf_h4501_Invoke,
942       { "Invoke", "h4501.Invoke", FT_NONE, BASE_NONE,
943       NULL, 0, "Invoke sequence of", HFILL }},
944    { &hf_h4502_CTIdentifyRes,
945       { "CTIdentifyRes", "h4502.CTIdentifyRes", FT_NONE, BASE_NONE,
946       NULL, 0, "CTIdentifyRes sequence of", HFILL }},
947    { &hf_h4502_DummyRes,
948       { "DummyRes", "h4502.DummyRes", FT_UINT32, BASE_DEC,
949       VALS(h450_DummyRes_vals), 0, "DummyRes Choice", HFILL }},
950    { &hf_h4502_DummyArg,
951       { "DummyArg", "h4502.DummyArg", FT_UINT32, BASE_DEC,
952       VALS(h450_DummyArg_vals), 0, "DummyArg choice", HFILL }},
953    { &hf_h4503DeactivateDiversionQArg,
954       { "DeactivateDiversionQArg", "h4503.DeactivateDiversionQArg", FT_NONE, BASE_NONE,
955       NULL, 0, "ActivateDiversionQArg sequence of", HFILL }},
956    { &hf_h4503InterrogateDiversionQ,
957       { "InterrogateDiversionQ", "h4503.InterrogateDiversionQ", FT_NONE, BASE_NONE,
958       NULL, 0, "InterrogateDiversionQ sequence of", HFILL }},
959    { &hf_h4503CheckRestrictionArg,
960       { "CheckRestrictionArg", "h4503.CheckRestrictionArg", FT_NONE, BASE_NONE,
961       NULL, 0, "CheckRestrictionArg sequence of", HFILL }},
962    { &hf_h4503CallReroutingArg,
963       { "CallReroutingArg", "h4503.CallReroutingArg", FT_NONE, BASE_NONE,
964       NULL, 0, "ActivateDiversionQArg sequence of", HFILL }},
965    { &hf_h4503DivertingLegInformation1Arg,
966       { "DivertingLegInformation1Arg", "h4503.DivertingLegInformation1Arg", FT_NONE, BASE_NONE,
967       NULL, 0, "DivertingLegInformation1Arg sequence of", HFILL }},
968    { &hf_h4503DivertingLegInformation2Arg,
969       { "DivertingLegInformation2Arg", "h4503.DivertingLegInformation2Arg", FT_NONE, BASE_NONE,
970       NULL, 0, "DivertingLegInformation1Arg sequence of", HFILL }},
971    { &hf_h4503DivertingLegInformation3Arg,
972       { "DivertingLegInformation3Arg", "h4503.DivertingLegInformation3Arg", FT_NONE, BASE_NONE,
973       NULL, 0, "DivertingLegInformation1Arg sequence of", HFILL }},
974    { &hf_h4503DivertingLegInformation4Arg,
975       { "DivertingLegInformation4Arg", "h4503.DivertingLegInformation4Arg", FT_NONE, BASE_NONE,
976       NULL, 0, "DivertingLegInformation4Arg sequence of", HFILL }},
977    { &hf_h4503CfnrDivertedLegFailedArg,
978       { "CfnrDivertedLegFailedArg", "h4503.CfnrDivertedLegFailedArg", FT_NONE, BASE_NONE,
979       NULL, 0, "ActivateDiversionQArg sequence of", HFILL }},
980
981    { &hf_h4504_HoldNotificArg,
982       { "HoldNotificArg", "h4504.HoldNotificArg", FT_NONE, BASE_NONE,
983       NULL, 0, "HoldNotificArg sequence of", HFILL }},
984    { &hf_h4504_RetrieveNotificArg,
985       { "RetrieveNotificArg", "h4504.RetrieveNotificArg", FT_NONE, BASE_NONE,
986       NULL, 0, "RetrieveNotificArg sequence of", HFILL }},
987    { &hf_h4504_RemoteHoldArg,
988       { "RemoteHoldArg", "h4504.RemoteHoldArg", FT_NONE, BASE_NONE,
989       NULL, 0, "RemoteHoldArg sequence of", HFILL }},
990    { &hf_h4504_RemoteRetrieveArg,
991       { "RemoteRetrieveArg", "h4504.RemoteRetrieveArg", FT_NONE, BASE_NONE,
992       NULL, 0, "RemoteRetrieveArg sequence of", HFILL }},
993    { &hf_h4504_RemoteRetrieveRes,
994       { "RemoteRetrieveRes", "h4504.RemoteRetrieveRes", FT_NONE, BASE_NONE,
995       NULL, 0, "RemoteRetrieveRes sequence of", HFILL }},
996
997    { &hf_h4507_MWIActivateArg,
998       { "MWIActivateArg", "h4507.MWIActivateArg", FT_NONE, BASE_NONE,
999       NULL, 0, "MWIActivateArg sequence of", HFILL }},
1000    { &hf_h4507_MwiDummyRes,
1001       { "MwiDummyRes", "h4507.MwiDummyRes", FT_NONE, BASE_NONE,
1002       NULL, 0, "MwiDummyRes sequence of", HFILL }},
1003    { &hf_h4507_MWIDeactivateArg,
1004       { "MWIDeactivateArg", "h4507.MWIDeactivateArg", FT_NONE, BASE_NONE,
1005       NULL, 0, "MWIDeactivateArg sequence of", HFILL }},
1006    { &hf_h4507_MWIInterrogateArg,
1007       { "MWIInterrogateArg", "h4507.MWIInterrogateArg", FT_NONE, BASE_NONE,
1008       NULL, 0, "MWIInterrogateArg sequence of", HFILL }},
1009    { &hf_h4507_MWIInterrogateRes,
1010       { "MWIInterrogateRes", "h4507.MWIInterrogateRes", FT_NONE, BASE_NONE,
1011       NULL, 0, "MWIInterrogateRes sequence of", HFILL }},
1012
1013    { &hf_h4508_CallingNameArg,
1014       { "CallingNameArg", "h4508.CallingNameArg", FT_NONE, BASE_NONE,
1015       NULL, 0, "CallingNameArg sequence of", HFILL }},
1016    { &hf_h4508_AlertingNameArg,
1017       { "AlertingNameArg", "h4508.AlertingNameArg", FT_NONE, BASE_NONE,
1018       NULL, 0, "AlertingNameArg sequence of", HFILL }},
1019    { &hf_h4508_ConnectedNameArg,
1020       { "ConnectedNameArg", "h4508.ConnectedNameArg", FT_NONE, BASE_NONE,
1021       NULL, 0, "ConnectedNameArg sequence of", HFILL }},
1022    { &hf_h4508_BusyNameArg,
1023       { "BusyNameArg", "h4508.BusyNameArg", FT_NONE, BASE_NONE,
1024       NULL, 0, "BusyNameArg sequence of", HFILL }},
1025    { &hf_h45012_CmnRequest,
1026       { "CmnRequest", "h4508.CmnRequest", FT_NONE, BASE_NONE,
1027       NULL, 0, "CmnRequest sequence of", HFILL }},
1028    { &hf_h45012_CmnInform,
1029       { "CmnRequest", "h4508.CmnRequest", FT_NONE, BASE_NONE,
1030       NULL, 0, "CmnRequest sequence of", HFILL }},
1031
1032 #include "packet-h450-hfarr.c"
1033   };
1034
1035   /* List of subtrees */
1036   static gint *ett[] = {
1037           &ett_h4501,
1038           &ett_h4501_opcode,
1039           &ett_h4501_result,
1040           &ett_h4501_errorCode,
1041
1042           &ett_h4501_problem,
1043           &ett_h4501_Reject,
1044           &ett_h4501_ReturnError,
1045           &ett_h4501_ReturnResult,
1046           &ett_h4501_Invoke,
1047           &ett_h4501_ROS,
1048 #include "packet-h450-ettarr.c"
1049   };
1050
1051
1052   /* Register protocol */
1053   proto_h4501 = proto_register_protocol(PNAME, PSNAME, PFNAME);
1054   /* Register fields and subtrees */
1055   proto_register_field_array(proto_h4501, hf, array_length(hf));
1056   proto_register_subtree_array(ett, array_length(ett));
1057
1058  
1059   register_dissector("h4501", dissect_h4501, proto_h4501);
1060
1061
1062 }
1063
1064
1065 /*--- proto_reg_handoff_h4501 ---------------------------------------*/
1066 void
1067 proto_reg_handoff_h4501(void)
1068 {
1069
1070         h4501_handle = find_dissector("h4501");
1071
1072 }