From owner-freebsd-net@freebsd.org Tue Mar 20 20:09:01 2018 Return-Path: Delivered-To: freebsd-net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C7E75F6A2B2 for ; Tue, 20 Mar 2018 20:09:01 +0000 (UTC) (envelope-from rfg@tristatelogic.com) Received: from outgoing.tristatelogic.com (segfault.tristatelogic.com [69.62.255.118]) by mx1.freebsd.org (Postfix) with ESMTP id 67EAE84A7A for ; Tue, 20 Mar 2018 20:09:01 +0000 (UTC) (envelope-from rfg@tristatelogic.com) Received: from segfault-nmh-helo.tristatelogic.com (localhost [127.0.0.1]) by segfault.tristatelogic.com (Postfix) with ESMTP id 98F933AEF2 for ; Tue, 20 Mar 2018 13:09:00 -0700 (PDT) From: "Ronald F. Guilmette" To: freebsd-net@freebsd.org Subject: Raw Sockets: Two Questions Date: Tue, 20 Mar 2018 13:09:00 -0700 Message-ID: <98551.1521576540@segfault.tristatelogic.com> X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Mar 2018 20:09:02 -0000 I'm going to be doing some stuff with raw sockets pretty soon, and while scrounging around, looking for some nice coding examples, I found the following very curious comment on one particular message board: https://stackoverflow.com/questions/7048448/raw-sockets-on-bsd-operating-systems "Using raw sockets isn't hard but it's not entirely portable. For instance, both in BSD and in Linux you can send whatever you want, but in BSD you can't receive anything that has a handler (like TCP and UDP)." So, first question: Is the above comment actually true & accurate? Second question: If the above assertion is actually true, then how can nmap manage to work so well on FreeBSD, despite what would appear to be this insurmountable stumbling block (of not being able to receive replies)?