[BSC] Move the BTS-type specific code from bcs_init.c to bts_*.c

bsc_init.c was a big mess even only for two supported BTS models,
so before adding more BTS types, this needs a cleanup.

All the BTS specific code from bsc_init.c has now moved into
bts_{siemens_bs11,ipaccess_nanobts}.c

This has required that input_event() and nm_state_event() get both
converted to proper libosmocore signals instead of referencing external
symbols.
diff --git a/openbsc/src/input/dahdi.c b/openbsc/src/input/dahdi.c
index 06d9171..934761f 100644
--- a/openbsc/src/input/dahdi.c
+++ b/openbsc/src/input/dahdi.c
@@ -47,6 +47,7 @@
 #include <openbsc/abis_rsl.h>
 #include <openbsc/subchan_demux.h>
 #include <openbsc/e1_input.h>
+#include <openbsc/signal.h>
 #include <osmocore/talloc.h>
 
 #include "lapd.h"
@@ -94,11 +95,11 @@
 		break;
 	case LAPD_MPH_ACTIVATE_IND:
 		DEBUGP(DMI, "MPH_ACTIVATE_IND: sapi(%d) tei(%d)\n", sapi, tei);
-		ret = e1inp_event(e1i_ts, EVT_E1_TEI_UP, tei, sapi);
+		ret = e1inp_event(e1i_ts, S_INP_TEI_UP, tei, sapi);
 		break;
 	case LAPD_MPH_DEACTIVATE_IND:
 		DEBUGP(DMI, "MPH_DEACTIVATE_IND: sapi(%d) tei(%d)\n", sapi, tei);
-		ret = e1inp_event(e1i_ts, EVT_E1_TEI_DN, tei, sapi);
+		ret = e1inp_event(e1i_ts, S_INP_TEI_DN, tei, sapi);
 		break;
 	case LAPD_DL_DATA_IND:
 	case LAPD_DL_UNITDATA_IND:
diff --git a/openbsc/src/input/ipaccess.c b/openbsc/src/input/ipaccess.c
index e7098dc..dcf8d1a 100644
--- a/openbsc/src/input/ipaccess.c
+++ b/openbsc/src/input/ipaccess.c
@@ -36,6 +36,7 @@
 #include <osmocore/select.h>
 #include <osmocore/tlv.h>
 #include <osmocore/msgb.h>
+#include <osmocore/talloc.h>
 #include <openbsc/debug.h>
 #include <openbsc/gsm_data.h>
 #include <openbsc/abis_nm.h>
@@ -44,7 +45,7 @@
 #include <openbsc/e1_input.h>
 #include <openbsc/ipaccess.h>
 #include <openbsc/socket.h>
-#include <osmocore/talloc.h>
+#include <openbsc/signal.h>
 
 #define PRIV_OML 1
 #define PRIV_RSL 2
@@ -367,7 +368,7 @@
 	/* send OML down */
 	ts = bts->oml_link->ts;
 	line = ts->line;
-	e1inp_event(ts, EVT_E1_TEI_DN, bts->oml_link->tei, bts->oml_link->sapi);
+	e1inp_event(ts, S_INP_TEI_DN, bts->oml_link->tei, bts->oml_link->sapi);
 
 	bfd = &ts->driver.ipaccess.fd;
 	bsc_unregister_fd(bfd);
@@ -436,7 +437,7 @@
 
 	/* send RSL down */
 	ts = trx->rsl_link->ts;
-	e1inp_event(ts, EVT_E1_TEI_DN, trx->rsl_link->tei, trx->rsl_link->sapi);
+	e1inp_event(ts, S_INP_TEI_DN, trx->rsl_link->tei, trx->rsl_link->sapi);
 
 	/* close the socket */
 	bfd = &ts->driver.ipaccess.fd;
@@ -499,14 +500,14 @@
 	switch (link->type) {
 	case E1INP_SIGN_RSL:
 		if (!(msg->trx->bts->ip_access.flags & (RSL_UP << msg->trx->nr))) {
-			e1inp_event(e1i_ts, EVT_E1_TEI_UP, link->tei, link->sapi);
+			e1inp_event(e1i_ts, S_INP_TEI_UP, link->tei, link->sapi);
 			msg->trx->bts->ip_access.flags |= (RSL_UP << msg->trx->nr);
 		}
 		ret = abis_rsl_rcvmsg(msg);
 		break;
 	case E1INP_SIGN_OML:
 		if (!(msg->trx->bts->ip_access.flags & OML_UP)) {
-			e1inp_event(e1i_ts, EVT_E1_TEI_UP, link->tei, link->sapi);
+			e1inp_event(e1i_ts, S_INP_TEI_UP, link->tei, link->sapi);
 			msg->trx->bts->ip_access.flags |= OML_UP;
 		}
 		ret = abis_nm_rcvmsg(msg);
diff --git a/openbsc/src/input/misdn.c b/openbsc/src/input/misdn.c
index 7604d01..4598879 100644
--- a/openbsc/src/input/misdn.c
+++ b/openbsc/src/input/misdn.c
@@ -42,13 +42,14 @@
 
 #include <osmocore/select.h>
 #include <osmocore/msgb.h>
+#include <osmocore/talloc.h>
 #include <openbsc/debug.h>
 #include <openbsc/gsm_data.h>
 #include <openbsc/abis_nm.h>
 #include <openbsc/abis_rsl.h>
 #include <openbsc/subchan_demux.h>
 #include <openbsc/e1_input.h>
-#include <osmocore/talloc.h>
+#include <openbsc/signal.h>
 
 #define TS1_ALLOC_SIZE	300
 
@@ -152,12 +153,12 @@
 		}
 		/* save the channel number in the driver private struct */
 		link->driver.misdn.channel = l2addr.channel;
-		ret = e1inp_event(e1i_ts, EVT_E1_TEI_UP, l2addr.tei, l2addr.sapi);
+		ret = e1inp_event(e1i_ts, S_INP_TEI_UP, l2addr.tei, l2addr.sapi);
 		break;
 	case DL_RELEASE_IND:
 		DEBUGP(DMI, "DL_RELEASE_IND: channel(%d) sapi(%d) tei(%d)\n",
 		l2addr.channel, l2addr.sapi, l2addr.tei);
-		ret = e1inp_event(e1i_ts, EVT_E1_TEI_DN, l2addr.tei, l2addr.sapi);
+		ret = e1inp_event(e1i_ts, S_INP_TEI_DN, l2addr.tei, l2addr.sapi);
 		break;
 	case DL_DATA_IND:
 	case DL_UNITDATA_IND: