Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 31 Aug 2000 18:46:24 -0700
From:      Ivan Passos <ivan@cyclades.com>
To:        freebsd-questions@FreeBSD.ORG
Subject:   How to use a network interface in "raw" mode??
Message-ID:  <39AF0A70.BB85ED78@cyclades.com>

next in thread | raw e-mail | index | archive | help

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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?39AF0A70.BB85ED78>