Re: ifconfig(8) refactoring -- YACC grammar now online
From: Robert Watson (rwatson_at_freebsd.org)
Date: 11/30/03
- Previous message: Bruce M Simpson: "Re: ifconfig(8) refactoring -- YACC grammar now online"
- In reply to: Bruce M Simpson: "Re: ifconfig(8) refactoring -- YACC grammar now online"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sun, 30 Nov 2003 17:41:08 -0500 (EST) To: Bruce M Simpson <bms@spc.org>
On Sun, 30 Nov 2003, Bruce M Simpson wrote:
> On Sun, Nov 30, 2003 at 02:20:50PM -0500, Robert Watson wrote:
> > if_type seems like it will work for high level classes of interfaces, but
> > something more fine-grained will be required for interfaces that implement
> > multiple classes or subclasses (i.e., 802 generally, and also 802.11b).
>
> The idea just now is we look at if_media if we need to get specific with
> physical interfaces.
>
> tap would seem to be missing from my list, actually; I note it's used to
> provide VMware support in the absence of Netgraph, amongst other things.
if_tap is actually quite useful, and in the same general class of
synthetic interfaces as if_tun. I've used both in building tunneling and
topology-manipulation tools, as well as for debugging routing, etc.
if_tap simulates an 802 device, and if_tun simulates a point-to-point
device. VMware is the only application I know of using if_tap, although I
have a fair amount of my own code that uses it. Userland ppp uses if_tun,
as to some of the third party crypto tunneling tools.
> > Or likewise, tap interfaces might implement 802 generally, but also
> > if_tap-specific primitives. Do we need to probe by-name for capabilities
> > using interface ioctls, or return a "list" of implemented
> > interfaces/classes to allow things to be a bit more multidimensional?
>
> That might work well, actually -- I already added a MIB to rtsock to
> deal with our lack of reporting multicast group memberships, I see no
> reason not to add one to enumerate loaded interface classes.
>
> OTOH, for the 'could load kld' case, this falls down, until the instance
> is created, either through cloning or completing ifattach() for a
> physical interface -- but if CREATE is a separate operation this isn't a
> problem, it is a problem if we want to say something like this in one
> go:-
>
> ifconfig gif0 create tunnel 1.2.3.4 5.6.7.8 10.0.0.1 10.0.0.2
>
> Then you do need a means for the ifconfig instance to ask gif0 if it
> speaks 'tunnel-ese' once it's loaded.
>
> I have to find an abstraction to comfortably deal with this stacking of
> properties/methods, simple polymorphism (a la Java 'implements
> interface') springs to mind.
I think that would be a reasonable approach, although it seems to me that
both the "inheritance" and "implements" models might apply in looking at
sets of protocol relationships. a tap interface is a synthetic interface,
it implements synthetic interface controls, as well as implementing 802.
However, it might be neat to hook up 802.11 to a tap-like interface
sometime as well. Question: does 802.11 imply 802? If so, a notion of
inheritence might be quite useful for driver implementors.
Robert N M Watson FreeBSD Core Team, TrustedBSD Projects
robert@fledge.watson.org Senior Research Scientist, McAfee Research
_______________________________________________
freebsd-arch@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-arch
To unsubscribe, send any mail to "freebsd-arch-unsubscribe@freebsd.org"
- Previous message: Bruce M Simpson: "Re: ifconfig(8) refactoring -- YACC grammar now online"
- In reply to: Bruce M Simpson: "Re: ifconfig(8) refactoring -- YACC grammar now online"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
- Re: Help: Tunneling multicast
... interface hooked up to the subnet that it is in. ... That's a fairly normal
circumstance for tunneling. ... You can configure a node as a router, and have it send
the packets along ... routing demons handle multiple tunnels is pretty much required.
... (comp.os.linux.networking) - Re: ifconfig(8) refactoring -- YACC grammar now online
... as to some of the third party crypto tunneling tools. ... > reason not to
add one to enumerate loaded interface classes. ... both the "inheritance" and "implements"
models might apply in looking at ... it implements synthetic interface controls, ...
(freebsd-hackers) - Re: Tired of 100s of stupid Getter/Setter methods
... but interface does not hide the other methods of implementing ... telling you
that you need to refactor a new common superclass. ... Again, composition instead of inheritance.
... A StringVector cannot take Integer parameters. ... (comp.lang.java.programmer) - Re: Beginner, Which language
... > That's much more true for implementation inheritance than interface ...
> compared to the run time support Java requires. ... > - All base classes
of the interface must also be declared with interface ... (comp.programming) - Re: Question on abstract classes versus interfaces
... do you conside single inheritance of interface inheritance at all? ...
And there is inheritance between Java interfaces, ... of my abstract data types,
... (comp.lang.java.programmer)