1 /* packet-camel-template.c
3 * Copyright 2004, Tim Endean <endeant@hotmail.com>
4 * Copyright 2005, Olivier Jacques <olivier.jacques@hp.com>
5 * Copyright 2005, Javier Acuna <javier.acuna@sixbell.com>
6 * Updated to ETSI TS 129 078 V6.4.0 (2004-3GPP TS 29.078 version 6.4.0 Release 6 1 12)
7 * Copyright 2005-2010, Anders Broman <anders.broman@ericsson.com>
8 * Updated to 3GPP TS 29.078 version 7.3.0 Release 7 (2006-06)
9 * Built from the gsm-map dissector Copyright 2004, Anders Broman <anders.broman@ericsson.com>
13 * Wireshark - Network traffic analyzer
14 * By Gerald Combs <gerald@wireshark.org>
15 * Copyright 1998 Gerald Combs
17 * This program is free software; you can redistribute it and/or
18 * modify it under the terms of the GNU General Public License
19 * as published by the Free Software Foundation; either version 2
20 * of the License, or (at your option) any later version.
22 * This program is distributed in the hope that it will be useful,
23 * but WITHOUT ANY WARRANTY; without even the implied warranty of
24 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25 * GNU General Public License for more details.
27 * You should have received a copy of the GNU General Public License
28 * along with this program; if not, write to the Free Software
29 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
30 * References: ETSI 300 374
33 * Indentation logic: this file is indented with 2 spaces indentation.
41 #include <epan/packet.h>
42 #include <epan/prefs.h>
43 #include <epan/oids.h>
45 #include <epan/asn1.h>
46 #include <epan/expert.h>
50 #include "packet-ber.h"
51 #include "packet-camel.h"
52 #include "packet-q931.h"
53 #include "packet-e164.h"
54 #include "packet-isup.h"
55 #include "packet-gsm_map.h"
56 #include "packet-gsm_a_common.h"
57 #include "packet-inap.h"
58 #include "packet-tcap.h"
59 #include <epan/camel-persistentdata.h>
60 #include <epan/tcap-persistentdata.h>
63 #define PSNAME "CAMEL"
64 #define PFNAME "camel"
66 /* Initialize the protocol and registered fields */
67 static int proto_camel = -1;
68 int date_format = 1; /*assume european date format */
70 /* Global variables */
71 static guint32 opcode=0;
72 static guint32 errorCode=0;
75 static rose_ctx_t camel_rose_ctx;
77 static int hf_digit = -1;
78 static int hf_camel_extension_code_local = -1;
79 static int hf_camel_error_code_local = -1;
80 static int hf_camel_cause_indicator = -1;
81 static int hf_camel_PDPTypeNumber_etsi = -1;
82 static int hf_camel_PDPTypeNumber_ietf = -1;
83 static int hf_camel_PDPAddress_IPv4 = -1;
84 static int hf_camel_PDPAddress_IPv6 = -1;
85 static int hf_camel_cellGlobalIdOrServiceAreaIdFixedLength = -1;
86 static int hf_camel_RP_Cause = -1;
87 static int hf_camel_CAMEL_AChBillingChargingCharacteristics = -1;
88 static int hf_camel_CAMEL_FCIBillingChargingCharacteristics = -1;
89 static int hf_camel_CAMEL_FCIGPRSBillingChargingCharacteristics = -1;
90 static int hf_camel_CAMEL_FCISMSBillingChargingCharacteristics = -1;
91 static int hf_camel_CAMEL_SCIBillingChargingCharacteristics = -1;
92 static int hf_camel_CAMEL_SCIGPRSBillingChargingCharacteristics = -1;
93 static int hf_camel_CAMEL_CallResult = -1;
95 /* Used by camel-persistentdata.c */
96 int hf_camelsrt_SessionId=-1;
97 int hf_camelsrt_RequestNumber=-1;
98 int hf_camelsrt_Duplicate=-1;
99 int hf_camelsrt_RequestFrame=-1;
100 int hf_camelsrt_ResponseFrame=-1;
101 int hf_camelsrt_DeltaTime=-1;
102 int hf_camelsrt_SessionTime=-1;
103 int hf_camelsrt_DeltaTime31=-1;
104 int hf_camelsrt_DeltaTime75=-1;
105 int hf_camelsrt_DeltaTime65=-1;
106 int hf_camelsrt_DeltaTime22=-1;
107 int hf_camelsrt_DeltaTime35=-1;
108 int hf_camelsrt_DeltaTime80=-1;
110 #include "packet-camel-hf.c"
112 static struct camelsrt_info_t * gp_camelsrt_info;
114 /* Forward declarations */
115 static int dissect_invokeData(proto_tree *tree, tvbuff_t *tvb, int offset,asn1_ctx_t *actx);
116 static int dissect_returnResultData(proto_tree *tree, tvbuff_t *tvb, int offset,asn1_ctx_t *actx);
117 static int dissect_returnErrorData(proto_tree *tree, tvbuff_t *tvb, int offset,asn1_ctx_t *actx);
118 static int dissect_camel_CAMEL_AChBillingChargingCharacteristics(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_);
119 static int dissect_camel_CAMEL_CallResult(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_);
121 gboolean gcamel_HandleSRT=FALSE;
122 extern gboolean gcamel_PersistentSRT;
123 extern gboolean gcamel_DisplaySRT;
125 /* Initialize the subtree pointers */
126 static gint ett_camel = -1;
127 static gint ett_camelisup_parameter = -1;
128 static gint ett_camel_AccessPointName = -1;
129 static gint ett_camel_pdptypenumber = -1;
130 static gint ett_camel_cause = -1;
131 static gint ett_camel_RPcause = -1;
132 static gint ett_camel_stat = -1;
133 static guint ett_camel_calledpartybcdnumber = -1;
135 #include "packet-camel-ett.c"
138 /* Preference settings default */
140 static range_t *global_ssn_range;
141 static dissector_handle_t camel_handle;
143 /* Global variables */
145 static int application_context_version;
146 static guint8 PDPTypeOrganization;
147 static guint8 PDPTypeNumber;
148 const char *camel_obj_id = NULL;
149 gboolean is_ExtensionField =FALSE;
151 static int camel_opcode_type;
152 #define CAMEL_OPCODE_INVOKE 1
153 #define CAMEL_OPCODE_RETURN_RESULT 2
154 #define CAMEL_OPCODE_RETURN_ERROR 3
155 #define CAMEL_OPCODE_REJECT 4
157 static const value_string camel_Component_vals[] = {
159 { 2, "returnResultLast" },
160 { 3, "returnError" },
165 static const true_false_string camel_extension_value = {
169 #define EUROPEAN_DATE 1
170 #define AMERICAN_DATE 2
171 #define CAMEL_DATE_AND_TIME_LEN 20 /* 2*5 + 4 + 5 + 1 (HH:MM:SS;mm/dd/yyyy) */
173 static enum_val_t date_options[] = {
174 { "european", "DD/MM/YYYY", EUROPEAN_DATE },
175 { "american", "MM/DD/YYYY", AMERICAN_DATE },
179 static const value_string digit_value[] = {
197 static const value_string camel_nature_of_addr_indicator_values[] = {
199 { 0x01, "International Number" },
200 { 0x02, "National Significant Number" },
201 { 0x03, "Network Specific Number" },
202 { 0x04, "Subscriber Number" },
203 { 0x05, "Reserved" },
204 { 0x06, "Abbreviated Number" },
205 { 0x07, "Reserved for extension" },
208 static const value_string camel_number_plan_values[] = {
210 { 0x01, "ISDN/Telephony Numbering (Rec ITU-T E.164)" },
212 { 0x03, "Data Numbering (ITU-T Rec. X.121)" },
213 { 0x04, "Telex Numbering (ITU-T Rec. F.69)" },
215 { 0x06, "Land Mobile Numbering (ITU-T Rec. E.212)" },
217 { 0x08, "National Numbering" },
218 { 0x09, "Private Numbering" },
219 { 0x0f, "Reserved for extension" },
223 /* End includes from old" packet-camel.c */
225 static const value_string camel_RP_Cause_values[] = {
226 { 1, "Unassigned (unallocated) number" },
227 { 8, "Operator determined barring" },
228 { 10, "Call barred" },
230 { 21, "Short message transfer rejected" },
231 { 27, "Destination out of order" },
232 { 28, "Unidentified subscriber" },
233 { 29, "Facility Rejected" },
234 { 30, "Unknown subscriber" },
235 { 38, "Network out of order" },
236 { 41, "Temporary failure" },
237 { 42, "Congestion" },
238 { 47, "Resources unavailable, unspecified" },
239 { 50, "Requested facility not subscribed" },
240 { 69, "Requested facility not implemented" },
241 { 81, "Invalid short message transfer reference value" },
242 { 95, "Semantically incorrect message" },
243 { 96, "Invalid mandatory information" },
244 { 97, " Message Type non-existent or not implemented" },
245 { 98, "Message not compatible with short message protocol state" },
246 { 99, "Information element non existent or not implemented" },
247 { 111, "Protocol error, unspecified" },
248 { 127, "Interworking, unspecified" },
249 { 22,"Memory capacity exceeded" },
253 static const value_string camel_holdTreatmentIndicator_values[] = {
254 { 0x01, "acceptHoldRequest" },
255 { 0x02, "rejectHoldRequest" },
258 static const value_string camel_cwTreatmentIndicator_values[] = {
259 { 0x01, "acceptCw" },
260 { 0x02, "rejectCw" },
263 static const value_string camel_ectTreatmentIndicator_values[] = {
264 { 0x01, "acceptEctRequest" },
265 { 0x02, "rejectEctRequest" },
269 #include "packet-camel-val.h"
271 #include "packet-camel-table.c"
273 static char camel_number_to_char(int number)
276 return (char) (number + 48 ); /* this is ASCII specific */
278 return (char) (number + 55 );
285 dissect_RP_cause_ie(tvbuff_t *tvb, guint32 offset, _U_ guint len,
286 proto_tree *tree, int hf_cause_value, guint8 *cause_value)
290 static char a_bigbuf[1024];
292 curr_offset = offset;
293 oct = tvb_get_guint8(tvb, curr_offset);
295 *cause_value = oct & 0x7f;
297 other_decode_bitfield_value(a_bigbuf, oct, 0x7f, 8);
298 proto_tree_add_uint_format(tree, hf_cause_value,
299 tvb, curr_offset, 1, *cause_value,
302 val_to_str(*cause_value, camel_RP_Cause_values,
303 "Unknown Cause (%u), treated as (41) \"Temporary failure\" for MO-SMS or (111) \"Protocol error,unspecified\" for MT-SMS"));
307 oct = tvb_get_guint8(tvb, curr_offset);
308 proto_tree_add_uint_format(tree, hf_cause_value,
309 tvb, curr_offset, 1, oct,
310 "Diagnostic : %u", oct);
313 return(curr_offset - offset);
316 #include "packet-camel-fn.c"
318 #include "packet-camel-table2.c"
321 static guint8 camel_pdu_type = 0;
322 static guint8 camel_pdu_size = 0;
326 dissect_camel_camelPDU(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_,proto_tree *tree, int hf_index) {
329 struct tcap_private_t * p_private_tcap;
332 application_context_version = 0;
333 if (actx->pinfo->private_data != NULL){
334 p_private_tcap=actx->pinfo->private_data;
336 if (p_private_tcap->acv==TRUE ){
337 version_ptr = strrchr(p_private_tcap->oid,'.');
339 application_context_version = atoi(version_ptr+1);
341 gp_camelsrt_info->tcap_context=p_private_tcap->context;
342 if (p_private_tcap->context)
343 gp_camelsrt_info->tcap_session_id
345 = ( (struct tcaphash_context_t *) (p_private_tcap->context))->session_id;
348 camel_pdu_type = tvb_get_guint8(tvb, offset)&0x0f;
349 /* Get the length and add 2 */
350 camel_pdu_size = tvb_get_guint8(tvb, offset+1)+2;
352 /* Populate the info column with PDU type*/
353 col_add_str(actx->pinfo->cinfo, COL_INFO, val_to_str(camel_pdu_type, camel_Component_vals, "Unknown Camel (%u)"));
354 col_append_str(actx->pinfo->cinfo, COL_INFO, " ");
356 is_ExtensionField =FALSE;
357 offset = dissect_camel_ROS(TRUE, tvb, offset, actx, tree, hf_index);
364 dissect_camel(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
366 proto_item *item=NULL;
367 proto_tree *tree=NULL;
368 proto_item *stat_item=NULL;
369 proto_tree *stat_tree=NULL;
371 asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
373 col_set_str(pinfo->cinfo, COL_PROTOCOL, "Camel");
375 /* create display subtree for the protocol */
377 item = proto_tree_add_item(parent_tree, proto_camel, tvb, 0, -1, ENC_NA);
378 tree = proto_item_add_subtree(item, ett_camel);
380 /* camelsrt reset counter, and initialise global pointer
381 to store service response time related data */
382 gp_camelsrt_info=camelsrt_razinfo();
383 dissect_camel_camelPDU(FALSE, tvb, 0, &asn1_ctx , tree, -1);
385 /* If a Tcap context is associated to this transaction */
386 if (gcamel_HandleSRT &&
387 gp_camelsrt_info->tcap_context ) {
388 if (gcamel_DisplaySRT && tree) {
389 stat_item = proto_tree_add_text(tree, tvb, 0, 0, "Stat");
390 stat_tree = proto_item_add_subtree(stat_item, ett_camel_stat);
392 camelsrt_call_matching(tvb, pinfo, stat_tree, gp_camelsrt_info);
393 tap_queue_packet(camel_tap, pinfo, gp_camelsrt_info);
397 /*--- proto_reg_handoff_camel ---------------------------------------*/
398 static void range_delete_callback(guint32 ssn)
401 delete_itu_tcap_subdissector(ssn, camel_handle);
405 static void range_add_callback(guint32 ssn)
408 add_itu_tcap_subdissector(ssn, camel_handle);
412 void proto_reg_handoff_camel(void) {
413 static gboolean camel_prefs_initialized = FALSE;
414 static range_t *ssn_range;
416 if (!camel_prefs_initialized) {
418 camel_prefs_initialized = TRUE;
419 camel_handle = find_dissector("camel");
422 register_ber_oid_dissector_handle("0.4.0.0.1.0.50.0",camel_handle, proto_camel, "CAP-v1-gsmSSF-to-gsmSCF-AC" );
423 register_ber_oid_dissector_handle("0.4.0.0.1.0.50.1",camel_handle, proto_camel, "CAP-v2-gsmSSF-to-gsmSCF-AC" );
424 register_ber_oid_dissector_handle("0.4.0.0.1.0.51.1",camel_handle, proto_camel, "CAP-v2-assist-gsmSSF-to-gsmSCF-AC" );
425 register_ber_oid_dissector_handle("0.4.0.0.1.0.52.1",camel_handle, proto_camel, "CAP-v2-gsmSRF-to-gsmSCF-AC" );
426 register_ber_oid_dissector_handle("0.4.0.0.1.21.3.50",camel_handle, proto_camel, "cap3-gprssf-scfAC" );
427 register_ber_oid_dissector_handle("0.4.0.0.1.21.3.51",camel_handle, proto_camel, "cap3-gsmscf-gprsssfAC" );
428 register_ber_oid_dissector_handle("0.4.0.0.1.21.3.61",camel_handle, proto_camel, "cap3-sms-AC" );
429 register_ber_oid_dissector_handle("0.4.0.0.1.23.3.4",camel_handle, proto_camel, "capssf-scfGenericAC" );
430 register_ber_oid_dissector_handle("0.4.0.0.1.23.3.61",camel_handle, proto_camel, "cap4-sms-AC" );
433 #include "packet-camel-dis-tab.c"
435 range_foreach(ssn_range, range_delete_callback);
439 ssn_range = range_copy(global_ssn_range);
441 range_foreach(ssn_range, range_add_callback);
445 void proto_register_camel(void) {
446 module_t *camel_module;
448 static hf_register_info hf[] = {
449 { &hf_camel_extension_code_local,
450 { "local", "camel.extension_code_local",
451 FT_INT32, BASE_DEC, NULL, 0,
452 "Extension local code", HFILL }},
453 { &hf_camel_error_code_local,
454 { "local", "camel.error_code_local",
455 FT_INT32, BASE_DEC, VALS(camel_err_code_string_vals), 0,
456 "ERROR code", HFILL }},
457 { &hf_camel_cause_indicator, /* Currently not enabled */
458 { "Cause indicator", "camel.cause_indicator",
459 FT_UINT8, BASE_DEC|BASE_EXT_STRING, &q850_cause_code_vals_ext, 0x7f,
462 { "Digit Value", "camel.digit_value",
463 FT_UINT8, BASE_DEC, VALS(digit_value), 0, NULL, HFILL }},
464 { &hf_camel_PDPTypeNumber_etsi,
465 { "ETSI defined PDP Type Value", "camel.PDPTypeNumber_etsi",
466 FT_UINT8, BASE_HEX, VALS(gsm_map_etsi_defined_pdp_vals), 0,
468 { &hf_camel_PDPTypeNumber_ietf,
469 { "IETF defined PDP Type Value", "camel.PDPTypeNumber_ietf",
470 FT_UINT8, BASE_HEX, VALS(gsm_map_ietf_defined_pdp_vals), 0,
472 { &hf_camel_PDPAddress_IPv4,
473 { "PDPAddress IPv4", "camel.PDPAddress_IPv4",
474 FT_IPv4, BASE_NONE, NULL, 0,
475 "IPAddress IPv4", HFILL }},
476 { &hf_camel_PDPAddress_IPv6,
477 { "PDPAddress IPv6", "camel.PDPAddress_IPv6",
478 FT_IPv6, BASE_NONE, NULL, 0,
479 "IPAddress IPv6", HFILL }},
480 { &hf_camel_cellGlobalIdOrServiceAreaIdFixedLength,
481 { "CellGlobalIdOrServiceAreaIdFixedLength", "camel.CellGlobalIdOrServiceAreaIdFixedLength",
482 FT_BYTES, BASE_NONE, NULL, 0,
483 "LocationInformationGPRS/CellGlobalIdOrServiceAreaIdOrLAI", HFILL }},
484 { &hf_camel_RP_Cause,
485 { "RP Cause", "camel.RP_Cause",
486 FT_UINT8, BASE_DEC, NULL, 0,
487 "RP Cause Value", HFILL }},
489 { &hf_camel_CAMEL_AChBillingChargingCharacteristics,
490 { "CAMEL-AChBillingChargingCharacteristics", "camel.CAMEL_AChBillingChargingCharacteristics",
491 FT_UINT32, BASE_DEC, VALS(camel_CAMEL_AChBillingChargingCharacteristics_vals), 0,
494 { &hf_camel_CAMEL_FCIBillingChargingCharacteristics,
495 { "CAMEL-FCIBillingChargingCharacteristics", "camel.CAMEL_FCIBillingChargingCharacteristics",
496 FT_UINT32, BASE_DEC, VALS(camel_CAMEL_FCIBillingChargingCharacteristics_vals), 0,
499 { &hf_camel_CAMEL_FCIGPRSBillingChargingCharacteristics,
500 { "CAMEL-FCIGPRSBillingChargingCharacteristics", "camel.CAMEL_FCIGPRSBillingChargingCharacteristics",
501 FT_UINT32, BASE_DEC, NULL, 0,
504 { &hf_camel_CAMEL_FCISMSBillingChargingCharacteristics,
505 { "CAMEL-FCISMSBillingChargingCharacteristics", "camel.CAMEL_FCISMSBillingChargingCharacteristics",
506 FT_UINT32, BASE_DEC, VALS(camel_CAMEL_FCISMSBillingChargingCharacteristics_vals), 0,
509 { &hf_camel_CAMEL_SCIBillingChargingCharacteristics,
510 { "CAMEL-SCIBillingChargingCharacteristics", "camel.CAMEL_SCIBillingChargingCharacteristics",
511 FT_UINT32, BASE_DEC, VALS(camel_CAMEL_SCIBillingChargingCharacteristics_vals), 0,
514 { &hf_camel_CAMEL_SCIGPRSBillingChargingCharacteristics,
515 { "CAMEL-SCIGPRSBillingChargingCharacteristics", "camel.CAMEL_SCIGPRSBillingChargingCharacteristics",
516 FT_UINT32, BASE_DEC, NULL, 0,
517 "CAMEL-FSCIGPRSBillingChargingCharacteristics", HFILL }},
519 { &hf_camel_CAMEL_CallResult,
520 { "CAMEL-CAMEL_CallResult", "camel.CAMEL_CallResult",
521 FT_UINT32, BASE_DEC, VALS(camel_CAMEL_CallResult_vals), 0,
522 "CAMEL-CallResult", HFILL }},
524 /* Camel Service Response Time */
525 { &hf_camelsrt_SessionId,
527 "camel.srt.session_id",
528 FT_UINT32, BASE_DEC, NULL, 0x0,
531 { &hf_camelsrt_RequestNumber,
533 "camel.srt.request_number",
534 FT_UINT64, BASE_DEC, NULL, 0x0,
537 { &hf_camelsrt_Duplicate,
538 { "Request Duplicate",
539 "camel.srt.duplicate",
540 FT_UINT32, BASE_DEC, NULL, 0x0,
543 { &hf_camelsrt_RequestFrame,
545 "camel.srt.reqframe",
546 FT_FRAMENUM, BASE_NONE, NULL, 0x0,
547 "SRT Request Frame", HFILL }
549 { &hf_camelsrt_ResponseFrame,
551 "camel.srt.rspframe",
552 FT_FRAMENUM, BASE_NONE, NULL, 0x0,
553 "SRT Response Frame", HFILL }
555 { &hf_camelsrt_DeltaTime,
556 { "Service Response Time",
557 "camel.srt.deltatime",
558 FT_RELATIVE_TIME, BASE_NONE, NULL, 0x0,
559 "DeltaTime between Request and Response", HFILL }
561 { &hf_camelsrt_SessionTime,
562 { "Session duration",
563 "camel.srt.sessiontime",
564 FT_RELATIVE_TIME, BASE_NONE, NULL, 0x0,
565 "Duration of the TCAP session", HFILL }
567 { &hf_camelsrt_DeltaTime31,
568 { "Service Response Time",
569 "camel.srt.deltatime31",
570 FT_RELATIVE_TIME, BASE_NONE, NULL, 0x0,
571 "DeltaTime between InitialDP and Continue", HFILL }
573 { &hf_camelsrt_DeltaTime65,
574 { "Service Response Time",
575 "camel.srt.deltatime65",
576 FT_RELATIVE_TIME, BASE_NONE, NULL, 0x0,
577 "DeltaTime between InitialDPSMS and ContinueSMS", HFILL }
579 { &hf_camelsrt_DeltaTime75,
580 { "Service Response Time",
581 "camel.srt.deltatime75",
582 FT_RELATIVE_TIME, BASE_NONE, NULL, 0x0,
583 "DeltaTime between InitialDPGPRS and ContinueGPRS", HFILL }
585 { &hf_camelsrt_DeltaTime35,
586 { "Service Response Time",
587 "camel.srt.deltatime35",
588 FT_RELATIVE_TIME, BASE_NONE, NULL, 0x0,
589 "DeltaTime between ApplyCharginReport and ApplyCharging", HFILL }
591 { &hf_camelsrt_DeltaTime22,
592 { "Service Response Time",
593 "camel.srt.deltatime22",
594 FT_RELATIVE_TIME, BASE_NONE, NULL, 0x0,
595 "DeltaTime between EventReport(Disconnect) and Release Call", HFILL }
597 { &hf_camelsrt_DeltaTime80,
598 { "Service Response Time",
599 "camel.srt.deltatime80",
600 FT_RELATIVE_TIME, BASE_NONE, NULL, 0x0,
601 "DeltaTime between EventReportGPRS and ContinueGPRS", HFILL }
606 #include "packet-camel-hfarr.c"
609 /* List of subtrees */
610 static gint *ett[] = {
612 &ett_camelisup_parameter,
613 &ett_camel_AccessPointName,
614 &ett_camel_pdptypenumber,
618 &ett_camel_calledpartybcdnumber,
620 #include "packet-camel-ettarr.c"
622 /* Register protocol */
623 proto_camel = proto_register_protocol(PNAME, PSNAME, PFNAME);
625 register_dissector("camel", dissect_camel, proto_camel);
627 proto_register_field_array(proto_camel, hf, array_length(hf));
628 proto_register_subtree_array(ett, array_length(ett));
630 rose_ctx_init(&camel_rose_ctx);
632 /* Register dissector tables */
633 camel_rose_ctx.arg_local_dissector_table = register_dissector_table("camel.ros.local.arg",
634 "CAMEL Operation Argument (local opcode)",
635 FT_UINT32, BASE_HEX);
636 camel_rose_ctx.res_local_dissector_table = register_dissector_table("camel.ros.local.res",
637 "CAMEL Operation Result (local opcode)",
638 FT_UINT32, BASE_HEX);
639 camel_rose_ctx.err_local_dissector_table = register_dissector_table("camel.ros.local.err",
640 "CAMEL Error (local opcode)",
641 FT_UINT32, BASE_HEX);
643 /* Register our configuration options, particularly our ssn:s */
644 /* Set default SSNs */
645 range_convert_str(&global_ssn_range, "6-9", MAX_SSN);
647 camel_module = prefs_register_protocol(proto_camel, proto_reg_handoff_camel);
649 prefs_register_enum_preference(camel_module, "date.format", "Date Format",
650 "The date format: (DD/MM) or (MM/DD)",
651 &date_format, date_options, FALSE);
654 prefs_register_range_preference(camel_module, "tcap.ssn",
656 "TCAP Subsystem numbers used for Camel",
657 &global_ssn_range, MAX_SSN);
659 prefs_register_bool_preference(camel_module, "srt",
660 "Service Response Time Analyse",
661 "Activate the analyse for Response Time",
664 prefs_register_bool_preference(camel_module, "persistentsrt",
665 "Persistent stats for SRT",
666 "Statistics for Response Time",
667 &gcamel_PersistentSRT);
669 /* Routine for statistic */
670 register_init_routine(&camelsrt_init_routine);
671 camel_tap=register_tap(PSNAME);