Date: Mon, 12 Nov 2001 12:38:19 -0800 (PST) From: yatin chalke <yat_33@yahoo.com> To: freebsd-questions@FreeBSD.ORG Subject: How to set up IP_HDRINCL in FreeBSD?? Message-ID: <20011112203819.83226.qmail@web9505.mail.yahoo.com>
next in thread | raw e-mail | index | archive | help
Hi,
I am working with raw sockets on freeBsd3.4.
I am creating my own IP & TCP header & want to pass it
along with the packet.
I tried setting up IP_HDRINCL option but it gives me
error in sendto function as "sendto: Invalid argument"
I am using following statement
if(setsockopt(sockd,IPPROTO_IP,IP_HDRINCL,(char
*)&on,sizeof(on)) < 0) {
perror("setsockopt");
exit(1);
}
where int on=1;
I am not able to see required data in IP header as it
is not using this option and generating its own ip
header.
I donno why I am not able to set the IP_HDRINCL
option.
If anyone can help me on this it will be great help.
Thank you.
--Yatin
P.S: I am not on mailing list so if u can please reply
me via e mail , I will be highly obliged.
__________________________________________________
Do You Yahoo!?
Find a job, post your resume.
http://careers.yahoo.com
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20011112203819.83226.qmail>
