From owner-freebsd-hackers Wed Nov 10 7:42:15 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from pluto.cpe.ku.ac.th (pluto.cpe.ku.ac.th [158.108.32.150]) by hub.freebsd.org (Postfix) with ESMTP id 299E614DDA for ; Wed, 10 Nov 1999 07:42:04 -0800 (PST) (envelope-from stt@pluto.cpe.ku.ac.th) Received: from localhost (stt@localhost) by pluto.cpe.ku.ac.th (8.9.3/8.9.3) with ESMTP id WAA21172 for ; Wed, 10 Nov 1999 22:42:42 GMT Date: Wed, 10 Nov 1999 22:42:42 +0000 (GMT) From: Sunthiti Patchararungruang To: freebsd-hackers@freebsd.org Subject: Problem about Raw IP socket Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Dear Sir, I have to create a route program for my thesis. Its operation is different from normal packet forwarding. Therefore, I need to forward all packets instead of using normal packet forwarding in FreeBSD kernel. I capture packets via Divert socket. It works well. I can grap IP packket including its header. However, I use normal Raw IP socket to write the packets to selected next-hop. I use socket option SO_DONTROUTE and IP_HDRINCL with my Raw IP socket and use "sendto" to write packets with "sockaddr" set to the IP of the next-hop-gateway. The sendto command always return error with errno=22. How can I solve this error? Thank you for all help. Regards, Sunthiti Patchararungruang To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message