Hi every one,
Because I want to simulate the MEC(mobile multi-access computing) to measure latency, I use a method(virtual tun net device) which connection type between S/P-GW and RemoteHost to apply eNBs to simulate MEC on eNB.
I add new variable tunDevice(enbVgsDevice) to "Epc-Enb-Application" and set the "SetSendCallBack" in the "pointer-to-point-epc-helper::AddEnb(...)" to create link .

This method which is imitated the connection type between S/P-GW and RemoteHost does not modify anything(changed just variable name).
In Epc-Enb-application, I add two function "SendToVgsSocket(..)" and "RecvFromEnbVgsDevice(...)" .
The "SendToVgsSocket(..)" is same the "epc-sgw-pgw-application::SendToTunDevice(...)" (But remove other useless parameters, just leave "->Receive(...)" to sned packet )
and in the "epc-enb-applicaiton::RecvFromLteSocket(...)" to forward packet to VM on the eNB(simulate MEC).
The "RecvFromEnbVgsDevice" is same the "epc-sgw-pgw-application::RecvFromTunDevice(...)" to receive the packet from VM on the eNB , and it is set the "SetSendCallBack" in "pointer-to-point-epc-helper".
(imitate the connection between S/P-GW and RemoteHost)
A problem is UE packets are received by "Epc-Enb-application::RecvFromLteSocket(..)" first ,but UE packets will received by "Epc-Enb-application::RecvFromEnbVgsDevice(..)" first after I set "SetSendCallBack" for "RecvFromEnbVgsDevice(...)" .
Can any one tell me how to solve it? Thank you!
Best regard
YX-H
IP :7.0.0.2 is UE, 192.168.10.2 is RemoteHost on the eNB(simulate MEC), I use the lena-simple-epc.cc to test it.
normal before set setSendCallBack:

unnormal after set setSendCallBack:
Packet will go "RecvFromEnbVgsDevice(..)" first.
