@Sergio R. Caprile Thank you for time ,
Sergio R. Caprile wrote > Perhaps if you could think your actions in terms of OSI layers it would > be easier to understand. > You say "before IP" but you draw "after IP" (well, sort of...), so I > don't really get what you need. Layer 3 in OSI layers, The new header will be between IP header and (TCP | UDP) header and tail at the end. Sergio R. Caprile wrote > What is it that you are trying to accomplish, do you want to encapsulate > TCP/IP into an "ESP" (whatever it is) datagram/frame ? Exactly, below figure shows IP packet before and after (ignore encryption & auth) <http://lwip.100.n7.nabble.com/file/t2118/ESPheader.png> Sergio R. Caprile wrote > or do you want to run that "ESP" protocol over IP ? phase 2 Sergio R. Caprile wrote > If "ESP" runs over Ethernet, you handle this at the netif level, outside > lwIP. Instead of lwIP calling and being called by the netif, you add a > netif layer that is > outbound: called by lwIP and calls the netif output function. Basically > you replace netif->output by your output function, which after adding > header and footer calls what was in there. > inbound: called by the netif and calls the lwIP input function, which > depends on whether you are actually using an OS or not (baremetal). > Basically, conversely, you replace netif->input by your function, which > after removing header and footer calls what was in there. > > Running "ESP" over IP requires you use the "raw IP" access functions. > Having other TCP/IP stack protocols over this is a bit trickier, since > you need to sit "in the middle" inside lwIP. I personally don't know how > to do this. Interesting . Note: I am using FreeRTOS With LwIP (1.4.1) . -- Sent from: http://lwip.100.n7.nabble.com/lwip-users-f3.html _______________________________________________ lwip-users mailing list lwip-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/lwip-users