From owner-freebsd-questions Thu Aug 31 18:44: 2 2000 Delivered-To: freebsd-questions@freebsd.org Received: from cyclades.com (main.cyclades.com [209.128.87.2]) by hub.freebsd.org (Postfix) with ESMTP id 1595337B423 for ; Thu, 31 Aug 2000 18:44:01 -0700 (PDT) Received: from cyclades.com (bahia.cyclades.com [209.128.87.17]) by cyclades.com (8.9.3/8.9.3) with ESMTP id SAA25861 for ; Thu, 31 Aug 2000 18:43:55 -0700 Message-ID: <39AF0A70.BB85ED78@cyclades.com> Date: Thu, 31 Aug 2000 18:46:24 -0700 From: Ivan Passos Organization: Cyclades Corporation X-Mailer: Mozilla 4.72 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: freebsd-questions@FreeBSD.ORG Subject: How to use a network interface in "raw" mode?? Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hello, I have a synchronous card (which is seen as a networki interface) that can run synchronous PPP or Cisco HDLC and carries IP traffic. Now I need to implement (and that includes kernel _and_ userspace levels) support for a "raw" mode of operation. This means that the only thing that should go to the driver is _data_, no IP headers, no protocol "garbage", nothing but data. How can I do that?? Do I need to change the kernel driver, or just create a direct socket bind to the driver, bypassing the INET layer?? This would be the most intuitive way to do it, but I don't know what kind of socket I should open. If I open a PF_INET socket, that brings the INET layer into place (which I don't want). If I try to open any other socket protocol type (PF_LINK, for instance), it returns EPROTONOSUPPORT (protocol not supported). The only other protocol type that works is PF_LOCAL, and that's for host-internal operations ... As I couldn't find any documentation about or src code that does that, I'm asking about it here. Just to give a similar scenario, in Linux I'd use an PF_PACKET socket, with SOCK_RAW. Any help is highly appreciated. Thanks in advance!!! Later, Ivan To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message