Date: Wed, 10 Nov 1999 10:35:47 -0800 (PST) From: Archie Cobbs <archie@whistle.com> To: stt@pluto.cpe.ku.ac.th (Sunthiti Patchararungruang) Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: Problem about Raw IP socket Message-ID: <199911101835.KAA42838@bubba.whistle.com> In-Reply-To: <Pine.BSF.4.05.9911102242100.21112-100000@pluto.cpe.ku.ac.th> from Sunthiti Patchararungruang at "Nov 10, 1999 10:42:42 pm"
next in thread | previous in thread | raw e-mail | index | archive | help
Sunthiti Patchararungruang writes: > 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? 22 = EINVAL. That can happen if your IP header is not well-formed. The relevant file is /usr/src/sys/netinet/raw_ip.c. -Archie ___________________________________________________________________________ Archie Cobbs * Whistle Communications, Inc. * http://www.whistle.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199911101835.KAA42838>