<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body dir="auto">
Have you looked at the procket library? Lots of low-level socket manipulation tools..
<div><br>
</div>
<div><a href="https://github.com/msantos/procket">https://github.com/msantos/procket</a><br>
<br>
<div dir="ltr">Sent from my iPhone</div>
<div dir="ltr"><br>
<blockquote type="cite">On Jul 5, 2020, at 8:56 PM, Papa Tana <papa.tana101@gmail.com> wrote:<br>
<br>
</blockquote>
</div>
<blockquote type="cite">
<div dir="ltr"><span>Hi All,</span><br>
<span></span><br>
<span>I am a node built in Erlang, and I receive lots of GTP-U packets:</span><br>
<span></span><br>
<span>---> GTP-U packets ---------> My Node as a Relay ----> Router [using</span><br>
<span>NAT]----> Internet</span><br>
<span></span><br>
<span>As shown above, the Erlang node task is to decapsulate the user data</span><br>
<span>(GTP-U Message Type is T-PDU (0xff)) and forward them to the Router,</span><br>
<span>without changing any information, just forward it, that's all.</span><br>
<span></span><br>
<span>I was used to send application message in binary as a Client, just</span><br>
<span>using gen_udp and gen_tcp, but now, I am not the Client. And not the</span><br>
<span>server because those messages are not for me neither.</span><br>
<span></span><br>
<span>=> Then, after I decapsulate these messages from GTP-U, I would like</span><br>
<span>to relay these layer messages to the Router with which I am connected.</span><br>
<span>The Router should connect with me with one network interface, using</span><br>
<span>the same netmask, let's say a small /30 netmask, it's obvious.</span><br>
<span></span><br>
<span>The IP addresses (src and dst) in the payload are not "from" me and</span><br>
<span>not "for" me.</span><br>
<span>Any tips please?</span><br>
<span></span><br>
<span>Thank you,</span><br>
<span>Best Regards,</span><br>
</div>
</blockquote>
</div>
</body>
</html>