Re: What were the reasons of having mandatory IP address at AX.25 interfaces ?

2008-02-04 Thread Matti Aarnio
On Mon, Feb 04, 2008 at 03:38:35PM +0100, Andi Kleen wrote:
> Matti Aarnio <[EMAIL PROTECTED]> writes:
> 
> > .. the original reason was apparently that _ifconfig_ blew up
> > when it saw protocols that it didn't understand on network
> > interfaces.  Possibly when there was no IP protocol on an
> > interface.
> 
> It's not only ifconfig, a lot of programs use SIOCGIFCONF
> to query ip addresses.

So ?   My codes do too, and filter away things they are not
interested in.  (When they specifically look for IP addresses.)

Of course I may be in minority by expecting the unexpected,
and handling such "weird" multiprotocol systems...


I found original explanation for that mandatoryness finally.
It was in order to silence bug reports in certain cases when
real fix would have been to really find all interfaces instead
of complaining.

In the end I used same trick that  ifconfig  tool uses to find
all interfaces, and filter away those that AX.25 subsystems
are not interested in - end of  "SIOCGIFCONF problems".


netdev:ish developemnt thing would be, that we ( = myself probably )
make SIOCGIFCONF to return those devices that have addresses
in the protocol family that the socket used for the query has.

For PF_INET we might return also PF_INET6 values to lessen
the spanish-inquisition -impact...

.. or do you know any who looks up interface IP addresses with
PF_FILE ( = AF_UNIX ) socket ?

What do the competitor systems B, S, and W do ?

> -Andi

/Matti Aarnio
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: What were the reasons of having mandatory IP address at AX.25 interfaces ?

2008-02-04 Thread Andi Kleen
Matti Aarnio <[EMAIL PROTECTED]> writes:

> .. the original reason was apparently that _ifconfig_ blew up
> when it saw protocols that it didn't understand on network
> interfaces.  Possibly when there was no IP protocol on an
> interface.

It's not only ifconfig, a lot of programs use SIOCGIFCONF
to query ip addresses.

-Andi
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: What were the reasons of having mandatory IP address at AX.25 interfaces ?

2008-02-04 Thread Matti Aarnio
.. the original reason was apparently that _ifconfig_ blew up
when it saw protocols that it didn't understand on network
interfaces.  Possibly when there was no IP protocol on an
interface.

This happened on DECNET, and apparently on others too.

Thus the  SIOCGIFCONF  ioctl is not returning much else
than interfaces with IP addresses on them, and to get
_all_ interfaces, one must read thru  /proc/net/dev  file.

Some reason like that is possibly behind the reason why
SIOCGIFCONF does not find anything but PF_INET sockets
even when it is run on  PF_AX25 type socket..


The "fun" part is that  ifconfig  does look for all devices
in /proc/net/dev.   Perhaps we should just make all devices
findable with  SIOCGIFCONF regardless of what protocols
they may support ?   And if the  ifconfig  blows up, the
bug is in ifconfig tool, not kernel.

Alternatively one could iterate all network devices of
protocol family X being enabled when  ioctl() is called
on socket with PF_x  (like PF_AX25.)


Can anyone recall any real reason why this would not be
acceptable ?

/Matti Aarnio
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html