Support forwarding RIM messages over GTPCv1 EUTRAN<->GERAN

MMEs connect over Gn interface using GTPCv1 towards the SGSN in order to
exchange RIM PDUs by using "RAN Information Relay" GTPCv1 message type.
For more info, see 3GPP TS 29.060 sec 7.5.14.1 "RAN Information Relay"

In order to support it, this commit does the following:

* Uses new libgtp APIs to rx and tx RAN Information Relay messages. The
  same "gsn" object is reused, ie. the local GTPCv1 socket address used
  for exchanging messages against GGSN is reused.
* Adds a new "sgsn_mme_ctx" struct holding information about MMEs
  allowed by the SGSN, each one containing information about the GTP
  address it uses, the in/out routing based on TAI requests, etc. The
  set of MMEs and their config can be set up using new VTY node introduced
  in this commit.
* The RIM related code in SGSN is refactored to allow forwarding from
  and to several types of addresses/interfaces.

Depends: osmo-ggsn.git Change-Id Iea3eb032ccd4aed5187baca7f7719349d76039d4
Depends: libosmocore.git Change-Id I534db7d8bc5ceb19a2a6866f07d5f5c70e456c5c
Related: SYS#5314
Change-Id: I396450b8d8b66595dab8ff7bf41cbf964bb40d93
diff --git a/tests/osmo-sgsn_test-nodes.vty b/tests/osmo-sgsn_test-nodes.vty
index 953a30e..f889541 100644
--- a/tests/osmo-sgsn_test-nodes.vty
+++ b/tests/osmo-sgsn_test-nodes.vty
@@ -61,3 +61,58 @@
   compression v42bis active direction (ms|sgsn|both) codewords <512-65535> strlen <6-250>
   compression v42bis passive
 ...
+
+OsmoSGSN(config-sgsn)# mme test0
+OsmoSGSN(config-sgsn-mme)# gtp remote-ip 1.2.3.4
+OsmoSGSN(config-sgsn-mme)# gtp ran-info-relay 907 10 567
+OsmoSGSN(config-sgsn-mme)# gtp ran-info-relay 202 12 51
+OsmoSGSN(config-sgsn-mme)# gtp ran-info-relay 907 10 567
+OsmoSGSN(config-sgsn-mme)# exit
+OsmoSGSN(config-sgsn)# mme test1
+OsmoSGSN(config-sgsn-mme)# gtp remote-ip 5.6.7.8
+OsmoSGSN(config-sgsn-mme)# gtp ran-info-relay default
+OsmoSGSN(config-sgsn-mme)# exit
+OsmoSGSN(config-sgsn)# show running-config
+...
+sgsn
+...
+ mme test0
+  gtp remote-ip 1.2.3.4
+  gtp ran-info-relay 907 10 567
+  gtp ran-info-relay 202 12 51
+ mme test1
+  gtp remote-ip 5.6.7.8
+  gtp ran-info-relay default
+...
+OsmoSGSN(config-sgsn)# mme test0
+OsmoSGSN(config-sgsn-mme)# gtp ran-info-relay default
+% Another MME test1 is already set as default route, remove it before setting it here.
+OsmoSGSN(config-sgsn-mme)# exit
+OsmoSGSN(config-sgsn)# mme test1
+OsmoSGSN(config-sgsn-mme)# no gtp ran-info-relay default
+OsmoSGSN(config-sgsn-mme)# exit
+OsmoSGSN(config-sgsn)# mme test0
+OsmoSGSN(config-sgsn-mme)# gtp ran-info-relay default
+OsmoSGSN(config-sgsn-mme)# exit
+OsmoSGSN(config-sgsn)# show running-config
+...
+sgsn
+...
+ mme test0
+  gtp remote-ip 1.2.3.4
+  gtp ran-info-relay default
+  gtp ran-info-relay 907 10 567
+  gtp ran-info-relay 202 12 51
+ mme test1
+  gtp remote-ip 5.6.7.8
+...
+OsmoSGSN(config-sgsn)# no mme test0
+OsmoSGSN(config-sgsn)# show running-config
+...
+sgsn
+...
+ no compression v42bis
+ mme test1
+  gtp remote-ip 5.6.7.8
+...
+OsmoSGSN(config-sgsn)# no mme test1