update to comply with libosmocore namespace fixes

This updates the code and brings it in sync to
libosmocore git commit 892e621fec571c7cba3573caa0d328ed1b25d8ee
diff --git a/include/osmocom/abis/e1_input.h b/include/osmocom/abis/e1_input.h
index b317ed9..acbc110 100644
--- a/include/osmocom/abis/e1_input.h
+++ b/include/osmocom/abis/e1_input.h
@@ -146,7 +146,7 @@
 	void *driver_data;
 };
 
-/* SS_INPUT signals */
+/* SS_L_INPUT signals */
 enum signal_input {
 	S_INP_NONE,
 	S_INP_TEI_UP,
diff --git a/src/e1_input.c b/src/e1_input.c
index 9c2dcb7..1b08ed7 100644
--- a/src/e1_input.c
+++ b/src/e1_input.c
@@ -211,7 +211,7 @@
 
 	/* don't know how to route this message. */
 	if (sign_link == NULL) {
-		LOGP(DRSL, LOGL_ERROR, "abis_sendmsg: msg->dst == NULL: %s\n",
+		LOGP(DLRSL, LOGL_ERROR, "abis_sendmsg: msg->dst == NULL: %s\n",
 			osmo_hexdump(msg->data, msg->len));
 		talloc_free(msg);
 		return -EINVAL;
@@ -290,14 +290,14 @@
 
 	line = e1inp_line_find(e1_nr);
 	if (line) {
-		LOGP(DINP, LOGL_ERROR, "E1 Line %u already exists\n",
+		LOGP(DLINP, LOGL_ERROR, "E1 Line %u already exists\n",
 		     e1_nr);
 		return NULL;
 	}
 
 	driver = e1inp_driver_find(driver_name);
 	if (!driver) {
-		LOGP(DINP, LOGL_ERROR, "No such E1 driver '%s'\n",
+		LOGP(DLINP, LOGL_ERROR, "No such E1 driver '%s'\n",
 		     driver_name);
 		return NULL;
 	}
@@ -474,12 +474,12 @@
 		write_pcap_packet(PCAP_INPUT, sapi, tei, msg);
 		link = e1inp_lookup_sign_link(ts, tei, sapi);
 		if (!link) {
-			LOGP(DMI, LOGL_ERROR, "didn't find signalling link for "
+			LOGP(DLMI, LOGL_ERROR, "didn't find signalling link for "
 				"tei %d, sapi %d\n", tei, sapi);
 			return -EINVAL;
 		}
 		if (!ts->line->ops->sign_link) {
-	                LOGP(DINP, LOGL_ERROR, "Fix your application, "
+	                LOGP(DLINP, LOGL_ERROR, "Fix your application, "
 				"no action set for signalling messages.\n");
 			return -ENOENT;
 		}
@@ -491,7 +491,7 @@
 		break;
 	default:
 		ret = -EINVAL;
-		LOGP(DMI, LOGL_ERROR, "unknown TS type %u\n", ts->type);
+		LOGP(DLMI, LOGL_ERROR, "unknown TS type %u\n", ts->type);
 		break;
 	}
 
@@ -528,7 +528,7 @@
 		msgb_put(msg, 40);
 		break;
 	default:
-		LOGP(DMI, LOGL_ERROR, "unsupported E1 TS type %u\n", e1i_ts->type);
+		LOGP(DLMI, LOGL_ERROR, "unsupported E1 TS type %u\n", e1i_ts->type);
 		return NULL;
 	}
 	return msg;
@@ -550,7 +550,7 @@
 	isd.sapi = sapi;
 
 	/* report further upwards */
-	osmo_signal_dispatch(SS_INPUT, evt, &isd);
+	osmo_signal_dispatch(SS_L_INPUT, evt, &isd);
 	return 0;
 }
 
@@ -593,7 +593,7 @@
 	 * configured */
 	memset(&isd, 0, sizeof(isd));
 	isd.line = line;
-	osmo_signal_dispatch(SS_INPUT, S_INP_LINE_INIT, &isd);
+	osmo_signal_dispatch(SS_L_INPUT, S_INP_LINE_INIT, &isd);
 
 	return rc;
 }
@@ -601,8 +601,8 @@
 static int e1i_sig_cb(unsigned int subsys, unsigned int signal,
 		      void *handler_data, void *signal_data)
 {
-	if (subsys != SS_GLOBAL ||
-	    signal != S_GLOBAL_SHUTDOWN)
+	if (subsys != SS_L_GLOBAL ||
+	    signal != S_L_GLOBAL_SHUTDOWN)
 		return 0;
 
 	if (pcap_fd) {
@@ -623,7 +623,7 @@
 	tall_e1inp_ctx = talloc_named_const(libosmo_abis_ctx, 1, "e1inp");
 	tall_sigl_ctx = talloc_named_const(tall_e1inp_ctx, 1,
 					   "e1inp_sign_link");
-	osmo_signal_register_handler(SS_GLOBAL, e1i_sig_cb, NULL);
+	osmo_signal_register_handler(SS_L_GLOBAL, e1i_sig_cb, NULL);
 
 	e1inp_misdn_init();
 #ifdef HAVE_DAHDI_USER_H
diff --git a/src/e1_input_vty.c b/src/e1_input_vty.c
index be51a16..d832cc5 100644
--- a/src/e1_input_vty.c
+++ b/src/e1_input_vty.c
@@ -65,7 +65,7 @@
 	"e1_input",
 	"Configure E1/T1/J1 TDM input\n")
 {
-	vty->node = E1INP_NODE;
+	vty->node = L_E1INP_NODE;
 
 	return CMD_SUCCESS;
 }
@@ -87,7 +87,7 @@
 }
 
 struct cmd_node e1inp_node = {
-	E1INP_NODE,
+	L_E1INP_NODE,
 	"%s(e1_input)#",
 	1,
 };
@@ -96,7 +96,7 @@
 {
 	install_element(CONFIG_NODE, &cfg_e1inp_cmd);
 	install_node(&e1inp_node, e1inp_config_write);
-	install_element(E1INP_NODE, &cfg_e1_line_driver_cmd);
+	install_element(L_E1INP_NODE, &cfg_e1_line_driver_cmd);
 
 	return 0;
 }
diff --git a/src/input/dahdi.c b/src/input/dahdi.c
index 4ad32af..f0d12b7 100644
--- a/src/input/dahdi.c
+++ b/src/input/dahdi.c
@@ -67,7 +67,7 @@
 	if (rc < 0)
 		return;
 
-	LOGP(DMI, LOGL_NOTICE, "Line %u(%s) / TS %u DAHDI EVENT %s\n",
+	LOGP(DLMI, LOGL_NOTICE, "Line %u(%s) / TS %u DAHDI EVENT %s\n",
 		ts->line->num, ts->line->name, ts->num,
 		get_value_string(dahdi_evt_names, evt));
 
@@ -76,11 +76,11 @@
 	switch (evt) {
 	case DAHDI_EVENT_ALARM:
 		/* we should notify the code that the line is gone */
-		osmo_signal_dispatch(SS_INPUT, S_INP_LINE_ALARM, &isd);
+		osmo_signal_dispatch(SS_L_INPUT, S_INP_LINE_ALARM, &isd);
 		break;
 	case DAHDI_EVENT_NOALARM:
 		/* alarm has gone, we should re-start the SABM requests */
-		osmo_signal_dispatch(SS_INPUT, S_INP_LINE_NOALARM, &isd);
+		osmo_signal_dispatch(SS_L_INPUT, S_INP_LINE_NOALARM, &isd);
 		break;
 	}
 }
@@ -113,7 +113,7 @@
 	sapi = msg->data[0] >> 2;
 	tei = msg->data[1] >> 1;
 
-	DEBUGP(DMI, "<= len = %d, sapi(%d) tei(%d)", ret, sapi, tei);
+	DEBUGP(DLMI, "<= len = %d, sapi(%d) tei(%d)", ret, sapi, tei);
 
 	idata = lapd_receive(e1i_ts->driver.dahdi.lapd, msg->data, msg->len, &ilen, &prim);
 	if (!idata && prim == 0)
@@ -121,17 +121,17 @@
 
 	msgb_pull(msg, 2);
 
-	DEBUGP(DMI, "prim %08x\n", prim);
+	DEBUGP(DLMI, "prim %08x\n", prim);
 
 	switch (prim) {
 	case 0:
 		break;
 	case LAPD_MPH_ACTIVATE_IND:
-		DEBUGP(DMI, "MPH_ACTIVATE_IND: sapi(%d) tei(%d)\n", sapi, tei);
+		DEBUGP(DLMI, "MPH_ACTIVATE_IND: sapi(%d) tei(%d)\n", sapi, tei);
 		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);
+		DEBUGP(DLMI, "MPH_DEACTIVATE_IND: sapi(%d) tei(%d)\n", sapi, tei);
 		ret = e1inp_event(e1i_ts, S_INP_TEI_DN, tei, sapi);
 		break;
 	case LAPD_DL_DATA_IND:
@@ -140,7 +140,7 @@
 			msg->l2h = msg->data + 2;
 		else
 			msg->l2h = msg->data + 1;
-		DEBUGP(DMI, "RX: %s\n", osmo_hexdump(msgb_l2(msg), ret));
+		DEBUGP(DLMI, "RX: %s\n", osmo_hexdump(msgb_l2(msg), ret));
 		ret = e1inp_rx_ts(e1i_ts, msg, tei, sapi);
 		break;
 	default:
@@ -148,7 +148,7 @@
 		break;
 	}
 
-	DEBUGP(DMI, "Returned ok\n");
+	DEBUGP(DLMI, "Returned ok\n");
 	return ret;
 }
 
@@ -187,7 +187,7 @@
 	if (ret == -1)
 		handle_dahdi_exception(e1i_ts);
 	else if (ret < 0)
-		LOGP(DMI, LOGL_NOTICE, "%s write failed %d\n", __func__, ret);
+		LOGP(DLMI, LOGL_NOTICE, "%s write failed %d\n", __func__, ret);
 }
 
 static int handle_ts1_write(struct osmo_fd *bfd)
@@ -207,7 +207,7 @@
 		return 0;
 	}
 
-	DEBUGP(DMI, "TX: %s\n", osmo_hexdump(msg->data, msg->len));
+	DEBUGP(DLMI, "TX: %s\n", osmo_hexdump(msg->data, msg->len));
 	lapd_transmit(e1i_ts->driver.dahdi.lapd, sign_link->tei,
 		      sign_link->sapi, msg->data, msg->len);
 	msgb_free(msg);
@@ -269,7 +269,7 @@
 			return ret;
 	}
 
-	DEBUGP(DMIB, "BCHAN TX: %s\n",
+	DEBUGP(DLMIB, "BCHAN TX: %s\n",
 		osmo_hexdump(tx_buf, D_BCHAN_TX_GRAN));
 
 	if (invertbits) {
@@ -310,7 +310,7 @@
 	msgb_put(msg, ret);
 
 	msg->l2h = msg->data;
-	DEBUGP(DMIB, "BCHAN RX: %s\n",
+	DEBUGP(DLMIB, "BCHAN RX: %s\n",
 		osmo_hexdump(msgb_l2(msg), ret));
 	ret = e1inp_rx_ts(e1i_ts, msg, 0, 0);
 	/* physical layer indicates that data has been sent,
diff --git a/src/input/hsl.c b/src/input/hsl.c
index 8f2bf73..98fd40f 100644
--- a/src/input/hsl.c
+++ b/src/input/hsl.c
@@ -108,7 +108,7 @@
 		unit_data.serno = strtoul(serno_buf, NULL, 10);
 
 		if (!line->ops->sign_link_up) {
-			LOGP(DINP, LOGL_ERROR,
+			LOGP(DLINP, LOGL_ERROR,
 			     "Unable to set signal link, closing socket.\n");
 			osmo_fd_unregister(bfd);
 			close(bfd->fd);
@@ -118,7 +118,7 @@
 		sign_link = line->ops->sign_link_up(&unit_data,
 						    line, E1INP_SIGN_NONE);
 		if (sign_link == NULL) {
-			LOGP(DINP, LOGL_ERROR,
+			LOGP(DLINP, LOGL_ERROR,
 			     "Unable to set signal link, closing socket.\n");
 			osmo_fd_unregister(bfd);
 			close(bfd->fd);
@@ -151,14 +151,14 @@
 		return error;
 	else if (error == 0) {
 		hsl_drop(e1i_ts->line, bfd);
-		LOGP(DINP, LOGL_NOTICE, "Sign link vanished, dead socket\n");
+		LOGP(DLINP, LOGL_NOTICE, "Sign link vanished, dead socket\n");
 		return error;
 	}
-	DEBUGP(DMI, "RX %u: %s\n", ts_nr, osmo_hexdump(msgb_l2(msg), msgb_l2len(msg)));
+	DEBUGP(DLMI, "RX %u: %s\n", ts_nr, osmo_hexdump(msgb_l2(msg), msgb_l2len(msg)));
 
 	hh = (struct ipaccess_head *) msg->data;
 	if (hh->proto == HSL_PROTO_DEBUG) {
-		LOGP(DINP, LOGL_NOTICE, "HSL debug: %s\n", msg->data + sizeof(*hh));
+		LOGP(DLINP, LOGL_NOTICE, "HSL debug: %s\n", msg->data + sizeof(*hh));
 		msgb_free(msg);
 		return ret;
 	}
@@ -181,7 +181,7 @@
 #endif
 	link = e1inp_lookup_sign_link(e1i_ts, hh->proto, 0);
 	if (!link) {
-		LOGP(DINP, LOGL_ERROR, "no matching signalling link for "
+		LOGP(DLINP, LOGL_ERROR, "no matching signalling link for "
 			"hh->proto=0x%02x\n", hh->proto);
 		msgb_free(msg);
 		return -EIO;
@@ -190,7 +190,7 @@
 
 	/* XXX: better use e1inp_ts_rx? */
 	if (!e1i_ts->line->ops->sign_link) {
-		LOGP(DINP, LOGL_ERROR, "Fix your application, "
+		LOGP(DLINP, LOGL_ERROR, "Fix your application, "
 			"no action set for signalling messages.\n");
 		return -ENOENT;
 	}
@@ -253,7 +253,7 @@
 	msg->l2h = msg->data;
 	ipaccess_prepend_header(msg, sign_link->tei);
 
-	DEBUGP(DMI, "TX %u: %s\n", ts_nr, osmo_hexdump(msg->l2h, msgb_l2len(msg)));
+	DEBUGP(DLMI, "TX %u: %s\n", ts_nr, osmo_hexdump(msg->l2h, msgb_l2len(msg)));
 
 	ret = send(bfd->fd, msg->data, msg->len, 0);
 	msgb_free(msg);
@@ -302,7 +302,7 @@
 		if (what & BSC_FD_WRITE)
 			rc = handle_ts1_write(bfd);
 	} else
-		LOGP(DINP, LOGL_ERROR, "unknown E1 TS type %u\n", e1i_ts->type);
+		LOGP(DLINP, LOGL_ERROR, "unknown E1 TS type %u\n", e1i_ts->type);
 
 	return rc;
 }
@@ -351,13 +351,13 @@
 		perror("accept");
 		return ret;
 	}
-	LOGP(DINP, LOGL_NOTICE, "accept()ed new HSL link from %s\n",
+	LOGP(DLINP, LOGL_NOTICE, "accept()ed new HSL link from %s\n",
 		inet_ntoa(sa.sin_addr));
 
 	/* clone virtual E1 line for this new signalling link. */
 	line = e1inp_line_clone(tall_hsl_ctx, listen_bfd->data);
 	if (line == NULL) {
-		LOGP(DINP, LOGL_ERROR, "could not clone E1 line\n");
+		LOGP(DLINP, LOGL_ERROR, "could not clone E1 line\n");
 		return -1;
 	}
 	/* create virrtual E1 timeslots for signalling */
@@ -377,7 +377,7 @@
 	bfd->when = BSC_FD_READ;
 	ret = osmo_fd_register(bfd);
 	if (ret < 0) {
-		LOGP(DINP, LOGL_ERROR, "could not register FD\n");
+		LOGP(DLINP, LOGL_ERROR, "could not register FD\n");
 		close(bfd->fd);
 		e1inp_line_put(line);
 		return ret;
@@ -394,14 +394,14 @@
 
 	hh = (struct ipaccess_head *) msg->data;
 	if (hh->proto == HSL_PROTO_DEBUG) {
-		LOGP(DINP, LOGL_NOTICE, "HSL debug: %s\n",
+		LOGP(DLINP, LOGL_NOTICE, "HSL debug: %s\n",
 						msg->data + sizeof(*hh));
 		msgb_free(msg);
 		return 0;
 	}
 	sign_link = e1inp_lookup_sign_link(e1i_ts, hh->proto, 0);
 	if (!sign_link) {
-		LOGP(DINP, LOGL_ERROR, "no matching signalling link for "
+		LOGP(DLINP, LOGL_ERROR, "no matching signalling link for "
 			"hh->proto=0x%02x\n", hh->proto);
 		msgb_free(msg);
 		return -EIO;
@@ -410,7 +410,7 @@
 
 	/* XXX better use e1inp_ts_rx? */
 	if (!link->line->ops->sign_link) {
-		LOGP(DINP, LOGL_ERROR, "Fix your application, "
+		LOGP(DLINP, LOGL_ERROR, "Fix your application, "
 			"no action set for signalling messages.\n");
 		return -ENOENT;
 	}
@@ -443,7 +443,7 @@
 
 	/* ... and enable the signalling link. */
 	if (!link->line->ops->sign_link_up) {
-		LOGP(DINP, LOGL_ERROR,
+		LOGP(DLINP, LOGL_ERROR,
 			"Unable to set signal link, closing socket.\n");
 		ipa_client_link_close(link);
 		return -EINVAL;
@@ -451,7 +451,7 @@
 	sign_link = link->line->ops->sign_link_up(&unit,
 						  link->line, E1INP_SIGN_NONE);
 	if (sign_link == NULL) {
-		LOGP(DINP, LOGL_ERROR,
+		LOGP(DLINP, LOGL_ERROR,
 		     "Unable to set signal link, closing socket.\n");
 		ipa_client_link_close(link);
 		return -EINVAL;
@@ -466,7 +466,7 @@
 
 	switch(role) {
 	case E1INP_LINE_R_BSC:
-		LOGP(DINP, LOGL_NOTICE, "enabling hsl BSC mode\n");
+		LOGP(DLINP, LOGL_NOTICE, "enabling hsl BSC mode\n");
 
 		ret = osmo_sock_init(AF_INET, SOCK_STREAM, IPPROTO_TCP,
 				     addr, HSL_TCP_PORT, OSMO_SOCK_F_BIND);
@@ -486,7 +486,7 @@
 	case E1INP_LINE_R_BTS: {
 		struct ipa_client_link *link;
 
-		LOGP(DINP, LOGL_NOTICE, "enabling hsl BTS mode\n");
+		LOGP(DLINP, LOGL_NOTICE, "enabling hsl BTS mode\n");
 
 		link = ipa_client_link_create(tall_hsl_ctx,
 					      &line->ts[E1INP_SIGN_OML-1],
@@ -497,12 +497,12 @@
 					      hsl_bts_write,
 					      NULL);
 		if (link == NULL) {
-			LOGP(DINP, LOGL_ERROR, "cannot create BTS link: %s\n",
+			LOGP(DLINP, LOGL_ERROR, "cannot create BTS link: %s\n",
 				strerror(errno));
 			return -ENOMEM;
 		}
 		if (ipa_client_link_open(link) < 0) {
-			LOGP(DINP, LOGL_ERROR, "cannot open BTS link: %s\n",
+			LOGP(DLINP, LOGL_ERROR, "cannot open BTS link: %s\n",
 				strerror(errno));
 			ipa_client_link_close(link);
 			ipa_client_link_destroy(link);
diff --git a/src/input/ipa.c b/src/input/ipa.c
index dd740bf..9b380b0 100644
--- a/src/input/ipa.c
+++ b/src/input/ipa.c
@@ -94,9 +94,9 @@
 
 static void ipa_client_retry(struct ipa_client_link *link)
 {
-	LOGP(DINP, LOGL_NOTICE, "connection closed\n");
+	LOGP(DLINP, LOGL_NOTICE, "connection closed\n");
 	ipa_client_link_close(link);
-	LOGP(DINP, LOGL_NOTICE, "retrying in 5 seconds...\n");
+	LOGP(DLINP, LOGL_NOTICE, "retrying in 5 seconds...\n");
 	osmo_timer_schedule(&link->timer, 5, 0);
 	link->state = IPA_CLIENT_LINK_STATE_CONNECTING;
 }
@@ -113,19 +113,19 @@
 	struct msgb *msg;
 	int ret;
 
-	LOGP(DINP, LOGL_NOTICE, "message received\n");
+	LOGP(DLINP, LOGL_NOTICE, "message received\n");
 
 	ret = ipa_msg_recv(ofd->fd, &msg);
 	if (ret < 0) {
 		if (errno == EPIPE || errno == ECONNRESET) {
-			LOGP(DINP, LOGL_ERROR, "lost connection with server\n");
+			LOGP(DLINP, LOGL_ERROR, "lost connection with server\n");
 		} else {
-			LOGP(DINP, LOGL_ERROR, "unknown error\n");
+			LOGP(DLINP, LOGL_ERROR, "unknown error\n");
 		}
 		ipa_client_retry(link);
 		return;
 	} else if (ret == 0) {
-		LOGP(DINP, LOGL_ERROR, "connection closed with server\n");
+		LOGP(DLINP, LOGL_ERROR, "connection closed with server\n");
 		ipa_client_retry(link);
 		return;
 	}
@@ -146,7 +146,7 @@
 	struct llist_head *lh;
 	int ret;
 
-	LOGP(DINP, LOGL_NOTICE, "sending data\n");
+	LOGP(DLINP, LOGL_NOTICE, "sending data\n");
 
 	if (llist_empty(&link->tx_queue)) {
 		ofd->when &= ~BSC_FD_WRITE;
@@ -161,7 +161,7 @@
 		if (errno == EPIPE || errno == ENOTCONN) {
 			ipa_client_retry(link);
 		}
-		LOGP(DINP, LOGL_ERROR, "error to send\n");
+		LOGP(DLINP, LOGL_ERROR, "error to send\n");
 	}
 	msgb_free(msg);
 	return 0;
@@ -181,18 +181,18 @@
 			return 0;
 		}
 		ofd->when &= ~BSC_FD_WRITE;
-		LOGP(DINP, LOGL_NOTICE, "connection done.\n");
+		LOGP(DLINP, LOGL_NOTICE, "connection done.\n");
 		link->state = IPA_CLIENT_LINK_STATE_CONNECTED;
 		if (link->connect_cb)
 			link->connect_cb(link);
 		break;
 	case IPA_CLIENT_LINK_STATE_CONNECTED:
 		if (what & BSC_FD_READ) {
-			LOGP(DINP, LOGL_NOTICE, "connected read\n");
+			LOGP(DLINP, LOGL_NOTICE, "connected read\n");
 			ipa_client_read(link);
 		}
 		if (what & BSC_FD_WRITE) {
-			LOGP(DINP, LOGL_NOTICE, "connected write\n");
+			LOGP(DLINP, LOGL_NOTICE, "connected write\n");
 			ipa_client_write(link);
 		}
 		break;
@@ -284,7 +284,7 @@
 {
 	struct ipa_client_link *link = data;
 
-	LOGP(DINP, LOGL_NOTICE, "reconnecting.\n");
+	LOGP(DLINP, LOGL_NOTICE, "reconnecting.\n");
 
 	switch(link->state) {
 	case IPA_CLIENT_LINK_STATE_CONNECTING:
@@ -310,11 +310,11 @@
 
 	ret = accept(ofd->fd, (struct sockaddr *)&sa, &sa_len);
 	if (ret < 0) {
-		LOGP(DINP, LOGL_ERROR, "failed to accept from origin "
+		LOGP(DLINP, LOGL_ERROR, "failed to accept from origin "
 			"peer, reason=`%s'\n", strerror(errno));
 		return ret;
 	}
-	LOGP(DINP, LOGL_NOTICE, "accept()ed new link from %s to port %u\n",
+	LOGP(DLINP, LOGL_NOTICE, "accept()ed new link from %s to port %u\n",
 		inet_ntoa(sa.sin_addr), link->port);
 
 	if (link->accept_cb)
@@ -382,18 +382,18 @@
 	struct msgb *msg;
 	int ret;
 
-	LOGP(DINP, LOGL_NOTICE, "message received\n");
+	LOGP(DLINP, LOGL_NOTICE, "message received\n");
 
 	ret = ipa_msg_recv(ofd->fd, &msg);
 	if (ret < 0) {
 		if (errno == EPIPE || errno == ECONNRESET) {
-			LOGP(DINP, LOGL_ERROR, "lost connection with server\n");
+			LOGP(DLINP, LOGL_ERROR, "lost connection with server\n");
 		} else {
-			LOGP(DINP, LOGL_ERROR, "unknown error\n");
+			LOGP(DLINP, LOGL_ERROR, "unknown error\n");
 		}
 		return;
 	} else if (ret == 0) {
-		LOGP(DINP, LOGL_ERROR, "connection closed with server\n");
+		LOGP(DLINP, LOGL_ERROR, "connection closed with server\n");
 		ipa_server_peer_destroy(peer);
 		return;
 	}
@@ -410,7 +410,7 @@
 	struct llist_head *lh;
 	int ret;
 
-	LOGP(DINP, LOGL_NOTICE, "sending data\n");
+	LOGP(DLINP, LOGL_NOTICE, "sending data\n");
 
 	if (llist_empty(&peer->tx_queue)) {
 		ofd->when &= ~BSC_FD_WRITE;
@@ -422,7 +422,7 @@
 
 	ret = send(peer->ofd.fd, msg->data, msg->len, 0);
 	if (ret < 0) {
-		LOGP(DINP, LOGL_ERROR, "error to send\n");
+		LOGP(DLINP, LOGL_ERROR, "error to send\n");
 	}
 	msgb_free(msg);
 }
@@ -431,7 +431,7 @@
 {
 	struct ipa_server_peer *peer = ofd->data;
 
-	LOGP(DINP, LOGL_NOTICE, "connected read/write\n");
+	LOGP(DLINP, LOGL_NOTICE, "connected read/write\n");
 	if (what & BSC_FD_READ)
 		ipa_server_peer_read(peer);
 	if (what & BSC_FD_WRITE)
@@ -449,7 +449,7 @@
 
 	peer = talloc_zero(ctx, struct ipa_server_peer);
 	if (peer == NULL) {
-		LOGP(DINP, LOGL_ERROR, "cannot allocate new peer in server, "
+		LOGP(DLINP, LOGL_ERROR, "cannot allocate new peer in server, "
 			"reason=`%s'\n", strerror(errno));
 		return NULL;
 	}
@@ -463,7 +463,7 @@
 	INIT_LLIST_HEAD(&peer->tx_queue);
 
 	if (osmo_fd_register(&peer->ofd) < 0) {
-		LOGP(DINP, LOGL_ERROR, "could not register FD\n");
+		LOGP(DLINP, LOGL_ERROR, "could not register FD\n");
 		talloc_free(peer);
 		return NULL;
 	}
diff --git a/src/input/ipaccess.c b/src/input/ipaccess.c
index 6d55132..07c8607 100644
--- a/src/input/ipaccess.c
+++ b/src/input/ipaccess.c
@@ -109,11 +109,11 @@
 		t_tag = *cur++;
 
 		if (t_len > len + 1) {
-			LOGP(DMI, LOGL_ERROR, "The tag does not fit: %d\n", t_len);
+			LOGP(DLMI, LOGL_ERROR, "The tag does not fit: %d\n", t_len);
 			return -EINVAL;
 		}
 
-		DEBUGPC(DMI, "%s='%s' ", ipaccess_idtag_name(t_tag), cur);
+		DEBUGPC(DLMI, "%s='%s' ", ipaccess_idtag_name(t_tag), cur);
 
 		dec->lv[t_tag].len = t_len;
 		dec->lv[t_tag].val = cur;
@@ -165,7 +165,7 @@
 	if (ret < 0)
 		return ret;
 	if (ret < msglen) {
-		LOGP(DINP, LOGL_ERROR, "ipaccess_send: short write\n");
+		LOGP(DLINP, LOGL_ERROR, "ipaccess_send: short write\n");
 		return -EIO;
 	}
 	return ret;
@@ -199,11 +199,11 @@
 		ret = ipaccess_send_pong(bfd->fd);
 		break;
 	case IPAC_MSGT_PONG:
-		DEBUGP(DMI, "PONG!\n");
+		DEBUGP(DLMI, "PONG!\n");
 		ipa_ccm = true;
 		break;
 	case IPAC_MSGT_ID_ACK:
-		DEBUGP(DMI, "ID_ACK? -> ACK!\n");
+		DEBUGP(DLMI, "ID_ACK? -> ACK!\n");
 		ipa_ccm = true;
 		ret = ipaccess_send_id_ack(bfd->fd);
 		break;
@@ -223,10 +223,10 @@
 		ret = ipaccess_send_pong(bfd->fd);
 		break;
 	case IPAC_MSGT_PONG:
-		DEBUGP(DMI, "PONG!\n");
+		DEBUGP(DLMI, "PONG!\n");
 		break;
 	case IPAC_MSGT_ID_ACK:
-		DEBUGP(DMI, "ID_ACK\n");
+		DEBUGP(DLMI, "ID_ACK\n");
 		break;
 	}
 	return 0;
@@ -242,7 +242,7 @@
 
 	/* Error case: we did not see any ID_RESP yet for this socket. */
 	if (bfd->fd != -1) {
-		LOGP(DINP, LOGL_ERROR, "Forcing socket shutdown with "
+		LOGP(DLINP, LOGL_ERROR, "Forcing socket shutdown with "
 					"no signal link set\n");
 		osmo_fd_unregister(bfd);
 		close(bfd->fd);
@@ -271,19 +271,19 @@
 
 	switch (msg_type) {
 	case IPAC_MSGT_ID_RESP:
-		DEBUGP(DMI, "ID_RESP\n");
+		DEBUGP(DLMI, "ID_RESP\n");
 		/* parse tags, search for Unit ID */
 		ret = ipaccess_idtag_parse(&tlvp, (uint8_t *)msg->l2h + 2,
 						msgb_l2len(msg)-2);
-		DEBUGP(DMI, "\n");
+		DEBUGP(DLMI, "\n");
 		if (ret < 0) {
-			LOGP(DINP, LOGL_ERROR, "IPA response message "
+			LOGP(DLINP, LOGL_ERROR, "IPA response message "
 				"with malformed TLVs\n");
 			ret = -EINVAL;
 			goto err;
 		}
 		if (!TLVP_PRESENT(&tlvp, IPAC_IDTAG_UNIT)) {
-			LOGP(DINP, LOGL_ERROR, "IPA response message "
+			LOGP(DLINP, LOGL_ERROR, "IPA response message "
 				"without unit ID\n");
 			ret = -EINVAL;
 			goto err;
@@ -291,7 +291,7 @@
 		}
 		len = TLVP_LEN(&tlvp, IPAC_IDTAG_UNIT);
 		if (len < 1) {
-			LOGP(DINP, LOGL_ERROR, "IPA response message "
+			LOGP(DLINP, LOGL_ERROR, "IPA response message "
 				"with too small unit ID\n");
 			ret = -EINVAL;
 			goto err;
@@ -301,7 +301,7 @@
 		ipaccess_parse_unitid(unitid, &unit_data);
 
 		if (!line->ops->sign_link_up) {
-			LOGP(DINP, LOGL_ERROR,
+			LOGP(DLINP, LOGL_ERROR,
 			     "Unable to set signal link, closing socket.\n");
 			ret = -EINVAL;
 			goto err;
@@ -312,7 +312,7 @@
 				line->ops->sign_link_up(&unit_data, line,
 							E1INP_SIGN_OML);
 			if (sign_link == NULL) {
-				LOGP(DINP, LOGL_ERROR,
+				LOGP(DLINP, LOGL_ERROR,
 					"Unable to set signal link, "
 					"closing socket.\n");
 				ret = -EINVAL;
@@ -327,7 +327,7 @@
 				line->ops->sign_link_up(&unit_data, line,
 							E1INP_SIGN_RSL);
 			if (sign_link == NULL) {
-				LOGP(DINP, LOGL_ERROR,
+				LOGP(DLINP, LOGL_ERROR,
 					"Unable to set signal link, "
 					"closing socket.\n");
 				ret = -EINVAL;
@@ -336,7 +336,7 @@
 			/* this is a bugtrap, the BSC should be using the
 			 * virtual E1 line used by OML for this RSL link. */
 			if (sign_link->ts->line == line) {
-				LOGP(DINP, LOGL_ERROR,
+				LOGP(DLINP, LOGL_ERROR,
 					"Fix your BSC, you should use the "
 					"E1 line used by the OML link for "
 					"your RSL link.\n");
@@ -360,7 +360,7 @@
 		}
 		break;
 	default:
-		LOGP(DINP, LOGL_ERROR, "Unknown IPA message type\n");
+		LOGP(DLINP, LOGL_ERROR, "Unknown IPA message type\n");
 		ret = -EINVAL;
 		goto err;
 	}
@@ -388,12 +388,12 @@
 		return error;
 	else if (error == 0) {
 		if (ipaccess_drop(bfd) >= 0) {
-			LOGP(DINP, LOGL_NOTICE, "Sign link vanished, "
+			LOGP(DLINP, LOGL_NOTICE, "Sign link vanished, "
 						"dead socket\n");
 		}
 		return error;
 	}
-	DEBUGP(DMI, "RX %u: %s\n", ts_nr, osmo_hexdump(msgb_l2(msg), msgb_l2len(msg)));
+	DEBUGP(DLMI, "RX %u: %s\n", ts_nr, osmo_hexdump(msgb_l2(msg), msgb_l2len(msg)));
 
 	hh = (struct ipaccess_head *) msg->data;
 	if (hh->proto == IPAC_PROTO_IPACCESS) {
@@ -406,7 +406,7 @@
 
 	link = e1inp_lookup_sign_link(e1i_ts, hh->proto, 0);
 	if (!link) {
-		LOGP(DINP, LOGL_ERROR, "no matching signalling link for "
+		LOGP(DLINP, LOGL_ERROR, "no matching signalling link for "
 			"hh->proto=0x%02x\n", hh->proto);
 		msgb_free(msg);
 		return -EIO;
@@ -415,13 +415,13 @@
 
 	/* XXX better use e1inp_ts_rx? */
 	if (!e1i_ts->line->ops->sign_link) {
-		LOGP(DINP, LOGL_ERROR, "Fix your application, "
+		LOGP(DLINP, LOGL_ERROR, "Fix your application, "
 			"no action set for signalling messages.\n");
 		ret = -EINVAL;
 		goto err;
 	}
 	if (e1i_ts->line->ops->sign_link(msg) < 0) {
-		LOGP(DINP, LOGL_ERROR, "Bad signalling message,"
+		LOGP(DLINP, LOGL_ERROR, "Bad signalling message,"
 				       "closing socket.\n");
 		ret = -EINVAL;
 		goto err;
@@ -513,7 +513,7 @@
 	msg->l2h = msg->data;
 	ipaccess_prepend_header(msg, sign_link->tei);
 
-	DEBUGP(DMI, "TX %u: %s\n", ts_nr, osmo_hexdump(msg->l2h, msgb_l2len(msg)));
+	DEBUGP(DLMI, "TX %u: %s\n", ts_nr, osmo_hexdump(msg->l2h, msgb_l2len(msg)));
 
 	ret = send(bfd->fd, msg->data, msg->len, 0);
 	msgb_free(msg);
@@ -579,7 +579,7 @@
 	/* clone virtual E1 line for this new OML link. */
 	line = e1inp_line_clone(tall_ipa_ctx, link->line);
 	if (line == NULL) {
-		LOGP(DINP, LOGL_ERROR, "could not clone E1 line\n");
+		LOGP(DLINP, LOGL_ERROR, "could not clone E1 line\n");
 		return -1;
 	}
 
@@ -600,7 +600,7 @@
 	bfd->when = BSC_FD_READ;
 	ret = osmo_fd_register(bfd);
 	if (ret < 0) {
-		LOGP(DINP, LOGL_ERROR, "could not register FD\n");
+		LOGP(DLINP, LOGL_ERROR, "could not register FD\n");
 		close(bfd->fd);
 		e1inp_line_put(line);
 		return ret;
@@ -623,7 +623,7 @@
          * allocate a temporary E1 line until we have received ID. */
 	line = e1inp_line_clone(tall_ipa_ctx, link->line);
 	if (line == NULL) {
-		LOGP(DINP, LOGL_ERROR, "could not clone E1 line\n");
+		LOGP(DLINP, LOGL_ERROR, "could not clone E1 line\n");
 		return -1;
 	}
 	/* initialize the fds */
@@ -644,7 +644,7 @@
 	bfd->when = BSC_FD_READ;
 	ret = osmo_fd_register(bfd);
 	if (ret < 0) {
-		LOGP(DINP, LOGL_ERROR, "could not register FD\n");
+		LOGP(DLINP, LOGL_ERROR, "could not register FD\n");
 		close(bfd->fd);
 		e1inp_line_put(line);
 		return ret;
@@ -669,7 +669,7 @@
 	*msgb_put(nmsg, 1) = IPAC_MSGT_ID_RESP;
 	while (len) {
 		if (len < 2) {
-			LOGP(DINP, LOGL_NOTICE,
+			LOGP(DLINP, LOGL_NOTICE,
 				"Short read of ipaccess tag\n");
 			msgb_free(nmsg);
 			return NULL;
@@ -708,12 +708,12 @@
 			strcpy(str, dev->serno);
 			break;
 		default:
-			LOGP(DINP, LOGL_NOTICE,
+			LOGP(DLINP, LOGL_NOTICE,
 				"Unknown ipaccess tag 0x%02x\n", *data);
 			msgb_free(nmsg);
 			return NULL;
 		}
-		LOGP(DINP, LOGL_INFO, " tag %d: %s\n", data[1], str);
+		LOGP(DLINP, LOGL_INFO, " tag %d: %s\n", data[1], str);
 		tag = msgb_put(nmsg, 3 + strlen(str) + 1);
 		tag[0] = 0x00;
 		tag[1] = 1 + strlen(str) + 1;
@@ -760,9 +760,9 @@
 			uint8_t *data = msgb_l2(msg);
 			int len = msgb_l2len(msg);
 
-			LOGP(DINP, LOGL_NOTICE, "received ID get\n");
+			LOGP(DLINP, LOGL_NOTICE, "received ID get\n");
 			if (!link->line->ops->sign_link_up) {
-				LOGP(DINP, LOGL_ERROR,
+				LOGP(DLINP, LOGL_ERROR,
 					"Unable to set signal link, "
 					"closing socket.\n");
 				osmo_fd_unregister(link->ofd);
@@ -774,7 +774,7 @@
 					link->line,
 					link->ofd->priv_nr);
 			if (sign_link == NULL) {
-				LOGP(DINP, LOGL_ERROR,
+				LOGP(DLINP, LOGL_ERROR,
 					"Unable to set signal link, "
 					"closing socket.\n");
 				osmo_fd_unregister(link->ofd);
@@ -801,7 +801,7 @@
 	/* look up for some existing signaling link. */
 	sign_link = e1inp_lookup_sign_link(e1i_ts, hh->proto, 0);
 	if (sign_link == NULL) {
-		LOGP(DINP, LOGL_ERROR, "no matching signalling link for "
+		LOGP(DLINP, LOGL_ERROR, "no matching signalling link for "
 			"hh->proto=0x%02x\n", hh->proto);
 		msgb_free(msg);
 		return -EIO;
@@ -810,7 +810,7 @@
 
 	/* XXX better use e1inp_ts_rx? */
 	if (!link->line->ops->sign_link) {
-		LOGP(DINP, LOGL_ERROR, "Fix your application, "
+		LOGP(DLINP, LOGL_ERROR, "Fix your application, "
 			"no action set for signalling messages.\n");
 		return -ENOENT;
 	}
@@ -827,18 +827,18 @@
 	case E1INP_LINE_R_BSC: {
 		struct ipa_server_link *oml_link, *rsl_link;
 
-		LOGP(DINP, LOGL_NOTICE, "enabling ipaccess BSC mode\n");
+		LOGP(DLINP, LOGL_NOTICE, "enabling ipaccess BSC mode\n");
 
 		oml_link = ipa_server_link_create(tall_ipa_ctx, line,
 					          "0.0.0.0", IPA_TCP_PORT_OML,
 						  ipaccess_bsc_oml_cb, NULL);
 		if (oml_link == NULL) {
-			LOGP(DINP, LOGL_ERROR, "cannot create OML "
+			LOGP(DLINP, LOGL_ERROR, "cannot create OML "
 				"BSC link: %s\n", strerror(errno));
 			return -ENOMEM;
 		}
 		if (ipa_server_link_open(oml_link) < 0) {
-			LOGP(DINP, LOGL_ERROR, "cannot open OML BSC link: %s\n",
+			LOGP(DLINP, LOGL_ERROR, "cannot open OML BSC link: %s\n",
 				strerror(errno));
 			ipa_server_link_close(oml_link);
 			ipa_server_link_destroy(oml_link);
@@ -848,12 +848,12 @@
 						  "0.0.0.0", IPA_TCP_PORT_RSL,
 						  ipaccess_bsc_rsl_cb, NULL);
 		if (rsl_link == NULL) {
-			LOGP(DINP, LOGL_ERROR, "cannot create RSL "
+			LOGP(DLINP, LOGL_ERROR, "cannot create RSL "
 				"BSC link: %s\n", strerror(errno));
 			return -ENOMEM;
 		}
 		if (ipa_server_link_open(rsl_link) < 0) {
-			LOGP(DINP, LOGL_ERROR, "cannot open RSL BSC link: %s\n",
+			LOGP(DLINP, LOGL_ERROR, "cannot open RSL BSC link: %s\n",
 				strerror(errno));
 			ipa_server_link_close(rsl_link);
 			ipa_server_link_destroy(rsl_link);
@@ -865,7 +865,7 @@
 	case E1INP_LINE_R_BTS: {
 		struct ipa_client_link *link, *rsl_link;
 
-		LOGP(DINP, LOGL_NOTICE, "enabling ipaccess BTS mode\n");
+		LOGP(DLINP, LOGL_NOTICE, "enabling ipaccess BTS mode\n");
 
 		link = ipa_client_link_create(tall_ipa_ctx,
 					      &line->ts[E1INP_SIGN_OML-1],
@@ -876,12 +876,12 @@
 					      ipaccess_bts_write_cb,
 					      NULL);
 		if (link == NULL) {
-			LOGP(DINP, LOGL_ERROR, "cannot create OML "
+			LOGP(DLINP, LOGL_ERROR, "cannot create OML "
 				"BTS link: %s\n", strerror(errno));
 			return -ENOMEM;
 		}
 		if (ipa_client_link_open(link) < 0) {
-			LOGP(DINP, LOGL_ERROR, "cannot open OML BTS link: %s\n",
+			LOGP(DLINP, LOGL_ERROR, "cannot open OML BTS link: %s\n",
 				strerror(errno));
 			ipa_client_link_close(link);
 			ipa_client_link_destroy(link);
@@ -896,12 +896,12 @@
 						  ipaccess_bts_write_cb,
 						  NULL);
 		if (rsl_link == NULL) {
-			LOGP(DINP, LOGL_ERROR, "cannot create RSL "
+			LOGP(DLINP, LOGL_ERROR, "cannot create RSL "
 				"BTS link: %s\n", strerror(errno));
 			return -ENOMEM;
 		}
 		if (ipa_client_link_open(rsl_link) < 0) {
-			LOGP(DINP, LOGL_ERROR, "cannot open RSL BTS link: %s\n",
+			LOGP(DLINP, LOGL_ERROR, "cannot open RSL BTS link: %s\n",
 				strerror(errno));
 			ipa_client_link_close(rsl_link);
 			ipa_client_link_destroy(rsl_link);
diff --git a/src/input/lapd.c b/src/input/lapd.c
index 44031bd..0d4cfc4 100644
--- a/src/input/lapd.c
+++ b/src/input/lapd.c
@@ -192,7 +192,7 @@
 
 static void lapd_tei_set_state(struct lapd_tei *teip, int newstate)
 {
-	DEBUGP(DMI, "state change on TEI %d: %s -> %s\n", teip->tei,
+	DEBUGP(DLMI, "state change on TEI %d: %s -> %s\n", teip->tei,
 		   lapd_tei_states[teip->state], lapd_tei_states[newstate]);
 	teip->state = newstate;
 };
@@ -236,7 +236,7 @@
 {
 	struct lapd_sap *sap = talloc_zero(teip, struct lapd_sap);
 
-	LOGP(DMI, LOGL_INFO, "Allocating SAP for SAPI=%u / TEI=%u\n",
+	LOGP(DLMI, LOGL_INFO, "Allocating SAP for SAPI=%u / TEI=%u\n",
 		sapi, teip->tei);
 
 	sap->sapi = sapi;
@@ -256,7 +256,7 @@
 	if (!sap)
 		return;
 
-	DEBUGP(DMI, "state change on TEI %u / SAPI %u: %s -> %s\n", teip->tei,
+	DEBUGP(DLMI, "state change on TEI %u / SAPI %u: %s -> %s\n", teip->tei,
 		sapi, lapd_sap_states[sap->state], lapd_sap_states[newstate]);
 	switch (sap->state) {
 	case SAP_STATE_SABM_RETRANS:
@@ -283,15 +283,15 @@
 	uint8_t resp[8];
 	struct lapd_tei *teip;
 
-	DEBUGP(DMI, "TEIMGR: entity %x, ref %x, mt %x, action %x, e %x\n", entity, ref, mt, action, e);
+	DEBUGP(DLMI, "TEIMGR: entity %x, ref %x, mt %x, action %x, e %x\n", entity, ref, mt, action, e);
 
 	switch (mt) {
 	case 0x01:	/* IDENTITY REQUEST */
-		DEBUGP(DMI, "TEIMGR: identity request for TEI %u\n", action);
+		DEBUGP(DLMI, "TEIMGR: identity request for TEI %u\n", action);
 
 		teip = teip_from_tei(li, action);
 		if (!teip) {
-			LOGP(DMI, LOGL_INFO, "TEI MGR: New TEI %u\n", action);
+			LOGP(DLMI, LOGL_INFO, "TEI MGR: New TEI %u\n", action);
 			teip = lapd_tei_alloc(li, action);
 		}
 
@@ -304,7 +304,7 @@
 			lapd_tei_set_state(teip, LAPD_TEI_ASSIGNED);
 		break;
 	default:
-		LOGP(DMI, LOGL_NOTICE, "TEIMGR: unknown mt %x action %x\n",
+		LOGP(DLMI, LOGL_NOTICE, "TEIMGR: unknown mt %x action %x\n",
 		     mt, action);
 		break;
 	};
@@ -327,12 +327,12 @@
 	*prim = 0;
 
 	if (len < 2) {
-		DEBUGP(DMI, "len %d < 2\n", len);
+		DEBUGP(DLMI, "len %d < 2\n", len);
 		return NULL;
 	};
 
 	if ((data[0] & 1) != 0 || (data[1] & 1) != 1) {
-		DEBUGP(DMI, "address field %x/%x not well formed\n", data[0],
+		DEBUGP(DLMI, "address field %x/%x not well formed\n", data[0],
 			   data[1]);
 		return NULL;
 	};
@@ -341,10 +341,10 @@
 	cr = (data[0] >> 1) & 1;
 	tei = data[1] >> 1;
 	command = li->network_side ^ cr;
-	//DEBUGP(DMI, "  address sapi %x tei %d cmd %d cr %d\n", sapi, tei, command, cr);
+	//DEBUGP(DLMI, "  address sapi %x tei %d cmd %d cr %d\n", sapi, tei, command, cr);
 
 	if (len < 3) {
-		DEBUGP(DMI, "len %d < 3\n", len);
+		DEBUGP(DLMI, "len %d < 3\n", len);
 		return NULL;
 	};
 
@@ -376,7 +376,7 @@
 			cmd = LAPD_CMD_REJ;
 			break;
 		default:
-			LOGP(DMI, LOGL_ERROR, "unknown LAPD S cmd %x\n", data[2]);
+			LOGP(DLMI, LOGL_ERROR, "unknown LAPD S cmd %x\n", data[2]);
 			return NULL;
 		};
 	} else if ((data[2] & 3) == 3) {
@@ -407,7 +407,7 @@
 			break;
 
 		default:
-			LOGP(DMI, LOGL_ERROR, "unknown U cmd %x "
+			LOGP(DLMI, LOGL_ERROR, "unknown U cmd %x "
 			     "(pf %x data %x)\n", val, pf, data[2]);
 			return NULL;
 		};
@@ -423,18 +423,18 @@
 
 	teip = teip_from_tei(li, tei);
 	if (!teip) {
-		LOGP(DMI, LOGL_NOTICE, "Unknown TEI %u\n", tei);
+		LOGP(DLMI, LOGL_NOTICE, "Unknown TEI %u\n", tei);
 		return NULL;
 	}
 
 	sap = lapd_sap_find(teip, sapi);
 	if (!sap) {
-		LOGP(DMI, LOGL_INFO, "No SAP for TEI=%u / SAPI=%u, "
+		LOGP(DLMI, LOGL_INFO, "No SAP for TEI=%u / SAPI=%u, "
 			"allocating\n", tei, sapi);
 		sap = lapd_sap_alloc(teip, sapi);
 	}
 
-	DEBUGP(DMI, "<- %c %s sapi %x tei %3d cmd %x pf %x ns %3d nr %3d "
+	DEBUGP(DLMI, "<- %c %s sapi %x tei %3d cmd %x pf %x ns %3d nr %3d "
 	     "ilen %d teip %p vs %d va %d vr %d len %d\n",
 	     lapd_msg_types[typ], lapd_cmd_types[cmd], sapi, tei, command, pf,
 	     ns, nr, *ilen, teip, sap->vs, sap->va, sap->vr, len);
@@ -442,9 +442,9 @@
 	switch (cmd) {
 	case LAPD_CMD_I:
 		if (ns != sap->vr) {
-			DEBUGP(DMI, "ns %d != vr %d\n", ns, sap->vr);
+			DEBUGP(DLMI, "ns %d != vr %d\n", ns, sap->vr);
 			if (ns == ((sap->vr - 1) & 0x7f)) {
-				DEBUGP(DMI, "DOUBLE FRAME, ignoring\n");
+				DEBUGP(DLMI, "DOUBLE FRAME, ignoring\n");
 				cmd = 0;	// ignore
 			} else {
 				assert(0);
@@ -474,7 +474,7 @@
 				//printf("ASSIGNED and ACTIVE\n");
 			} else {
 #if 0
-				DEBUGP(DMI, "rr in strange state, send rej\n");
+				DEBUGP(DLMI, "rr in strange state, send rej\n");
 
 				// rej
 				resp[l++] = (sap-> sapi << 2) | (li->network_side ? 0 : 2);
@@ -507,7 +507,7 @@
 				//printf("ASSIGNED and ACTIVE\n");
 			} else {
 #if 0
-				DEBUGP(DMI, "rr in strange " "state, send rej\n");
+				DEBUGP(DLMI, "rr in strange " "state, send rej\n");
 
 				// rej
 				resp[l++] = (sap-> sapi << 2) | (li->network_side ? 0 : 2);
@@ -539,7 +539,7 @@
 			*prim = LAPD_MPH_DEACTIVATE_IND;
 		lapd_tei_set_state(teip, LAPD_TEI_ASSIGNED);
 #endif
-		LOGP(DMI, LOGL_NOTICE, "frame reject, ignoring\n");
+		LOGP(DLMI, LOGL_NOTICE, "frame reject, ignoring\n");
 		break;
 	case LAPD_CMD_DISC:
 		// disconnect
@@ -550,7 +550,7 @@
 		lapd_tei_set_state(teip, LAPD_TEI_NONE);
 		break;
 	default:
-		LOGP(DMI, LOGL_NOTICE, "unknown cmd for tei %d (cmd %x)\n",
+		LOGP(DLMI, LOGL_NOTICE, "unknown cmd for tei %d (cmd %x)\n",
 		     tei, cmd);
 		break;
 	}
@@ -562,7 +562,7 @@
 		 */
 
 		/* interrogating us, send rr */
-		DEBUGP(DMI, "Sending RR response\n");
+		DEBUGP(DLMI, "Sending RR response\n");
 		resp[l++] = data[0];
 		resp[l++] = (tei << 1) | 1;
 		resp[l++] = 0x01;	// rr
@@ -589,7 +589,7 @@
 	if (!msg)
 		return -ENOMEM;
 
-	DEBUGP(DMI, "Sending SABM for TEI=%u, SAPI=%u\n", tei, sapi);
+	DEBUGP(DLMI, "Sending SABM for TEI=%u, SAPI=%u\n", tei, sapi);
 
 	msgb_put_u8(msg, (sapi << 2) | (li->network_side ? 2 : 0));
 	msgb_put_u8(msg, (tei << 1) | 1);
@@ -664,14 +664,14 @@
 	struct lapd_sap *sap;
 
 	if (!teip) {
-		LOGP(DMI, LOGL_ERROR, "Cannot transmit on non-existing "
+		LOGP(DLMI, LOGL_ERROR, "Cannot transmit on non-existing "
 		     "TEI %u\n", tei);
 		return;
 	}
 
 	sap = lapd_sap_find(teip, sapi);
 	if (!sap) {
-		LOGP(DMI, LOGL_INFO, "Tx on unknown SAPI=%u in TEI=%u, "
+		LOGP(DLMI, LOGL_INFO, "Tx on unknown SAPI=%u in TEI=%u, "
 			"allocating\n", sapi, tei);
 		sap = lapd_sap_alloc(teip, sapi);
 	}
diff --git a/src/input/misdn.c b/src/input/misdn.c
index dce4f42..dc8d10f 100644
--- a/src/input/misdn.c
+++ b/src/input/misdn.c
@@ -114,21 +114,21 @@
 
 	msgb_put(msg, ret);
 
-	DEBUGP(DMI, "alen =%d, dev(%d) channel(%d) sapi(%d) tei(%d)\n",
+	DEBUGP(DLMI, "alen =%d, dev(%d) channel(%d) sapi(%d) tei(%d)\n",
 		alen, l2addr.dev, l2addr.channel, l2addr.sapi, l2addr.tei);
 
-	DEBUGP(DMI, "<= len = %d, prim(0x%x) id(0x%x): %s\n",
+	DEBUGP(DLMI, "<= len = %d, prim(0x%x) id(0x%x): %s\n",
 		ret, hh->prim, hh->id, get_prim_name(hh->prim));
 
 	switch (hh->prim) {
 	case DL_INFORMATION_IND:
 		/* mISDN tells us which channel number is allocated for this
 		 * tuple of (SAPI, TEI). */
-		DEBUGP(DMI, "DL_INFORMATION_IND: use channel(%d) sapi(%d) tei(%d) for now\n",
+		DEBUGP(DLMI, "DL_INFORMATION_IND: use channel(%d) sapi(%d) tei(%d) for now\n",
 			l2addr.channel, l2addr.sapi, l2addr.tei);
 		link = e1inp_lookup_sign_link(e1i_ts, l2addr.tei, l2addr.sapi);
 		if (!link) {
-			DEBUGPC(DMI, "mISDN message for unknown sign_link\n");
+			DEBUGPC(DLMI, "mISDN message for unknown sign_link\n");
 			msgb_free(msg);
 			return -EINVAL;
 		}
@@ -136,14 +136,14 @@
 		link->driver.misdn.channel = l2addr.channel;
 		break;
 	case DL_ESTABLISH_IND:
-		DEBUGP(DMI, "DL_ESTABLISH_IND: channel(%d) sapi(%d) tei(%d)\n",
+		DEBUGP(DLMI, "DL_ESTABLISH_IND: channel(%d) sapi(%d) tei(%d)\n",
 			l2addr.channel, l2addr.sapi, l2addr.tei);
 		/* For some strange reason, sometimes the DL_INFORMATION_IND tells
 		 * us the wrong channel, and we only get the real channel number
 		 * during the DL_ESTABLISH_IND */
 		link = e1inp_lookup_sign_link(e1i_ts, l2addr.tei, l2addr.sapi);
 		if (!link) {
-			DEBUGPC(DMI, "mISDN message for unknown sign_link\n");
+			DEBUGPC(DLMI, "mISDN message for unknown sign_link\n");
 			msgb_free(msg);
 			return -EINVAL;
 		}
@@ -152,22 +152,22 @@
 		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",
+		DEBUGP(DLMI, "DL_RELEASE_IND: channel(%d) sapi(%d) tei(%d)\n",
 		l2addr.channel, l2addr.sapi, l2addr.tei);
 		ret = e1inp_event(e1i_ts, S_INP_TEI_DN, l2addr.tei, l2addr.sapi);
 		break;
 	case DL_DATA_IND:
 	case DL_UNITDATA_IND:
 		msg->l2h = msg->data + MISDN_HEADER_LEN;
-		DEBUGP(DMI, "RX: %s\n", osmo_hexdump(msgb_l2(msg), ret - MISDN_HEADER_LEN));
+		DEBUGP(DLMI, "RX: %s\n", osmo_hexdump(msgb_l2(msg), ret - MISDN_HEADER_LEN));
 		ret = e1inp_rx_ts(e1i_ts, msg, l2addr.tei, l2addr.sapi);
 		break;
 	case PH_ACTIVATE_IND:
-		DEBUGP(DMI, "PH_ACTIVATE_IND: channel(%d) sapi(%d) tei(%d)\n",
+		DEBUGP(DLMI, "PH_ACTIVATE_IND: channel(%d) sapi(%d) tei(%d)\n",
 		l2addr.channel, l2addr.sapi, l2addr.tei);
 		break;
 	case PH_DEACTIVATE_IND:
-		DEBUGP(DMI, "PH_DEACTIVATE_IND: channel(%d) sapi(%d) tei(%d)\n",
+		DEBUGP(DLMI, "PH_DEACTIVATE_IND: channel(%d) sapi(%d) tei(%d)\n",
 		l2addr.channel, l2addr.sapi, l2addr.tei);
 		break;
 	default:
@@ -224,7 +224,7 @@
 	hh = (struct mISDNhead *) msgb_push(msg, sizeof(*hh));
 	hh->prim = DL_DATA_REQ;
 
-	DEBUGP(DMI, "TX channel(%d) TEI(%d) SAPI(%d): %s\n",
+	DEBUGP(DLMI, "TX channel(%d) TEI(%d) SAPI(%d): %s\n",
 		sign_link->driver.misdn.channel, sign_link->tei,
 		sign_link->sapi, osmo_hexdump(l2_data, msg->len - MISDN_HEADER_LEN));
 
@@ -265,12 +265,12 @@
 
 	subchan_mux_out(mx, tx_buf+sizeof(*hh), BCHAN_TX_GRAN);
 
-	DEBUGP(DMIB, "BCHAN TX: %s\n",
+	DEBUGP(DLMIB, "BCHAN TX: %s\n",
 		osmo_hexdump(tx_buf+sizeof(*hh), BCHAN_TX_GRAN));
 
 	ret = send(bfd->fd, tx_buf, sizeof(*hh) + BCHAN_TX_GRAN, 0);
 	if (ret < sizeof(*hh) + BCHAN_TX_GRAN)
-		DEBUGP(DMIB, "send returns %d instead of %zu\n", ret,
+		DEBUGP(DLMIB, "send returns %d instead of %zu\n", ret,
 			sizeof(*hh) + BCHAN_TX_GRAN);
 
 	return ret;
@@ -301,13 +301,13 @@
 	msgb_put(msg, ret);
 
 	if (hh->prim != PH_CONTROL_IND)
-		DEBUGP(DMIB, "<= BCHAN len = %d, prim(0x%x) id(0x%x): %s\n",
+		DEBUGP(DLMIB, "<= BCHAN len = %d, prim(0x%x) id(0x%x): %s\n",
 			ret, hh->prim, hh->id, get_prim_name(hh->prim));
 
 	switch (hh->prim) {
 	case PH_DATA_IND:
 		msg->l2h = msg->data + MISDN_HEADER_LEN;
-		DEBUGP(DMIB, "BCHAN RX: %s\n",
+		DEBUGP(DLMIB, "BCHAN RX: %s\n",
 			osmo_hexdump(msgb_l2(msg), ret - MISDN_HEADER_LEN));
 		ret = e1inp_rx_ts(e1i_ts, msg, 0, 0);
 		break;
@@ -443,7 +443,7 @@
 			addr.channel = ts;
 			break;
 		default:
-			DEBUGP(DMI, "unsupported E1 TS type: %u\n",
+			DEBUGP(DLMI, "unsupported E1 TS type: %u\n",
 				e1i_ts->type);
 			break;
 		}
@@ -503,7 +503,7 @@
 		close(sk);
 		return -ENODEV;
 	}
-	//DEBUGP(DMI,"%d device%s found\n", cnt, (cnt==1)?"":"s");
+	//DEBUGP(DLMI,"%d device%s found\n", cnt, (cnt==1)?"":"s");
 	printf("%d device%s found\n", cnt, (cnt==1)?"":"s");
 #if 1
 	devinfo.id = line->num;
diff --git a/src/ipa_proxy.c b/src/ipa_proxy.c
index f90eb49..53da996 100644
--- a/src/ipa_proxy.c
+++ b/src/ipa_proxy.c
@@ -117,14 +117,14 @@
 	struct ipaccess_head *hh;
 	struct ipa_proxy_conn *conn = link->data;
 
-	LOGP(DINP, LOGL_NOTICE, "received message from client side\n");
+	LOGP(DLINP, LOGL_NOTICE, "received message from client side\n");
 
 	hh = (struct ipaccess_head *)msg->data;
 	/* check if we have a route for this message. */
 	if (bitvec_get_bit_pos(
 	     &conn->route->shared->dst.streamid_map,
 	     hh->proto) != ONE) {
-		LOGP(DINP, LOGL_NOTICE, "we don't have a "
+		LOGP(DLINP, LOGL_NOTICE, "we don't have a "
 			"route for streamid 0x%x\n", hh->proto);
 		msgb_free(msg);
 		return 0;
@@ -141,13 +141,13 @@
 	struct ipaccess_head *hh;
 	struct ipa_proxy_conn *conn = peer->data;
 
-	LOGP(DINP, LOGL_NOTICE, "received message from server side\n");
+	LOGP(DLINP, LOGL_NOTICE, "received message from server side\n");
 
 	hh = (struct ipaccess_head *)msg->data;
 	/* check if we have a route for this message. */
 	if (bitvec_get_bit_pos(&conn->route->shared->src.streamid_map,
 			hh->proto) != ONE) {
-		LOGP(DINP, LOGL_NOTICE, "we don't have a "
+		LOGP(DLINP, LOGL_NOTICE, "we don't have a "
 			"route for streamid 0x%x\n", hh->proto);
 		msgb_free(msg);
 		return 0;
@@ -168,7 +168,7 @@
 
 	conn = talloc_zero(tall_ipa_proxy_ctx, struct ipa_proxy_conn);
 	if (conn == NULL) {
-		LOGP(DINP, LOGL_ERROR, "cannot allocate memory for "
+		LOGP(DLINP, LOGL_ERROR, "cannot allocate memory for "
 				       "origin IPA\n");
 		close(fd);
 		return ret;
@@ -178,12 +178,12 @@
 	conn->src = ipa_server_peer_create(tall_ipa_proxy_ctx, link, fd,
 					   ipa_sock_src_cb, conn);
 	if (conn->src == NULL) {
-		LOGP(DINP, LOGL_ERROR, "could not create server peer: %s\n",
+		LOGP(DLINP, LOGL_ERROR, "could not create server peer: %s\n",
 			strerror(errno));
 		return -ENOMEM;
 	}
 
-	LOGP(DINP, LOGL_NOTICE, "now trying to connect to destination\n");
+	LOGP(DLINP, LOGL_NOTICE, "now trying to connect to destination\n");
 
 	conn->dst = ipa_client_link_create(NULL, NULL, NULL, 0,
 					   route->shared->dst.inst->net.addr,
@@ -193,12 +193,12 @@
 					   ipa_client_write_default_cb,
 					   conn);
 	if (conn->dst == NULL) {
-		LOGP(DINP, LOGL_ERROR, "could not create client: %s\n",
+		LOGP(DLINP, LOGL_ERROR, "could not create client: %s\n",
 			strerror(errno));
 		return -ENOMEM;
 	}
 	if (ipa_client_link_open(conn->dst) < 0) {
-		LOGP(DINP, LOGL_ERROR, "could not start client: %s\n",
+		LOGP(DLINP, LOGL_ERROR, "could not start client: %s\n",
 			strerror(errno));
 		return -ENOMEM;
 	}
@@ -212,7 +212,7 @@
 DEFUN(ipa_proxy, ipa_cmd, "ipa", "Configure the ipaccess proxy")
 {
 	vty->index = NULL;
-	vty->node = IPA_NODE;
+	vty->node = L_IPA_NODE;
 	return CMD_SUCCESS;
 }
 
@@ -592,7 +592,7 @@
 DEFUN(ipa_cfg, ipa_cfg_cmd, "ipa", "Configure the ipaccess proxy")
 {
 	vty->index = NULL;
-	vty->node = IPA_NODE;
+	vty->node = L_IPA_NODE;
 	return CMD_SUCCESS;
 }
 
@@ -612,7 +612,7 @@
 }
 
 struct cmd_node ipa_node = {
-	IPA_NODE,
+	L_IPA_NODE,
 	"%s(ipa)#",
 	1,
 };
@@ -649,7 +649,7 @@
       ournode_exit_cmd, "exit", "Exit current mode and down to previous mode\n")
 {
         switch (vty->node) {
-        case IPA_NODE:
+        case L_IPA_NODE:
                 vty->node = CONFIG_NODE;
                 vty->index = NULL;
                 break;
@@ -661,7 +661,7 @@
       ournode_end_cmd, "end", "End current mode and change to enable mode.\n")
 {
 	switch (vty->node) {
-	case IPA_NODE:
+	case L_IPA_NODE:
 		break;
 	}
 	return CMD_SUCCESS;
@@ -682,9 +682,9 @@
 
 	install_element(CONFIG_NODE, &ipa_cfg_cmd);
 	install_node(&ipa_node, ipa_cfg_write);
-	install_default(IPA_NODE);
-	install_element(IPA_NODE, &ournode_exit_cmd);
-	install_element(IPA_NODE, &ournode_end_cmd);
-	install_element(IPA_NODE, &ipa_instance_cfg_add_cmd);
-	install_element(IPA_NODE, &ipa_route_cfg_add_cmd);
+	install_default(L_IPA_NODE);
+	install_element(L_IPA_NODE, &ournode_exit_cmd);
+	install_element(L_IPA_NODE, &ournode_end_cmd);
+	install_element(L_IPA_NODE, &ipa_instance_cfg_add_cmd);
+	install_element(L_IPA_NODE, &ipa_route_cfg_add_cmd);
 }
diff --git a/src/trau_frame.c b/src/trau_frame.c
index bf0dbd4..2ef4730 100644
--- a/src/trau_frame.c
+++ b/src/trau_frame.c
@@ -107,12 +107,12 @@
 	case TRAU_FT_DATA_DOWN:
 	case TRAU_FT_D145_SYNC:
 	case TRAU_FT_EDATA:
-		LOGP(DMUX, LOGL_NOTICE, "can't decode unimplemented TRAU "
+		LOGP(DLMUX, LOGL_NOTICE, "can't decode unimplemented TRAU "
 			"Frame Type 0x%02x\n", cbits5);
 		return -1;
 		break;
 	default:
-		LOGP(DMUX, LOGL_NOTICE, "can't decode unknown TRAU "
+		LOGP(DLMUX, LOGL_NOTICE, "can't decode unknown TRAU "
 			"Frame Type 0x%02x\n", cbits5);
 		return -1;
 		break;
@@ -164,12 +164,12 @@
 	case TRAU_FT_DATA_UP:
 	case TRAU_FT_D145_SYNC:
 	case TRAU_FT_EDATA:
-		LOGP(DMUX, LOGL_NOTICE, "unimplemented TRAU Frame Type "
+		LOGP(DLMUX, LOGL_NOTICE, "unimplemented TRAU Frame Type "
 			"0x%02x\n", cbits5);
 		return -1;
 		break;
 	default:
-		LOGP(DMUX, LOGL_NOTICE, "unknown TRAU Frame Type "
+		LOGP(DLMUX, LOGL_NOTICE, "unknown TRAU Frame Type "
 			"0x%02x\n", cbits5);
 		return -1;
 		break;
@@ -227,12 +227,12 @@
 	case TRAU_FT_DATA_DOWN:
 	case TRAU_FT_D145_SYNC:
 	case TRAU_FT_EDATA:
-		LOGP(DMUX, LOGL_NOTICE, "unimplemented TRAU Frame Type "
+		LOGP(DLMUX, LOGL_NOTICE, "unimplemented TRAU Frame Type "
 			"0x%02x\n", cbits5);
 		return -1;
 		break;
 	default:
-		LOGP(DMUX, LOGL_NOTICE, "unknown TRAU Frame Type "
+		LOGP(DLMUX, LOGL_NOTICE, "unknown TRAU Frame Type "
 			"0x%02x\n", cbits5);
 		return -1;
 		break;
diff --git a/tests/ipa_proxy_test.c b/tests/ipa_proxy_test.c
index b57127a..6288a3a 100644
--- a/tests/ipa_proxy_test.c
+++ b/tests/ipa_proxy_test.c
@@ -17,7 +17,7 @@
 
 struct log_info_cat ipa_proxy_test_cat[] = {
 	[DIPA_PROXY_TEST] = {
-		.name = "DINP_IPA_PROXY_TEST",
+		.name = "DLINP_IPA_PROXY_TEST",
 		.description = "IPA proxy test",
 		.color = "\033[1;35m",
 		.enabled = 1, .loglevel = LOGL_NOTICE,
@@ -33,7 +33,7 @@
 static int bsc_vty_is_config_node(struct vty *vty, int node)
 {
 	switch(node) {
-	case IPA_NODE:
+	case L_IPA_NODE:
 		return 1;
 		break;
 	}
@@ -43,7 +43,7 @@
 static enum node_type bsc_vty_go_parent(struct vty *vty)
 {
 	switch (vty->node) {
-	case IPA_NODE:
+	case L_IPA_NODE:
 		vty->node = VIEW_NODE;
 		break;
 	}