hnb: Introduce HNB_Tests testsuite
A new Iuh CodecPort + Emulation is introduced to (de)mux RANAP and RUA
in the same SCTP socket.
The Iuh_CodecPort.ttcn file has currently a hack to be able to test
HNBAP, since titan seem to be reporting sinfo_ppid=0 when in fact it
received sinfo_ppid=20 (HNBAP).
A couple tests are added to validate HNBAP HNBRegister Request + Accept
or Reject. In current osmo-hnodeb state, both tests pass if run
separately, but fail if run sequentially since osmo-hnodeb still doesn't
re-connect properly after first test finishes and connection is dropped.
Related: SYS#5516
Change-Id: I7227917148e98a2c777f4b05d8d2eca6e9c121b7
diff --git a/hnodeb/HNBGW_ConnectionHandler.ttcn b/hnodeb/HNBGW_ConnectionHandler.ttcn
new file mode 100644
index 0000000..071e3e8
--- /dev/null
+++ b/hnodeb/HNBGW_ConnectionHandler.ttcn
@@ -0,0 +1,112 @@
+module HNBGW_ConnectionHandler {
+
+/* HNBGW Connection Handler of HNB_Tests in TTCN-3
+ * (C) 2021 by sysmocom - s.m.f.c. GmbH <info@sysmocom.de>
+ * All rights reserved.
+ *
+ * Released under the terms of GNU General Public License, Version 2 or
+ * (at your option) any later version.
+ *
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ */
+
+import from Misc_Helpers all;
+import from General_Types all;
+import from Osmocom_Types all;
+import from IPL4asp_Types all;
+import from Native_Functions all;
+
+import from SDP_Types all;
+
+import from StatsD_Checker all;
+
+import from TELNETasp_PortType all;
+import from Osmocom_VTY_Functions all;
+
+import from HNBAP_Templates all;
+
+import from Iuh_Emulation all;
+
+/* this component represents a single Iuh connection at the HNBGW. */
+type component HNBGW_ConnHdlr extends StatsD_ConnHdlr {
+ port TELNETasp_PT HNBVTY;
+ port HNBAP_PT HNBAP;
+ port RUA_PT RUA;
+ var TestHdlrParams g_pars;
+
+ var boolean g_vty_initialized := false;
+}
+
+function f_HNBGW_ConnHdlr_init_vty() runs on HNBGW_ConnHdlr {
+ if (not g_vty_initialized) {
+ map(self:HNBVTY, system:HNBVTY);
+ f_vty_set_prompts(HNBVTY);
+ f_vty_transceive(HNBVTY, "enable");
+ g_vty_initialized := true;
+ }
+}
+
+/* initialize all parameters */
+function f_HNBGW_ConnHdlr_init(TestHdlrParams pars) runs on HNBGW_ConnHdlr {
+ var integer i := 0;
+ var Iuh_Emulation_CT vc_Iuh;
+
+ g_pars := valueof(pars);
+ vc_Iuh := Iuh_Emulation_CT.create("HNBGW" & int2str(i));
+ connect(self:HNBAP, vc_Iuh:HNBAP);
+ connect(self:RUA, vc_Iuh:RUA);
+
+ var Iuh_conn_parameters iuh_pars;
+ iuh_pars.remote_ip := g_pars.hnodeb_addr;
+ iuh_pars.remote_sctp_port := -1;
+ iuh_pars.local_ip := g_pars.hnbgw_addr;
+ iuh_pars.local_sctp_port := g_pars.hnbgw_port;
+ vc_Iuh.start(Iuh_Emulation.main(iuh_pars, "Iuh" & int2str(i)));
+
+ f_HNBGW_ConnHdlr_init_vty();
+}
+
+type record TestHdlrParams {
+ charstring hnbgw_addr,
+ charstring hnodeb_addr,
+ integer hnbgw_port,
+ uint16_t rnc_id,
+ charstring hNB_Identity_Info,
+ OCT3 plmnid,
+ uint32_t cell_identity,
+ uint16_t lac,
+ uint8_t rac,
+ uint8_t sac
+};
+
+/* Note: Do not use valueof() to get a value of this template, use
+ * f_gen_test_hdlr_pars() instead in order to get a configuration. */
+template (value) TestHdlrParams t_def_TestHdlrPars := {
+ hnbgw_addr := "127.0.0.1",
+ hnodeb_addr := "127.0.0.1",
+ hnbgw_port := 29169,
+ rnc_id := 23,
+ hNB_Identity_Info := "OsmoHNodeB",
+ plmnid := '00F110'O,
+ cell_identity := 1,
+ lac := 2,
+ rac := 3,
+ sac := 4
+}
+
+
+function f_handle_hnbap_hnb_register_req()
+runs on HNBGW_ConnHdlr {
+ HNBAP.receive(tr_HNBAP_HNBRegisterRequest(char2oct(g_pars.hNB_Identity_Info),
+ g_pars.plmnid,
+ int2bit(g_pars.cell_identity, 28),
+ int2oct(g_pars.lac, 2),
+ int2oct(g_pars.rac, 1),
+ int2oct(g_pars.sac, 2)
+ ));
+ HNBAP.send(ts_HNBAP_HNBRegisterAccept(g_pars.rnc_id));
+}
+
+
+
+}
diff --git a/hnodeb/HNB_Tests.cfg b/hnodeb/HNB_Tests.cfg
new file mode 100644
index 0000000..38d9cc7
--- /dev/null
+++ b/hnodeb/HNB_Tests.cfg
@@ -0,0 +1,18 @@
+[ORDERED_INCLUDE]
+# Common configuration, shared between test suites
+"../Common.cfg"
+# testsuite specific configuration, not expected to change
+"./HNB_Tests.default"
+
+# Local configuration below
+
+[LOGGING]
+
+[TESTPORT_PARAMETERS]
+
+[MODULE_PARAMETERS]
+
+[MAIN_CONTROLLER]
+
+[EXECUTE]
+HNB_Tests.control
diff --git a/hnodeb/HNB_Tests.default b/hnodeb/HNB_Tests.default
new file mode 100644
index 0000000..a06dcc6
--- /dev/null
+++ b/hnodeb/HNB_Tests.default
@@ -0,0 +1,27 @@
+[LOGGING]
+mtc.FileMask := LOG_ALL | TTCN_DEBUG | TTCN_MATCHING | DEBUG_ENCDEC;
+
+[TESTPORT_PARAMETERS]
+*.HNBVTY.CTRL_MODE := "client"
+*.HNBVTY.CTRL_HOSTNAME := "127.0.0.1"
+*.HNBVTY.CTRL_PORTNUM := "4273"
+*.HNBVTY.CTRL_LOGIN_SKIPPED := "yes"
+*.HNBVTY.CTRL_DETECT_SERVER_DISCONNECTED := "yes"
+*.HNBVTY.CTRL_READMODE := "buffered"
+*.HNBVTY.CTRL_CLIENT_CLEANUP_LINEFEED := "yes"
+*.HNBVTY.CTRL_DETECT_CONNECTION_ESTABLISHMENT_RESULT := "yes"
+*.HNBVTY.PROMPT1 := "OsmoHNodeB> "
+*.STATSVTY.CTRL_MODE := "client"
+*.STATSVTY.CTRL_HOSTNAME := "127.0.0.1"
+*.STATSVTY.CTRL_PORTNUM := "4274"
+*.STATSVTY.CTRL_LOGIN_SKIPPED := "yes"
+*.STATSVTY.CTRL_DETECT_SERVER_DISCONNECTED := "yes"
+*.STATSVTY.CTRL_READMODE := "buffered"
+*.STATSVTY.CTRL_CLIENT_CLEANUP_LINEFEED := "yes"
+*.STATSVTY.CTRL_DETECT_CONNECTION_ESTABLISHMENT_RESULT := "yes"
+*.STATSVTY.PROMPT1 := "OsmoHNodeB> "
+
+[MODULE_PARAMETERS]
+Osmocom_VTY_Functions.mp_prompt_prefix := "OsmoHNodeB";
+
+[EXECUTE]
diff --git a/hnodeb/HNB_Tests.ttcn b/hnodeb/HNB_Tests.ttcn
new file mode 100644
index 0000000..7a668dd
--- /dev/null
+++ b/hnodeb/HNB_Tests.ttcn
@@ -0,0 +1,214 @@
+module HNB_Tests {
+
+/* Integration Tests for OsmoHNodeB
+ * (C) 2021 by sysmocom - s.f.m.c. GmbH <info@sysmocom.de>
+ * All rights reserved.
+ *
+ * Released under the terms of GNU General Public License, Version 2 or
+ * (at your option) any later version.
+ *
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ *
+ * This test suite tests OsmoHNodB while emulating both multiple UE as
+ * well as the HNBGW. See README for more details.
+ *
+ * There are test cases that run in so-called 'handler mode' and test cases
+ * that run directly on top of the BSSAP and RSL CodecPorts. The "handler mode"
+ * tests abstract the multiplexing/demultiplexing of multiple SCCP connections
+ * and/or RSL channels and are hence suitable for higher-level test cases, while
+ * the "raw" tests directly on top of the CodecPorts are more suitable for lower-
+ * level testing.
+ */
+
+import from Misc_Helpers all;
+import from General_Types all;
+import from Osmocom_Types all;
+import from IPL4asp_Types all;
+
+import from Osmocom_CTRL_Functions all;
+import from Osmocom_CTRL_Types all;
+import from Osmocom_CTRL_Adapter all;
+
+import from StatsD_Types all;
+import from StatsD_CodecPort all;
+import from StatsD_CodecPort_CtrlFunct all;
+import from StatsD_Checker all;
+
+import from Osmocom_VTY_Functions all;
+import from TELNETasp_PortType all;
+
+import from HNBAP_Templates all;
+
+import from HNBGW_ConnectionHandler all;
+import from Iuh_Emulation all;
+
+modulepar {
+ /* IP address at which the HNodeB can be reached */
+ charstring mp_hnodeb_ip := "127.0.0.1";
+
+ /* IP address at which the test binds */
+ charstring mp_hnbgw_iuh_ip := "127.0.0.1";
+ integer mp_hnbgw_iuh_port := 29169;
+}
+
+type component test_CT extends CTRL_Adapter_CT {
+ port TELNETasp_PT HNBVTY;
+
+ /* global test case guard timer (actual timeout value is set in f_init()) */
+ timer T_guard := 30.0;
+}
+
+/* global altstep for global guard timer; */
+altstep as_Tguard() runs on test_CT {
+ [] T_guard.timeout {
+ setverdict(fail, "Timeout of T_guard");
+ mtc.stop;
+ }
+}
+
+friend function f_logp(TELNETasp_PT pt, charstring log_msg)
+{
+ // log on TTCN3 log output
+ log(log_msg);
+ // log in stderr log
+ f_vty_transceive(pt, "logp lglobal notice TTCN3 f_logp(): " & log_msg);
+}
+
+function f_init_vty(charstring id := "foo") runs on test_CT {
+ if (HNBVTY.checkstate("Mapped")) {
+ /* skip initialization if already executed once */
+ return;
+ }
+ map(self:HNBVTY, system:HNBVTY);
+ f_vty_set_prompts(HNBVTY);
+ f_vty_transceive(HNBVTY, "enable");
+}
+/* global initialization function */
+function f_init(float guard_timeout := 30.0) runs on test_CT {
+ var integer bssap_idx;
+
+ T_guard.start(guard_timeout);
+ activate(as_Tguard());
+
+ f_init_vty("VirtHNBGW");
+
+ /* TODO: Wait for Iuh connection to be established */
+}
+
+friend function f_shutdown_helper() runs on test_CT {
+ all component.stop;
+ setverdict(pass);
+ mtc.stop;
+}
+
+friend function f_gen_test_hdlr_pars() return TestHdlrParams {
+
+ var TestHdlrParams pars := valueof(t_def_TestHdlrPars);
+ pars.hnodeb_addr := mp_hnodeb_ip;
+ pars.hnbgw_addr := mp_hnbgw_iuh_ip;
+ pars.hnbgw_port := mp_hnbgw_iuh_port;
+ return pars;
+}
+
+type function void_fn(charstring id) runs on HNBGW_ConnHdlr;
+
+/* helper function to create and connect a HNBGW_ConnHdlr component */
+private function f_connect_handler(inout HNBGW_ConnHdlr vc_conn, integer bssap_idx := 0) runs on test_CT {
+ /*connect(vc_conn:RAN, g_bssap[bssap_idx].vc_RAN:PROC);
+ connect(vc_conn:MGCP_PROC, vc_MGCP:MGCP_PROC);
+ connect(vc_conn:RSL, bts[0].rsl.vc_RSL:CLIENT_PT);
+ connect(vc_conn:RSL_PROC, bts[0].rsl.vc_RSL:RSL_PROC);
+ if (isvalue(bts[1])) {
+ connect(vc_conn:RSL1, bts[1].rsl.vc_RSL:CLIENT_PT);
+ connect(vc_conn:RSL1_PROC, bts[1].rsl.vc_RSL:RSL_PROC);
+ }
+ if (isvalue(bts[2])) {
+ connect(vc_conn:RSL2, bts[2].rsl.vc_RSL:CLIENT_PT);
+ connect(vc_conn:RSL2_PROC, bts[2].rsl.vc_RSL:RSL_PROC);
+ }
+ connect(vc_conn:BSSAP, g_bssap[bssap_idx].vc_RAN:CLIENT);
+ if (mp_enable_lcs_tests) {
+ connect(vc_conn:BSSAP_LE, g_bssap_le.vc_BSSAP_LE:CLIENT);
+ connect(vc_conn:BSSAP_LE_PROC, g_bssap_le.vc_BSSAP_LE:PROC);
+ }
+ connect(vc_conn:MGCP, vc_MGCP:MGCP_CLIENT);
+ connect(vc_conn:MGCP_MULTI, vc_MGCP:MGCP_CLIENT_MULTI);
+ connect(vc_conn:STATSD_PROC, vc_STATSD:STATSD_PROC);*/
+}
+
+function f_start_handler_create(TestHdlrParams pars)
+runs on test_CT return HNBGW_ConnHdlr {
+ var charstring id := testcasename();
+ var HNBGW_ConnHdlr vc_conn;
+ vc_conn := HNBGW_ConnHdlr.create(id);
+ f_connect_handler(vc_conn);
+ return vc_conn;
+}
+
+function f_start_handler_run(HNBGW_ConnHdlr vc_conn, void_fn fn, TestHdlrParams pars)
+runs on test_CT return HNBGW_ConnHdlr {
+ var charstring id := testcasename();
+ /* Emit a marker to appear in the SUT's own logging output */
+ f_logp(HNBVTY, id & "() start");
+ vc_conn.start(f_handler_init(fn, id, pars));
+ return vc_conn;
+}
+
+function f_start_handler(void_fn fn, template (omit) TestHdlrParams pars_tmpl := omit)
+runs on test_CT return HNBGW_ConnHdlr {
+ var TestHdlrParams pars;
+ if (isvalue(pars)) {
+ pars := valueof(pars_tmpl);
+ } else {
+ pars := valueof(f_gen_test_hdlr_pars());
+ }
+ return f_start_handler_run(f_start_handler_create(pars), fn, pars);
+}
+
+/* first function inside ConnHdlr component; sets g_pars + starts function */
+private function f_handler_init(void_fn fn, charstring id, TestHdlrParams pars)
+runs on HNBGW_ConnHdlr {
+ f_HNBGW_ConnHdlr_init(pars);
+ HNBAP.receive(IUHEM_Event:{up_down:=IUHEM_EVENT_UP}); /* Wait for HNB to connect to us */
+ fn.apply(id);
+}
+
+private function f_tc_hnb_register_request(charstring id) runs on HNBGW_ConnHdlr {
+ f_handle_hnbap_hnb_register_req();
+ f_sleep(1.0);
+}
+testcase TC_hnb_register_request_accept() runs on test_CT {
+ var HNBGW_ConnHdlr vc_conn;
+
+ f_init();
+ vc_conn := f_start_handler(refers(f_tc_hnb_register_request));
+ vc_conn.done;
+ f_shutdown_helper();
+}
+
+private function f_tc_hnb_register_reject(charstring id) runs on HNBGW_ConnHdlr {
+ HNBAP.receive(tr_HNBAP_HNBRegisterRequest(char2oct(g_pars.hNB_Identity_Info),
+ g_pars.plmnid,
+ int2bit(g_pars.cell_identity, 28),
+ int2oct(g_pars.lac, 2),
+ int2oct(g_pars.rac, 1),
+ int2oct(g_pars.sac, 2)
+ ));
+ HNBAP.send(ts_HNBAP_HNBRegisterReject(ts_HnbapCause(overload)));
+ f_sleep(1.0);
+}
+testcase TC_hnb_register_request_reject() runs on test_CT {
+ var HNBGW_ConnHdlr vc_conn;
+
+ f_init();
+ vc_conn := f_start_handler(refers(f_tc_hnb_register_reject));
+ vc_conn.done;
+ f_shutdown_helper();
+}
+
+control {
+ execute( TC_hnb_register_request_accept() );
+ execute( TC_hnb_register_request_reject() );
+}
+
+}
diff --git a/hnodeb/README.md b/hnodeb/README.md
new file mode 100644
index 0000000..3b3fa9f
--- /dev/null
+++ b/hnodeb/README.md
@@ -0,0 +1,30 @@
+# HNB_Tests.ttcn
+
+* external interfaces
+ * Iuh side (emulates HNBGW-side)
+ * SCTP/HNBAP
+ * SCTP/RUA/RANAP
+ * RTP side: emulates MGW
+ * GTP-U side: emulates GGSN
+ * UE side
+ * VTY
+ * CTRL
+ * StatsD
+
+{% dot hnb_tests.svg
+digraph G {
+ graph [label="HNB_Tests", labelloc=t, fontsize=30];
+ rankdir=LR;
+ { rank=same; ATS; HNB; };
+ HNB [label="IUT\nosmo-bsc",shape="box"];
+ ATS [label="ATS\nHNB_Tests.ttcn"];
+
+ HNB <- ATS [label="Uu (or some intermediate lower layer)"];
+ HNB -> ATS [label="Iuh"];
+ HNB -> ATS [label="RTP"];
+ HNB -> ATS [label="GTP-U"];
+ HNB <- ATS [label="CTRL"];
+ HNB <- ATS [label="VTY"];
+ HNB -> ATS [label="StatsD"];
+}
+%}
diff --git a/hnodeb/README.txt b/hnodeb/README.txt
new file mode 100644
index 0000000..1cf81ee
--- /dev/null
+++ b/hnodeb/README.txt
@@ -0,0 +1,32 @@
+Integration Tests for OsmoHnodeB
+--------------------------------
+
+This test suite tests OsmoHNodeB while emulating both multiple UE as
+well as the HNBGW.
+
+The included jenkins.sh script, together with the Dockerfiles from
+http://git.osmocom.org/docker-playground/ can be used to run both the
+osmo-hnodeb-under-test as well as the extenal entities and the tester.
+
+
+Further Test Ideas
+------------------
+
+This is a random list of things about things possible to test.
+Asterisks '*' are TODO, while 'x' means already implemented.
+
+= exhaustion of resources
+
+= paging
+
+= assignment
+
+= hand-over
+
+= erroneous channel release
+
+= misc
+
+= counters
+
+= VTY based/corresponding tests
diff --git a/hnodeb/expected-results.xml b/hnodeb/expected-results.xml
new file mode 100644
index 0000000..39cea9f
--- /dev/null
+++ b/hnodeb/expected-results.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<testsuite name='HNB_Tests' tests='0' failures='0' errors='0' skipped='0' inconc='0' time='MASKED'>
+
+</testsuite>
diff --git a/hnodeb/gen_links.sh b/hnodeb/gen_links.sh
new file mode 100755
index 0000000..ba946e8
--- /dev/null
+++ b/hnodeb/gen_links.sh
@@ -0,0 +1,60 @@
+#!/bin/bash
+
+BASEDIR=../deps
+
+. ../gen_links.sh.inc
+
+#DIR=$BASEDIR/titan.TestPorts.UNIX_DOMAIN_SOCKETasp/src
+#FILES="UD_PT.cc UD_PT.hh UD_PortType.ttcn UD_Types.ttcn"
+#gen_links $DIR $FILES
+
+DIR=$BASEDIR/titan.Libraries.TCCUsefulFunctions/src
+FILES="TCCInterface_Functions.ttcn TCCConversion_Functions.ttcn TCCConversion.cc TCCInterface.cc TCCInterface_ip.h"
+FILES+=" TCCEncoding_Functions.ttcn TCCEncoding.cc " # GSM 7-bit coding
+gen_links $DIR $FILES
+
+DIR=$BASEDIR/titan.TestPorts.Common_Components.Socket-API/src
+FILES="Socket_API_Definitions.ttcn"
+gen_links $DIR $FILES
+
+# Required by MGCP and IPA
+DIR=$BASEDIR/titan.TestPorts.IPL4asp/src
+FILES="IPL4asp_Functions.ttcn IPL4asp_PT.cc IPL4asp_PT.hh IPL4asp_PortType.ttcn IPL4asp_Types.ttcn IPL4asp_discovery.cc IPL4asp_protocol_L234.hh"
+gen_links $DIR $FILES
+
+# required by M3UA_Emulation
+DIR=$BASEDIR/titan.TestPorts.SCTPasp/src
+FILES="SCTPasp_PT.cc SCTPasp_PT.hh SCTPasp_PortType.ttcn SCTPasp_Types.ttcn"
+gen_links $DIR $FILES
+
+DIR=$BASEDIR/titan.ProtocolModules.SDP/src
+FILES="SDP_EncDec.cc SDP_Types.ttcn SDP_parse_.tab.c SDP_parse_.tab.h SDP_parse_parser.h SDP_parser.l
+SDP_parser.y lex.SDP_parse_.c"
+gen_links $DIR $FILES
+
+DIR=$BASEDIR/titan.ProtocolModules.RTP/src
+FILES="RTP_EncDec.cc RTP_Types.ttcn"
+gen_links $DIR $FILES
+
+DIR=$BASEDIR/titan.TestPorts.TELNETasp/src
+FILES="TELNETasp_PT.cc TELNETasp_PT.hh TELNETasp_PortType.ttcn"
+gen_links $DIR $FILES
+
+DIR=../library/hnbap
+FILES="HNBAP_CommonDataTypes.asn HNBAP_Constants.asn HNBAP_Containers.asn HNBAP_IEs.asn HNBAP_PDU_Contents.asn HNBAP_PDU_Descriptions.asn "
+FILES+="HNBAP_EncDec.cc HNBAP_Types.ttcn HNBAP_Templates.ttcn "
+gen_links $DIR $FILES
+
+DIR=../library/rua
+FILES="RUA_CommonDataTypes.asn RUA_Constants.asn RUA_Containers.asn RUA_IEs.asn RUA_PDU_Contents.asn RUA_PDU_Descriptions.asn "
+FILES+="RUA_EncDec.cc RUA_Types.ttcn RUA_Templates.ttcn "
+gen_links $DIR $FILES
+
+DIR=../library
+FILES="Iuh_Types.ttcn Iuh_CodecPort.ttcn Iuh_CodecPort_CtrlFunctDef.cc Iuh_CodecPort_CtrlFunct.ttcn Iuh_Emulation.ttcn DNS_Helpers.ttcn "
+FILES+="Misc_Helpers.ttcn General_Types.ttcn Osmocom_Types.ttcn Osmocom_VTY_Functions.ttcn Native_Functions.ttcn Native_FunctionDefs.cc IPA_Types.ttcn IPA_CodecPort.ttcn IPA_CodecPort_CtrlFunct.ttcn IPA_CodecPort_CtrlFunctDef.cc IPA_Emulation.ttcnpp Osmocom_CTRL_Types.ttcn Osmocom_CTRL_Functions.ttcn Osmocom_CTRL_Adapter.ttcn RTP_CodecPort.ttcn RTP_CodecPort_CtrlFunct.ttcn RTP_CodecPort_CtrlFunctDef.cc RTP_Emulation.ttcn IuUP_Types.ttcn IuUP_EncDec.cc IuUP_Emulation.ttcn "
+FILES+="StatsD_Types.ttcn StatsD_CodecPort.ttcn StatsD_CodecPort_CtrlFunct.ttcn StatsD_CodecPort_CtrlFunctdef.cc StatsD_Checker.ttcn "
+
+gen_links $DIR $FILES
+
+ignore_pp_results
diff --git a/hnodeb/osmo-hnodeb.cfg b/hnodeb/osmo-hnodeb.cfg
new file mode 100644
index 0000000..3ccd4b4
--- /dev/null
+++ b/hnodeb/osmo-hnodeb.cfg
@@ -0,0 +1,19 @@
+log stderr
+ logging filter all 1
+ logging color 1
+ logging print category-hex 0
+ logging print category 1
+ logging print extended-timestamp 1
+ logging print file basename
+ logging level set-all debug
+line vty
+ no login
+!
+hnodeb
+ cell_identity 1
+ location_area_code 2
+ routing_area_code 3
+ service_area_code 4
+ iuh
+ local-ip 127.0.0.1
+ remote-ip 127.0.0.1
diff --git a/hnodeb/regen_makefile.sh b/hnodeb/regen_makefile.sh
new file mode 100755
index 0000000..9ebfaf2
--- /dev/null
+++ b/hnodeb/regen_makefile.sh
@@ -0,0 +1,35 @@
+#!/bin/sh
+
+NAME=HNB_Tests
+
+FILES="
+ *.asn
+ *.c
+ *.ttcn
+ *.ttcnpp
+ IPA_CodecPort_CtrlFunctDef.cc
+ IPL4asp_PT.cc
+ IPL4asp_discovery.cc
+ IuUP_EncDec.cc
+ Iuh_CodecPort_CtrlFunctDef.cc
+ Native_FunctionDefs.cc
+ RTP_CodecPort_CtrlFunctDef.cc
+ RTP_EncDec.cc
+ SCTPasp_PT.cc
+ SDP_EncDec.cc
+ StatsD_CodecPort_CtrlFunctdef.cc
+ TCCConversion.cc
+ TCCEncoding.cc
+ TCCInterface.cc
+ TELNETasp_PT.cc
+ HNBAP_EncDec.cc
+ RUA_EncDec.cc
+"
+
+export CPPFLAGS_TTCN3="
+ -DIPA_EMULATION_CTRL
+"
+
+../regen-makefile.sh -e $NAME $FILES
+
+sed -i -e 's/^LINUX_LIBS = -lxml2 -lsctp/LINUX_LIBS = -lxml2 -lsctp -lfftranscode/' Makefile