On Mon, 2007-10-22 at 10:03 +0200, Hannes Gredler wrote:
> On Sun, Oct 21, 2007 at 01:05:56AM +0200, Bernd Petrovitsch wrote:
> | Hi all!
> | 
> | I stumbled recently over the structs hna4_entry and hna6_entry (in
> | src/olsrd_cnf.h), which look pretty much the same (they contain an IP
> | address and a netmask/prefixlen) and are there for the same purpose
> | (store a locally configured HNA).
> | So there is no real reason to duplicate data structures and source
> | handling those. The IMHO working patch is in
> | http://bernd.petrovitsch.priv.at/olsr-ng/local-hna-cleanup-20071020.patch
> | but I'm not sure that it doesn't hurt others.
> | Does anyone see any problems?
> 
> hi bernd,
> 
> patch looks good - one concern i have is the (reuse of netmasks).

Well, internal compatibility .....

> IMO we should focus on moving all the code towards prefixes + prefixlenght
> notation and get rid of netmasks altogether. so olsr_ip_prefix_to_string()
> should become much simpler.

ACK, I'm all for it if only to make IPv4 and IPv6 even more similar to
simplify things (and it shouldn't be a problem to accept both forms for
IPv4 on the config-file/input side).
For the output side, I would simply change the output format sooner or
later everywhere to "/$prefix" - but I have nothing noteworthy down in
the "food chain" (as e.g. some widely used firmware from Berlin which
probably needs tweaking and social acceptance by the users) and can live
with no optical change on the output and/or plug-in specialities).

But that's IMHO another larger untertaking (read: live with it for weeks
and refix other changes, plugin updates and patches etc.) and I didn't
look into it up to now (read: think, how it should look afterwards, find
the smallest step in the right direction and start to get "make" compile
everything again).

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




