lwip-devel
[Top][All Lists]
Advanced

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

Re: [lwip-devel] Layer 2 protocol over LWIP Ethernet?


From: Kamil Khoury
Subject: Re: [lwip-devel] Layer 2 protocol over LWIP Ethernet?
Date: Mon, 11 Jun 2018 16:13:41 +0200

Thanks Dirk for your response.

Actually I'm a bit confused because ethernet_output() function takes netif as a parameter and this parameter contains IP information. Plus, ethernet_output() is exclusively called from LWIP stack and uses the netif as a parameter which is returned from ip-route() function. 

My question is:
If I'm not using LWIP stack, how am I supposed to get the netif that is required for ethernet_output() ? am I supposed to initialize it manually?

Thanks


On Mon, Jun 11, 2018 at 1:40 PM, Dirk Ziegelmeier <address@hidden> wrote:
Use git master:

- use ethernet_output() to send any ethernet packet.
- use LWIP_HOOK_UNKNOWN_ETH_PROTOCOL to receive any ethernet based protocol that is not handled by lwIP

See src\netif\ethernet.c

lwIP is an IP stack. You don't need it at all to implement a layer 2 protocol. lwIP handles stuff ABOVE layer 2 only.

-> You only need lwIP if you want a layer 2 protocol AND IP traffic.

Ciao
Dirk


On Mon, Jun 11, 2018 at 12:35 PM Kamil Khoury <address@hidden> wrote:
Hello,

I'm trying to implement a layer 2 protocol (1588 PTPv2) on the top of the Ethernet layer. According to the standard's documentation, this protocol requires a special EtherType and doesn't need IP (or above) layers. I was thinking to implement this using LWIP because I'm also using freeRTOS and it is perfectly working with LWIP. However, LWIP Ethernet layer does not seem to offer a configurable options for upper layer (other than IPv4/IPv6). So before starting I would like to benefit from your knowledge... 
- Do you think LWIP is a good choice to do this implementation? 
- Is there any example projects or information resources to guide me through this?
- if not LWIP, then can you recommend me a different solution? (not forgetting that freeRTOS is a main part of my project).

Thank you.
Kind Regrards,
Kamil Alkhouri
_______________________________________________
lwip-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/lwip-devel

_______________________________________________
lwip-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/lwip-devel



reply via email to

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