Introduce libsmpputil

As part of preparation for libosmo-netif migration let's move common SMPP code
into separate build-time library and use it for both smpp_mirror and OsmoMSC
renaming the files if necessary.

While at it we also fix id/password legth limits in smpp_mirror and drop unused
fields from ESME struct.

Related: OS#5568
Change-Id: I61910651bc7c188dc2fb67d96189a66a47e7e8fb
diff --git a/tests/smpp/Makefile.am b/tests/smpp/Makefile.am
index 00090da..fabfd2d 100644
--- a/tests/smpp/Makefile.am
+++ b/tests/smpp/Makefile.am
@@ -11,6 +11,8 @@
 	$(LIBOSMOGSM_CFLAGS) \
 	$(LIBOSMOSCCP_CFLAGS) \
 	$(LIBOSMOABIS_CFLAGS) \
+	$(LIBOSMOSCCP_CFLAGS) \
+	$(LIBOSMOMGCPCLIENT_CFLAGS) \
 	$(COVERAGE_CFLAGS) \
 	$(LIBSMPP34_CFLAGS) \
 	$(NULL)
@@ -30,10 +32,10 @@
 
 smpp_test_SOURCES = \
 	smpp_test.c \
-	$(top_builddir)/src/libmsc/smpp_utils.c \
 	$(NULL)
 
 smpp_test_LDADD = \
+	$(top_builddir)/src/libsmpputil/libsmpputil.a \
 	$(LIBOSMOCORE_LIBS) \
 	$(LIBOSMOGSM_LIBS) \
 	$(NULL)
diff --git a/tests/smpp/smpp_test.c b/tests/smpp/smpp_test.c
index 4640a5f..9b94c63 100644
--- a/tests/smpp/smpp_test.c
+++ b/tests/smpp/smpp_test.c
@@ -22,12 +22,10 @@
 #include <stdio.h>
 
 #include <osmocom/msc/debug.h>
-
+#include <osmocom/smpp/smpp_smsc.h>
 #include <osmocom/core/application.h>
 #include <osmocom/core/backtrace.h>
 
-#include "smpp_smsc.h"
-
 struct coding_test {
 	uint8_t dcs;
 	uint8_t coding;