[openbeosnetteam] Re: Interfaces

  • From: "Axel Dörfler" <axeld@xxxxxxxxxxxxxxxx>
  • To: openbeosnetteam@xxxxxxxxxxxxx
  • Date: Wed, 12 Jul 2006 17:32:45 +0200 CEST

"Waldemar Kornewald" <wkornew@xxxxxxx> wrote:
[...]
> > I'm still unsure I get what you're saying.
> > You can just create the PPP interface and leave it down 
> > (unconfigured).
> > If you then try to send (or receive) some data through it, it would
> > need to automatically "up" itself instead of rejecting the request.
> > There is an IFF_AUTOUP flag in BONE that I would guess is thought 
> > for
> > exactly that usage.
> I was talking about the ethernet interface, not the PPP interface. As
> long as the ethernet interface is down I can't send any packets. As
> long as the ethernet interface is unconfigured (no IP) it's down.
> Thus, I can't send PPPoE packets over ethernet interfaces that don't
> have an IP address, so I have to assign some address like
> "192.168.0.1" just to be able to use PPPoE over that ethernet
> interface.

You're still managing to confuse me :-)
You never send PPPoE packets over an ethernet interface. You only send 
them over an ethernet device. And it's absolutely correct that those 
packets are rejected if the PPP interface (and therefore the ethernet 
device) is down.
The way I think, when the IFF_AUTOUP flag is set, the interface will 
try to "up" itself (which will also "up" the ethernet device) before 
rejecting the packet, though.

[...]
> > Still, there is no net_device anywhere to be seen. But if you want 
> > to
> > use PPP you sure have to create an interface for it (either through
> > ifconfig or a dedicated application). Also in the auto dial case.
> The way I imagined it would be to use node-monitoring to watch the
> interface configuration files. If a new file is created the 
> respective
> net_device is automatically created, too. Deleting or changing the
> configuration file results in the net_device being deleted/updated.

This could be done via the net_server I'd like to see (which also 
includes inetd).

> The default PPP interface (if there is one) is in connect-on-demand
> mode. You can bring an interface up/down manually using ifconfig. PPP
> interfaces would behave like ethernet interfaces, so applications
> don't need special API code for handling PPP interfaces.

Sure, a PPP interface is just like any other interface. If it's 
configured IFF_AUTOUP it will bring itself up automatically - like any 
other interface which is configured as such as well.

> > > How will protocols register themselves with the net_device? One 
> > > party
> > > (protocol or, preferrably, the device) has to know the link-layer
> > > type IDs for the respective protocol (IPv4, IPv6, PPPoE). For 
> > > example,
> > > ethernet has different packet type IDs than PPP and other 
> > > devices.
> > > Will protocol IDs be hard-coded in the device or will it be 
> > > possible
> > > to add new handlers by supplying the device's protocol type ID?
> > I am not sure what you mean. Are you asking how the received 
> > packets
> > are dispatched to the correct protocol?
> Yes. :)

Honestly, I haven't thought about this yet. I think we'll follow the 
BONE path here as well, though. That is, there is a register_handler() 
function that will register your handler for incoming data. How the 
internals will look like I don't know yet, but it will be a dynamic 
process; ie. you can register a handler for a type the networking stack 
doesn't know of.

Bye,
   Axel.


Other related posts: