Subject: Re: bin/33923: slattach(8) can't attach sl(4) interface
To: None <christos@zoulas.com>
From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
List: tech-net
Date: 07/09/2006 11:57:03
christos@zoulas.com wrote:
> On Jul 8, 7:56pm, cube@cubidou.net (Quentin Garnier) wrote:
> -- Subject: Re: bin/33923: slattach(8) can't attach sl(4) interface
>
> | By the way, as I have never used sl(4) nor strip(4), I wonder what
> | clonification changed, beside the fact that the user has to create the
> | interface by hand. My reading of slattach.c seems to indicate that
> | currently (and independently from the fact that sl(4) is clonable) there
> | is no way to tell for sure which interface it has attached to.
> |
> | Am I correct?
> |
> | [Moved to tech-net because it's not really related to the PR anymore.]
>
> Before cloning we created 2 slip devices and 2 strip devices in the kernel.
> Now we create none.
According to sys/net/if_sl.c:slopen() and sys/kern/tty.c:ttioctl()
(which just calls slopen() vir struct linesw), slopen() just
looks up all sl interfaces (by list or array) and uses the first
available one.
There is no way to pass/return an unit number via struct linesw without
API changes?
---
Izumi Tsutsui