On Fri, Aug 21, 2020 at 09:53:34AM +0300, Papa Tana wrote:
But for GTP-U, I was trying to listen in port 2152
several times, and it
yields an error that I cannot listen on it, port 2152 is already used.
You cannot do that, sorry.
You manage all
your UDP sockets.
your application is responsible for receiving and responding to any GTP-U
packets
there.
As I said, I am using Erlang as a userspace program.
And when I create a tunnel, I "just" send a basic command exec to the Linux
by open_port like this:
This will obviously not work. You need to manage the socket from your program.
IF it's erlang, you either have to speak netlink directly from within Erlang,
or you need to add some native functions for calling libgtpnl.
So I don't have any idea on how to listen to 2152
as my Erlang program is
forbidden to listen on it when libgtpnl is invoked.
You are asking for the impossible. You need to open the socket from within your
program. You cannot crate a second socket for what you are trying to do.
At least earlier versions of ergw had support for the kernel GTP-U plane,
why not simply use that code?
They created
https://github.com/travelping/gen_netlink
to talk netlink from erlang, including gtpnl support.
--
- Harald Welte <laforge(a)gnumonks.org>
http://laforge.gnumonks.org/
============================================================================
"Privacy in residential applications is a desirable marketing option."
(ETSI EN 300 175-7 Ch. A6)