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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
37 #include <epan/packet.h>
38 #include <epan/asn1.h>
40 #include "packet-ber.h"
41 #include "packet-smrse.h"
43 #define PNAME "Short Message Relaying Service"
44 #define PSNAME "SMRSE"
45 #define PFNAME "smrse"
47 #define TCP_PORT_SMRSE 4321
49 /* Initialize the protocol and registered fields */
50 static int proto_smrse = -1;
51 static int hf_smrse_reserved = -1;
52 static int hf_smrse_tag = -1;
53 static int hf_smrse_length = -1;
54 static int hf_smrse_Octet_Format = -1;
56 /*--- Included file: packet-smrse-hf.c ---*/
57 #line 1 "../../asn1/smrse/packet-smrse-hf.c"
58 static int hf_smrse_sc_address = -1; /* SMS_Address */
59 static int hf_smrse_password = -1; /* Password */
60 static int hf_smrse_address_type = -1; /* T_address_type */
61 static int hf_smrse_numbering_plan = -1; /* T_numbering_plan */
62 static int hf_smrse_address_value = -1; /* T_address_value */
63 static int hf_smrse_octet_format = -1; /* T_octet_format */
64 static int hf_smrse_connect_fail_reason = -1; /* Connect_fail */
65 static int hf_smrse_mt_priority_request = -1; /* BOOLEAN */
66 static int hf_smrse_mt_mms = -1; /* BOOLEAN */
67 static int hf_smrse_mt_message_reference = -1; /* RP_MR */
68 static int hf_smrse_mt_originating_address = -1; /* SMS_Address */
69 static int hf_smrse_mt_destination_address = -1; /* SMS_Address */
70 static int hf_smrse_mt_user_data = -1; /* RP_UD */
71 static int hf_smrse_mt_origVMSCAddr = -1; /* SMS_Address */
72 static int hf_smrse_mt_tariffClass = -1; /* SM_TC */
73 static int hf_smrse_mo_message_reference = -1; /* RP_MR */
74 static int hf_smrse_mo_originating_address = -1; /* SMS_Address */
75 static int hf_smrse_mo_user_data = -1; /* RP_UD */
76 static int hf_smrse_origVMSCAddr = -1; /* SMS_Address */
77 static int hf_smrse_moimsi = -1; /* IMSI_Address */
78 static int hf_smrse_message_reference = -1; /* RP_MR */
79 static int hf_smrse_error_reason = -1; /* Error_reason */
80 static int hf_smrse_msg_waiting_set = -1; /* BOOLEAN */
81 static int hf_smrse_alerting_MS_ISDN = -1; /* SMS_Address */
82 static int hf_smrse_sm_diag_info = -1; /* RP_UD */
83 static int hf_smrse_ms_address = -1; /* SMS_Address */
85 /*--- End of included file: packet-smrse-hf.c ---*/
86 #line 48 "../../asn1/smrse/packet-smrse-template.c"
88 /* Initialize the subtree pointers */
89 static gint ett_smrse = -1;
91 /*--- Included file: packet-smrse-ett.c ---*/
92 #line 1 "../../asn1/smrse/packet-smrse-ett.c"
93 static gint ett_smrse_SMR_Bind = -1;
94 static gint ett_smrse_SMS_Address = -1;
95 static gint ett_smrse_T_address_value = -1;
96 static gint ett_smrse_SMR_Bind_Confirm = -1;
97 static gint ett_smrse_SMR_Bind_Failure = -1;
98 static gint ett_smrse_SMR_Unbind = -1;
99 static gint ett_smrse_RPDataMT = -1;
100 static gint ett_smrse_RPDataMO = -1;
101 static gint ett_smrse_RPAck = -1;
102 static gint ett_smrse_RPError = -1;
103 static gint ett_smrse_RPAlertSC = -1;
105 /*--- End of included file: packet-smrse-ett.c ---*/
106 #line 52 "../../asn1/smrse/packet-smrse-template.c"
110 /*--- Included file: packet-smrse-fn.c ---*/
111 #line 1 "../../asn1/smrse/packet-smrse-fn.c"
113 static const value_string smrse_T_address_type_vals[] = {
114 { 0, "unknown-type" },
115 { 1, "internat-number" },
116 { 2, "national-number" },
117 { 3, "net-spec-number" },
118 { 4, "short-number" },
124 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_) {
125 offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
132 static const value_string smrse_T_numbering_plan_vals[] = {
133 { 0, "unknown-numbering" },
134 { 1, "iSDN-numbering" },
135 { 3, "data-network-numbering" },
136 { 4, "telex-numbering" },
137 { 8, "national-numbering" },
138 { 9, "private-numbering" },
144 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_) {
145 offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
155 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_) {
156 #line 21 "../../asn1/smrse/smrse.cnf"
157 char *strp,tmpstr[21];
158 guint32 i, start_offset;
163 static char n2a[16] = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' };
167 /* skip the tag and length */
168 offset=dissect_ber_identifier(actx->pinfo, tree, tvb, offset, &class, &pc, &tag);
169 offset=dissect_ber_length(actx->pinfo, tree, tvb, offset, &len, &ind);
175 *strp++=n2a[tvb_get_guint8(tvb, offset)&0x0f];
176 *strp++=n2a[(tvb_get_guint8(tvb, offset)>>4)&0x0f];
181 proto_tree_add_string(tree, hf_smrse_Octet_Format, tvb, start_offset, offset-start_offset, tmpstr);
191 static const value_string smrse_T_address_value_vals[] = {
192 { 0, "octet-format" },
196 static const ber_choice_t T_address_value_choice[] = {
197 { 0, &hf_smrse_octet_format , BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_NOOWNTAG, dissect_smrse_T_octet_format },
198 { 0, NULL, 0, 0, 0, NULL }
202 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_) {
203 offset = dissect_ber_choice(actx, tree, tvb, offset,
204 T_address_value_choice, hf_index, ett_smrse_T_address_value,
211 static const ber_sequence_t SMS_Address_sequence[] = {
212 { &hf_smrse_address_type , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_smrse_T_address_type },
213 { &hf_smrse_numbering_plan, BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_smrse_T_numbering_plan },
214 { &hf_smrse_address_value , BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_smrse_T_address_value },
215 { NULL, 0, 0, 0, NULL }
219 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_) {
220 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
221 SMS_Address_sequence, hf_index, ett_smrse_SMS_Address);
229 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_) {
230 offset = dissect_ber_restricted_string(implicit_tag, BER_UNI_TAG_PrintableString,
231 actx, tree, tvb, offset, hf_index,
238 static const ber_sequence_t SMR_Bind_sequence[] = {
239 { &hf_smrse_sc_address , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_smrse_SMS_Address },
240 { &hf_smrse_password , BER_CLASS_UNI, BER_UNI_TAG_PrintableString, BER_FLAGS_NOOWNTAG, dissect_smrse_Password },
241 { NULL, 0, 0, 0, NULL }
245 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_) {
246 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
247 SMR_Bind_sequence, hf_index, ett_smrse_SMR_Bind);
255 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_) {
256 offset = dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index,
263 static const ber_sequence_t SMR_Bind_Confirm_sequence[] = {
264 { NULL, 0, 0, 0, NULL }
268 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_) {
269 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
270 SMR_Bind_Confirm_sequence, hf_index, ett_smrse_SMR_Bind_Confirm);
276 static const value_string smrse_Connect_fail_vals[] = {
277 { 0, "not-entitled" },
278 { 1, "tmp-overload" },
279 { 2, "tmp-failure" },
280 { 3, "id-or-passwd" },
281 { 4, "not-supported" },
282 { 5, "inv-SC-addr" },
288 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_) {
289 offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
296 static const ber_sequence_t SMR_Bind_Failure_sequence[] = {
297 { &hf_smrse_connect_fail_reason, BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_smrse_Connect_fail },
298 { NULL, 0, 0, 0, NULL }
302 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_) {
303 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
304 SMR_Bind_Failure_sequence, hf_index, ett_smrse_SMR_Bind_Failure);
310 static const ber_sequence_t SMR_Unbind_sequence[] = {
311 { NULL, 0, 0, 0, NULL }
315 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_) {
316 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
317 SMR_Unbind_sequence, hf_index, ett_smrse_SMR_Unbind);
325 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_) {
326 offset = dissect_ber_boolean(implicit_tag, actx, tree, tvb, offset, hf_index, NULL);
334 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_) {
335 offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
344 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_) {
345 offset = dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index,
354 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_) {
355 offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
362 static const ber_sequence_t RPDataMT_sequence[] = {
363 { &hf_smrse_mt_priority_request, BER_CLASS_UNI, BER_UNI_TAG_BOOLEAN, BER_FLAGS_NOOWNTAG, dissect_smrse_BOOLEAN },
364 { &hf_smrse_mt_mms , BER_CLASS_UNI, BER_UNI_TAG_BOOLEAN, BER_FLAGS_NOOWNTAG, dissect_smrse_BOOLEAN },
365 { &hf_smrse_mt_message_reference, BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_smrse_RP_MR },
366 { &hf_smrse_mt_originating_address, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_smrse_SMS_Address },
367 { &hf_smrse_mt_destination_address, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_smrse_SMS_Address },
368 { &hf_smrse_mt_user_data , BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_NOOWNTAG, dissect_smrse_RP_UD },
369 { &hf_smrse_mt_origVMSCAddr, BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_smrse_SMS_Address },
370 { &hf_smrse_mt_tariffClass, BER_CLASS_CON, 2, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_smrse_SM_TC },
371 { NULL, 0, 0, 0, NULL }
375 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_) {
376 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
377 RPDataMT_sequence, hf_index, ett_smrse_RPDataMT);
383 static const ber_sequence_t RPDataMO_sequence[] = {
384 { &hf_smrse_mo_message_reference, BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_smrse_RP_MR },
385 { &hf_smrse_mo_originating_address, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_smrse_SMS_Address },
386 { &hf_smrse_mo_user_data , BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_NOOWNTAG, dissect_smrse_RP_UD },
387 { &hf_smrse_origVMSCAddr , BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_smrse_SMS_Address },
388 { &hf_smrse_moimsi , BER_CLASS_CON, 2, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_smrse_IMSI_Address },
389 { NULL, 0, 0, 0, NULL }
393 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_) {
394 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
395 RPDataMO_sequence, hf_index, ett_smrse_RPDataMO);
401 static const ber_sequence_t RPAck_sequence[] = {
402 { &hf_smrse_message_reference, BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_smrse_RP_MR },
403 { NULL, 0, 0, 0, NULL }
407 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_) {
408 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
409 RPAck_sequence, hf_index, ett_smrse_RPAck);
415 static const value_string smrse_Error_reason_vals[] = {
416 { 1, "unknown-subscriber" },
417 { 9, "illegal-subscriber" },
418 { 11, "teleservice-not-provisioned" },
419 { 13, "call-barred" },
420 { 15, "cug-reject" },
421 { 19, "sMS-ll-capabilities-not-prov" },
422 { 20, "error-in-MS" },
423 { 21, "facility-not-supported" },
424 { 22, "memory-capacity-exceeded" },
425 { 29, "absent-subscriber" },
426 { 30, "ms-busy-for-MT-sms" },
427 { 36, "system-failure" },
428 { 44, "illegal-equipment" },
429 { 60, "no-resp-to-paging" },
430 { 61, "gMSC-congestion" },
431 { 70, "dublicate-sm" },
432 { 101, "sC-congestion" },
433 { 103, "mS-not-SC-Subscriber" },
434 { 104, "invalid-sme-address" },
440 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_) {
441 offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
448 static const ber_sequence_t RPError_sequence[] = {
449 { &hf_smrse_error_reason , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_smrse_Error_reason },
450 { &hf_smrse_msg_waiting_set, BER_CLASS_UNI, BER_UNI_TAG_BOOLEAN, BER_FLAGS_NOOWNTAG, dissect_smrse_BOOLEAN },
451 { &hf_smrse_message_reference, BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_smrse_RP_MR },
452 { &hf_smrse_alerting_MS_ISDN, BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_smrse_SMS_Address },
453 { &hf_smrse_sm_diag_info , BER_CLASS_CON, 2, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_smrse_RP_UD },
454 { NULL, 0, 0, 0, NULL }
458 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_) {
459 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
460 RPError_sequence, hf_index, ett_smrse_RPError);
466 static const ber_sequence_t RPAlertSC_sequence[] = {
467 { &hf_smrse_ms_address , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_smrse_SMS_Address },
468 { &hf_smrse_message_reference, BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_smrse_RP_MR },
469 { NULL, 0, 0, 0, NULL }
473 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_) {
474 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
475 RPAlertSC_sequence, hf_index, ett_smrse_RPAlertSC);
481 /*--- End of included file: packet-smrse-fn.c ---*/
482 #line 55 "../../asn1/smrse/packet-smrse-template.c"
484 static const value_string tag_vals[] = {
486 { 2, "AliveTestRsp" },
500 dissect_smrse(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void *data _U_)
502 proto_item *item = NULL;
503 proto_tree *tree = NULL;
504 guint8 reserved, tag;
507 asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
509 reserved=tvb_get_guint8(tvb, 0);
510 tag=tvb_get_guint8(tvb, 3);
514 if( (tag<1)||(tag>11) )
518 item = proto_tree_add_item(parent_tree, proto_smrse, tvb, 0, -1, ENC_NA);
519 tree = proto_item_add_subtree(item, ett_smrse);
522 col_set_str(pinfo->cinfo, COL_PROTOCOL, "SMRSE");
523 if (check_col(pinfo->cinfo, COL_INFO))
524 col_add_str(pinfo->cinfo, COL_INFO, val_to_str(tag, tag_vals,"Unknown Tag:0x%02x"));
526 proto_tree_add_item(tree, hf_smrse_reserved, tvb, 0, 1, ENC_BIG_ENDIAN);
527 proto_tree_add_item(tree, hf_smrse_length, tvb, 1, 2, ENC_BIG_ENDIAN);
528 proto_tree_add_item(tree, hf_smrse_tag, tvb, 3, 1, ENC_BIG_ENDIAN);
536 offset=dissect_smrse_SMR_Bind(FALSE, tvb, 4, &asn1_ctx, tree, -1);
539 offset=dissect_smrse_SMR_Bind_Confirm(FALSE, tvb, 4, &asn1_ctx, tree, -1);
542 offset=dissect_smrse_SMR_Bind_Failure(FALSE, tvb, 4, &asn1_ctx, tree, -1);
545 offset=dissect_smrse_SMR_Unbind(FALSE, tvb, 4, &asn1_ctx, tree, -1);
548 offset=dissect_smrse_RPDataMT(FALSE, tvb, 4, &asn1_ctx, tree, -1);
551 offset=dissect_smrse_RPDataMO(FALSE, tvb, 4, &asn1_ctx, tree, -1);
554 offset=dissect_smrse_RPAck(FALSE, tvb, 4, &asn1_ctx, tree, -1);
557 offset=dissect_smrse_RPError(FALSE, tvb, 4, &asn1_ctx, tree, -1);
560 offset=dissect_smrse_RPAlertSC(FALSE, tvb, 4, &asn1_ctx, tree, -1);
567 /*--- proto_register_smrse ----------------------------------------------*/
568 void proto_register_smrse(void) {
571 static hf_register_info hf[] = {
572 { &hf_smrse_reserved, {
573 "Reserved", "smrse.reserved", FT_UINT8, BASE_DEC,
574 NULL, 0, "Reserved byte, must be 126", HFILL }},
576 "Tag", "smrse.tag", FT_UINT8, BASE_DEC,
577 VALS(tag_vals), 0, NULL, HFILL }},
578 { &hf_smrse_length, {
579 "Length", "smrse.length", FT_UINT16, BASE_DEC,
580 NULL, 0, "Length of SMRSE PDU", HFILL }},
581 { &hf_smrse_Octet_Format,
582 { "octet-Format", "smrse.octet_Format",
583 FT_STRING, BASE_NONE, NULL, 0,
584 "SMS-Address/address-value/octet-format", HFILL }},
587 /*--- Included file: packet-smrse-hfarr.c ---*/
588 #line 1 "../../asn1/smrse/packet-smrse-hfarr.c"
589 { &hf_smrse_sc_address,
590 { "sc-address", "smrse.sc_address",
591 FT_NONE, BASE_NONE, NULL, 0,
592 "SMS_Address", HFILL }},
593 { &hf_smrse_password,
594 { "password", "smrse.password",
595 FT_STRING, BASE_NONE, NULL, 0,
597 { &hf_smrse_address_type,
598 { "address-type", "smrse.address_type",
599 FT_INT32, BASE_DEC, VALS(smrse_T_address_type_vals), 0,
601 { &hf_smrse_numbering_plan,
602 { "numbering-plan", "smrse.numbering_plan",
603 FT_INT32, BASE_DEC, VALS(smrse_T_numbering_plan_vals), 0,
605 { &hf_smrse_address_value,
606 { "address-value", "smrse.address_value",
607 FT_UINT32, BASE_DEC, VALS(smrse_T_address_value_vals), 0,
609 { &hf_smrse_octet_format,
610 { "octet-format", "smrse.octet_format",
611 FT_BYTES, BASE_NONE, NULL, 0,
612 "T_octet_format", HFILL }},
613 { &hf_smrse_connect_fail_reason,
614 { "connect-fail-reason", "smrse.connect_fail_reason",
615 FT_INT32, BASE_DEC, VALS(smrse_Connect_fail_vals), 0,
616 "Connect_fail", HFILL }},
617 { &hf_smrse_mt_priority_request,
618 { "mt-priority-request", "smrse.mt_priority_request",
619 FT_BOOLEAN, BASE_NONE, NULL, 0,
622 { "mt-mms", "smrse.mt_mms",
623 FT_BOOLEAN, BASE_NONE, NULL, 0,
625 { &hf_smrse_mt_message_reference,
626 { "mt-message-reference", "smrse.mt_message_reference",
627 FT_UINT32, BASE_DEC, NULL, 0,
629 { &hf_smrse_mt_originating_address,
630 { "mt-originating-address", "smrse.mt_originating_address",
631 FT_NONE, BASE_NONE, NULL, 0,
632 "SMS_Address", HFILL }},
633 { &hf_smrse_mt_destination_address,
634 { "mt-destination-address", "smrse.mt_destination_address",
635 FT_NONE, BASE_NONE, NULL, 0,
636 "SMS_Address", HFILL }},
637 { &hf_smrse_mt_user_data,
638 { "mt-user-data", "smrse.mt_user_data",
639 FT_BYTES, BASE_NONE, NULL, 0,
641 { &hf_smrse_mt_origVMSCAddr,
642 { "mt-origVMSCAddr", "smrse.mt_origVMSCAddr",
643 FT_NONE, BASE_NONE, NULL, 0,
644 "SMS_Address", HFILL }},
645 { &hf_smrse_mt_tariffClass,
646 { "mt-tariffClass", "smrse.mt_tariffClass",
647 FT_UINT32, BASE_DEC, NULL, 0,
649 { &hf_smrse_mo_message_reference,
650 { "mo-message-reference", "smrse.mo_message_reference",
651 FT_UINT32, BASE_DEC, NULL, 0,
653 { &hf_smrse_mo_originating_address,
654 { "mo-originating-address", "smrse.mo_originating_address",
655 FT_NONE, BASE_NONE, NULL, 0,
656 "SMS_Address", HFILL }},
657 { &hf_smrse_mo_user_data,
658 { "mo-user-data", "smrse.mo_user_data",
659 FT_BYTES, BASE_NONE, NULL, 0,
661 { &hf_smrse_origVMSCAddr,
662 { "origVMSCAddr", "smrse.origVMSCAddr",
663 FT_NONE, BASE_NONE, NULL, 0,
664 "SMS_Address", HFILL }},
666 { "moimsi", "smrse.moimsi",
667 FT_BYTES, BASE_NONE, NULL, 0,
668 "IMSI_Address", HFILL }},
669 { &hf_smrse_message_reference,
670 { "message-reference", "smrse.message_reference",
671 FT_UINT32, BASE_DEC, NULL, 0,
673 { &hf_smrse_error_reason,
674 { "error-reason", "smrse.error_reason",
675 FT_INT32, BASE_DEC, VALS(smrse_Error_reason_vals), 0,
677 { &hf_smrse_msg_waiting_set,
678 { "msg-waiting-set", "smrse.msg_waiting_set",
679 FT_BOOLEAN, BASE_NONE, NULL, 0,
681 { &hf_smrse_alerting_MS_ISDN,
682 { "alerting-MS-ISDN", "smrse.alerting_MS_ISDN",
683 FT_NONE, BASE_NONE, NULL, 0,
684 "SMS_Address", HFILL }},
685 { &hf_smrse_sm_diag_info,
686 { "sm-diag-info", "smrse.sm_diag_info",
687 FT_BYTES, BASE_NONE, NULL, 0,
689 { &hf_smrse_ms_address,
690 { "ms-address", "smrse.ms_address",
691 FT_NONE, BASE_NONE, NULL, 0,
692 "SMS_Address", HFILL }},
694 /*--- End of included file: packet-smrse-hfarr.c ---*/
695 #line 159 "../../asn1/smrse/packet-smrse-template.c"
698 /* List of subtrees */
699 static gint *ett[] = {
702 /*--- Included file: packet-smrse-ettarr.c ---*/
703 #line 1 "../../asn1/smrse/packet-smrse-ettarr.c"
705 &ett_smrse_SMS_Address,
706 &ett_smrse_T_address_value,
707 &ett_smrse_SMR_Bind_Confirm,
708 &ett_smrse_SMR_Bind_Failure,
709 &ett_smrse_SMR_Unbind,
714 &ett_smrse_RPAlertSC,
716 /*--- End of included file: packet-smrse-ettarr.c ---*/
717 #line 165 "../../asn1/smrse/packet-smrse-template.c"
720 /* Register protocol */
721 proto_smrse = proto_register_protocol(PNAME, PSNAME, PFNAME);
723 /* Register fields and subtrees */
724 proto_register_field_array(proto_smrse, hf, array_length(hf));
725 proto_register_subtree_array(ett, array_length(ett));
730 /*--- proto_reg_handoff_smrse -------------------------------------------*/
731 void proto_reg_handoff_smrse(void) {
732 dissector_handle_t smrse_handle;
734 smrse_handle = new_create_dissector_handle(dissect_smrse, proto_smrse);
735 dissector_add_uint("tcp.port",TCP_PORT_SMRSE, smrse_handle);