Stefan Sperling | c307e68 | 2018-06-14 15:15:46 +0200 | [diff] [blame] | 1 | /* (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 Welte | 34b5a95 | 2019-05-27 11:54:11 +0200 | [diff] [blame] | 6 | * |
| 7 | * SPDX-License-Identifier: GPL-2.0-or-later |
Stefan Sperling | c307e68 | 2018-06-14 15:15:46 +0200 | [diff] [blame] | 8 | */ |
| 9 | |
| 10 | module SCCP_Templates { |
| 11 | |
| 12 | import from SCCP_Types all; |
| 13 | import from SCCPasp_Types all; |
| 14 | import from SCCP_Emulation all; |
| 15 | |
| 16 | /* construct a SCCP_PAR_Address with just PC + SSN and no GT */ |
| 17 | template (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 */ |
| 31 | template (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 | } |