gprs_gb: Add NS CodecPort + Emulation; Add NS selftests
diff --git a/gprs_gb/BSSGP_Helper.cc b/gprs_gb/BSSGP_Helper.cc
index 4665dcd..376cade 100644
--- a/gprs_gb/BSSGP_Helper.cc
+++ b/gprs_gb/BSSGP_Helper.cc
@@ -169,6 +169,8 @@
 	return prefix + compact_tlv_part(tlv_part_in);
 }
 
+#define NS_PDUT_NS_UNITDATA	0x00
+
 /* expand all the variable-length "length" fields of a NS message (Osmocom TvLV) into statlc TL16V format */
 OCTETSTRING f__NS__expand__len(OCTETSTRING const &in)
 {
@@ -177,6 +179,9 @@
 	uint8_t pdu_type = in_ptr[0];
 	uint8_t static_hdr_len = 1;
 
+	if (pdu_type == NS_PDUT_NS_UNITDATA)
+		return in;
+
 	if (in_len < static_hdr_len)
 		TTCN_error("NS message is shorter (%u bytes) than minimum header length (%u bytes) for msg_type 0x%02x",
 				in_len, static_hdr_len, pdu_type);
@@ -195,6 +200,9 @@
 	uint8_t pdu_type = in_ptr[0];
 	uint8_t static_hdr_len = 1;
 
+	if (pdu_type == NS_PDUT_NS_UNITDATA)
+		return in;
+
 	if (in_len < static_hdr_len)
 		TTCN_error("NS message is shorter (%u bytes) than minimum header length (%u bytes) for msg_type 0x%02x",
 				in_len, static_hdr_len, pdu_type);
diff --git a/gprs_gb/NS_CodecPort.ttcn b/gprs_gb/NS_CodecPort.ttcn
new file mode 100644
index 0000000..735a91f
--- /dev/null
+++ b/gprs_gb/NS_CodecPort.ttcn
@@ -0,0 +1,55 @@
+module NS_CodecPort {
+
+	import from IPL4asp_PortType all;
+	import from IPL4asp_Types all;
+	import from BSSGP_Helper_Functions all;
+	import from NS_Types all;
+
+	type record NS_RecvFrom {
+		ConnectionId	connId,
+		HostName	remName,
+		PortNumber	remPort,
+		HostName	locName,
+		PortNumber	locPort,
+		NsPdu		msg
+	}
+
+	template NS_RecvFrom t_NS_RecvFrom(template NsPdu pdu) := {
+		connId := ?,
+		remName := ?,
+		remPort := ?,
+		locName := ?,
+		locPort := ?,
+		msg := pdu
+	};
+
+	type record NS_Send {
+		ConnectionId	connId,
+		NsPdu		msg
+	}
+
+	private function IPL4_to_NS_RecvFrom(in ASP_RecvFrom pin, out NS_RecvFrom pout) {
+		pout.connId := pin.connId;
+		pout.remName := pin.remName;
+		pout.remPort := pin.remPort;
+		pout.locName := pin.locName;
+		pout.locPort := pin.locPort;
+		pout.msg := dec_NsPdu(f_NS_expand_len(pin.msg));
+	} with { extension "prototype(fast)" };
+
+	private function NS_to_IPL4_Send(in NS_Send pin, out ASP_SendTo pout) {
+		pout.connId := pin.connId;
+		pout.proto := { udp := {} };
+		pout.msg := f_NS_compact_len(enc_NsPdu(pin.msg));
+	} with { extension "prototype(fast)" };
+
+	type port NS_CODEC_PT message {
+		out	NS_Send;
+		in	NS_RecvFrom,
+			ASP_Event;
+	} with { extension "user IPL4asp_PT
+		out(NS_Send -> ASP_SendTo: function(NS_to_IPL4_Send))
+		in(ASP_RecvFrom -> NS_RecvFrom: function(IPL4_to_NS_RecvFrom);
+		   ASP_Event -> ASP_Event: simple)"
+	}
+}
diff --git a/gprs_gb/NS_CodecPort_CtrlFunct.ttcn b/gprs_gb/NS_CodecPort_CtrlFunct.ttcn
new file mode 100644
index 0000000..cc77dda
--- /dev/null
+++ b/gprs_gb/NS_CodecPort_CtrlFunct.ttcn
@@ -0,0 +1,44 @@
+module NS_CodecPort_CtrlFunct {
+
+  import from NS_CodecPort all;
+  import from IPL4asp_Types all;
+
+  external function f_IPL4_listen(
+    inout NS_CODEC_PT portRef,
+    in HostName locName,
+    in PortNumber locPort,
+    in ProtoTuple proto,
+    in OptionList options := {}
+  ) return Result;
+
+  external function f_IPL4_connect(
+    inout NS_CODEC_PT portRef,
+    in HostName remName,
+    in PortNumber remPort,
+    in HostName locName,
+    in PortNumber locPort,
+    in ConnectionId connId,
+    in ProtoTuple proto,
+    in OptionList options := {}
+  ) return Result;
+
+  external function f_IPL4_close(
+    inout NS_CODEC_PT portRef,
+    in ConnectionId id,
+    in ProtoTuple proto := { unspecified := {} }
+  ) return Result;
+
+  external function f_IPL4_setUserData(
+    inout NS_CODEC_PT portRef,
+    in ConnectionId id,
+    in UserData userData
+  ) return Result;
+
+  external function f_IPL4_getUserData(
+    inout NS_CODEC_PT portRef,
+    in ConnectionId id,
+    out UserData userData
+  ) return Result;
+
+}
+
diff --git a/gprs_gb/NS_CodecPort_CtrlFunctDef.cc b/gprs_gb/NS_CodecPort_CtrlFunctDef.cc
new file mode 100644
index 0000000..a6da7ac
--- /dev/null
+++ b/gprs_gb/NS_CodecPort_CtrlFunctDef.cc
@@ -0,0 +1,56 @@
+#include "IPL4asp_PortType.hh"
+#include "NS_CodecPort.hh"
+#include "IPL4asp_PT.hh"
+
+namespace NS__CodecPort__CtrlFunct {
+
+  IPL4asp__Types::Result f__IPL4__listen(
+    NS__CodecPort::NS__CODEC__PT& portRef,
+    const IPL4asp__Types::HostName& locName,
+    const IPL4asp__Types::PortNumber& locPort,
+    const IPL4asp__Types::ProtoTuple& proto,
+    const IPL4asp__Types::OptionList& options)
+  {
+    return f__IPL4__PROVIDER__listen(portRef, locName, locPort, proto, options);
+  }
+  
+  IPL4asp__Types::Result f__IPL4__connect(
+    NS__CodecPort::NS__CODEC__PT& portRef,
+    const IPL4asp__Types::HostName& remName,
+    const IPL4asp__Types::PortNumber& remPort,
+    const IPL4asp__Types::HostName& locName,
+    const IPL4asp__Types::PortNumber& locPort,
+    const IPL4asp__Types::ConnectionId& connId,
+    const IPL4asp__Types::ProtoTuple& proto,
+    const IPL4asp__Types::OptionList& options)
+  {
+    return f__IPL4__PROVIDER__connect(portRef, remName, remPort,
+                                      locName, locPort, connId, proto, options);
+  }
+
+  IPL4asp__Types::Result f__IPL4__close(
+    NS__CodecPort::NS__CODEC__PT& portRef, 
+    const IPL4asp__Types::ConnectionId& connId, 
+    const IPL4asp__Types::ProtoTuple& proto)
+  {
+      return f__IPL4__PROVIDER__close(portRef, connId, proto);
+  }
+
+  IPL4asp__Types::Result f__IPL4__setUserData(
+    NS__CodecPort::NS__CODEC__PT& portRef,
+    const IPL4asp__Types::ConnectionId& connId,
+    const IPL4asp__Types::UserData& userData)
+  {
+    return f__IPL4__PROVIDER__setUserData(portRef, connId, userData);
+  }
+  
+  IPL4asp__Types::Result f__IPL4__getUserData(
+    NS__CodecPort::NS__CODEC__PT& portRef,
+    const IPL4asp__Types::ConnectionId& connId,
+    IPL4asp__Types::UserData& userData)
+  {
+    return f__IPL4__PROVIDER__getUserData(portRef, connId, userData);
+  }
+  
+}
+
diff --git a/gprs_gb/NS_Emulation.ttcn b/gprs_gb/NS_Emulation.ttcn
new file mode 100644
index 0000000..7abd7f9
--- /dev/null
+++ b/gprs_gb/NS_Emulation.ttcn
@@ -0,0 +1,157 @@
+module NS_Emulation {
+	import from NS_Types all;
+	import from BSSGP_Types all;
+	import from NS_CodecPort all;
+	import from NS_CodecPort_CtrlFunct all;
+	//import from IPL4asp_PortType all;
+	import from IPL4asp_Types all;
+
+	type record NsUnitdataRequest {
+		BssgpBvci	bvci,
+		Nsei		nsei,
+		octetstring	sdu
+	}
+
+	type record NsUnitdataIndication {
+		BssgpBvci	bvci,
+		Nsei		nsei,
+		octetstring	sdu
+	}
+
+	type enumerated NseState {
+		NSE_S_BLOCKED,
+		NSE_S_ALIVE,
+		NSE_S_RESET
+	};
+
+	/* port from our (internal) point of view */
+	type port NS_SP_PT message {
+		in	NsUnitdataRequest;
+		out	NsUnitdataIndication,
+			ASP_Event;
+	} with { extension "internal" };
+
+	/* port from the user point of view */
+	type port NS_PT message {
+		in	ASP_Event,
+			NsUnitdataIndication;
+		out	NsUnitdataRequest;
+	} with { extension "internal" };
+
+	function NSStart() runs on NS_CT {
+		f_init();
+		f_ScanEvents();
+	}
+
+	private function f_init() runs on NS_CT {
+		f_IPL4_connect(NSCP, remote_ip, remote_udp_port, local_ip, local_udp_port, 0, { udp := {}});
+	}
+
+	type component NS_CT {
+		/* UDP port towards the bottom (IUT) */
+		port NS_CODEC_PT NSCP;
+		/* NS-User SAP towards the user */
+		port NS_SP_PT NS_SP;
+
+		var NseState		state;
+		var ConnectionId	conn_id;
+	}
+
+	modulepar {
+		PortNumber local_udp_port := 23001;
+		charstring local_ip := "127.0.0.1";
+		PortNumber remote_udp_port := 23000;
+		charstring remote_ip := "127.0.0.1";
+	};
+
+	template NsTLV t_NS_IE_CAUSE(template NsCause cause) := {
+		iei := NS_IEI_CAUSE,
+		len := 1,
+		u := { cause := cause }
+	};
+
+	template NsTLV t_NS_IE_NSVCI(template Nsvci nsvci) := {
+		iei := NS_IEI_NSVCI,
+		len := 2,
+		u := { nsvci :=  nsvci }
+	}
+
+	template NsTLV t_NS_IE_NSEI(template Nsvci nsei) := {
+		iei := NS_IEI_NSEI,
+		len := 2,
+		u := { nsei := nsei }
+	}
+
+	template NsPdu t_NS_RESET(template NsCause cause, template Nsvci nsvci, template Nsei nsei) := {
+		pdu_type := NS_PDUT_NS_RESET,
+		u := {
+			other := {
+				tlvs := { t_NS_IE_CAUSE(cause), t_NS_IE_NSVCI(nsvci), t_NS_IE_NSEI(nsei) }
+			}
+		}
+	};
+
+	template NsPdu t_NS_RESET_ACK(template Nsvci nsvci, template Nsei nsei) := {
+		pdu_type := NS_PDUT_NS_RESET,
+		u := {
+			other := {
+				tlvs := { t_NS_IE_NSVCI(nsvci), t_NS_IE_NSEI(nsei) }
+			}
+		}
+	};
+
+	template NsPdu t_NS_SIMPLE(template NsPduType pdut) := { pdu_type := pdut, u := { other := { tlvs := {} } } };
+	template NsPdu t_NS_ALIVE := t_NS_SIMPLE(NS_PDUT_NS_ALIVE);
+	template NsPdu t_NS_ALIVE_ACK := t_NS_SIMPLE(NS_PDUT_NS_ALIVE_ACK);
+	template NsPdu t_NS_UNBLOCK := t_NS_SIMPLE(NS_PDUT_NS_UNBLOCK);
+	template NsPdu t_NS_UNBLOCK_ACK := t_NS_SIMPLE(NS_PDUT_NS_UNBLOCK_ACK);
+	template NsPdu t_NS_BLOCK := t_NS_SIMPLE(NS_PDUT_NS_BLOCK);
+	template NsPdu t_NS_BLOCK_ACK := t_NS_SIMPLE(NS_PDUT_NS_BLOCK_ACK);
+
+	template NS_Send t_NS_Send(template ConnectionId connId, template NsPdu msg) := {
+		connId := connId,
+		msg := msg
+	}
+
+	private function f_ScanEvents() runs on NS_CT {
+		var NsUnitdataRequest ud_req;
+		var NS_RecvFrom rf;
+		var ASP_Event evt;
+
+		while (true) {
+
+		if (state == NSE_S_BLOCKED) {
+			alt {
+				[] NSCP.receive(t_NS_RecvFrom(t_NS_BLOCK)) -> value rf {
+					NSCP.send(t_NS_Send(conn_id, t_NS_BLOCK_ACK));
+				}
+				[] NSCP.receive(t_NS_RecvFrom(t_NS_UNBLOCK)) -> value rf {
+					NSCP.send(t_NS_Send(conn_id, t_NS_UNBLOCK_ACK));
+					state := NSE_S_ALIVE;
+				}
+				[] NSCP.receive(ASP_Event:?) -> value evt { NS_SP.send(evt); }
+			}
+		} else if (state == NSE_S_ALIVE) {
+			alt {
+				[] NSCP.receive(t_NS_RecvFrom(t_NS_BLOCK)) -> value rf {
+					NSCP.send(t_NS_Send(conn_id, t_NS_BLOCK_ACK));
+					state := NSE_S_BLOCKED;
+				}
+				[] NSCP.receive(t_NS_RecvFrom(t_NS_UNBLOCK)) -> value rf {
+					NSCP.send(t_NS_Send(conn_id, t_NS_UNBLOCK_ACK));
+				}
+				[] NS_SP.receive(NsUnitdataRequest:?) -> value ud_req {
+					//NSCP.send(t_NS_Send(
+				}
+				[] NSCP.receive(ASP_Event:?) -> value evt { NS_SP.send(evt); }
+			}
+		} else if (state == NSE_S_RESET) {
+			alt {
+				[] NSCP.receive(ASP_Event:?) -> value evt { NS_SP.send(evt); }
+			}
+		}
+
+
+		}
+	}
+}
diff --git a/gprs_gb/NS_Types.ttcn b/gprs_gb/NS_Types.ttcn
index ee2444d..bd04a66 100644
--- a/gprs_gb/NS_Types.ttcn
+++ b/gprs_gb/NS_Types.ttcn
@@ -57,6 +57,15 @@
 		NS_CAUSE_IP_TEST_FAILEDA			('00010100'B)
 	} with { variant "FIELDLENGTH(8)" };
 
+	/* TS 48.016 10.3.9 */
+	type record NsSduControlBits {
+		BIT6	spare,
+		boolean c,
+		boolean r
+	} with { variant (c) "FIELDLENGTH(1)"
+		 variant (r) "FIELDLENGTH(1)"
+	};
+
 	type uint16_t Nsvci;
 	type uint16_t Nsei;
 
@@ -90,11 +99,29 @@
 
 	type record of NsTLV NsTLVs;
 
-	type record NsPdu {
-		NsPduType	pdu_type,
+	type record NsPduUnitdata {
+		NsSduControlBits	control_bits,
+		BssgpBvci		bvci,
+		octetstring		sdu
+	} with { variant "" };
+
+	type record NsPduOther {
 		NsTLVs		tlvs optional
 	} with { variant "" };
 
+	type union NsPduUnion {
+		NsPduUnitdata	unitdata,
+		NsPduOther	other
+	} with { variant "" };
+
+	type record NsPdu {
+		NsPduType	pdu_type,
+		NsPduUnion	u
+	} with { variant (u) "CROSSTAG(
+				unitdata,		pdu_type = NS_PDUT_NS_UNITDATA;
+				other,			OTHERWISE)"
+	};
+
 	external function enc_NsPdu(in NsPdu pdu) return octetstring
 		with { extension "prototype(convert) encode(RAW)" };
 	external function dec_NsPdu(in octetstring stream) return NsPdu
diff --git a/gprs_gb/Test.ttcn b/gprs_gb/Test.ttcn
index 33d43bf..8939cad 100644
--- a/gprs_gb/Test.ttcn
+++ b/gprs_gb/Test.ttcn
@@ -2,15 +2,16 @@
 
 	import from BSSGP_Helper_Functions all;
 	import from BSSGP_Types all;
+	import from NS_Types all;
 
 	type component dummy_CT {
 	}
 
-	function f_assert_prepr(in octetstring a, in octetstring b) {
-		log ("Input: ", a);
-		log ("Expected: ", b);
+	function f_bssgp_assert_prepr(in octetstring a, in octetstring b) {
+		log("BSSGP Input: ", a);
+		log("BSSGP Expected: ", b);
 		var octetstring a_preprocessed := f_BSSGP_expand_len(a);
-		log ("Preprocessed: ", a_preprocessed);
+		log("BSSGP Preprocessed: ", a_preprocessed);
 
 		if (a_preprocessed != b) {
 			setverdict(fail);
@@ -19,15 +20,15 @@
 		}
 	}
 
-	function f_dec_and_log(in octetstring inp) {
-		log("Input: ", inp);
+	function f_bssgp_dec_and_log(in octetstring inp) {
+		log("BSSGP Input: ", inp);
 		var octetstring inp_p := f_BSSGP_expand_len(inp);
-		log ("Preprocessed: ", inp_p);
+		log("BSSGP Preprocessed: ", inp_p);
 		var BssgpPdu dec := dec_BssgpPdu(inp_p);
-		log("Decoded: ", dec);
+		log("BSSGP Decoded: ", dec);
 	}
 
-	testcase TC_selftest() runs on dummy_CT {
+	testcase TC_selftest_bssgp() runs on dummy_CT {
 		const octetstring c_bvc_reset_pcu := '2204820000078108088832f44000c80051e0'O;
 		const octetstring c_bvc_reset_q := '2204820000078100'O;
 		const octetstring c_status_pcu := '4107810515882204820000078103'O;
@@ -45,35 +46,75 @@
 		const octetstring c_gmm_mo_att_cpl := '01fb146ddd000004088832f44000c80051e000800e000801c009080339d7bc'O;
 
 		/* single byte length to two byte length */
-		f_assert_prepr('04058101'O, '0405000101'O);
-		f_assert_prepr('040589000102030405060708'O, '04050009000102030405060708'O);
+		f_bssgp_assert_prepr('04058101'O, '0405000101'O);
+		f_bssgp_assert_prepr('040589000102030405060708'O, '04050009000102030405060708'O);
 		/* two byte length to two byte length */
-		f_assert_prepr('0405000101'O, '0405000101'O);
+		f_bssgp_assert_prepr('0405000101'O, '0405000101'O);
 		/* special case: DL-UD + UL-UD */
-		f_assert_prepr('00aabbccddeeffaa29822342'O, '00aabbccddeeffaa2900022342'O);
-		f_assert_prepr('01aabbccddeeffaa29822342'O, '01aabbccddeeffaa2900022342'O);
+		f_bssgp_assert_prepr('00aabbccddeeffaa29822342'O, '00aabbccddeeffaa2900022342'O);
+		f_bssgp_assert_prepr('01aabbccddeeffaa29822342'O, '01aabbccddeeffaa2900022342'O);
 		/* multiple TLVs */
-		f_assert_prepr('234281aa4382bbbb'O, '23420001aa430002bbbb'O);
-		f_assert_prepr('230080'O, '23000000'O);
+		f_bssgp_assert_prepr('234281aa4382bbbb'O, '23420001aa430002bbbb'O);
+		f_bssgp_assert_prepr('230080'O, '23000000'O);
 
-		f_dec_and_log(c_bvc_reset_pcu);
-		f_dec_and_log(c_bvc_reset_q);
-		f_dec_and_log(c_status_pcu);
-		f_dec_and_log(c_reset_ack_q);
-		f_dec_and_log(c_reset_ack_pcu);
-		f_dec_and_log(c_unblock_pcu);
-		f_dec_and_log(c_unblock_ack_q);
-		f_dec_and_log(c_fc_bvc_pcu);
-		f_dec_and_log(c_fc_bvc_ack_q);
-		f_dec_and_log(c_gmm_mo_att_req);
-		f_dec_and_log(c_gmm_mt_ac_req);
-		f_dec_and_log(c_gmm_mo_ac_resp);
-		f_dec_and_log(c_gmm_mt_att_acc);
-		f_dec_and_log(c_gmm_mt_det_req);
-		f_dec_and_log(c_gmm_mo_att_cpl);
+		f_bssgp_dec_and_log(c_bvc_reset_pcu);
+		f_bssgp_dec_and_log(c_bvc_reset_q);
+		f_bssgp_dec_and_log(c_status_pcu);
+		f_bssgp_dec_and_log(c_reset_ack_q);
+		f_bssgp_dec_and_log(c_reset_ack_pcu);
+		f_bssgp_dec_and_log(c_unblock_pcu);
+		f_bssgp_dec_and_log(c_unblock_ack_q);
+		f_bssgp_dec_and_log(c_fc_bvc_pcu);
+		f_bssgp_dec_and_log(c_fc_bvc_ack_q);
+		f_bssgp_dec_and_log(c_gmm_mo_att_req);
+		f_bssgp_dec_and_log(c_gmm_mt_ac_req);
+		f_bssgp_dec_and_log(c_gmm_mo_ac_resp);
+		f_bssgp_dec_and_log(c_gmm_mt_att_acc);
+		f_bssgp_dec_and_log(c_gmm_mt_det_req);
+		f_bssgp_dec_and_log(c_gmm_mo_att_cpl);
+	}
+
+	function f_ns_assert_prepr(in octetstring a, in octetstring b) {
+		log("NS Input: ", a);
+		log("NS Expected: ", b);
+		var octetstring a_preprocessed := f_NS_expand_len(a);
+		log("NS Preprocessed: ", a_preprocessed);
+
+		if (a_preprocessed != b) {
+			setverdict(fail);
+		} else {
+			setverdict(pass);
+		}
+	}
+
+	function f_ns_dec_and_log(in octetstring inp) {
+		log("NS Input: ", inp);
+		var octetstring inp_p := f_NS_expand_len(inp);
+		log("NS Preprocessed: ", inp_p);
+		var NsPdu dec := dec_NsPdu(inp_p);
+		log("NS Decoded: ", dec);
+	}
+
+	testcase TC_selftest_ns() runs on dummy_CT {
+		const octetstring c_ns_reset_pcu := '000000c4271e813d'O;
+
+		/* single byte length to two byte length */
+		f_ns_assert_prepr('04058101'O, '0405000101'O);
+		f_ns_assert_prepr('040589000102030405060708'O, '04050009000102030405060708'O);
+		/* two byte length to two byte length */
+		f_ns_assert_prepr('0405000101'O, '0405000101'O);
+		/* special case: NS-UNITDATA */
+		f_ns_assert_prepr('00aabbccddeeffaa29822342'O, '00aabbccddeeffaa2900022342'O);
+		/* multiple TLVs */
+		f_ns_assert_prepr('234281aa4382bbbb'O, '23420001aa430002bbbb'O);
+		/* zero-length */
+		f_ns_assert_prepr('230080'O, '23000000'O);
+
+		f_ns_dec_and_log(c_ns_reset_pcu);
 	}
 
 	control {
-		execute(TC_selftest());
+		execute(TC_selftest_bssgp());
+		execute(TC_selftest_ns());
 	}
 };
diff --git a/gprs_gb/gen_links.sh b/gprs_gb/gen_links.sh
index e8aa176..c2e76dc 100755
--- a/gprs_gb/gen_links.sh
+++ b/gprs_gb/gen_links.sh
@@ -15,6 +15,18 @@
 #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 TCCConversion.hh TCCInterface.cc TCCInterface_ip.h"
+gen_links $DIR $FILES
+
+DIR=$BASEDIR/titan.TestPorts.Common_Components.Socket-API/src
+FILES="Socket_API_Definitions.ttcn"
+gen_links $DIR $FILES
+
+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
+
 
 
 DIR=../library
diff --git a/gprs_gb/regen_makefile.sh b/gprs_gb/regen_makefile.sh
index 9a9abb8..984174a 100755
--- a/gprs_gb/regen_makefile.sh
+++ b/gprs_gb/regen_makefile.sh
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-FILES="*.ttcn BSSGP_Helper.cc"
+FILES="*.ttcn BSSGP_Helper.cc IPL4asp_PT.cc IPL4asp_discovery.cc TCCConversion.cc TCCInterface.cc NS_CodecPort_CtrlFunctDef.cc"
 
 ttcn3_makefilegen -f Test.ttcn $FILES
 sed -i -e 's/# TTCN3_DIR = /TTCN3_DIR = \/usr/' Makefile