hlr: add TC_MSLookup_mDNS_service_other_home

Send an mslookup mDNS request to the home HLR, asking about a service
that is not "gsup.hlr". Hence the "_other" in the test name, service
"gsup.hlr" has different code paths, and related tests will be added in
follow-up patches.

This is the first test using MSLookup_mDNS_Emulation, so add related
test infrastructure.

Related: OS#4380
Depends: osmo-hlr I2fe453553c90e6ee527ed13a13089900efd488aa
Change-Id: Ia7f92d33691f910549353b16a7b0efc18e521719
diff --git a/library/MSLookup_mDNS_Templates.ttcn b/library/MSLookup_mDNS_Templates.ttcn
new file mode 100644
index 0000000..123ec16
--- /dev/null
+++ b/library/MSLookup_mDNS_Templates.ttcn
@@ -0,0 +1,99 @@
+
+/* (C) 2020 by sysmocom s.f.m.c. GmbH <info@sysmocom.de>
+ * All Rights Reserved
+ *
+ * Released under the terms of GNU General Public License, Version 2 or
+ * (at your option) any later version.
+ *
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ */
+
+module MSLookup_mDNS_Templates {
+
+import from DNS_Types all;
+import from MSLookup_mDNS_Types all;
+
+template MSLookup_mDNS ts_MSLookup_mDNS_query(integer id, charstring domain) := {
+	dnsMessage := {
+		header := {
+			id := id,
+			qr := DNS_QUERY,
+			opCode := 0,
+			aa := false,
+			tc := false,
+			rd := false,
+			ra := false,
+			z := '000'B,
+			rCode := DNS_NO_ERROR,
+			qdCount := 1,
+			anCount := 0,
+			nsCount := 0,
+			arCount := 0
+		},
+		queries := {
+			{
+				qName := domain,
+				qType := 255,
+				qClass := DNS_IN
+			}
+		},
+		answers := {},
+		nameServerRecords := {},
+		additionalRecords := {}
+	},
+	udpAddress := "239.192.23.42",
+	udpPort := 4266
+}
+
+template MSLookup_mDNS tr_MSLookup_mDNS_result_IPv4(integer id, charstring domain, UInt32 ip_v4, integer port_v4) := {
+	dnsMessage := {
+		header := {
+			id := id,
+			qr := DNS_RESPONSE,
+			opCode := DNS_OP_QUERY,
+			aa := false,
+			tc := false,
+			rd := false,
+			ra := false,
+			z := '000'B,
+			rCode := DNS_NO_ERROR,
+			qdCount := 0,
+			anCount := 3,
+			nsCount := 0,
+			arCount := 0
+		},
+		queries := {},
+		answers := {
+			{
+				name := domain,
+				rrType := DNS_TXT,
+				rrClass := DNS_IN,
+				ttl := ?,
+				rdLength := ?,
+				rData := {txt := {pattern "age=*"}}
+			},
+			{
+				name := domain,
+				rrType := DNS_A,
+				rrClass := DNS_IN,
+				ttl := ?,
+				rdLength := ?,
+				rData := {a := ip_v4}
+			},
+			{
+				name := domain,
+				rrType := DNS_TXT,
+				rrClass := DNS_IN,
+				ttl := ?,
+				rdLength := ?,
+				rData := {txt := {"port=" & int2str(port_v4)}}
+			}
+		},
+		nameServerRecords := {},
+		additionalRecords := {}
+	},
+	udpAddress := ?,
+	udpPort := ?
+}
+
+}