[Top][All Lists]

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

Re: [lwip-users] Add new header & tail

From: dhosa
Subject: Re: [lwip-users] Add new header & tail
Date: Thu, 13 Sep 2018 22:46:44 -0700 (MST)

That doesn't seem completely correct. Per your later image, it seems you need the IP header to contain proto = ESP, not proto = TCP...

Yes , i did change proto to 50,  IPH_PROTO_SET(iphdr, proto);

But you must also check it, not only remove it, don't you?

Sure, Currently I'm Just trying to add/remove header .

No, that doesn't seem correct. pbuf_header only moves the payload pointer, the data is still where it was before. You'll need to fiddle around with the data or create new pbufs to achieve what you want. If you wanted to implement this without changing the stack, you'd need some kind of new hook (as Sergio mentioned) to add the header and change the IP protocol. For RX, it might be enough to implement a raw pcb that detects the IP proto = ESP, checks and hides the header and sends the remaining pbuf up to tcp_input().
I got it.


Sent from the lwip-users mailing list archive at Nabble.com.

reply via email to

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