[Olsr-cvs] olsrd-current CHANGELOG,1.111,1.112

Bernd Petrovitsch (spam-protected)
Thu Nov 8 23:47:41 CET 2007


Update of /cvsroot/olsrd/olsrd-current
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv28726

Modified Files:
	CHANGELOG 
Log Message:
Another fat commit:

The main target was:
- Fixed the misleading definition of "v4" in "struct olsr_ip_addr" fom
  "olsr_u32_t" (in network-byteorder!) to "struct in_addr". Lots of
  temporary variables to call inet_ntoa()/inet_ptoa() vanished .....
- declare "int_addr", "int_netmask" and "int_broadaddr" in "struct interface"
  as "struct sockaddr_in" since it is that what we actually want there (and
  it is similar to the IPv6 code).

To get that thoroughly via compiler errors, we get:
- We have now ip4_to_string(), ip6_to_string() and olsr_ip_to_string()
  to print a "struct in_addr", "struct in6_addr" and "union olsr_ip_addr"
  into a string buffer.

Alas, this also annoyed me since ages:
- cleanup: olsr_ip_to_string() and similar non-reentrant functions now must
  get a target buffer. To ease that, there is the "struct ipaddr_str"
  which is large enough for all of them (read: for an IPv6 address). This
  also removes the cyclic buffer there.
  All of these function return a "const char *" which can be directly used
  for printf(3) and friends.

And some cleanups:
- const'ified more functions
- converted the source to UTF-8.
- "struct sig_msg" uses an olsr_u8_t for a byte array (and not "char")
- force the few inline function to always be inlined.
- #ifdef the body of the olsr_print_hna_set() and olsr_print_neighbor_table()
  if nothing is done
- use "inline_avl_comp_ipv4()" in "avl_comp_ipv4()"
- clean up the routes on more signals. Basically we want to do this on all
  signals which terminate the program.
- killed a superflous global buffer in src/main.c

This version was breing since weeks and running for severa day in Vienna's
FunkFeuer net without any noticably problem!

Please report anything that broke!



Index: CHANGELOG
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/CHANGELOG,v
retrieving revision 1.111
retrieving revision 1.112
diff -C2 -d -r1.111 -r1.112
*** CHANGELOG	5 Nov 2007 15:34:37 -0000	1.111
--- CHANGELOG	8 Nov 2007 22:47:39 -0000	1.112
***************
*** 53,56 ****
--- 53,98 ----
    look at the global "olsr_cnf->ip_version".
  - added a olsr_ip_prefix_to_string() function
+ - .h file cleanup: def.h does not longer include net_olsr.h because it 
+   doesn't needs it.
+ - more type safety: the macros COPY_IP() and COMP_IP are gone and replaced
+   with "=" or similar "normal" C operations. There are also now the inline
+   functions ip4cmp() and ip4equal() to work on "struct in_addr", ip6cmp()
+   and ip6equal() to work on "struct in6_addr" and ipcmp() and ip6equal()
+   to work on "union olsr_ip_addr".
+   Most (or even more precise: almost all) uses of COPY_IP() and COMP_IP()
+   are in "if (olsr_cnf->ip_version) { ... } else { ... }" anyway to
+   there is no reson to copy an IPv4 address effectively with
+   "memcpy(&dst, &src, 4)" or compare with memcmp(&a, &b, 4)" wher the
+   always "4" is stored in a variable inhibiting compiler optimization.
+   There is also the deprecated function genipcopy() mimicking the old
+   typeless COPY_IP() macro for the last few places where a cleanup is
+   needed anyways.
+   There also lots of old macros left over (commented out of course) until
+   we are confident that everything works. And then I will kill them too.
+ - Fixed the misleading definition of "v4" in "struct olsr_ip_addr" fom
+   "olsr_u32_t" (in network-byteorder!) to "struct in_addr". Lots of
+   temporary variables to call inet_ntoa()/inet_ptoa() vanished .....
+ - We have now ip4_to_string(), ip6_to_string() and olsr_ip_to_string()
+   to print a "struct in_addr", "struct in6_addr" and "union olsr_ip_addr"
+   into a string buffer.
+ - cleanup: olsr_ip_to_string() and similar non-reentrant functions now must
+   get a target buffer. To ease that, there is the "struct ipaddr_str"
+   which is large enough for all of them (read: for an IPv6 address). This
+   also removes the cyclic buffer there.
+   All of these function return a "const char *" which can be directly used
+   for printf(3) and friends.
+ - const'ified more functions
+ - converted the source to UTF-8.
+ - "struct sig_msg" uses an olsr_u8_t for a byte array (and not "char")
+ - force the few inline function to always be inlined.
+ - #ifdef the body of the olsr_print_hna_set() and olsr_print_neighbor_table()
+   if nothing is done
+ - declare "int_addr", "int_netmask" and "int_broadaddr" in "struct interface"
+   as "struct sockaddr_in" since it is that what we actually want there (and
+   it is similar to the IPv6 code).
+ - use "inline_avl_comp_ipv4()" in "avl_comp_ipv4()"
+ - clean up the routes on more signals. Basically we want to do this on all
+   signals which terminate the program.
+ - killed a superflous global buffer in src/main.c
  
  0.5.4 ---------------------------------------------------------------------





More information about the Olsr-cvs mailing list