make gsup ipa name configurable in osmo-msc.cfg

Add a 'ipa-name' VTY command which overrides the default IPA name
used by the MSC. This is a prerequisite for inter-MSC handover.

Related: OS#3355
Change-Id: I317d6c59f77e92fbb2b875a83dc0ec2fa5cb6006
diff --git a/include/osmocom/msc/gsm_data.h b/include/osmocom/msc/gsm_data.h
index 63af3e7..d2511cb 100644
--- a/include/osmocom/msc/gsm_data.h
+++ b/include/osmocom/msc/gsm_data.h
@@ -212,6 +212,12 @@
 		/* MSISDN to which to route MO emergency calls */
 		char *route_to_msisdn;
 	} emergency;
+
+	/* This is transmitted as IPA Serial Number tag, which is used for GSUP routing (e.g. in OsmoHLR).
+         * For inter-MSC handover, the remote MSC's neighbor configuration requires to match this name.
+	 * If no name is set, the IPA Serial Number will be the same as the Unit Name,
+	 * and will be of the form 'MSC-00-00-00-00-00-00' */
+	char *msc_ipa_name;
 };
 
 struct osmo_esme;
diff --git a/include/osmocom/msc/vlr.h b/include/osmocom/msc/vlr.h
index c0e4864..68e0759 100644
--- a/include/osmocom/msc/vlr.h
+++ b/include/osmocom/msc/vlr.h
@@ -9,6 +9,7 @@
 #include <osmocom/gsm/gsm23003.h>
 #include <osmocom/gsm/gsm0808.h>
 #include <osmocom/gsm/gsup.h>
+#include <osmocom/gsm/ipa.h>
 #include <osmocom/msc/ran_conn.h>
 #include <osmocom/msc/msc_common.h>
 #include <osmocom/gsupclient/gsup_client.h>
@@ -312,7 +313,7 @@
 int vlr_subscr_rx_imsi_detach(struct vlr_subscr *vsub);
 
 struct vlr_instance *vlr_alloc(void *ctx, const struct vlr_ops *ops);
-int vlr_start(const char *gsup_unit_name, struct vlr_instance *vlr,
+int vlr_start(struct ipaccess_unit *ipa_dev, struct vlr_instance *vlr,
 	      const char *gsup_server_addr_str, uint16_t gsup_server_port);
 
 /* internal use only */