Libstock prefers package manager

Package Manager

We strongly encourage users to use Package manager for sharing their code on Libstock website, because it boosts your efficiency and leaves the end user with no room for error. [more info]

Project Request

Return
Alex Kadow
Alex2661

posted on 2022/07/17 07:23:30 AM CEST

Communication > Ethernet

Bridge/Transfer all data packets from one ETH port to another (or wifi click to another)

Hi All,

I need to establish a bridge that will sit between a router and a PC which will log the IP addresses of all traffic that pass between (including TCP and UDP). It should also restrict some IP addresses, acting like a very basic firewall.

The speed at which it does this is not important as the PC only runs dedicated software.

The connection can either be wired (via 2x ethernet ports) or wireless (one wireless device connects to the router's wifi whilst a second provides a network for the PC to connect with). Ideally the solution could accommodate both.

I am developing using the Fusion v7 and PIC32MX795F512L and have 2x ethernet clicks with 2x wifi clicks on order.

I have explored:
- using the Mikroe libraries to speak to both (1) the internal ethernet port and (2) an ethernet click port but cannot figure out how to bridge the traffic using Mikroe libraries. I am told that the libraries accommodate one port max so using both the internal and an external port seems like a possible solution.
- Github/other forums to seek example code that may help to speak to the ENC28J60 (IC on the ethernet click) directly but refs seems incompatible with MicroC.
- Review of some libraries available here that deal with the wifi click. Assuming the libraries are unable to accommodate more than one wifi click like the ethernet click libraries, this seems like an unlikely solution.
- Mikroe support.

I wonder if anyone has achieved a basic bridge like this for a firewall, range-extender or another similar application and if anyone can provide any example projects or code.

We have achieved this using the raspberry pi but wish to establish a professional solution using PIC and Mikroe.

Any help or advice would be appreciated.

Thanks for your time and all the best.

Alex