From owner-freebsd-questions Mon Nov 12 12:38:24 2001 Delivered-To: freebsd-questions@freebsd.org Received: from web9505.mail.yahoo.com (web9505.mail.yahoo.com [216.136.129.135]) by hub.freebsd.org (Postfix) with SMTP id D0BF537B405 for ; Mon, 12 Nov 2001 12:38:19 -0800 (PST) Message-ID: <20011112203819.83226.qmail@web9505.mail.yahoo.com> Received: from [4.18.161.204] by web9505.mail.yahoo.com via HTTP; Mon, 12 Nov 2001 12:38:19 PST Date: Mon, 12 Nov 2001 12:38:19 -0800 (PST) From: yatin chalke Subject: How to set up IP_HDRINCL in FreeBSD?? To: freebsd-questions@FreeBSD.ORG MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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