Re: dev.* analogue for interfaces



On Wed, 20 Feb 2008, Dag-Erling Smørgrav wrote:

Robert Watson <rwatson@xxxxxxxxxxx> writes:

We also support interface renaming... Does newbus mind if you rename the devices in its tree?

I'm not sure whether you're replying to my proposal or to Julian's interpretation / extrapolation of it... but I have no intention of hooking interfaces into newbus. I just want a sysctl tree for struct ifnet like we have a sysctl tree for device_t, to access interface parameters which are not easily accessible through ifconfig.

Hmm. When I look at net/if.c, I don't see renaming support, so perhaps this was just a proposal I was thinking of and not actual code. In either case, I think the question stands: in a world where interface renaming is supported, is your plan to also rename the if.X sysctl tree created for the interface? Does sysctl have a facility to do this?

I assume that somehow the details of your plan involve automatically creating a root node for the interface in if_attach and then exposing the node to the driver, possibly via a new pointer in struct ifnet? I'm certainly fine with such a notion, but think we should establish, for devices with a number of sysctl trees (i.e., dev.em vs if.em, dev.da0 vs disk.da0, etc), a general philosophy for placing nodes in one or the other somewhat deterministically.

Robert N M Watson
Computer Laboratory
University of Cambridge_______________________________________________
freebsd-arch@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-arch
To unsubscribe, send any mail to "freebsd-arch-unsubscribe@xxxxxxxxxxx"

Relevant Pages

  • Re: dev.* analogue for interfaces
    ... I just want a sysctl tree for struct ... When I look at net/if.c, I don't see renaming support, so perhaps ... I think the question stands: in a world where interface renaming is ...
    (freebsd-arch)
  • Re: [patch 0/8] Nesting class_device patches that actually work
    ... you give one of your "subclass devices" an interface, ... Take a step back and look what a kernel interface is about. ... device tree by following the "device" symlink from sysfs to get a unified tree ... the hierarchy is not a reason not to be able to walk up the chain and change ...
    (Linux-Kernel)
  • Re: ATL-COM: return pointer to instance
    ... > tree a second time. ... You should call AddRef any time you are handing a new reference to the ... both your own code and the VB code refer to the interface, ...
    (microsoft.public.vc.language)
  • Re: developing for something that isnt there..
    ... xml was chosen becouse well. ... creating a tree model of javabeans was my insisting becouse i didnt' ... had a complelty differnt strucutre and style of interface, ... and interface to send messages about them the classes ...
    (comp.lang.java.programmer)
  • Re: What I dont like about C# so far, compared to C++ (managed or
    ... locking type. ... program "using" the interface is show. ... probably never use it ("The IConfiguration interface defines ... Amazing that my home grown tree is ...
    (microsoft.public.dotnet.languages.csharp)