Re: Support for macOS feth devices

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

 



Hi,

On Thu, Jul 16, 2020 at 02:02:36PM +1000, Damien Miller wrote:
> Apparently there's also "utun" mentioned on this bug
> https://bugzilla.mindrot.org/show_bug.cgi?id=3139 - it's used AFAIK to
> implement user-space PPP, so it seems like a good fit though I don't
> know whether it does L2. Conversely, the feth interface seems to be L2-
> only, so maybe we need both?

We use utun in OpenVPN, and as far as we know, it's only L3.

(So as of today, OpenVPN uses the tap kext for L2... reading this thread
with interest :-) )

[..]
> find and open a free /dev/bpfN device (brute force open from unit 1 up)
> ioctl bpf: BIOCSBLEN to set read buffer size, get back read packet size
> ioctl bpf: BIOCIMMEDIATE/1 to disable bpf buffering in kernel
> ioctl bpf: BIOCSSEESENT/0 to disable interception of sent packets
> ioctl bpf: BIOCSHDRCMPLT/1 to disable lladdr completion
> ioctl bpf: BIOCPROMISC/1 to enable promiscuous mode
> ioctl bpf: BIOCSETIF to set peer interface (feth5000)
> 
> then read packets on the bpf fd as per usual, write packets on the
> socket.

This looks wacky, having two different FDs for reading and writing...

What happens if you read() (or rcvmsg()) from the socket fd?

gert
-- 
"If was one thing all people took for granted, was conviction that if you 
 feed honest figures into a computer, honest figures come out. Never doubted 
 it myself till I met a computer with a sense of humor."
                             Robert A. Heinlein, The Moon is a Harsh Mistress

Gert Doering - Munich, Germany                             gert@xxxxxxxxxxxxxx
_______________________________________________
openssh-unix-dev mailing list
openssh-unix-dev@xxxxxxxxxxx
https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev



[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux