Move "connect to L1CTL and RESET" function from LAPDm_RAW_PT to L1CTL_PortType
diff --git a/lapdm/LAPDm_RAW_PT.ttcn b/lapdm/LAPDm_RAW_PT.ttcn
index 37824d3..02b0b13 100644
--- a/lapdm/LAPDm_RAW_PT.ttcn
+++ b/lapdm/LAPDm_RAW_PT.ttcn
@@ -90,11 +90,7 @@
 	}
 
 	private function f_init() runs on lapdm_CT {
-		L1CTL.send(L1CTL_connect:{path:=l1ctl_sock_path});
-		L1CTL.receive(L1CTL_connect_result:{result_code := SUCCESS, err:=omit});
-
-		L1CTL.send(t_L1ctlResetReq(L1CTL_RES_T_SCHED));
-		L1CTL.receive;
+		f_connect_reset(L1CTL, l1ctl_sock_path);
 		set_ph_state(PH_STATE_NULL);
 	}
 
diff --git a/library/L1CTL_PortType.ttcn b/library/L1CTL_PortType.ttcn
index 92d3d11..019e2a7 100644
--- a/library/L1CTL_PortType.ttcn
+++ b/library/L1CTL_PortType.ttcn
@@ -67,6 +67,13 @@
 		pt.send(t_L1CTL_DM_EST_REQ({ false, imm_ass.chan_desc.arfcn }, imm_ass.chan_desc.chan_nr, imm_ass.chan_desc.tsc));
 	}
 
+	function f_connect_reset(L1CTL_PT pt, charstring l1ctl_sock_path := "/tmp/osmocom_l2") {
+		pt.send(L1CTL_connect:{path:=l1ctl_sock_path});
+		pt.receive(L1CTL_connect_result:{result_code := SUCCESS, err:=omit});
+
+		pt.send(t_L1ctlResetReq(L1CTL_RES_T_SCHED));
+		pt.receive;
+	}
 
 	private function L1CTL_to_UD_connect(in L1CTL_connect pin, out UD_connect pout) {
 		pout.path := pin.path;