Kashyap Gada
Kashyap Gada

Reputation: 1

LwIP read raw ethernet packets & also run a web server

We have a project of a custom radio working as a point to point device working as a bridge between two LAN Networks. We have two requirements – 1. Sending and receiving all Ethernet packets to the opposite radio to & fro. 2. Also run a web server on the radio for managing the radio.

This requires me to communicate all the Ethernet packets to the opposite radio and also consume requests on the local web server. How can I bifurcate or this traffic and what locations or c functions should I tap the data from. Need simple guidance to achieve this.

Regards Kashyap

Upvotes: 0

Views: 876

Answers (1)

Joel Cunningham
Joel Cunningham

Reputation: 671

This sounds like the radio is going to run a layer 2 (802.1d) bridge, but also have a layer 3 endpoint (for the web server).

The LwIP project supports this if you use sources from git master (active development) rather than the stable releases. There is a bridgeif.c netif which implements the 802.1d bridge. In this setup, you can have multiple netifs abstracted under the bridge netif. LwIP will only have the bridge netif added to its core and this becomes your layer 3 endpoint

Upvotes: 0

Related Questions