From owner-freebsd-hackers Mon Mar 10 17:28: 6 2003 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 04EE237B404 for ; Mon, 10 Mar 2003 17:28:05 -0800 (PST) Received: from web14201.mail.yahoo.com (web14201.mail.yahoo.com [216.136.172.143]) by mx1.FreeBSD.org (Postfix) with SMTP id 3520E43F85 for ; Mon, 10 Mar 2003 17:28:04 -0800 (PST) (envelope-from neelnatu@yahoo.com) Message-ID: <20030311012804.84570.qmail@web14201.mail.yahoo.com> Received: from [208.2.250.35] by web14201.mail.yahoo.com via HTTP; Mon, 10 Mar 2003 17:28:04 PST Date: Mon, 10 Mar 2003 17:28:04 -0800 (PST) From: Neelkanth Natu Subject: Re: divert socket To: Ferruccio Vitale , freebsd-hackers@freebsd.org In-Reply-To: <20030310092032.2fc71b8d.freebsd@cs.tin.it> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --- Ferruccio Vitale wrote: > > I try to explain better my problem: when my daemon tries to read from this socket, recv tells me > it read 68 bytes, for example, which is about message size at application layer, but what I read > is not I expect (string without sense). Is there a particular way to read from a raw socket or a > divert socket? Take a look at the tcpmssd code in the ports/net collection. In a nutshell, the data that is read from the divert socket contains the IP header, typically followed by the TCP/UDP header, followed by the application data. http://www.freebsd.org/cgi/pds.cgi?ports/net/tcpmssd http://www.freebsd.org/cgi/url.cgi?ports/net/tcpmssd/pkg-descr best Neel > > Ferruccio > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-hackers" in the body of the message __________________________________________________ Do you Yahoo!? Yahoo! Tax Center - forms, calculators, tips, more http://taxes.yahoo.com/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message