1 /* Do not modify this file. Changes will be overwritten. */
2 /* Generated automatically by the ASN.1 to Wireshark dissector compiler */
4 /* asn2wrs.py -b -q -L -p smrse -c ./smrse.cnf -s ./packet-smrse-template -D . -O ../.. SMRSE.asn */
7 * Routines for SMRSE Short Message Relay Service packet dissection
10 * Wireshark - Network traffic analyzer
11 * By Gerald Combs <gerald@wireshark.org>
12 * Copyright 1998 Gerald Combs
14 * SPDX-License-Identifier: GPL-2.0-or-later
19 #include <epan/packet.h>
20 #include <epan/asn1.h>
21 #include <wsutil/array.h>
23 #include "packet-ber.h"
24 #include "packet-smrse.h"
26 #define PNAME "Short Message Relaying Service"
27 #define PSNAME "SMRSE"
28 #define PFNAME "smrse"
30 #define TCP_PORT_SMRSE 4321 /* Not IANA registered */
32 void proto_register_smrse(void);
33 void proto_reg_handoff_smrse(void);
35 static dissector_handle_t smrse_handle
;
37 /* Initialize the protocol and registered fields */
38 static int proto_smrse
;
39 static int hf_smrse_reserved
;
40 static int hf_smrse_tag
;
41 static int hf_smrse_length
;
42 static int hf_smrse_Octet_Format
;
43 static int hf_smrse_sc_address
; /* SMS_Address */
44 static int hf_smrse_password
; /* Password */
45 static int hf_smrse_address_type
; /* T_address_type */
46 static int hf_smrse_numbering_plan
; /* T_numbering_plan */
47 static int hf_smrse_address_value
; /* T_address_value */
48 static int hf_smrse_octet_format
; /* T_octet_format */
49 static int hf_smrse_connect_fail_reason
; /* Connect_fail */
50 static int hf_smrse_mt_priority_request
; /* BOOLEAN */
51 static int hf_smrse_mt_mms
; /* BOOLEAN */
52 static int hf_smrse_mt_message_reference
; /* RP_MR */
53 static int hf_smrse_mt_originating_address
; /* SMS_Address */
54 static int hf_smrse_mt_destination_address
; /* SMS_Address */
55 static int hf_smrse_mt_user_data
; /* RP_UD */
56 static int hf_smrse_mt_origVMSCAddr
; /* SMS_Address */
57 static int hf_smrse_mt_tariffClass
; /* SM_TC */
58 static int hf_smrse_mo_message_reference
; /* RP_MR */
59 static int hf_smrse_mo_originating_address
; /* SMS_Address */
60 static int hf_smrse_mo_user_data
; /* RP_UD */
61 static int hf_smrse_origVMSCAddr
; /* SMS_Address */
62 static int hf_smrse_moimsi
; /* IMSI_Address */
63 static int hf_smrse_message_reference
; /* RP_MR */
64 static int hf_smrse_error_reason
; /* Error_reason */
65 static int hf_smrse_msg_waiting_set
; /* BOOLEAN */
66 static int hf_smrse_alerting_MS_ISDN
; /* SMS_Address */
67 static int hf_smrse_sm_diag_info
; /* RP_UD */
68 static int hf_smrse_ms_address
; /* SMS_Address */
70 /* Initialize the subtree pointers */
72 static int ett_smrse_SMR_Bind
;
73 static int ett_smrse_SMS_Address
;
74 static int ett_smrse_T_address_value
;
75 static int ett_smrse_SMR_Bind_Confirm
;
76 static int ett_smrse_SMR_Bind_Failure
;
77 static int ett_smrse_SMR_Unbind
;
78 static int ett_smrse_RPDataMT
;
79 static int ett_smrse_RPDataMO
;
80 static int ett_smrse_RPAck
;
81 static int ett_smrse_RPError
;
82 static int ett_smrse_RPAlertSC
;
86 static const value_string smrse_T_address_type_vals
[] = {
87 { 0, "unknown-type" },
88 { 1, "internat-number" },
89 { 2, "national-number" },
90 { 3, "net-spec-number" },
91 { 4, "short-number" },
97 dissect_smrse_T_address_type(bool implicit_tag _U_
, tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
98 offset
= dissect_ber_integer(implicit_tag
, actx
, tree
, tvb
, offset
, hf_index
,
105 static const value_string smrse_T_numbering_plan_vals
[] = {
106 { 0, "unknown-numbering" },
107 { 1, "iSDN-numbering" },
108 { 3, "data-network-numbering" },
109 { 4, "telex-numbering" },
110 { 8, "national-numbering" },
111 { 9, "private-numbering" },
117 dissect_smrse_T_numbering_plan(bool implicit_tag _U_
, tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
118 offset
= dissect_ber_integer(implicit_tag
, actx
, tree
, tvb
, offset
, hf_index
,
128 dissect_smrse_T_octet_format(bool implicit_tag _U_
, tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
129 char *strp
,tmpstr
[21];
130 uint32_t i
, start_offset
;
135 static char n2a
[16] = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' };
139 /* skip the tag and length */
140 offset
=dissect_ber_identifier(actx
->pinfo
, tree
, tvb
, offset
, &ber_class
, &pc
, &tag
);
141 offset
=dissect_ber_length(actx
->pinfo
, tree
, tvb
, offset
, &len
, &ind
);
147 *strp
++=n2a
[tvb_get_uint8(tvb
, offset
)&0x0f];
148 *strp
++=n2a
[(tvb_get_uint8(tvb
, offset
)>>4)&0x0f];
153 proto_tree_add_string(tree
, hf_smrse_Octet_Format
, tvb
, start_offset
, offset
-start_offset
, tmpstr
);
159 static const value_string smrse_T_address_value_vals
[] = {
160 { 0, "octet-format" },
164 static const ber_choice_t T_address_value_choice
[] = {
165 { 0, &hf_smrse_octet_format
, BER_CLASS_UNI
, BER_UNI_TAG_OCTETSTRING
, BER_FLAGS_NOOWNTAG
, dissect_smrse_T_octet_format
},
166 { 0, NULL
, 0, 0, 0, NULL
}
170 dissect_smrse_T_address_value(bool implicit_tag _U_
, tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
171 offset
= dissect_ber_choice(actx
, tree
, tvb
, offset
,
172 T_address_value_choice
, hf_index
, ett_smrse_T_address_value
,
179 static const ber_sequence_t SMS_Address_sequence
[] = {
180 { &hf_smrse_address_type
, BER_CLASS_UNI
, BER_UNI_TAG_INTEGER
, BER_FLAGS_NOOWNTAG
, dissect_smrse_T_address_type
},
181 { &hf_smrse_numbering_plan
, BER_CLASS_UNI
, BER_UNI_TAG_INTEGER
, BER_FLAGS_NOOWNTAG
, dissect_smrse_T_numbering_plan
},
182 { &hf_smrse_address_value
, BER_CLASS_ANY
/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG
|BER_FLAGS_NOTCHKTAG
, dissect_smrse_T_address_value
},
183 { NULL
, 0, 0, 0, NULL
}
187 dissect_smrse_SMS_Address(bool implicit_tag _U_
, tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
188 offset
= dissect_ber_sequence(implicit_tag
, actx
, tree
, tvb
, offset
,
189 SMS_Address_sequence
, hf_index
, ett_smrse_SMS_Address
);
197 dissect_smrse_Password(bool implicit_tag _U_
, tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
198 offset
= dissect_ber_restricted_string(implicit_tag
, BER_UNI_TAG_PrintableString
,
199 actx
, tree
, tvb
, offset
, hf_index
,
206 static const ber_sequence_t SMR_Bind_sequence
[] = {
207 { &hf_smrse_sc_address
, BER_CLASS_UNI
, BER_UNI_TAG_SEQUENCE
, BER_FLAGS_NOOWNTAG
, dissect_smrse_SMS_Address
},
208 { &hf_smrse_password
, BER_CLASS_UNI
, BER_UNI_TAG_PrintableString
, BER_FLAGS_NOOWNTAG
, dissect_smrse_Password
},
209 { NULL
, 0, 0, 0, NULL
}
213 dissect_smrse_SMR_Bind(bool implicit_tag _U_
, tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
214 offset
= dissect_ber_sequence(implicit_tag
, actx
, tree
, tvb
, offset
,
215 SMR_Bind_sequence
, hf_index
, ett_smrse_SMR_Bind
);
223 dissect_smrse_IMSI_Address(bool 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_octet_string(implicit_tag
, actx
, tree
, tvb
, offset
, hf_index
,
231 static const ber_sequence_t SMR_Bind_Confirm_sequence
[] = {
232 { NULL
, 0, 0, 0, NULL
}
236 dissect_smrse_SMR_Bind_Confirm(bool implicit_tag _U_
, tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
237 offset
= dissect_ber_sequence(implicit_tag
, actx
, tree
, tvb
, offset
,
238 SMR_Bind_Confirm_sequence
, hf_index
, ett_smrse_SMR_Bind_Confirm
);
244 static const value_string smrse_Connect_fail_vals
[] = {
245 { 0, "not-entitled" },
246 { 1, "tmp-overload" },
247 { 2, "tmp-failure" },
248 { 3, "id-or-passwd" },
249 { 4, "not-supported" },
250 { 5, "inv-SC-addr" },
256 dissect_smrse_Connect_fail(bool implicit_tag _U_
, tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
257 offset
= dissect_ber_integer(implicit_tag
, actx
, tree
, tvb
, offset
, hf_index
,
264 static const ber_sequence_t SMR_Bind_Failure_sequence
[] = {
265 { &hf_smrse_connect_fail_reason
, BER_CLASS_UNI
, BER_UNI_TAG_INTEGER
, BER_FLAGS_NOOWNTAG
, dissect_smrse_Connect_fail
},
266 { NULL
, 0, 0, 0, NULL
}
270 dissect_smrse_SMR_Bind_Failure(bool 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_Failure_sequence
, hf_index
, ett_smrse_SMR_Bind_Failure
);
278 static const ber_sequence_t SMR_Unbind_sequence
[] = {
279 { NULL
, 0, 0, 0, NULL
}
283 dissect_smrse_SMR_Unbind(bool implicit_tag _U_
, tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
284 offset
= dissect_ber_sequence(implicit_tag
, actx
, tree
, tvb
, offset
,
285 SMR_Unbind_sequence
, hf_index
, ett_smrse_SMR_Unbind
);
293 dissect_smrse_BOOLEAN(bool implicit_tag _U_
, tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
294 offset
= dissect_ber_boolean(implicit_tag
, actx
, tree
, tvb
, offset
, hf_index
, NULL
);
302 dissect_smrse_RP_MR(bool 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_integer(implicit_tag
, actx
, tree
, tvb
, offset
, hf_index
,
312 dissect_smrse_RP_UD(bool implicit_tag _U_
, tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
313 offset
= dissect_ber_octet_string(implicit_tag
, actx
, tree
, tvb
, offset
, hf_index
,
322 dissect_smrse_SM_TC(bool implicit_tag _U_
, tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
323 offset
= dissect_ber_integer(implicit_tag
, actx
, tree
, tvb
, offset
, hf_index
,
330 static const ber_sequence_t RPDataMT_sequence
[] = {
331 { &hf_smrse_mt_priority_request
, BER_CLASS_UNI
, BER_UNI_TAG_BOOLEAN
, BER_FLAGS_NOOWNTAG
, dissect_smrse_BOOLEAN
},
332 { &hf_smrse_mt_mms
, BER_CLASS_UNI
, BER_UNI_TAG_BOOLEAN
, BER_FLAGS_NOOWNTAG
, dissect_smrse_BOOLEAN
},
333 { &hf_smrse_mt_message_reference
, BER_CLASS_UNI
, BER_UNI_TAG_INTEGER
, BER_FLAGS_NOOWNTAG
, dissect_smrse_RP_MR
},
334 { &hf_smrse_mt_originating_address
, BER_CLASS_UNI
, BER_UNI_TAG_SEQUENCE
, BER_FLAGS_NOOWNTAG
, dissect_smrse_SMS_Address
},
335 { &hf_smrse_mt_destination_address
, BER_CLASS_UNI
, BER_UNI_TAG_SEQUENCE
, BER_FLAGS_NOOWNTAG
, dissect_smrse_SMS_Address
},
336 { &hf_smrse_mt_user_data
, BER_CLASS_UNI
, BER_UNI_TAG_OCTETSTRING
, BER_FLAGS_NOOWNTAG
, dissect_smrse_RP_UD
},
337 { &hf_smrse_mt_origVMSCAddr
, BER_CLASS_CON
, 1, BER_FLAGS_OPTIONAL
|BER_FLAGS_IMPLTAG
, dissect_smrse_SMS_Address
},
338 { &hf_smrse_mt_tariffClass
, BER_CLASS_CON
, 2, BER_FLAGS_OPTIONAL
|BER_FLAGS_IMPLTAG
, dissect_smrse_SM_TC
},
339 { NULL
, 0, 0, 0, NULL
}
343 dissect_smrse_RPDataMT(bool implicit_tag _U_
, tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
344 offset
= dissect_ber_sequence(implicit_tag
, actx
, tree
, tvb
, offset
,
345 RPDataMT_sequence
, hf_index
, ett_smrse_RPDataMT
);
351 static const ber_sequence_t RPDataMO_sequence
[] = {
352 { &hf_smrse_mo_message_reference
, BER_CLASS_UNI
, BER_UNI_TAG_INTEGER
, BER_FLAGS_NOOWNTAG
, dissect_smrse_RP_MR
},
353 { &hf_smrse_mo_originating_address
, BER_CLASS_UNI
, BER_UNI_TAG_SEQUENCE
, BER_FLAGS_NOOWNTAG
, dissect_smrse_SMS_Address
},
354 { &hf_smrse_mo_user_data
, BER_CLASS_UNI
, BER_UNI_TAG_OCTETSTRING
, BER_FLAGS_NOOWNTAG
, dissect_smrse_RP_UD
},
355 { &hf_smrse_origVMSCAddr
, BER_CLASS_CON
, 1, BER_FLAGS_OPTIONAL
|BER_FLAGS_IMPLTAG
, dissect_smrse_SMS_Address
},
356 { &hf_smrse_moimsi
, BER_CLASS_CON
, 2, BER_FLAGS_OPTIONAL
|BER_FLAGS_IMPLTAG
, dissect_smrse_IMSI_Address
},
357 { NULL
, 0, 0, 0, NULL
}
361 dissect_smrse_RPDataMO(bool implicit_tag _U_
, tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
362 offset
= dissect_ber_sequence(implicit_tag
, actx
, tree
, tvb
, offset
,
363 RPDataMO_sequence
, hf_index
, ett_smrse_RPDataMO
);
369 static const ber_sequence_t RPAck_sequence
[] = {
370 { &hf_smrse_message_reference
, BER_CLASS_UNI
, BER_UNI_TAG_INTEGER
, BER_FLAGS_NOOWNTAG
, dissect_smrse_RP_MR
},
371 { NULL
, 0, 0, 0, NULL
}
375 dissect_smrse_RPAck(bool 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 RPAck_sequence
, hf_index
, ett_smrse_RPAck
);
383 static const value_string smrse_Error_reason_vals
[] = {
384 { 1, "unknown-subscriber" },
385 { 9, "illegal-subscriber" },
386 { 11, "teleservice-not-provisioned" },
387 { 13, "call-barred" },
388 { 15, "cug-reject" },
389 { 19, "sMS-ll-capabilities-not-prov" },
390 { 20, "error-in-MS" },
391 { 21, "facility-not-supported" },
392 { 22, "memory-capacity-exceeded" },
393 { 29, "absent-subscriber" },
394 { 30, "ms-busy-for-MT-sms" },
395 { 36, "system-failure" },
396 { 44, "illegal-equipment" },
397 { 60, "no-resp-to-paging" },
398 { 61, "gMSC-congestion" },
399 { 70, "dublicate-sm" },
400 { 101, "sC-congestion" },
401 { 103, "mS-not-SC-Subscriber" },
402 { 104, "invalid-sme-address" },
408 dissect_smrse_Error_reason(bool implicit_tag _U_
, tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
409 offset
= dissect_ber_integer(implicit_tag
, actx
, tree
, tvb
, offset
, hf_index
,
416 static const ber_sequence_t RPError_sequence
[] = {
417 { &hf_smrse_error_reason
, BER_CLASS_UNI
, BER_UNI_TAG_INTEGER
, BER_FLAGS_NOOWNTAG
, dissect_smrse_Error_reason
},
418 { &hf_smrse_msg_waiting_set
, BER_CLASS_UNI
, BER_UNI_TAG_BOOLEAN
, BER_FLAGS_NOOWNTAG
, dissect_smrse_BOOLEAN
},
419 { &hf_smrse_message_reference
, BER_CLASS_UNI
, BER_UNI_TAG_INTEGER
, BER_FLAGS_NOOWNTAG
, dissect_smrse_RP_MR
},
420 { &hf_smrse_alerting_MS_ISDN
, BER_CLASS_CON
, 1, BER_FLAGS_OPTIONAL
|BER_FLAGS_IMPLTAG
, dissect_smrse_SMS_Address
},
421 { &hf_smrse_sm_diag_info
, BER_CLASS_CON
, 2, BER_FLAGS_OPTIONAL
|BER_FLAGS_IMPLTAG
, dissect_smrse_RP_UD
},
422 { NULL
, 0, 0, 0, NULL
}
426 dissect_smrse_RPError(bool implicit_tag _U_
, tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
427 offset
= dissect_ber_sequence(implicit_tag
, actx
, tree
, tvb
, offset
,
428 RPError_sequence
, hf_index
, ett_smrse_RPError
);
434 static const ber_sequence_t RPAlertSC_sequence
[] = {
435 { &hf_smrse_ms_address
, BER_CLASS_UNI
, BER_UNI_TAG_SEQUENCE
, BER_FLAGS_NOOWNTAG
, dissect_smrse_SMS_Address
},
436 { &hf_smrse_message_reference
, BER_CLASS_UNI
, BER_UNI_TAG_INTEGER
, BER_FLAGS_NOOWNTAG
, dissect_smrse_RP_MR
},
437 { NULL
, 0, 0, 0, NULL
}
441 dissect_smrse_RPAlertSC(bool implicit_tag _U_
, tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
442 offset
= dissect_ber_sequence(implicit_tag
, actx
, tree
, tvb
, offset
,
443 RPAlertSC_sequence
, hf_index
, ett_smrse_RPAlertSC
);
449 static const value_string tag_vals
[] = {
451 { 2, "AliveTestRsp" },
465 dissect_smrse(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*parent_tree
, void *data _U_
)
467 proto_item
*item
= NULL
;
468 proto_tree
*tree
= NULL
;
469 uint8_t reserved
, tag
;
472 asn1_ctx_init(&asn1_ctx
, ASN1_ENC_BER
, true, pinfo
);
474 reserved
=tvb_get_uint8(tvb
, 0);
475 tag
=tvb_get_uint8(tvb
, 3);
479 if( (tag
<1)||(tag
>11) )
483 item
= proto_tree_add_item(parent_tree
, proto_smrse
, tvb
, 0, -1, ENC_NA
);
484 tree
= proto_item_add_subtree(item
, ett_smrse
);
487 col_set_str(pinfo
->cinfo
, COL_PROTOCOL
, "SMRSE");
488 col_add_str(pinfo
->cinfo
, COL_INFO
, val_to_str(tag
, tag_vals
,"Unknown Tag:0x%02x"));
490 proto_tree_add_item(tree
, hf_smrse_reserved
, tvb
, 0, 1, ENC_BIG_ENDIAN
);
491 proto_tree_add_item(tree
, hf_smrse_length
, tvb
, 1, 2, ENC_BIG_ENDIAN
);
492 proto_tree_add_item(tree
, hf_smrse_tag
, tvb
, 3, 1, ENC_BIG_ENDIAN
);
500 offset
=dissect_smrse_SMR_Bind(false, tvb
, 4, &asn1_ctx
, tree
, -1);
503 offset
=dissect_smrse_SMR_Bind_Confirm(false, tvb
, 4, &asn1_ctx
, tree
, -1);
506 offset
=dissect_smrse_SMR_Bind_Failure(false, tvb
, 4, &asn1_ctx
, tree
, -1);
509 offset
=dissect_smrse_SMR_Unbind(false, tvb
, 4, &asn1_ctx
, tree
, -1);
512 offset
=dissect_smrse_RPDataMT(false, tvb
, 4, &asn1_ctx
, tree
, -1);
515 offset
=dissect_smrse_RPDataMO(false, tvb
, 4, &asn1_ctx
, tree
, -1);
518 offset
=dissect_smrse_RPAck(false, tvb
, 4, &asn1_ctx
, tree
, -1);
521 offset
=dissect_smrse_RPError(false, tvb
, 4, &asn1_ctx
, tree
, -1);
524 offset
=dissect_smrse_RPAlertSC(false, tvb
, 4, &asn1_ctx
, tree
, -1);
531 /*--- proto_register_smrse ----------------------------------------------*/
532 void proto_register_smrse(void) {
535 static hf_register_info hf
[] = {
536 { &hf_smrse_reserved
, {
537 "Reserved", "smrse.reserved", FT_UINT8
, BASE_DEC
,
538 NULL
, 0, "Reserved byte, must be 126", HFILL
}},
540 "Tag", "smrse.tag", FT_UINT8
, BASE_DEC
,
541 VALS(tag_vals
), 0, NULL
, HFILL
}},
542 { &hf_smrse_length
, {
543 "Length", "smrse.length", FT_UINT16
, BASE_DEC
,
544 NULL
, 0, "Length of SMRSE PDU", HFILL
}},
545 { &hf_smrse_Octet_Format
,
546 { "octet-Format", "smrse.octet_Format",
547 FT_STRING
, BASE_NONE
, NULL
, 0,
548 "SMS-Address/address-value/octet-format", HFILL
}},
550 { &hf_smrse_sc_address
,
551 { "sc-address", "smrse.sc_address_element",
552 FT_NONE
, BASE_NONE
, NULL
, 0,
553 "SMS_Address", HFILL
}},
554 { &hf_smrse_password
,
555 { "password", "smrse.password",
556 FT_STRING
, BASE_NONE
, NULL
, 0,
558 { &hf_smrse_address_type
,
559 { "address-type", "smrse.address_type",
560 FT_INT32
, BASE_DEC
, VALS(smrse_T_address_type_vals
), 0,
562 { &hf_smrse_numbering_plan
,
563 { "numbering-plan", "smrse.numbering_plan",
564 FT_INT32
, BASE_DEC
, VALS(smrse_T_numbering_plan_vals
), 0,
566 { &hf_smrse_address_value
,
567 { "address-value", "smrse.address_value",
568 FT_UINT32
, BASE_DEC
, VALS(smrse_T_address_value_vals
), 0,
570 { &hf_smrse_octet_format
,
571 { "octet-format", "smrse.octet_format",
572 FT_BYTES
, BASE_NONE
, NULL
, 0,
573 "T_octet_format", HFILL
}},
574 { &hf_smrse_connect_fail_reason
,
575 { "connect-fail-reason", "smrse.connect_fail_reason",
576 FT_INT32
, BASE_DEC
, VALS(smrse_Connect_fail_vals
), 0,
577 "Connect_fail", HFILL
}},
578 { &hf_smrse_mt_priority_request
,
579 { "mt-priority-request", "smrse.mt_priority_request",
580 FT_BOOLEAN
, BASE_NONE
, NULL
, 0,
583 { "mt-mms", "smrse.mt_mms",
584 FT_BOOLEAN
, BASE_NONE
, NULL
, 0,
586 { &hf_smrse_mt_message_reference
,
587 { "mt-message-reference", "smrse.mt_message_reference",
588 FT_UINT32
, BASE_DEC
, NULL
, 0,
590 { &hf_smrse_mt_originating_address
,
591 { "mt-originating-address", "smrse.mt_originating_address_element",
592 FT_NONE
, BASE_NONE
, NULL
, 0,
593 "SMS_Address", HFILL
}},
594 { &hf_smrse_mt_destination_address
,
595 { "mt-destination-address", "smrse.mt_destination_address_element",
596 FT_NONE
, BASE_NONE
, NULL
, 0,
597 "SMS_Address", HFILL
}},
598 { &hf_smrse_mt_user_data
,
599 { "mt-user-data", "smrse.mt_user_data",
600 FT_BYTES
, BASE_NONE
, NULL
, 0,
602 { &hf_smrse_mt_origVMSCAddr
,
603 { "mt-origVMSCAddr", "smrse.mt_origVMSCAddr_element",
604 FT_NONE
, BASE_NONE
, NULL
, 0,
605 "SMS_Address", HFILL
}},
606 { &hf_smrse_mt_tariffClass
,
607 { "mt-tariffClass", "smrse.mt_tariffClass",
608 FT_UINT32
, BASE_DEC
, NULL
, 0,
610 { &hf_smrse_mo_message_reference
,
611 { "mo-message-reference", "smrse.mo_message_reference",
612 FT_UINT32
, BASE_DEC
, NULL
, 0,
614 { &hf_smrse_mo_originating_address
,
615 { "mo-originating-address", "smrse.mo_originating_address_element",
616 FT_NONE
, BASE_NONE
, NULL
, 0,
617 "SMS_Address", HFILL
}},
618 { &hf_smrse_mo_user_data
,
619 { "mo-user-data", "smrse.mo_user_data",
620 FT_BYTES
, BASE_NONE
, NULL
, 0,
622 { &hf_smrse_origVMSCAddr
,
623 { "origVMSCAddr", "smrse.origVMSCAddr_element",
624 FT_NONE
, BASE_NONE
, NULL
, 0,
625 "SMS_Address", HFILL
}},
627 { "moimsi", "smrse.moimsi",
628 FT_BYTES
, BASE_NONE
, NULL
, 0,
629 "IMSI_Address", HFILL
}},
630 { &hf_smrse_message_reference
,
631 { "message-reference", "smrse.message_reference",
632 FT_UINT32
, BASE_DEC
, NULL
, 0,
634 { &hf_smrse_error_reason
,
635 { "error-reason", "smrse.error_reason",
636 FT_INT32
, BASE_DEC
, VALS(smrse_Error_reason_vals
), 0,
638 { &hf_smrse_msg_waiting_set
,
639 { "msg-waiting-set", "smrse.msg_waiting_set",
640 FT_BOOLEAN
, BASE_NONE
, NULL
, 0,
642 { &hf_smrse_alerting_MS_ISDN
,
643 { "alerting-MS-ISDN", "smrse.alerting_MS_ISDN_element",
644 FT_NONE
, BASE_NONE
, NULL
, 0,
645 "SMS_Address", HFILL
}},
646 { &hf_smrse_sm_diag_info
,
647 { "sm-diag-info", "smrse.sm_diag_info",
648 FT_BYTES
, BASE_NONE
, NULL
, 0,
650 { &hf_smrse_ms_address
,
651 { "ms-address", "smrse.ms_address_element",
652 FT_NONE
, BASE_NONE
, NULL
, 0,
653 "SMS_Address", HFILL
}},
656 /* List of subtrees */
657 static int *ett
[] = {
660 &ett_smrse_SMS_Address
,
661 &ett_smrse_T_address_value
,
662 &ett_smrse_SMR_Bind_Confirm
,
663 &ett_smrse_SMR_Bind_Failure
,
664 &ett_smrse_SMR_Unbind
,
669 &ett_smrse_RPAlertSC
,
672 /* Register protocol */
673 proto_smrse
= proto_register_protocol(PNAME
, PSNAME
, PFNAME
);
675 /* Register dissector */
676 smrse_handle
= register_dissector(PFNAME
, dissect_smrse
, proto_smrse
);
678 /* Register fields and subtrees */
679 proto_register_field_array(proto_smrse
, hf
, array_length(hf
));
680 proto_register_subtree_array(ett
, array_length(ett
));
685 /*--- proto_reg_handoff_smrse -------------------------------------------*/
686 void proto_reg_handoff_smrse(void) {
687 dissector_add_uint_with_preference("tcp.port",TCP_PORT_SMRSE
, smrse_handle
);