1 /* Do not modify this file. */
2 /* It is created automatically by the ASN.1 to Wireshark dissector compiler */
4 /* ../../tools/asn2wrs.py -b -p smrse -c ./smrse.cnf -s ./packet-smrse-template -D . SMRSE.asn */
6 /* Input file: packet-smrse-template.c */
8 #line 1 "packet-smrse-template.c"
10 * Routines for SMRSE Short Message Relay Service packet dissection
11 * Ronnie Sahlberg 2004
15 * Wireshark - Network traffic analyzer
16 * By Gerald Combs <gerald@wireshark.org>
17 * Copyright 1998 Gerald Combs
19 * This program is free software; you can redistribute it and/or
20 * modify it under the terms of the GNU General Public License
21 * as published by the Free Software Foundation; either version 2
22 * of the License, or (at your option) any later version.
24 * This program is distributed in the hope that it will be useful,
25 * but WITHOUT ANY WARRANTY; without even the implied warranty of
26 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27 * GNU General Public License for more details.
29 * You should have received a copy of the GNU General Public License
30 * along with this program; if not, write to the Free Software
31 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
39 #include <epan/packet.h>
40 #include <epan/asn1.h>
44 #include "packet-ber.h"
45 #include "packet-smrse.h"
47 #define PNAME "Short Message Relaying Service"
48 #define PSNAME "SMRSE"
49 #define PFNAME "smrse"
51 #define TCP_PORT_SMRSE 4321
53 /* Initialize the protocol and registered fields */
54 static int proto_smrse = -1;
55 static int hf_smrse_reserved = -1;
56 static int hf_smrse_tag = -1;
57 static int hf_smrse_length = -1;
58 static int hf_smrse_Octet_Format = -1;
60 /*--- Included file: packet-smrse-hf.c ---*/
61 #line 1 "packet-smrse-hf.c"
62 static int hf_smrse_sc_address = -1; /* SMS_Address */
63 static int hf_smrse_password = -1; /* Password */
64 static int hf_smrse_address_type = -1; /* T_address_type */
65 static int hf_smrse_numbering_plan = -1; /* T_numbering_plan */
66 static int hf_smrse_address_value = -1; /* T_address_value */
67 static int hf_smrse_octet_format = -1; /* T_octet_format */
68 static int hf_smrse_connect_fail_reason = -1; /* Connect_fail */
69 static int hf_smrse_mt_priority_request = -1; /* BOOLEAN */
70 static int hf_smrse_mt_mms = -1; /* BOOLEAN */
71 static int hf_smrse_mt_message_reference = -1; /* RP_MR */
72 static int hf_smrse_mt_originating_address = -1; /* SMS_Address */
73 static int hf_smrse_mt_destination_address = -1; /* SMS_Address */
74 static int hf_smrse_mt_user_data = -1; /* RP_UD */
75 static int hf_smrse_mt_origVMSCAddr = -1; /* SMS_Address */
76 static int hf_smrse_mt_tariffClass = -1; /* SM_TC */
77 static int hf_smrse_mo_message_reference = -1; /* RP_MR */
78 static int hf_smrse_mo_originating_address = -1; /* SMS_Address */
79 static int hf_smrse_mo_user_data = -1; /* RP_UD */
80 static int hf_smrse_origVMSCAddr = -1; /* SMS_Address */
81 static int hf_smrse_moimsi = -1; /* IMSI_Address */
82 static int hf_smrse_message_reference = -1; /* RP_MR */
83 static int hf_smrse_error_reason = -1; /* Error_reason */
84 static int hf_smrse_msg_waiting_set = -1; /* BOOLEAN */
85 static int hf_smrse_alerting_MS_ISDN = -1; /* SMS_Address */
86 static int hf_smrse_sm_diag_info = -1; /* RP_UD */
87 static int hf_smrse_ms_address = -1; /* SMS_Address */
89 /*--- End of included file: packet-smrse-hf.c ---*/
90 #line 52 "packet-smrse-template.c"
92 /* Initialize the subtree pointers */
93 static gint ett_smrse = -1;
95 /*--- Included file: packet-smrse-ett.c ---*/
96 #line 1 "packet-smrse-ett.c"
97 static gint ett_smrse_SMR_Bind = -1;
98 static gint ett_smrse_SMS_Address = -1;
99 static gint ett_smrse_T_address_value = -1;
100 static gint ett_smrse_SMR_Bind_Confirm = -1;
101 static gint ett_smrse_SMR_Bind_Failure = -1;
102 static gint ett_smrse_SMR_Unbind = -1;
103 static gint ett_smrse_RPDataMT = -1;
104 static gint ett_smrse_RPDataMO = -1;
105 static gint ett_smrse_RPAck = -1;
106 static gint ett_smrse_RPError = -1;
107 static gint ett_smrse_RPAlertSC = -1;
109 /*--- End of included file: packet-smrse-ett.c ---*/
110 #line 56 "packet-smrse-template.c"
114 /*--- Included file: packet-smrse-fn.c ---*/
115 #line 1 "packet-smrse-fn.c"
117 static const value_string smrse_T_address_type_vals[] = {
118 { 0, "unknown-type" },
119 { 1, "internat-number" },
120 { 2, "national-number" },
121 { 3, "net-spec-number" },
122 { 4, "short-number" },
128 dissect_smrse_T_address_type(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
129 offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
136 static const value_string smrse_T_numbering_plan_vals[] = {
137 { 0, "unknown-numbering" },
138 { 1, "iSDN-numbering" },
139 { 3, "data-network-numbering" },
140 { 4, "telex-numbering" },
141 { 8, "national-numbering" },
142 { 9, "private-numbering" },
148 dissect_smrse_T_numbering_plan(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
149 offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
159 dissect_smrse_T_octet_format(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
161 char *strp,tmpstr[21];
162 guint32 i, start_offset;
167 static char n2a[16] = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' };
171 /* skip the tag and length */
172 offset=dissect_ber_identifier(actx->pinfo, tree, tvb, offset, &class, &pc, &tag);
173 offset=dissect_ber_length(actx->pinfo, tree, tvb, offset, &len, &ind);
179 *strp++=n2a[tvb_get_guint8(tvb, offset)&0x0f];
180 *strp++=n2a[(tvb_get_guint8(tvb, offset)>>4)&0x0f];
185 proto_tree_add_string(tree, hf_smrse_Octet_Format, tvb, start_offset, offset-start_offset, tmpstr);
195 static const value_string smrse_T_address_value_vals[] = {
196 { 0, "octet-format" },
200 static const ber_choice_t T_address_value_choice[] = {
201 { 0, &hf_smrse_octet_format , BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_NOOWNTAG, dissect_smrse_T_octet_format },
202 { 0, NULL, 0, 0, 0, NULL }
206 dissect_smrse_T_address_value(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
207 offset = dissect_ber_choice(actx, tree, tvb, offset,
208 T_address_value_choice, hf_index, ett_smrse_T_address_value,
215 static const ber_sequence_t SMS_Address_sequence[] = {
216 { &hf_smrse_address_type , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_smrse_T_address_type },
217 { &hf_smrse_numbering_plan, BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_smrse_T_numbering_plan },
218 { &hf_smrse_address_value , BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_smrse_T_address_value },
219 { NULL, 0, 0, 0, NULL }
223 dissect_smrse_SMS_Address(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
224 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
225 SMS_Address_sequence, hf_index, ett_smrse_SMS_Address);
233 dissect_smrse_Password(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
234 offset = dissect_ber_restricted_string(implicit_tag, BER_UNI_TAG_PrintableString,
235 actx, tree, tvb, offset, hf_index,
242 static const ber_sequence_t SMR_Bind_sequence[] = {
243 { &hf_smrse_sc_address , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_smrse_SMS_Address },
244 { &hf_smrse_password , BER_CLASS_UNI, BER_UNI_TAG_PrintableString, BER_FLAGS_NOOWNTAG, dissect_smrse_Password },
245 { NULL, 0, 0, 0, NULL }
249 dissect_smrse_SMR_Bind(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
250 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
251 SMR_Bind_sequence, hf_index, ett_smrse_SMR_Bind);
259 dissect_smrse_IMSI_Address(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
260 offset = dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index,
267 static const ber_sequence_t SMR_Bind_Confirm_sequence[] = {
268 { NULL, 0, 0, 0, NULL }
272 dissect_smrse_SMR_Bind_Confirm(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
273 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
274 SMR_Bind_Confirm_sequence, hf_index, ett_smrse_SMR_Bind_Confirm);
280 static const value_string smrse_Connect_fail_vals[] = {
281 { 0, "not-entitled" },
282 { 1, "tmp-overload" },
283 { 2, "tmp-failure" },
284 { 3, "id-or-passwd" },
285 { 4, "not-supported" },
286 { 5, "inv-SC-addr" },
292 dissect_smrse_Connect_fail(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
293 offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
300 static const ber_sequence_t SMR_Bind_Failure_sequence[] = {
301 { &hf_smrse_connect_fail_reason, BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_smrse_Connect_fail },
302 { NULL, 0, 0, 0, NULL }
306 dissect_smrse_SMR_Bind_Failure(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
307 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
308 SMR_Bind_Failure_sequence, hf_index, ett_smrse_SMR_Bind_Failure);
314 static const ber_sequence_t SMR_Unbind_sequence[] = {
315 { NULL, 0, 0, 0, NULL }
319 dissect_smrse_SMR_Unbind(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
320 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
321 SMR_Unbind_sequence, hf_index, ett_smrse_SMR_Unbind);
329 dissect_smrse_BOOLEAN(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
330 offset = dissect_ber_boolean(implicit_tag, actx, tree, tvb, offset, hf_index, NULL);
338 dissect_smrse_RP_MR(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
339 offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
348 dissect_smrse_RP_UD(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
349 offset = dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index,
358 dissect_smrse_SM_TC(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
359 offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
366 static const ber_sequence_t RPDataMT_sequence[] = {
367 { &hf_smrse_mt_priority_request, BER_CLASS_UNI, BER_UNI_TAG_BOOLEAN, BER_FLAGS_NOOWNTAG, dissect_smrse_BOOLEAN },
368 { &hf_smrse_mt_mms , BER_CLASS_UNI, BER_UNI_TAG_BOOLEAN, BER_FLAGS_NOOWNTAG, dissect_smrse_BOOLEAN },
369 { &hf_smrse_mt_message_reference, BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_smrse_RP_MR },
370 { &hf_smrse_mt_originating_address, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_smrse_SMS_Address },
371 { &hf_smrse_mt_destination_address, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_smrse_SMS_Address },
372 { &hf_smrse_mt_user_data , BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_NOOWNTAG, dissect_smrse_RP_UD },
373 { &hf_smrse_mt_origVMSCAddr, BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_smrse_SMS_Address },
374 { &hf_smrse_mt_tariffClass, BER_CLASS_CON, 2, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_smrse_SM_TC },
375 { NULL, 0, 0, 0, NULL }
379 dissect_smrse_RPDataMT(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
380 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
381 RPDataMT_sequence, hf_index, ett_smrse_RPDataMT);
387 static const ber_sequence_t RPDataMO_sequence[] = {
388 { &hf_smrse_mo_message_reference, BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_smrse_RP_MR },
389 { &hf_smrse_mo_originating_address, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_smrse_SMS_Address },
390 { &hf_smrse_mo_user_data , BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_NOOWNTAG, dissect_smrse_RP_UD },
391 { &hf_smrse_origVMSCAddr , BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_smrse_SMS_Address },
392 { &hf_smrse_moimsi , BER_CLASS_CON, 2, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_smrse_IMSI_Address },
393 { NULL, 0, 0, 0, NULL }
397 dissect_smrse_RPDataMO(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
398 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
399 RPDataMO_sequence, hf_index, ett_smrse_RPDataMO);
405 static const ber_sequence_t RPAck_sequence[] = {
406 { &hf_smrse_message_reference, BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_smrse_RP_MR },
407 { NULL, 0, 0, 0, NULL }
411 dissect_smrse_RPAck(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
412 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
413 RPAck_sequence, hf_index, ett_smrse_RPAck);
419 static const value_string smrse_Error_reason_vals[] = {
420 { 1, "unknown-subscriber" },
421 { 9, "illegal-subscriber" },
422 { 11, "teleservice-not-provisioned" },
423 { 13, "call-barred" },
424 { 15, "cug-reject" },
425 { 19, "sMS-ll-capabilities-not-prov" },
426 { 20, "error-in-MS" },
427 { 21, "facility-not-supported" },
428 { 22, "memory-capacity-exceeded" },
429 { 29, "absent-subscriber" },
430 { 30, "ms-busy-for-MT-sms" },
431 { 36, "system-failure" },
432 { 44, "illegal-equipment" },
433 { 60, "no-resp-to-paging" },
434 { 61, "gMSC-congestion" },
435 { 70, "dublicate-sm" },
436 { 101, "sC-congestion" },
437 { 103, "mS-not-SC-Subscriber" },
438 { 104, "invalid-sme-address" },
444 dissect_smrse_Error_reason(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
445 offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
452 static const ber_sequence_t RPError_sequence[] = {
453 { &hf_smrse_error_reason , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_smrse_Error_reason },
454 { &hf_smrse_msg_waiting_set, BER_CLASS_UNI, BER_UNI_TAG_BOOLEAN, BER_FLAGS_NOOWNTAG, dissect_smrse_BOOLEAN },
455 { &hf_smrse_message_reference, BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_smrse_RP_MR },
456 { &hf_smrse_alerting_MS_ISDN, BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_smrse_SMS_Address },
457 { &hf_smrse_sm_diag_info , BER_CLASS_CON, 2, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_smrse_RP_UD },
458 { NULL, 0, 0, 0, NULL }
462 dissect_smrse_RPError(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
463 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
464 RPError_sequence, hf_index, ett_smrse_RPError);
470 static const ber_sequence_t RPAlertSC_sequence[] = {
471 { &hf_smrse_ms_address , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_smrse_SMS_Address },
472 { &hf_smrse_message_reference, BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_smrse_RP_MR },
473 { NULL, 0, 0, 0, NULL }
477 dissect_smrse_RPAlertSC(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
478 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
479 RPAlertSC_sequence, hf_index, ett_smrse_RPAlertSC);
485 /*--- End of included file: packet-smrse-fn.c ---*/
486 #line 59 "packet-smrse-template.c"
488 static const value_string tag_vals[] = {
490 { 2, "AliveTestRsp" },
504 dissect_smrse(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
506 proto_item *item = NULL;
507 proto_tree *tree = NULL;
508 guint8 reserved, tag;
512 asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
514 reserved=tvb_get_guint8(tvb, 0);
515 length=tvb_get_ntohs(tvb,1);
516 tag=tvb_get_guint8(tvb, 3);
520 if( (tag<1)||(tag>11) )
524 item = proto_tree_add_item(parent_tree, proto_smrse, tvb, 0, -1, FALSE);
525 tree = proto_item_add_subtree(item, ett_smrse);
528 col_set_str(pinfo->cinfo, COL_PROTOCOL, "SMRSE");
529 if (check_col(pinfo->cinfo, COL_INFO))
530 col_add_str(pinfo->cinfo, COL_INFO, val_to_str(tag, tag_vals,"Unknown Tag:0x%02x"));
532 proto_tree_add_item(tree, hf_smrse_reserved, tvb, 0, 1, FALSE);
533 proto_tree_add_item(tree, hf_smrse_length, tvb, 1, 2, FALSE);
534 proto_tree_add_item(tree, hf_smrse_tag, tvb, 3, 1, FALSE);
542 offset=dissect_smrse_SMR_Bind(FALSE, tvb, 4, &asn1_ctx, tree, -1);
545 offset=dissect_smrse_SMR_Bind_Confirm(FALSE, tvb, 4, &asn1_ctx, tree, -1);
548 offset=dissect_smrse_SMR_Bind_Failure(FALSE, tvb, 4, &asn1_ctx, tree, -1);
551 offset=dissect_smrse_SMR_Unbind(FALSE, tvb, 4, &asn1_ctx, tree, -1);
554 offset=dissect_smrse_RPDataMT(FALSE, tvb, 4, &asn1_ctx, tree, -1);
557 offset=dissect_smrse_RPDataMO(FALSE, tvb, 4, &asn1_ctx, tree, -1);
560 offset=dissect_smrse_RPAck(FALSE, tvb, 4, &asn1_ctx, tree, -1);
563 offset=dissect_smrse_RPError(FALSE, tvb, 4, &asn1_ctx, tree, -1);
566 offset=dissect_smrse_RPAlertSC(FALSE, tvb, 4, &asn1_ctx, tree, -1);
573 /*--- proto_register_smrse ----------------------------------------------*/
574 void proto_register_smrse(void) {
577 static hf_register_info hf[] = {
578 { &hf_smrse_reserved, {
579 "Reserved", "smrse.reserved", FT_UINT8, BASE_DEC,
580 NULL, 0, "Reserved byte, must be 126", HFILL }},
582 "Tag", "smrse.tag", FT_UINT8, BASE_DEC,
583 VALS(tag_vals), 0, NULL, HFILL }},
584 { &hf_smrse_length, {
585 "Length", "smrse.length", FT_UINT16, BASE_DEC,
586 NULL, 0, "Length of SMRSE PDU", HFILL }},
587 { &hf_smrse_Octet_Format,
588 { "octet-Format", "smrse.octet_Format",
589 FT_STRING, BASE_NONE, NULL, 0,
590 "SMS-Address/address-value/octet-format", HFILL }},
593 /*--- Included file: packet-smrse-hfarr.c ---*/
594 #line 1 "packet-smrse-hfarr.c"
595 { &hf_smrse_sc_address,
596 { "sc-address", "smrse.sc_address",
597 FT_NONE, BASE_NONE, NULL, 0,
598 "smrse.SMS_Address", HFILL }},
599 { &hf_smrse_password,
600 { "password", "smrse.password",
601 FT_STRING, BASE_NONE, NULL, 0,
602 "smrse.Password", HFILL }},
603 { &hf_smrse_address_type,
604 { "address-type", "smrse.address_type",
605 FT_INT32, BASE_DEC, VALS(smrse_T_address_type_vals), 0,
606 "smrse.T_address_type", HFILL }},
607 { &hf_smrse_numbering_plan,
608 { "numbering-plan", "smrse.numbering_plan",
609 FT_INT32, BASE_DEC, VALS(smrse_T_numbering_plan_vals), 0,
610 "smrse.T_numbering_plan", HFILL }},
611 { &hf_smrse_address_value,
612 { "address-value", "smrse.address_value",
613 FT_UINT32, BASE_DEC, VALS(smrse_T_address_value_vals), 0,
614 "smrse.T_address_value", HFILL }},
615 { &hf_smrse_octet_format,
616 { "octet-format", "smrse.octet_format",
617 FT_BYTES, BASE_NONE, NULL, 0,
618 "smrse.T_octet_format", HFILL }},
619 { &hf_smrse_connect_fail_reason,
620 { "connect-fail-reason", "smrse.connect_fail_reason",
621 FT_INT32, BASE_DEC, VALS(smrse_Connect_fail_vals), 0,
622 "smrse.Connect_fail", HFILL }},
623 { &hf_smrse_mt_priority_request,
624 { "mt-priority-request", "smrse.mt_priority_request",
625 FT_BOOLEAN, BASE_NONE, NULL, 0,
626 "smrse.BOOLEAN", HFILL }},
628 { "mt-mms", "smrse.mt_mms",
629 FT_BOOLEAN, BASE_NONE, NULL, 0,
630 "smrse.BOOLEAN", HFILL }},
631 { &hf_smrse_mt_message_reference,
632 { "mt-message-reference", "smrse.mt_message_reference",
633 FT_UINT32, BASE_DEC, NULL, 0,
634 "smrse.RP_MR", HFILL }},
635 { &hf_smrse_mt_originating_address,
636 { "mt-originating-address", "smrse.mt_originating_address",
637 FT_NONE, BASE_NONE, NULL, 0,
638 "smrse.SMS_Address", HFILL }},
639 { &hf_smrse_mt_destination_address,
640 { "mt-destination-address", "smrse.mt_destination_address",
641 FT_NONE, BASE_NONE, NULL, 0,
642 "smrse.SMS_Address", HFILL }},
643 { &hf_smrse_mt_user_data,
644 { "mt-user-data", "smrse.mt_user_data",
645 FT_BYTES, BASE_NONE, NULL, 0,
646 "smrse.RP_UD", HFILL }},
647 { &hf_smrse_mt_origVMSCAddr,
648 { "mt-origVMSCAddr", "smrse.mt_origVMSCAddr",
649 FT_NONE, BASE_NONE, NULL, 0,
650 "smrse.SMS_Address", HFILL }},
651 { &hf_smrse_mt_tariffClass,
652 { "mt-tariffClass", "smrse.mt_tariffClass",
653 FT_UINT32, BASE_DEC, NULL, 0,
654 "smrse.SM_TC", HFILL }},
655 { &hf_smrse_mo_message_reference,
656 { "mo-message-reference", "smrse.mo_message_reference",
657 FT_UINT32, BASE_DEC, NULL, 0,
658 "smrse.RP_MR", HFILL }},
659 { &hf_smrse_mo_originating_address,
660 { "mo-originating-address", "smrse.mo_originating_address",
661 FT_NONE, BASE_NONE, NULL, 0,
662 "smrse.SMS_Address", HFILL }},
663 { &hf_smrse_mo_user_data,
664 { "mo-user-data", "smrse.mo_user_data",
665 FT_BYTES, BASE_NONE, NULL, 0,
666 "smrse.RP_UD", HFILL }},
667 { &hf_smrse_origVMSCAddr,
668 { "origVMSCAddr", "smrse.origVMSCAddr",
669 FT_NONE, BASE_NONE, NULL, 0,
670 "smrse.SMS_Address", HFILL }},
672 { "moimsi", "smrse.moimsi",
673 FT_BYTES, BASE_NONE, NULL, 0,
674 "smrse.IMSI_Address", HFILL }},
675 { &hf_smrse_message_reference,
676 { "message-reference", "smrse.message_reference",
677 FT_UINT32, BASE_DEC, NULL, 0,
678 "smrse.RP_MR", HFILL }},
679 { &hf_smrse_error_reason,
680 { "error-reason", "smrse.error_reason",
681 FT_INT32, BASE_DEC, VALS(smrse_Error_reason_vals), 0,
682 "smrse.Error_reason", HFILL }},
683 { &hf_smrse_msg_waiting_set,
684 { "msg-waiting-set", "smrse.msg_waiting_set",
685 FT_BOOLEAN, BASE_NONE, NULL, 0,
686 "smrse.BOOLEAN", HFILL }},
687 { &hf_smrse_alerting_MS_ISDN,
688 { "alerting-MS-ISDN", "smrse.alerting_MS_ISDN",
689 FT_NONE, BASE_NONE, NULL, 0,
690 "smrse.SMS_Address", HFILL }},
691 { &hf_smrse_sm_diag_info,
692 { "sm-diag-info", "smrse.sm_diag_info",
693 FT_BYTES, BASE_NONE, NULL, 0,
694 "smrse.RP_UD", HFILL }},
695 { &hf_smrse_ms_address,
696 { "ms-address", "smrse.ms_address",
697 FT_NONE, BASE_NONE, NULL, 0,
698 "smrse.SMS_Address", HFILL }},
700 /*--- End of included file: packet-smrse-hfarr.c ---*/
701 #line 165 "packet-smrse-template.c"
704 /* List of subtrees */
705 static gint *ett[] = {
708 /*--- Included file: packet-smrse-ettarr.c ---*/
709 #line 1 "packet-smrse-ettarr.c"
711 &ett_smrse_SMS_Address,
712 &ett_smrse_T_address_value,
713 &ett_smrse_SMR_Bind_Confirm,
714 &ett_smrse_SMR_Bind_Failure,
715 &ett_smrse_SMR_Unbind,
720 &ett_smrse_RPAlertSC,
722 /*--- End of included file: packet-smrse-ettarr.c ---*/
723 #line 171 "packet-smrse-template.c"
726 /* Register protocol */
727 proto_smrse = proto_register_protocol(PNAME, PSNAME, PFNAME);
729 /* Register fields and subtrees */
730 proto_register_field_array(proto_smrse, hf, array_length(hf));
731 proto_register_subtree_array(ett, array_length(ett));
736 /*--- proto_reg_handoff_smrse -------------------------------------------*/
737 void proto_reg_handoff_smrse(void) {
738 dissector_handle_t smrse_handle;
740 smrse_handle = new_create_dissector_handle(dissect_smrse, proto_smrse);
741 dissector_add("tcp.port",TCP_PORT_SMRSE, smrse_handle);