blob: 32746b414e7a97ec4fd8ee80d42bd6bdd47738fe [file] [log] [blame]
Harald Welte34b5a952019-05-27 11:54:11 +02001/* GPRS-NS Emulation in TTCN-3
Harald Welte013d65a2020-09-13 14:41:31 +02002 * (C) 2018-2020 Harald Welte <laforge@gnumonks.org>
Harald Welte34b5a952019-05-27 11:54:11 +02003 * contributions by sysmocom - s.f.m.c. GmbH
4 * All rights reserved.
5 *
6 * Released under the terms of GNU General Public License, Version 2 or
7 * (at your option) any later version.
8 *
9 * SPDX-License-Identifier: GPL-2.0-or-later
10 */
11
Harald Welte6fff3642017-07-22 21:36:13 +020012module NS_Emulation {
13 import from NS_Types all;
14 import from BSSGP_Types all;
Harald Welte867243a2020-09-13 18:32:32 +020015 import from Osmocom_Types all;
Harald Weltee0abc472018-02-05 09:13:31 +010016 import from Osmocom_Gb_Types all;
Harald Welte013d65a2020-09-13 14:41:31 +020017 import from NS_Provider_IPL4 all;
Harald Welte867243a2020-09-13 18:32:32 +020018#ifdef NS_EMULATION_FR
19 import from NS_Provider_FR all;
20#endif
Harald Welte6fff3642017-07-22 21:36:13 +020021 import from IPL4asp_Types all;
22
23 type record NsUnitdataRequest {
24 BssgpBvci bvci,
25 Nsei nsei,
Harald Welte6e594f22017-07-23 16:19:35 +020026 octetstring sdu optional,
Harald Weltee0abc472018-02-05 09:13:31 +010027 PDU_BSSGP bssgp optional
Harald Welte6e594f22017-07-23 16:19:35 +020028 }
29
30 template NsUnitdataRequest t_NsUdReq(template Nsei nsei, template BssgpBvci bvci, template octetstring sdu,
Harald Weltee0abc472018-02-05 09:13:31 +010031 template PDU_BSSGP bssgp) := {
Harald Welte6e594f22017-07-23 16:19:35 +020032 bvci := bvci,
33 nsei := nsei,
34 sdu := sdu,
35 bssgp := bssgp
Harald Welte6fff3642017-07-22 21:36:13 +020036 }
37
38 type record NsUnitdataIndication {
39 BssgpBvci bvci,
40 Nsei nsei,
Harald Welte6e594f22017-07-23 16:19:35 +020041 octetstring sdu optional,
Harald Weltee0abc472018-02-05 09:13:31 +010042 PDU_BSSGP bssgp optional
Harald Welte6e594f22017-07-23 16:19:35 +020043 }
44
45 template NsUnitdataIndication t_NsUdInd(Nsei nsei, BssgpBvci bvci, octetstring sdu) := {
46 bvci := bvci,
47 nsei := nsei,
48 sdu := sdu,
Harald Weltee0abc472018-02-05 09:13:31 +010049 bssgp := dec_PDU_BSSGP(sdu)
Harald Welte6e594f22017-07-23 16:19:35 +020050 }
51
52 type record NsStatusIndication {
53 Nsei nsei,
54 Nsvci nsvci,
55 NseState old_state,
56 NseState new_state
57 }
58
59 template NsStatusIndication t_NsStsInd(Nsei nsei, Nsvci nsvci, NseState old_state, NseState state) := {
60 nsei := nsei,
61 nsvci := nsvci,
62 old_state := old_state,
63 new_state := state
Harald Welte6fff3642017-07-22 21:36:13 +020064 }
65
66 type enumerated NseState {
Harald Welte6e594f22017-07-23 16:19:35 +020067 NSE_S_DEAD_BLOCKED,
68 NSE_S_WAIT_RESET,
69 NSE_S_ALIVE_BLOCKED,
70 NSE_S_ALIVE_UNBLOCKED
71 }
Harald Welte6fff3642017-07-22 21:36:13 +020072
73 /* port from our (internal) point of view */
74 type port NS_SP_PT message {
75 in NsUnitdataRequest;
76 out NsUnitdataIndication,
Harald Welte013d65a2020-09-13 14:41:31 +020077 NsStatusIndication;
Harald Welte6fff3642017-07-22 21:36:13 +020078 } with { extension "internal" };
79
80 /* port from the user point of view */
81 type port NS_PT message {
82 in ASP_Event,
Harald Welte6e594f22017-07-23 16:19:35 +020083 NsStatusIndication,
Harald Welte6fff3642017-07-22 21:36:13 +020084 NsUnitdataIndication;
85 out NsUnitdataRequest;
86 } with { extension "internal" };
87
Alexander Couzens2c12b242018-07-31 00:30:11 +020088 function NSStart(NSConfiguration init_config) runs on NS_CT {
89 config := init_config;
Harald Welte6fff3642017-07-22 21:36:13 +020090 f_init();
91 f_ScanEvents();
92 }
93
94 private function f_init() runs on NS_CT {
Harald Welte6e594f22017-07-23 16:19:35 +020095 var Result res;
Harald Welte013d65a2020-09-13 14:41:31 +020096
Harald Welte867243a2020-09-13 18:32:32 +020097 if (ischosen(config.provider.ip)) {
98 /* Connect the UDP socket */
99 vc_NSP_IP := NS_Provider_IPL4_CT.create;
100 connect(self:NSCP, vc_NSP_IP:NSE);
101 vc_NSP_IP.start(NS_Provider_IPL4.main(config));
102#ifdef NS_EMULATION_FR
103 } else if (ischosen(config.provider.fr)) {
104 vc_NSP_FR := NS_Provider_FR_CT.create;
105 connect(self:NSCP, vc_NSP_FR:NSE);
106 vc_NSP_FR.start(NS_Provider_FR.main(config));
107#endif
108 }
Harald Welte013d65a2020-09-13 14:41:31 +0200109
Harald Welte6e594f22017-07-23 16:19:35 +0200110 f_change_state(NSE_S_DEAD_BLOCKED);
111 /* Send the first NS-ALIVE to test the connection */
Harald Weltee81d84e2018-07-05 03:17:00 +0200112 if (not config.role_sgsn) {
113 f_sendReset();
114 }
Harald Welte6fff3642017-07-22 21:36:13 +0200115 }
116
Harald Welte013d65a2020-09-13 14:41:31 +0200117 type component NS_Provider_CT {
118 /* upper port, facing to NS_Emulation:NSCP */
119 port NS_PROVIDER_PT NSE;
120 /* lower layer ports (UDP/IP, Frame Relay) are added in derived components */
121 };
122
123 /* port between NS_Provider and NS_CT */
124 type port NS_PROVIDER_PT message {
125 inout PDU_NS;
126 } with { extension "internal" };
127
Harald Welte6fff3642017-07-22 21:36:13 +0200128 type component NS_CT {
129 /* UDP port towards the bottom (IUT) */
Harald Welte013d65a2020-09-13 14:41:31 +0200130 port NS_PROVIDER_PT NSCP;
131 var NS_Provider_IPL4_CT vc_NSP_IP;
Harald Welte867243a2020-09-13 18:32:32 +0200132#ifdef NS_EMULATION_FR
133 var NS_Provider_FR_CT vc_NSP_FR;
134#endif
Harald Welte013d65a2020-09-13 14:41:31 +0200135
Harald Welte6fff3642017-07-22 21:36:13 +0200136 /* NS-User SAP towards the user */
137 port NS_SP_PT NS_SP;
138
Alexander Couzens2c12b242018-07-31 00:30:11 +0200139 var NSConfiguration config;
140
Harald Welte6e594f22017-07-23 16:19:35 +0200141 var NseState g_state := NSE_S_DEAD_BLOCKED;
Harald Welte6e594f22017-07-23 16:19:35 +0200142
143 timer Tns_alive := 3.0;
144 timer Tns_test := 10.0;
145 timer Tns_block := 10.0;
Harald Welte6fff3642017-07-22 21:36:13 +0200146 }
147
Harald Welte5e8573e2020-09-13 15:32:56 +0200148 type record NSConfigurationIP {
Alexander Couzense0f7c542020-09-13 17:25:18 +0200149 AddressFamily address_family,
Alexander Couzens2c12b242018-07-31 00:30:11 +0200150 PortNumber local_udp_port,
151 charstring local_ip,
152 PortNumber remote_udp_port,
Harald Welte5e8573e2020-09-13 15:32:56 +0200153 charstring remote_ip
154 };
Harald Welte867243a2020-09-13 18:32:32 +0200155 type record NSConfigurationFR {
156 charstring netdev, /* HDLC net-device for AF_PACKET socket */
157 integer dlci
158 };
Harald Welte5e8573e2020-09-13 15:32:56 +0200159 type union NSConfigurationP {
Harald Welte867243a2020-09-13 18:32:32 +0200160 NSConfigurationIP ip,
161 NSConfigurationFR fr
Harald Welte5e8573e2020-09-13 15:32:56 +0200162 };
163 type record NSConfiguration {
164 NSConfigurationP provider,
Alexander Couzens2c12b242018-07-31 00:30:11 +0200165 Nsvci nsvci,
Harald Welte5e514fa2018-07-05 00:01:45 +0200166 Nsvci nsei,
167 boolean role_sgsn,
168 boolean handle_sns
Alexander Couzens2c12b242018-07-31 00:30:11 +0200169 }
Harald Welte6fff3642017-07-22 21:36:13 +0200170
Harald Welte6e594f22017-07-23 16:19:35 +0200171 private function f_change_state(NseState new_state) runs on NS_CT {
172 var NseState old_state := g_state;
173 g_state := new_state;
174 log("NS State Transition: ", old_state, " -> ", new_state);
Alexander Couzens2c12b242018-07-31 00:30:11 +0200175 NS_SP.send(t_NsStsInd(config.nsei, config.nsvci, old_state, new_state));
Harald Welte6fff3642017-07-22 21:36:13 +0200176 }
177
Harald Welte6e594f22017-07-23 16:19:35 +0200178 private function f_sendReset() runs on NS_CT {
Harald Welte013d65a2020-09-13 14:41:31 +0200179 NSCP.send(ts_NS_RESET(NS_CAUSE_OM_INTERVENTION, config.nsvci, config.nsei));
Harald Welte6e594f22017-07-23 16:19:35 +0200180 g_state := NSE_S_WAIT_RESET;
Harald Welte6fff3642017-07-22 21:36:13 +0200181 }
182
Harald Welte6e594f22017-07-23 16:19:35 +0200183 private function f_sendAlive() runs on NS_CT {
Harald Welte013d65a2020-09-13 14:41:31 +0200184 NSCP.send(t_NS_ALIVE);
Harald Welte6e594f22017-07-23 16:19:35 +0200185 Tns_alive.start;
186 }
187
188 private function f_sendUnblock() runs on NS_CT {
Harald Welte013d65a2020-09-13 14:41:31 +0200189 NSCP.send(t_NS_UNBLOCK);
Harald Welte6e594f22017-07-23 16:19:35 +0200190 Tns_block.start;
191 }
192
193 private function f_sendBlock(NsCause cause) runs on NS_CT {
Harald Welte013d65a2020-09-13 14:41:31 +0200194 NSCP.send(ts_NS_BLOCK(cause, config.nsvci));
Harald Welte6e594f22017-07-23 16:19:35 +0200195 Tns_block.start;
196 }
197
198 altstep as_allstate() runs on NS_CT {
Harald Welte013d65a2020-09-13 14:41:31 +0200199 var PDU_NS rf;
Harald Welte6e594f22017-07-23 16:19:35 +0200200 var ASP_Event evt;
201
202 /* transition to DEAD if t_alive times out */
Harald Welte9a7c5122020-09-14 11:35:57 +0200203 [] Tns_alive.timeout {
204 log("Tns-alive expired: changing to DEAD_BLOCKED + starting Tns-test");
Harald Welte6e594f22017-07-23 16:19:35 +0200205 f_change_state(NSE_S_DEAD_BLOCKED);
206 Tns_test.start;
Harald Welte6fff3642017-07-22 21:36:13 +0200207 }
Harald Welte6fff3642017-07-22 21:36:13 +0200208
Harald Welte9a7c5122020-09-14 11:35:57 +0200209 [] Tns_test.timeout {
Harald Welte6e594f22017-07-23 16:19:35 +0200210 log("Tns-test expired: sending NS-ALIVE");
211 f_sendAlive();
Harald Welte6fff3642017-07-22 21:36:13 +0200212 }
Harald Welte6fff3642017-07-22 21:36:13 +0200213
Harald Welte6e594f22017-07-23 16:19:35 +0200214 /* Stop t_alive when receiving ALIVE-ACK */
Harald Welte9a7c5122020-09-14 11:35:57 +0200215 [Tns_alive.running] NSCP.receive(t_NS_ALIVE_ACK) {
Harald Welte6e594f22017-07-23 16:19:35 +0200216 log("NS-ALIVE-ACK received: stopping Tns-alive; starting Tns-test");
217 Tns_alive.stop;
218 Tns_test.start;
219 }
Harald Welte6fff3642017-07-22 21:36:13 +0200220
Harald Welte6e594f22017-07-23 16:19:35 +0200221 /* respond to NS-ALIVE with NS-ALIVE-ACK */
Harald Welte013d65a2020-09-13 14:41:31 +0200222 [] NSCP.receive(t_NS_ALIVE) {
223 NSCP.send(t_NS_ALIVE_ACK);
Harald Welte6e594f22017-07-23 16:19:35 +0200224 }
225
226 /* Respond to BLOCK for wrong NSVCI */
Harald Welte013d65a2020-09-13 14:41:31 +0200227 [] NSCP.receive(tr_NS_BLOCK(?, ?)) -> value rf {
Harald Welte6e594f22017-07-23 16:19:35 +0200228 log("Rx NS-BLOCK for unknown NSVCI");
229 /* FIXME */
230 }
231
232 /* Respond to RESET with correct NSEI/NSVCI */
Harald Welte013d65a2020-09-13 14:41:31 +0200233 [] NSCP.receive(tr_NS_RESET(?, config.nsvci, config.nsei)) -> value rf {
Harald Welte6e594f22017-07-23 16:19:35 +0200234 f_change_state(NSE_S_ALIVE_BLOCKED);
Harald Welte013d65a2020-09-13 14:41:31 +0200235 NSCP.send(ts_NS_RESET_ACK(config.nsvci, config.nsei));
Harald Welte6e594f22017-07-23 16:19:35 +0200236 }
237
238 /* Respond to RESET with wrong NSEI/NSVCI */
Harald Welte013d65a2020-09-13 14:41:31 +0200239 [] NSCP.receive(tr_NS_RESET(?, ?, ?)) -> value rf {
Harald Welte6e594f22017-07-23 16:19:35 +0200240 log("Rx NS-RESET for unknown NSEI/NSVCI");
241 /* FIXME */
242 }
243
Harald Welte5e8573e2020-09-13 15:32:56 +0200244 [config.role_sgsn and config.handle_sns and ischosen(config.provider.ip)] as_sns_sgsn();
Harald Welte5e514fa2018-07-05 00:01:45 +0200245
Harald Welte6e594f22017-07-23 16:19:35 +0200246 /* default case of handling unknown PDUs */
Harald Welte013d65a2020-09-13 14:41:31 +0200247 [] NSCP.receive(PDU_NS: ?) -> value rf {
248 log("Rx Unexpected NS PDU ", rf," in state ", g_state);
249 NSCP.send(ts_NS_STATUS(NS_CAUSE_PDU_NOT_COMPATIBLE_WITH_PROTOCOL_STATE, rf));
Harald Welte6e594f22017-07-23 16:19:35 +0200250 }
Harald Welte6fff3642017-07-22 21:36:13 +0200251 }
252
Harald Welte5e514fa2018-07-05 00:01:45 +0200253 /* simple IP Sub-Network Service responder for the SGSN side. This is not a full implementation
254 * of the protocol, merely sufficient to make the PCU/BSS side happy to proceed */
255 altstep as_sns_sgsn() runs on NS_CT {
Harald Welte013d65a2020-09-13 14:41:31 +0200256 var PDU_NS rf;
257 [] NSCP.receive(tr_SNS_SIZE(config.nsei)) -> value rf {
Harald Welte5e514fa2018-07-05 00:01:45 +0200258 /* blindly acknowledge whatever the PCU sends */
Harald Welte013d65a2020-09-13 14:41:31 +0200259 NSCP.send(ts_SNS_SIZE_ACK(config.nsei, omit));
Harald Welte5e514fa2018-07-05 00:01:45 +0200260 }
Harald Welte013d65a2020-09-13 14:41:31 +0200261 [] NSCP.receive(tr_SNS_SIZE(?)) {
Harald Welte5e514fa2018-07-05 00:01:45 +0200262 setverdict(fail, "SNS-SIZE from unexpected NSEI");
263 self.stop;
264 }
Harald Welte013d65a2020-09-13 14:41:31 +0200265 [] NSCP.receive(tr_SNS_CONFIG(config.nsei, true,
Harald Welte5e8573e2020-09-13 15:32:56 +0200266 {tr_SNS_IPv4(config.provider.ip.remote_ip,
267 config.provider.ip.remote_udp_port)})) -> value rf {
Harald Welte5e514fa2018-07-05 00:01:45 +0200268 /* blindly acknowledge whatever the PCU sends */
Harald Welte013d65a2020-09-13 14:41:31 +0200269 NSCP.send(ts_SNS_CONFIG_ACK(config.nsei, omit));
Harald Welte5e514fa2018-07-05 00:01:45 +0200270 /* send a SNS-CONFIG in response and expect a SNS-CONFIG-ACK */
Harald Welte5e8573e2020-09-13 15:32:56 +0200271 var IP4_Elements v4 := { valueof(ts_SNS_IPv4(config.provider.ip.local_ip, config.provider.ip.local_udp_port)) };
Harald Welte013d65a2020-09-13 14:41:31 +0200272 NSCP.send(ts_SNS_CONFIG(config.nsei, true, v4));
Harald Welte5e514fa2018-07-05 00:01:45 +0200273 alt {
Harald Welte013d65a2020-09-13 14:41:31 +0200274 [] NSCP.receive(tr_SNS_CONFIG_ACK(config.nsei, omit)) {
Harald Welte5e514fa2018-07-05 00:01:45 +0200275 /* success */
276 }
Harald Welte013d65a2020-09-13 14:41:31 +0200277 [] NSCP.receive(tr_SNS_CONFIG_ACK(config.nsei, ?)) {
Harald Welte5e514fa2018-07-05 00:01:45 +0200278 setverdict(fail, "Unexpected SNS-CONFIG-NACK");
279 self.stop;
280 }
281 }
282 }
Harald Welte013d65a2020-09-13 14:41:31 +0200283 [] NSCP.receive(tr_SNS_CONFIG(config.nsei, false, ?)) { /* ignore */}
284 [] NSCP.receive(tr_SNS_CONFIG(config.nsei, true, ?)) {
Harald Welte5e514fa2018-07-05 00:01:45 +0200285 setverdict(fail, "Unexpected SNS-CONFIG content");
286 self.stop;
287 }
Harald Welte013d65a2020-09-13 14:41:31 +0200288 [] NSCP.receive(tr_SNS_CONFIG(?, ?, ?)) {
Harald Welte5e514fa2018-07-05 00:01:45 +0200289 setverdict(fail, "SNS-CONFIG from unexpected NSEI");
290 self.stop;
291 }
292 }
293
Harald Welte6fff3642017-07-22 21:36:13 +0200294 private function f_ScanEvents() runs on NS_CT {
295 var NsUnitdataRequest ud_req;
Harald Welte013d65a2020-09-13 14:41:31 +0200296 var PDU_NS rf;
Harald Welte6e594f22017-07-23 16:19:35 +0200297 var default d;
298
299 d := activate(as_allstate());
Harald Welte6fff3642017-07-22 21:36:13 +0200300
301 while (true) {
Harald Welte6e594f22017-07-23 16:19:35 +0200302 if (g_state == NSE_S_DEAD_BLOCKED) {
Harald Welte6fff3642017-07-22 21:36:13 +0200303 alt {
Harald Welte6e594f22017-07-23 16:19:35 +0200304 [false] any timer.timeout {}
Harald Welte6fff3642017-07-22 21:36:13 +0200305 }
Harald Welte6e594f22017-07-23 16:19:35 +0200306 } else if (g_state == NSE_S_WAIT_RESET) {
Harald Welte6fff3642017-07-22 21:36:13 +0200307 alt {
Harald Welte013d65a2020-09-13 14:41:31 +0200308 [] NSCP.receive(tr_NS_RESET_ACK(config.nsvci, config.nsei)) -> value rf {
Harald Welte6e594f22017-07-23 16:19:35 +0200309 f_change_state(NSE_S_ALIVE_BLOCKED);
310 f_sendAlive();
311 f_sendUnblock();
Harald Welte6fff3642017-07-22 21:36:13 +0200312 }
Harald Welte6fff3642017-07-22 21:36:13 +0200313 }
Harald Welte6e594f22017-07-23 16:19:35 +0200314 } else if (g_state == NSE_S_ALIVE_BLOCKED) {
Harald Welte6fff3642017-07-22 21:36:13 +0200315 alt {
Harald Welte6e594f22017-07-23 16:19:35 +0200316 /* bogus block, just respond with ACK */
Harald Welte013d65a2020-09-13 14:41:31 +0200317 [] NSCP.receive(tr_NS_BLOCK(?, config.nsvci)) -> value rf {
318 NSCP.send(ts_NS_BLOCK_ACK(config.nsvci));
Harald Welte6e594f22017-07-23 16:19:35 +0200319 }
320 /* Respond to UNBLOCK with UNBLOCK-ACK + change state */
Harald Welte013d65a2020-09-13 14:41:31 +0200321 [] NSCP.receive(t_NS_UNBLOCK) -> value rf {
322 NSCP.send(t_NS_UNBLOCK_ACK);
Harald Welte6e594f22017-07-23 16:19:35 +0200323 Tns_block.stop;
324 f_change_state(NSE_S_ALIVE_UNBLOCKED);
325 }
Harald Welte013d65a2020-09-13 14:41:31 +0200326 [] NSCP.receive(t_NS_UNBLOCK_ACK) -> value rf {
Harald Welte6e594f22017-07-23 16:19:35 +0200327 Tns_block.stop;
328 f_change_state(NSE_S_ALIVE_UNBLOCKED);
329 }
330 [] Tns_block.timeout {
331 /* repeat unblock transmission */
332 f_sendUnblock();
333 }
334 }
335 } else if (g_state == NSE_S_ALIVE_UNBLOCKED) {
336 alt {
337 /* bogus unblock, just respond with ACK */
Harald Welte013d65a2020-09-13 14:41:31 +0200338 [] NSCP.receive(t_NS_UNBLOCK) -> value rf {
339 NSCP.send(t_NS_UNBLOCK_ACK);
Harald Welte6e594f22017-07-23 16:19:35 +0200340 }
341 /* Respond to BLOCK with BLOCK-ACK + change state */
Harald Welte013d65a2020-09-13 14:41:31 +0200342 [] NSCP.receive(tr_NS_BLOCK(?, config.nsvci)) -> value rf {
343 NSCP.send(ts_NS_BLOCK_ACK(config.nsvci));
Harald Welte6e594f22017-07-23 16:19:35 +0200344 Tns_block.stop;
345 f_change_state(NSE_S_ALIVE_BLOCKED);
346 }
Harald Welte013d65a2020-09-13 14:41:31 +0200347 [] NSCP.receive(tr_NS_BLOCK_ACK(config.nsvci)) -> value rf {
Harald Welte6e594f22017-07-23 16:19:35 +0200348 Tns_block.stop;
349 }
350 /* NS-UNITDATA PDU from network to NS-UNITDATA.ind to user */
Harald Welte013d65a2020-09-13 14:41:31 +0200351 [] NSCP.receive(tr_NS_UNITDATA(?, ?, ?)) -> value rf {
Alexander Couzens2c12b242018-07-31 00:30:11 +0200352 NS_SP.send(t_NsUdInd(config.nsei,
Harald Welte013d65a2020-09-13 14:41:31 +0200353 oct2int(rf.pDU_NS_Unitdata.bVCI),
354 rf.pDU_NS_Unitdata.nS_SDU));
Harald Welte6e594f22017-07-23 16:19:35 +0200355 }
356 /* NS-UNITDATA.req from user to NS-UNITDATA PDU on network */
Alexander Couzens2c12b242018-07-31 00:30:11 +0200357 [] NS_SP.receive(t_NsUdReq(config.nsei, ?, ?, omit)) -> value ud_req {
Harald Welte6e594f22017-07-23 16:19:35 +0200358 /* using raw octetstring PDU */
Harald Welte013d65a2020-09-13 14:41:31 +0200359 NSCP.send(ts_NS_UNITDATA(t_SduCtrlB, ud_req.bvci, ud_req.sdu));
Harald Welte6e594f22017-07-23 16:19:35 +0200360 }
Alexander Couzens2c12b242018-07-31 00:30:11 +0200361 [] NS_SP.receive(t_NsUdReq(config.nsei, ?, omit, ?)) -> value ud_req {
Harald Welte6e594f22017-07-23 16:19:35 +0200362 /* using decoded BSSGP PDU that we need to encode first */
Harald Weltee0abc472018-02-05 09:13:31 +0100363 var octetstring enc := enc_PDU_BSSGP(ud_req.bssgp);
Harald Welte013d65a2020-09-13 14:41:31 +0200364 NSCP.send(ts_NS_UNITDATA(t_SduCtrlB, ud_req.bvci, enc));
Harald Welte6e594f22017-07-23 16:19:35 +0200365 }
Harald Welte6fff3642017-07-22 21:36:13 +0200366 }
367 }
368
Harald Welte6e594f22017-07-23 16:19:35 +0200369 } /* while */
370 //deactivate(d);
Harald Welte6fff3642017-07-22 21:36:13 +0200371 }
372}