From owner-freebsd-hackers Fri Feb 16 8:51: 0 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from mail.matriplex.com (ns1.matriplex.com [208.131.42.8]) by hub.freebsd.org (Postfix) with ESMTP id 7C9D037B401 for ; Fri, 16 Feb 2001 08:50:57 -0800 (PST) Received: from mail.matriplex.com (mail.matriplex.com [208.131.42.9]) by mail.matriplex.com (8.9.2/8.9.2) with ESMTP id IAA99666; Fri, 16 Feb 2001 08:50:38 -0800 (PST) (envelope-from rh@matriplex.com) Date: Fri, 16 Feb 2001 08:50:38 -0800 (PST) From: Richard Hodges To: Dale Chulhan - Home Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: Cannot create raw socket connections In-Reply-To: <3A8C88D0.DC9ED9AA@uwi.tt> 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 On Thu, 15 Feb 2001, Dale Chulhan - Home wrote: > I have a pal trying to do a tool for measurement of bandwidth on a bsd > machine. > > He says: > > Everytime I open a raw socket connection ( send FIN to expect RST or > something like that ). There should be no problem with sending a TCP FIN on a raw socket. But the returning RST will be eaten by the TCP protocol. Your raw socket will not receive it. (ref: Stevens UNP v1, p 659) > The socket is killed. That is most strange... You mean to say that the next sendto() or recvfrom() returns EBADF? What version of FreeBSD is this? > He concluded that the router he is going through is dropping the packets > some how on their way out or the connection is being killed on the way > back in. The router could be dropping packets. If you have access, it should not take much time to add a specific access list rule to log those packets to see if they are going through. > He says there is a third possibility that the kernel actually discards > the packets. Said he found it in a man page some where? Unless you have a firewall installed, the kernel should send all packets from a raw socket, and pass all incoming packets to your socket, except UDP, TCP, and ICMP echo/timestamp/mask. -Richard ------------------------------------------- Richard Hodges | Matriplex, inc. | 769 Basque Way rh@matriplex.com | Carson City, NV 89706 775-886-6477 | www.matriplex.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message