pespin has uploaded this change for review.

View Change

GTPv1U_Emulation: Support IPv6 SLAAC with osmo-uecups

Depends: osmo-uecups.git Change-Id I917b5c70f143d48b55b4e270e24594d1a36f71aa
Change-Id: Ic368383ea65161297e57a298a12c7b4adc927142
---
M deps/Makefile
M library/GTPv1U_Emulation.ttcnpp
2 files changed, 26 insertions(+), 3 deletions(-)

git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/59/42459/1
diff --git a/deps/Makefile b/deps/Makefile
index c125a15..3a7b822 100644
--- a/deps/Makefile
+++ b/deps/Makefile
@@ -124,7 +124,7 @@
titan.TestPorts.UDPasp_commit= 54176e95850654e5e8b0ffa2f1b5f35c412b949c
titan.TestPorts.UNIX_DOMAIN_SOCKETasp_commit= R.2.A-13-gd34ab71
titan.TestPorts.USB_commit= a9470fdc99c82fbf988f4508c3161118c9106e28
-osmo-uecups_commit= fdff5ae0b7addf07c368adbe31610d4e57dac273
+osmo-uecups_commit= 2f340548a6ac636603e0b01d8c4884e958d354f8

all: $(foreach dir,$(ALL_REPOS),$(dir)/update)
clean: $(foreach dir,$(ALL_REPOS),$(dir)/clean)
diff --git a/library/GTPv1U_Emulation.ttcnpp b/library/GTPv1U_Emulation.ttcnpp
index 51fc5a1..6146147 100644
--- a/library/GTPv1U_Emulation.ttcnpp
+++ b/library/GTPv1U_Emulation.ttcnpp
@@ -245,6 +245,12 @@
/* FIXME: remove from table */
repeat;
}
+/* handle incoming ipv6_slaac_ind; dispatch to whatever component started the process */
+[] UECUPS.receive(tr_UECUPS_RecvFrom_R({ipv6_slaac_ind:=?})) -> value rx {
+ vc_conn := f_comp_by_teid(int2oct(rx.msg.ipv6_slaac_ind.rx_teid, 4));
+ CLIENT.send(rx.msg.ipv6_slaac_ind) to vc_conn;
+ repeat;
+ }
}
#endif

@@ -257,6 +263,7 @@
var UECUPS_CreateTun gtc;
var UECUPS_DestroyTun gtd;
var UECUPS_StartProgram sprog;
+ var UECUPS_IPv6SLAAC ipv6slaac;
#endif

f_init(cfg);
@@ -306,6 +313,10 @@
}
CLIENT_PROC.reply(GTP1UEM_start_program:{sprog} value rx_uecups.start_program_res) to vc_conn;
}
+ [] CLIENT_PROC.getcall(GTP1UEM_ipv6_slaac:{?}) -> param(ipv6slaac) sender vc_conn {
+ rx_uecups := f_uecups_xceive({ipv6_slaac := ipv6slaac}, {ipv6_slaac_res:={result:=OK}});
+ CLIENT_PROC.reply(GTP1UEM_ipv6_slaac:{ipv6slaac} value rx_uecups.ipv6_slaac_res) to vc_conn;
+ }
#endif
}
}
@@ -318,7 +329,8 @@
type port GTP1UEM_PT message {
inout Gtp1uUnitdata
#ifdef GTP1U_EMULATION_HAVE_UECUPS
- , UECUPS_ProgramTermInd
+ , UECUPS_ProgramTermInd,
+ UECUPS_IPv6SLAACInd
#endif
;
} with { extension "internal" };
@@ -329,12 +341,16 @@
signature GTP1UEM_create_tunnel(UECUPS_CreateTun gtc);
signature GTP1UEM_destroy_tunnel(UECUPS_DestroyTun gtd);
signature GTP1UEM_start_program(UECUPS_StartProgram sprog) return UECUPS_StartProgramRes;
+signature GTP1UEM_ipv6_slaac(UECUPS_IPv6SLAAC ipv6slaac) return UECUPS_IPv6SLAACRes;
#endif

type port GTP1UEM_PROC_PT procedure {
inout GTP1UEM_register_teid, GTP1UEM_allocate_teid
#ifdef GTP1U_EMULATION_HAVE_UECUPS
- , GTP1UEM_create_tunnel, GTP1UEM_destroy_tunnel, GTP1UEM_start_program
+ , GTP1UEM_create_tunnel,
+ GTP1UEM_destroy_tunnel,
+ GTP1UEM_start_program,
+ GTP1UEM_ipv6_slaac
#endif
;
} with { extension "internal" };
@@ -390,6 +406,13 @@
return res;
}

+function f_gtp1u_ipv6_slaac(template (value) UECUPS_IPv6SLAAC ipv6slaac, integer port_idx := 0)
+runs on GTP1U_ConnHdlr {
+ GTP1U_PROC[port_idx].call(GTP1UEM_ipv6_slaac:{valueof(ipv6slaac)}) {
+ [] GTP1U_PROC[port_idx].getreply(GTP1UEM_ipv6_slaac:{ipv6slaac});
+ }
+}
+
/***********************************************************************
* High level APIs for user convenience
***********************************************************************/

To view, visit change 42459. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-MessageType: newchange
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Ic368383ea65161297e57a298a12c7b4adc927142
Gerrit-Change-Number: 42459
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin@sysmocom.de>