site_archiver@lists.apple.com Delivered-To: darwin-kernel@lists.apple.com _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-kernel mailing list (Darwin-kernel@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-kernel/site_archiver%40lists.a... This email sent to site_archiver@lists.apple.com struct ip* newip = (struct ip*)_MALLOC((7676,0F0F,5050">struct ip),M_FREE,M_NOWAIT); newip->ip_hl = 5; newip->ip_v = ipHeader->ip_v; printf("ipHeader version: %d\n", ipHeader->ip_v); printf("ipHeader hdrleng: %d\n", ipHeader->ip_hl); printf("newipheader: %d\n", newip->ip_v); printf("newipheader: %d\n", newip->ip_hl); newip->ip_tos = 0; int data_len = strlen(httpresponse); // this is the HTTP/1.1 response length of the tcp data I will inject into the input newip->ip_len = (7676,0F0F,5050">struct ip) + (7676,0F0F,5050">struct tcphdr) + data_len; newip->ip_id = 34234; newip->ip_off = 0x4000; newip->ip_ttl = 35; newip->ip_p = ipHeader->ip_p; newip->ip_sum = 0; memcpy(&(newip->ip_src), &(ipHeader->ip_dst), (7676,0F0F,5050">struct in_addr)); memcpy(&(newip->ip_dst), &(ipHeader->ip_src), (7676,0F0F,5050">struct in_addr));