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: Dirk Ziegelmeier
Subject: Re: [lwip-devel] Layer 2 protocol over LWIP Ethernet?
Date: Mon, 11 Jun 2018 16:17:53 +0200

If you don't need lwIP (IP communication), why do you try to use lwIP's network interface structures? It gives you no advantage. Just call your driver manually!

Ciao
Dirk


On Mon, Jun 11, 2018 at 4:14 PM Kamil Khoury <address@hidden> wrote:
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


_______________________________________________
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]