lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-users] Sending raw IP packets


From: JonathonS
Subject: [lwip-users] Sending raw IP packets
Date: Sun, 7 Mar 2021 03:50:06 -0800

Hello, I am attempting to implement an Android VPN service which provides me raw IP packets on the TUN interface.  What I'd like to do is simply send the whole IP packet (including IP header) to its destination.  I know I can parse the IP packet to pull out only the TCP/UDP transport layer data and then send it over a TCP/UDP socket myself but if this is already done by lwip, then I'd prefer to use it instead.

I found the raw APIs (https://www.nongnu.org/lwip/2_1_x/group__raw__raw.html), but wasn't sure if this is what I needed to use.  Since I am running in user-space as a regular Android application, I am unable to run as root so not sure if the raw APIs require that I create a raw socket (which requires root).

Also, if you can provide any sample code, this would be greatly appreciated. Thanks!


reply via email to

[Prev in Thread] Current Thread [Next in Thread]