Re: dlil_inject_if_input
Re: dlil_inject_if_input
- Subject: Re: dlil_inject_if_input
- From: Justin Walker <email@hidden>
- Date: Fri, 17 Sep 2004 16:40:16 -0700
On Sep 17, 2004, at 16:22, Matt Jaffa wrote:
On Sep 17, 2004, at 3:53 PM, Justin Walker wrote:
On Sep 17, 2004, at 13:32, Matthew Jaffa wrote:
[snip]
Now the problem is, is inserting my own HTTP/1.1 response into the
input stream of the machine that made the request.
[snip]
I am doing the checksumming correct now for the ipheader and
tcpheader,
If you literally mean you checksummed the tcpheader, then you have a
problem: the TCP checksum covers all the TCP data.
I read on the internet that the TCP checksum is calculated with the
tcphdr, pseudo header that has IP elements in it, and the TCP data. I
threw all of the in a mbuf and then used in_cksum and it calculates
it.
Depending on where you inject your frames, you may be able to see the
packet with tcpdump; have you tried that? Also, the pseudo header is
kind of tricky, so you should look at code that computes it to be
sure...
Regards,
Justin
--
Justin C. Walker, Curmudgeon-At-Large *
Institute for General Semantics | When LuteFisk is outlawed
| Only outlaws will have
| LuteFisk
*--------------------------------------*-------------------------------*
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden