Am 25.07.2019 um 21:22 schrieb Nathan Immerman via lwip-users:
> Hi all,
> I am implementing a software Precision Time Protocol (PTP)
> implementation which requires reading Raw Ethernet II frames, no
> TCP/IP/UDP. An example packet is copied below. Is this possible using lwIP?
Yes and no. There's no API for raw Ethernet frames in lwIP, but if
you're using it on an embedded system where you have access to the netif
driver, you can just send those frames directly to the netif driver's
> I see the raw_new api accepts a proto parameter but there doesn't seem
> to be a protocal define for raw frames.
The 'raw' API is for 'raw' transport layer access. IPv4 or IPv6 is
always encapsuled. This resembles the socket API. E.g. if you want to
send raw Ethernet frames in Linux, you need AF_PACKET, not SOCK_RAW.
I'd be open for a patch to include such raw (Ethernet) access if it's
done cleanly enough. AF_PACKET could be implemented above that as well.
I'm just not taking the time to do that myself...
Am 26.07.2019 um 21:06 schrieb Nathan Hartman:
> On Thu, Jul 25, 2019 at 4:31 PM Dirk Ziegelmeier <[hidden email] > <mailto:[hidden email]>> wrote:
> What do you need an IP stack for when you want to process raw
> ethernet frames???
> My guess is that you need it because the system does other things with
> the network, too.
Well, you still wouldn't need to tunnel those raw Ethernet requests
through lwIP, which is an IP stack.
On the other hand, given the lack of a standardized API to send and
receive raw Ethernet frames; and given the PF_PACKET extension other
stacks have, I can understand this question.
I have already answered though: we don't have it yet; contributions are
welcom. Sadly, no such thing seen yet.