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 . -O ../../epan/dissectors SMRSE.asn */
6 /* Input file: packet-smrse-template.c */
8 #line 1 "../../asn1/smrse/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>
42 #include "packet-ber.h"
43 #include "packet-smrse.h"
45 #define PNAME "Short Message Relaying Service"
46 #define PSNAME "SMRSE"
47 #define PFNAME "smrse"
49 #define TCP_PORT_SMRSE 4321
51 /* Initialize the protocol and registered fields */
52 static int proto_smrse = -1;
53 static int hf_smrse_reserved = -1;
54 static int hf_smrse_tag = -1;
55 static int hf_smrse_length = -1;
56 static int hf_smrse_Octet_Format = -1;
58 /*--- Included file: packet-smrse-hf.c ---*/
59 #line 1 "../../asn1/smrse/packet-smrse-hf.c"
60 static int hf_smrse_sc_address = -1; /* SMS_Address */
61 static int hf_smrse_password = -1; /* Password */
62 static int hf_smrse_address_type = -1; /* T_address_type */
63 static int hf_smrse_numbering_plan = -1; /* T_numbering_plan */
64 static int hf_smrse_address_value = -1; /* T_address_value */
65 static int hf_smrse_octet_format = -1; /* T_octet_format */
66 static int hf_smrse_connect_fail_reason = -1; /* Connect_fail */
67 static int hf_smrse_mt_priority_request = -1; /* BOOLEAN */
68 static int hf_smrse_mt_mms = -1; /* BOOLEAN */
69 static int hf_smrse_mt_message_reference = -1; /* RP_MR */
70 static int hf_smrse_mt_originating_address = -1; /* SMS_Address */
71 static int hf_smrse_mt_destination_address = -1; /* SMS_Address */
72 static int hf_smrse_mt_user_data = -1; /* RP_UD */
73 static int hf_smrse_mt_origVMSCAddr = -1; /* SMS_Address */
74 static int hf_smrse_mt_tariffClass = -1; /* SM_TC */
75 static int hf_smrse_mo_message_reference = -1; /* RP_MR */
76 static int hf_smrse_mo_originating_address = -1; /* SMS_Address */
77 static int hf_smrse_mo_user_data = -1; /* RP_UD */
78 static int hf_smrse_origVMSCAddr = -1; /* SMS_Address */
79 static int hf_smrse_moimsi = -1; /* IMSI_Address */
80 static int hf_smrse_message_reference = -1; /* RP_MR */
81 static int hf_smrse_error_reason = -1; /* Error_reason */
82 static int hf_smrse_msg_waiting_set = -1; /* BOOLEAN */
83 static int hf_smrse_alerting_MS_ISDN = -1; /* SMS_Address */
84 static int hf_smrse_sm_diag_info = -1; /* RP_UD */
85 static int hf_smrse_ms_address = -1; /* SMS_Address */
87 /*--- End of included file: packet-smrse-hf.c ---*/
88 #line 50 "../../asn1/smrse/packet-smrse-template.c"
90 /* Initialize the subtree pointers */
91 static gint ett_smrse = -1;
93 /*--- Included file: packet-smrse-ett.c ---*/
94 #line 1 "../../asn1/smrse/packet-smrse-ett.c"
95 static gint ett_smrse_SMR_Bind = -1;
96 static gint ett_smrse_SMS_Address = -1;
97 static gint ett_smrse_T_address_value = -1;
98 static gint ett_smrse_SMR_Bind_Confirm = -1;
99 static gint ett_smrse_SMR_Bind_Failure = -1;
100 static gint ett_smrse_SMR_Unbind = -1;
101 static gint ett_smrse_RPDataMT = -1;
102 static gint ett_smrse_RPDataMO = -1;
103 static gint ett_smrse_RPAck = -1;
104 static gint ett_smrse_RPError = -1;
105 static gint ett_smrse_RPAlertSC = -1;
107 /*--- End of included file: packet-smrse-ett.c ---*/
108 #line 54 "../../asn1/smrse/packet-smrse-template.c"
112 /*--- Included file: packet-smrse-fn.c ---*/
113 #line 1 "../../asn1/smrse/packet-smrse-fn.c"
115 static const value_string smrse_T_address_type_vals[] = {
116 { 0, "unknown-type" },
117 { 1, "internat-number" },
118 { 2, "national-number" },
119 { 3, "net-spec-number" },
120 { 4, "short-number" },
126 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_) {
127 offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
134 static const value_string smrse_T_numbering_plan_vals[] = {
135 { 0, "unknown-numbering" },
136 { 1, "iSDN-numbering" },
137 { 3, "data-network-numbering" },
138 { 4, "telex-numbering" },
139 { 8, "national-numbering" },
140 { 9, "private-numbering" },
146 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_) {
147 offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
157 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_) {
158 #line 21 "../../asn1/smrse/smrse.cnf"
159 char *strp,tmpstr[21];
160 guint32 i, start_offset;
165 static char n2a[16] = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' };
169 /* skip the tag and length */
170 offset=dissect_ber_identifier(actx->pinfo, tree, tvb, offset, &class, &pc, &tag);
171 offset=dissect_ber_length(actx->pinfo, tree, tvb, offset, &len, &ind);
177 *strp++=n2a[tvb_get_guint8(tvb, offset)&0x0f];
178 *strp++=n2a[(tvb_get_guint8(tvb, offset)>>4)&0x0f];
183 proto_tree_add_string(tree, hf_smrse_Octet_Format, tvb, start_offset, offset-start_offset, tmpstr);
193 static const value_string smrse_T_address_value_vals[] = {
194 { 0, "octet-format" },
198 static const ber_choice_t T_address_value_choice[] = {
199 { 0, &hf_smrse_octet_format , BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_NOOWNTAG, dissect_smrse_T_octet_format },
200 { 0, NULL, 0, 0, 0, NULL }
204 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_) {
205 offset = dissect_ber_choice(actx, tree, tvb, offset,
206 T_address_value_choice, hf_index, ett_smrse_T_address_value,
213 static const ber_sequence_t SMS_Address_sequence[] = {
214 { &hf_smrse_address_type , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_smrse_T_address_type },
215 { &hf_smrse_numbering_plan, BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_smrse_T_numbering_plan },
216 { &hf_smrse_address_value , BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_smrse_T_address_value },
217 { NULL, 0, 0, 0, NULL }
221 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_) {
222 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
223 SMS_Address_sequence, hf_index, ett_smrse_SMS_Address);
231 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_) {
232 offset = dissect_ber_restricted_string(implicit_tag, BER_UNI_TAG_PrintableString,
233 actx, tree, tvb, offset, hf_index,
240 static const ber_sequence_t SMR_Bind_sequence[] = {
241 { &hf_smrse_sc_address , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_smrse_SMS_Address },
242 { &hf_smrse_password , BER_CLASS_UNI, BER_UNI_TAG_PrintableString, BER_FLAGS_NOOWNTAG, dissect_smrse_Password },
243 { NULL, 0, 0, 0, NULL }
247 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_) {
248 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
249 SMR_Bind_sequence, hf_index, ett_smrse_SMR_Bind);
257 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_) {
258 offset = dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index,
265 static const ber_sequence_t SMR_Bind_Confirm_sequence[] = {
266 { NULL, 0, 0, 0, NULL }
270 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_) {
271 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
272 SMR_Bind_Confirm_sequence, hf_index, ett_smrse_SMR_Bind_Confirm);
278 static const value_string smrse_Connect_fail_vals[] = {
279 { 0, "not-entitled" },
280 { 1, "tmp-overload" },
281 { 2, "tmp-failure" },
282 { 3, "id-or-passwd" },
283 { 4, "not-supported" },
284 { 5, "inv-SC-addr" },
290 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_) {
291 offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
298 static const ber_sequence_t SMR_Bind_Failure_sequence[] = {
299 { &hf_smrse_connect_fail_reason, BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_smrse_Connect_fail },
300 { NULL, 0, 0, 0, NULL }
304 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_) {
305 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
306 SMR_Bind_Failure_sequence, hf_index, ett_smrse_SMR_Bind_Failure);
312 static const ber_sequence_t SMR_Unbind_sequence[] = {
313 { NULL, 0, 0, 0, NULL }
317 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_) {
318 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
319 SMR_Unbind_sequence, hf_index, ett_smrse_SMR_Unbind);
327 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_) {
328 offset = dissect_ber_boolean(implicit_tag, actx, tree, tvb, offset, hf_index, NULL);
336 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_) {
337 offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
346 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_) {
347 offset = dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index,
356 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_) {
357 offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
364 static const ber_sequence_t RPDataMT_sequence[] = {
365 { &hf_smrse_mt_priority_request, BER_CLASS_UNI, BER_UNI_TAG_BOOLEAN, BER_FLAGS_NOOWNTAG, dissect_smrse_BOOLEAN },
366 { &hf_smrse_mt_mms , BER_CLASS_UNI, BER_UNI_TAG_BOOLEAN, BER_FLAGS_NOOWNTAG, dissect_smrse_BOOLEAN },
367 { &hf_smrse_mt_message_reference, BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_smrse_RP_MR },
368 { &hf_smrse_mt_originating_address, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_smrse_SMS_Address },
369 { &hf_smrse_mt_destination_address, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_smrse_SMS_Address },
370 { &hf_smrse_mt_user_data , BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_NOOWNTAG, dissect_smrse_RP_UD },
371 { &hf_smrse_mt_origVMSCAddr, BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_smrse_SMS_Address },
372 { &hf_smrse_mt_tariffClass, BER_CLASS_CON, 2, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_smrse_SM_TC },
373 { NULL, 0, 0, 0, NULL }
377 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_) {
378 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
379 RPDataMT_sequence, hf_index, ett_smrse_RPDataMT);
385 static const ber_sequence_t RPDataMO_sequence[] = {
386 { &hf_smrse_mo_message_reference, BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_smrse_RP_MR },
387 { &hf_smrse_mo_originating_address, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_smrse_SMS_Address },
388 { &hf_smrse_mo_user_data , BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_NOOWNTAG, dissect_smrse_RP_UD },
389 { &hf_smrse_origVMSCAddr , BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_smrse_SMS_Address },
390 { &hf_smrse_moimsi , BER_CLASS_CON, 2, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_smrse_IMSI_Address },
391 { NULL, 0, 0, 0, NULL }
395 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_) {
396 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
397 RPDataMO_sequence, hf_index, ett_smrse_RPDataMO);
403 static const ber_sequence_t RPAck_sequence[] = {
404 { &hf_smrse_message_reference, BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_smrse_RP_MR },
405 { NULL, 0, 0, 0, NULL }
409 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_) {
410 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
411 RPAck_sequence, hf_index, ett_smrse_RPAck);
417 static const value_string smrse_Error_reason_vals[] = {
418 { 1, "unknown-subscriber" },
419 { 9, "illegal-subscriber" },
420 { 11, "teleservice-not-provisioned" },
421 { 13, "call-barred" },
422 { 15, "cug-reject" },
423 { 19, "sMS-ll-capabilities-not-prov" },
424 { 20, "error-in-MS" },
425 { 21, "facility-not-supported" },
426 { 22, "memory-capacity-exceeded" },
427 { 29, "absent-subscriber" },
428 { 30, "ms-busy-for-MT-sms" },
429 { 36, "system-failure" },
430 { 44, "illegal-equipment" },
431 { 60, "no-resp-to-paging" },
432 { 61, "gMSC-congestion" },
433 { 70, "dublicate-sm" },
434 { 101, "sC-congestion" },
435 { 103, "mS-not-SC-Subscriber" },
436 { 104, "invalid-sme-address" },
442 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_) {
443 offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
450 static const ber_sequence_t RPError_sequence[] = {
451 { &hf_smrse_error_reason , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_smrse_Error_reason },
452 { &hf_smrse_msg_waiting_set, BER_CLASS_UNI, BER_UNI_TAG_BOOLEAN, BER_FLAGS_NOOWNTAG, dissect_smrse_BOOLEAN },
453 { &hf_smrse_message_reference, BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_smrse_RP_MR },
454 { &hf_smrse_alerting_MS_ISDN, BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_smrse_SMS_Address },
455 { &hf_smrse_sm_diag_info , BER_CLASS_CON, 2, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_smrse_RP_UD },
456 { NULL, 0, 0, 0, NULL }
460 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_) {
461 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
462 RPError_sequence, hf_index, ett_smrse_RPError);
468 static const ber_sequence_t RPAlertSC_sequence[] = {
469 { &hf_smrse_ms_address , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_smrse_SMS_Address },
470 { &hf_smrse_message_reference, BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_smrse_RP_MR },
471 { NULL, 0, 0, 0, NULL }
475 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_) {
476 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
477 RPAlertSC_sequence, hf_index, ett_smrse_RPAlertSC);
483 /*--- End of included file: packet-smrse-fn.c ---*/
484 #line 57 "../../asn1/smrse/packet-smrse-template.c"
486 static const value_string tag_vals[] = {
488 { 2, "AliveTestRsp" },
502 dissect_smrse(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
504 proto_item *item = NULL;
505 proto_tree *tree = NULL;
506 guint8 reserved, tag;
510 asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
512 reserved=tvb_get_guint8(tvb, 0);
513 length=tvb_get_ntohs(tvb,1);
514 tag=tvb_get_guint8(tvb, 3);
518 if( (tag<1)||(tag>11) )
522 item = proto_tree_add_item(parent_tree, proto_smrse, tvb, 0, -1, FALSE);
523 tree = proto_item_add_subtree(item, ett_smrse);
526 col_set_str(pinfo->cinfo, COL_PROTOCOL, "SMRSE");
527 if (check_col(pinfo->cinfo, COL_INFO))
528 col_add_str(pinfo->cinfo, COL_INFO, val_to_str(tag, tag_vals,"Unknown Tag:0x%02x"));
530 proto_tree_add_item(tree, hf_smrse_reserved, tvb, 0, 1, ENC_BIG_ENDIAN);
531 proto_tree_add_item(tree, hf_smrse_length, tvb, 1, 2, ENC_BIG_ENDIAN);
532 proto_tree_add_item(tree, hf_smrse_tag, tvb, 3, 1, ENC_BIG_ENDIAN);
540 offset=dissect_smrse_SMR_Bind(FALSE, tvb, 4, &asn1_ctx, tree, -1);
543 offset=dissect_smrse_SMR_Bind_Confirm(FALSE, tvb, 4, &asn1_ctx, tree, -1);
546 offset=dissect_smrse_SMR_Bind_Failure(FALSE, tvb, 4, &asn1_ctx, tree, -1);
549 offset=dissect_smrse_SMR_Unbind(FALSE, tvb, 4, &asn1_ctx, tree, -1);
552 offset=dissect_smrse_RPDataMT(FALSE, tvb, 4, &asn1_ctx, tree, -1);
555 offset=dissect_smrse_RPDataMO(FALSE, tvb, 4, &asn1_ctx, tree, -1);
558 offset=dissect_smrse_RPAck(FALSE, tvb, 4, &asn1_ctx, tree, -1);
561 offset=dissect_smrse_RPError(FALSE, tvb, 4, &asn1_ctx, tree, -1);
564 offset=dissect_smrse_RPAlertSC(FALSE, tvb, 4, &asn1_ctx, tree, -1);
571 /*--- proto_register_smrse ----------------------------------------------*/
572 void proto_register_smrse(void) {
575 static hf_register_info hf[] = {
576 { &hf_smrse_reserved, {
577 "Reserved", "smrse.reserved", FT_UINT8, BASE_DEC,
578 NULL, 0, "Reserved byte, must be 126", HFILL }},
580 "Tag", "smrse.tag", FT_UINT8, BASE_DEC,
581 VALS(tag_vals), 0, NULL, HFILL }},
582 { &hf_smrse_length, {
583 "Length", "smrse.length", FT_UINT16, BASE_DEC,
584 NULL, 0, "Length of SMRSE PDU", HFILL }},
585 { &hf_smrse_Octet_Format,
586 { "octet-Format", "smrse.octet_Format",
587 FT_STRING, BASE_NONE, NULL, 0,
588 "SMS-Address/address-value/octet-format", HFILL }},
591 /*--- Included file: packet-smrse-hfarr.c ---*/
592 #line 1 "../../asn1/smrse/packet-smrse-hfarr.c"
593 { &hf_smrse_sc_address,
594 { "sc-address", "smrse.sc_address",
595 FT_NONE, BASE_NONE, NULL, 0,
596 "SMS_Address", HFILL }},
597 { &hf_smrse_password,
598 { "password", "smrse.password",
599 FT_STRING, BASE_NONE, NULL, 0,
601 { &hf_smrse_address_type,
602 { "address-type", "smrse.address_type",
603 FT_INT32, BASE_DEC, VALS(smrse_T_address_type_vals), 0,
605 { &hf_smrse_numbering_plan,
606 { "numbering-plan", "smrse.numbering_plan",
607 FT_INT32, BASE_DEC, VALS(smrse_T_numbering_plan_vals), 0,
609 { &hf_smrse_address_value,
610 { "address-value", "smrse.address_value",
611 FT_UINT32, BASE_DEC, VALS(smrse_T_address_value_vals), 0,
613 { &hf_smrse_octet_format,
614 { "octet-format", "smrse.octet_format",
615 FT_BYTES, BASE_NONE, NULL, 0,
616 "T_octet_format", HFILL }},
617 { &hf_smrse_connect_fail_reason,
618 { "connect-fail-reason", "smrse.connect_fail_reason",
619 FT_INT32, BASE_DEC, VALS(smrse_Connect_fail_vals), 0,
620 "Connect_fail", HFILL }},
621 { &hf_smrse_mt_priority_request,
622 { "mt-priority-request", "smrse.mt_priority_request",
623 FT_BOOLEAN, BASE_NONE, NULL, 0,
626 { "mt-mms", "smrse.mt_mms",
627 FT_BOOLEAN, BASE_NONE, NULL, 0,
629 { &hf_smrse_mt_message_reference,
630 { "mt-message-reference", "smrse.mt_message_reference",
631 FT_UINT32, BASE_DEC, NULL, 0,
633 { &hf_smrse_mt_originating_address,
634 { "mt-originating-address", "smrse.mt_originating_address",
635 FT_NONE, BASE_NONE, NULL, 0,
636 "SMS_Address", HFILL }},
637 { &hf_smrse_mt_destination_address,
638 { "mt-destination-address", "smrse.mt_destination_address",
639 FT_NONE, BASE_NONE, NULL, 0,
640 "SMS_Address", HFILL }},
641 { &hf_smrse_mt_user_data,
642 { "mt-user-data", "smrse.mt_user_data",
643 FT_BYTES, BASE_NONE, NULL, 0,
645 { &hf_smrse_mt_origVMSCAddr,
646 { "mt-origVMSCAddr", "smrse.mt_origVMSCAddr",
647 FT_NONE, BASE_NONE, NULL, 0,
648 "SMS_Address", HFILL }},
649 { &hf_smrse_mt_tariffClass,
650 { "mt-tariffClass", "smrse.mt_tariffClass",
651 FT_UINT32, BASE_DEC, NULL, 0,
653 { &hf_smrse_mo_message_reference,
654 { "mo-message-reference", "smrse.mo_message_reference",
655 FT_UINT32, BASE_DEC, NULL, 0,
657 { &hf_smrse_mo_originating_address,
658 { "mo-originating-address", "smrse.mo_originating_address",
659 FT_NONE, BASE_NONE, NULL, 0,
660 "SMS_Address", HFILL }},
661 { &hf_smrse_mo_user_data,
662 { "mo-user-data", "smrse.mo_user_data",
663 FT_BYTES, BASE_NONE, NULL, 0,
665 { &hf_smrse_origVMSCAddr,
666 { "origVMSCAddr", "smrse.origVMSCAddr",
667 FT_NONE, BASE_NONE, NULL, 0,
668 "SMS_Address", HFILL }},
670 { "moimsi", "smrse.moimsi",
671 FT_BYTES, BASE_NONE, NULL, 0,
672 "IMSI_Address", HFILL }},
673 { &hf_smrse_message_reference,
674 { "message-reference", "smrse.message_reference",
675 FT_UINT32, BASE_DEC, NULL, 0,
677 { &hf_smrse_error_reason,
678 { "error-reason", "smrse.error_reason",
679 FT_INT32, BASE_DEC, VALS(smrse_Error_reason_vals), 0,
681 { &hf_smrse_msg_waiting_set,
682 { "msg-waiting-set", "smrse.msg_waiting_set",
683 FT_BOOLEAN, BASE_NONE, NULL, 0,
685 { &hf_smrse_alerting_MS_ISDN,
686 { "alerting-MS-ISDN", "smrse.alerting_MS_ISDN",
687 FT_NONE, BASE_NONE, NULL, 0,
688 "SMS_Address", HFILL }},
689 { &hf_smrse_sm_diag_info,
690 { "sm-diag-info", "smrse.sm_diag_info",
691 FT_BYTES, BASE_NONE, NULL, 0,
693 { &hf_smrse_ms_address,
694 { "ms-address", "smrse.ms_address",
695 FT_NONE, BASE_NONE, NULL, 0,
696 "SMS_Address", HFILL }},
698 /*--- End of included file: packet-smrse-hfarr.c ---*/
699 #line 163 "../../asn1/smrse/packet-smrse-template.c"
702 /* List of subtrees */
703 static gint *ett[] = {
706 /*--- Included file: packet-smrse-ettarr.c ---*/
707 #line 1 "../../asn1/smrse/packet-smrse-ettarr.c"
709 &ett_smrse_SMS_Address,
710 &ett_smrse_T_address_value,
711 &ett_smrse_SMR_Bind_Confirm,
712 &ett_smrse_SMR_Bind_Failure,
713 &ett_smrse_SMR_Unbind,
718 &ett_smrse_RPAlertSC,
720 /*--- End of included file: packet-smrse-ettarr.c ---*/
721 #line 169 "../../asn1/smrse/packet-smrse-template.c"
724 /* Register protocol */
725 proto_smrse = proto_register_protocol(PNAME, PSNAME, PFNAME);
727 /* Register fields and subtrees */
728 proto_register_field_array(proto_smrse, hf, array_length(hf));
729 proto_register_subtree_array(ett, array_length(ett));
734 /*--- proto_reg_handoff_smrse -------------------------------------------*/
735 void proto_reg_handoff_smrse(void) {
736 dissector_handle_t smrse_handle;
738 smrse_handle = new_create_dissector_handle(dissect_smrse, proto_smrse);
739 dissector_add_uint("tcp.port",TCP_PORT_SMRSE, smrse_handle);