- /*copy ethernet and ip headers over*/
- memcpy(ncur, ocur, sizeof(struct ether_header)+sizeof(struct iphdr) );
- ocur+=sizeof(struct ether_header)+ sizeof(struct iphdr);
- ncur+=sizeof(struct ether_header) +sizeof(struct iphdr);
- length-=sizeof(struct ether_header) +sizeof(struct iphdr);
-
- /*set ip to indicate that tcp is next protocol*/
- iph= (struct iphdr *) (ncur - sizeof(struct iphdr));
- iph->protocol=6;
- iph->check=htonl(0);
-