tech-kern archive

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

Re: Fixing tap(4) behaviour



Hi,

On Sat, Nov 29, 2008 at 4:41 PM, Quentin Garnier <cube%cubidou.net@localhost> 
wrote:
>> Beside that, this do not solve the problem of the behavior of the
>> stat(2) syscall on a cloner device.
>
> Right.  I was pointing out that the premise for the work was incorrect,
> which doesn't mean the work itself isn't useful.  One thing to note,
> though, is that it is a bad idea to derive the name of the interface
> from the unit number, because we might want to make it possible to
> change interface names in the future,
The name isn't derived from the unit number, but the interface index
is derived from the device's minor. The current code already use this
"hack" to get the interface softc when accessed through /dev/tapN. The
major/minor -> name association belong to userland.

> which means the network interface name and the device name might differ.
>
device name yes, major/minor no, cf above.

> Which is why TAPGIFNAME takes an
> ifreq, which is something you can actually feed to a socket ioctl
> afterwards.
>
this is just YAITDI[0] :-) but I'm not sure why a program using tap(4)
would use a socket. In general case, it opens the cloner device and
read/write through it.

> Now, if your git stuff could provide an easy way to get a diff...  But I
> might have missed something in your initial mail.
>
It don't seem so... looks I didn't find the ultimate git interface :/
Anyway, here's a "mirror" of the branch, combined into a mbox to avoid
multiple patches:
http://www.netbsd.org/~alc/git-branch/

 - Arnaud

[0]: Yet Another Interface To Do It


Home | Main Index | Thread Index | Old Index