Yes you can do precisely that with a raw socket. You just
need to set the IP_HDRINCL socket option to indicate that the packets
you're sending include an IP header. The kernel will automatically do
set your IP checksum so just zero out that field.
Hope this helps,
On Mon, 6 Mar 2000, rajesh balan wrote:
> i want to generate a ip packet, with ip-source addr and destn addr of my
> wish. is there any way to that using SOCK_RAW or any other methods.
> can this be done by setsockopt. please let me know.
> thanks in advance
> rajesh balan
> please reply if u know. i'm not a hacker and iam not going to use this for
> hacking/cracking etc. ironically, i'm building a network based intrusion
> detection system. for testing purposes i need this. please help if u knowfor
> Get Your Private, Free Email at http://www.hotmail.com
> To unsubscribe from this list: send the line "unsubscribe linux-net" in
> the body of a message to firstname.lastname@example.org
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to email@example.com
This archive was generated by hypermail 2b29 : Tue Mar 07 2000 - 21:00:27 EST