On Tue, 2007-05-08 at 02:26 -0700, Joerg Pommnitz wrote:
[...]
> attached is a patch that removes the internal interface index. Please read and comment! 

Ah, that is/was essentially a left over from earlier and - thus - should
be cleaned up.
We had a few locally "static" defined arrays with fixed sizes with
additional interface info. This was merged into the "struct interface".

The patch applies with one trivial reject against CVS-HEAD.

> The onliest real use of the index seems to be in the following hunk:

I don't think so, Joerg;-)
----  snip  ----
{34}find -name '*.[ch]' | xargs fgrep -w if_nr
./src/win32/ifnet.c:  ifp->if_nr = iface->index;
./src/win32/ifnet.c:  New->if_nr = IntConf->index;
./src/win32/ifnet.c:              IntConf->name, New->if_nr);
./src/packet.c:  OLSR_PRINTF(3, "\tBuilding HELLO on interface %d\n", outif->if_nr);
----  snip  ----
The last one is in a #if DEBUG and trivial to fix.

The others are in the Windows port - so someone should also compile it
there and see if it works.
And IIRC we have in the Windows p[ao]rt one array left as mentioned
above.

[...]
> Since the OS interface index is guaranteed to be unique, I consider my change to be correct.
> 
> If I didn't do anything stupid, please feel free to apply the patch to the olsrd repository.

BTW we have actually an olsrd-dev@ list for development
stuff/source/patches like this.

	Bernd
-- 
Firmix Software GmbH                   http://www.firmix.at/
mobil: +43 664 4416156                 fax: +43 1 7890849-55
          Embedded Linux Development and Services




