blob: a5af073a374d2d066e38efc31079d59074a543bd [file] [log] [blame]
Stefan Sperlingc307e682018-06-14 15:15:46 +02001/* (C) 2018 by sysmocom s.f.m.c. GmbH <info@sysmocom.de>
2 * All Rights Reserved
3 *
4 * Released under the terms of GNU General Public License, Version 2 or
5 * (at your option) any later version.
Harald Welte34b5a952019-05-27 11:54:11 +02006 *
7 * SPDX-License-Identifier: GPL-2.0-or-later
Stefan Sperlingc307e682018-06-14 15:15:46 +02008 */
9
10module SCCP_Templates {
11
12import from SCCP_Types all;
13import from SCCPasp_Types all;
14import from SCCP_Emulation all;
15
16/* construct a SCCP_PAR_Address with just PC + SSN and no GT */
17template (value) SCCP_PAR_Address ts_SccpAddr_PC_SSN(integer pc, integer ssn, octetstring sio,
18 charstring sccp_srv_type) := {
19 addressIndicator := {
20 pointCodeIndic := '1'B,
21 ssnIndicator := '1'B,
22 globalTitleIndic := '0000'B,
23 routingIndicator := '1'B
24 },
25 signPointCode := SCCP_SPC_int2bit(pc, sccp_srv_type, sio),
26 subsystemNumber := ssn,
27 globalTitle := omit
28}
29
30/* construct a SCCP_PAR_Address with only GT */
31template (value) SCCP_PAR_Address ts_SccpAddr_GT(hexstring global_address) := {
32 addressIndicator := {
33 pointCodeIndic := '0'B,
34 ssnIndicator := '0'B,
35 globalTitleIndic := '0001'B, // NAI only
36 routingIndicator := cg_route_on_GT // route on GT
37 },
38 signPointCode := omit,
39 subsystemNumber := omit,
40 globalTitle := {
41 gti0001 := {
42 natureOfAddress := '0000011'B,
43 oddeven := '0'B,
44 globalTitleAddress := global_address
45 }
46 }
47}
48
49}