olsrd.git
12 years ago* added niclude files needed by this header file
Bernd Petrovitsch [Thu, 6 Dec 2007 20:41:51 +0000 (20:41 +0000)]
* added niclude files needed by this header file

12 years ago* commented out unused functions
Bernd Petrovitsch [Thu, 6 Dec 2007 20:25:47 +0000 (20:25 +0000)]
* commented out unused functions

12 years agoadding $(OS_LIB_PTHREAD) once in Makefile.inc is enough
Bernd Petrovitsch [Thu, 6 Dec 2007 20:22:37 +0000 (20:22 +0000)]
adding $(OS_LIB_PTHREAD) once in Makefile.inc is enough

12 years ago- added "-ffunction-sections -fdata-sections -Wl,--print-gc-sections" and
Bernd Petrovitsch [Thu, 6 Dec 2007 20:13:56 +0000 (20:13 +0000)]
- added "-ffunction-sections -fdata-sections -Wl,--print-gc-sections" and
  comnmented them out:
These tell gcc to put each function and global variable in a separate section.
The linker can than remove all unreferenced section. But in the olsrd binary
unused doesn't imply unused at all since the function may be used by plugins,
e.g. the ones in src/plugin_utils.c.
So we can use that featuer at most to identify unused functions and remove them
from the source by hand.

12 years ago- adding $(OS_LIB_PTHREAD) once in Makefile.inc is enough
Bernd Petrovitsch [Thu, 6 Dec 2007 20:12:47 +0000 (20:12 +0000)]
- adding $(OS_LIB_PTHREAD) once in Makefile.inc is enough
- removed an superflous dependency

12 years ago* similar to gcc-warnings but for linker options
Bernd Petrovitsch [Thu, 6 Dec 2007 20:10:19 +0000 (20:10 +0000)]
* similar to gcc-warnings but for linker options

12 years ago* make it work with gcc-3.2.3 and beautified it
Bernd Petrovitsch [Thu, 6 Dec 2007 18:17:35 +0000 (18:17 +0000)]
* make it work with gcc-3.2.3 and beautified it

12 years ago* ISO8859-1 -> UTF-8
Bernd Petrovitsch [Sun, 2 Dec 2007 19:00:30 +0000 (19:00 +0000)]
* ISO8859-1 -> UTF-8

12 years ago* fixed a warning on 64bit
Bernd Petrovitsch [Thu, 29 Nov 2007 23:40:08 +0000 (23:40 +0000)]
* fixed a warning on 64bit

12 years ago* added more warnings
Bernd Petrovitsch [Thu, 29 Nov 2007 23:03:48 +0000 (23:03 +0000)]
* added more warnings

12 years ago- killed hna_chgestruct to reduce malloc()/free() churn
Bernd Petrovitsch [Thu, 29 Nov 2007 23:03:07 +0000 (23:03 +0000)]
- killed hna_chgestruct to reduce malloc()/free() churn

12 years ago* fixed warnings
Bernd Petrovitsch [Thu, 29 Nov 2007 22:59:51 +0000 (22:59 +0000)]
* fixed warnings

12 years ago* missed the changelog
Bernd Petrovitsch [Thu, 29 Nov 2007 22:40:11 +0000 (22:40 +0000)]
* missed the changelog

12 years ago"open_ipc" is only a boolean value containing "olsr_cnf->debug_level > 1".
Bernd Petrovitsch [Thu, 29 Nov 2007 22:21:26 +0000 (22:21 +0000)]
"open_ipc" is  only a boolean value containing "olsr_cnf->debug_level > 1".
So I see no reason to keep that variable.

Apart from the the attached patch makes the "#if" condition for the
"rts" field identical to all other references to it.

12 years ago* more fixes fro MacOSX
Bernd Petrovitsch [Thu, 29 Nov 2007 18:20:45 +0000 (18:20 +0000)]
* more fixes fro MacOSX

12 years ago* removed the commented out COPY_IP() and COMP_IP() macros - everything seems to...
Bernd Petrovitsch [Thu, 29 Nov 2007 18:10:18 +0000 (18:10 +0000)]
* removed the commented out COPY_IP() and COMP_IP() macros - everything seems to work

12 years ago* ISO8859-* -> UTF_8
Bernd Petrovitsch [Thu, 29 Nov 2007 18:09:11 +0000 (18:09 +0000)]
* ISO8859-* -> UTF_8

12 years ago* ISO8859-* -> UTF_8
Bernd Petrovitsch [Thu, 29 Nov 2007 17:59:29 +0000 (17:59 +0000)]
* ISO8859-* -> UTF_8

12 years ago* killed the duplicated olsr_ip_to_string() functions
Bernd Petrovitsch [Thu, 29 Nov 2007 17:56:57 +0000 (17:56 +0000)]
* killed the duplicated olsr_ip_to_string() functions
* using "ipcalc.h" and killed the COPY_IP()/COMP_IP() macros

12 years ago* added a forgotten line
Bernd Petrovitsch [Thu, 29 Nov 2007 17:14:41 +0000 (17:14 +0000)]
* added a forgotten line

12 years ago* applied bsdfix_pwm.diff.txt from Patrick McCarty <mccartyp@gmail.com> so that ...
Bernd Petrovitsch [Thu, 29 Nov 2007 17:09:16 +0000 (17:09 +0000)]
* applied bsdfix_pwm.diff.txt from Patrick McCarty <mccartyp@gmail.com> so that *BSD compiles and runs

12 years ago* fixed a warning
Bernd Petrovitsch [Thu, 29 Nov 2007 17:07:15 +0000 (17:07 +0000)]
* fixed a warning

12 years ago* define LINUX_POLICY_ROUTING only if it is not defined before
Bernd Petrovitsch [Thu, 29 Nov 2007 15:47:26 +0000 (15:47 +0000)]
* define LINUX_POLICY_ROUTING only if it is not defined before

12 years ago* fixed another corner
Bernd Petrovitsch [Thu, 29 Nov 2007 01:38:36 +0000 (01:38 +0000)]
* fixed another corner

12 years ago* fixed debug output
Bernd Petrovitsch [Thu, 29 Nov 2007 01:29:53 +0000 (01:29 +0000)]
* fixed debug output

12 years ago* and some blurb for the changelog
Bernd Petrovitsch [Thu, 29 Nov 2007 00:50:38 +0000 (00:50 +0000)]
* and some blurb for the changelog

12 years agoMajor Changes:
Bernd Petrovitsch [Thu, 29 Nov 2007 00:49:42 +0000 (00:49 +0000)]
Major Changes:
- renamed "struct local_hna_entry" to "struct ip_prefix_list" since
  it is exactly that. Renamed the functions in src/local_hna_set.{c,h}
  in the same way.
- each IPv4 and IPv6 function pairs in src/local_hna_set.{c,h} is
  called from the same place and have the same signature. So I
  condensed each of them.
- Since we have only 3 functions left in src/local_hna_set.{c,h}
  and they are used for the configuration, the .h file is now part
  of src/olsr_cfg.h and the ,c file of src/cfgparser/olsrd_conf.c.
- replaced "struct ipc_net" with "struct ip_prefix_list" since it
  serves the same purpose as the "struct ip_prefix_list"
- replaced "struct ipc_host" with "struct ip_prefix_list" since it
  serves the same purpose as the "struct ip_prefix_list" and is
  just a special case. No need to duplicate code etc.
- removed "union hna_netmask" from src/olsr_types since we use the
  prefix_len everywhere (and that is an olsr_u8_t in several other
  struct's).
  That implies changes and simplifications in the code handling
  them (since the IPv4 is similar to IPv6).
- the config file parser now understands for IPv4 addresses also
  "/$prefix".
- On the output side, the patch generates only "/$prefix" which
  kills code since it is the same as the IPv6 handling.
- There are some netmask conversions left (mainly in the plugins)
  but that be cleaned up afterwards.
- extracted ip{,4,6}{cmp,equal} and formatting functions from
  net_olsr.{c,h} into src/ipcalc.{c,h} since net_olsr.h became
  IMHO to much of a "put anything in there".
- renamed "sockaddr_to_string()" to "sockaddr4_to_string()"
  since it is exactly that (unless I'm missing something).

Minor Changes:
- lib/httpinfo/src/admin_html.h contained just some variable
  definitions so it is now integrated in the only user:
  admin_interface.c
- olsrd_dot_draw.c got rid of two indicator variables if
  a socket is valid or not. Since sockets may use "-1" as the
  "not open", "invalid" value, there is no need for two more
  ints.
- and the dot_draw plugin is somewhat smaller and easier to read.
- const'ified some functions

12 years agoPatch from Sven-Ola Tuecke <sven-ola@gmx.de> from
Bernd Petrovitsch [Thu, 29 Nov 2007 00:34:22 +0000 (00:34 +0000)]
Patch from Sven-Ola Tuecke <sven-ola@gmx.de> from
http://download-master.berlin.freifunk.net/sven-ola/nylon/packages/olsrd/files/138-olsrd-fixdotdraw.patch: fix the dot_draw plugin

12 years agoPatch from Sven-Ola Tuecke <sven-ola@gmx.de> from
Bernd Petrovitsch [Thu, 29 Nov 2007 00:26:16 +0000 (00:26 +0000)]
Patch from Sven-Ola Tuecke <sven-ola@gmx.de> from
http://download-master.berlin.freifunk.net/sven-ola/nylon/packages/olsrd/files/135-georss-map-for-nameservice.patch: fixes and extensions for the namesaervice plugin

12 years agoPatch from Sven-Ola Tuecke <sven-ola@gmx.de> from
Bernd Petrovitsch [Thu, 29 Nov 2007 00:24:00 +0000 (00:24 +0000)]
Patch from Sven-Ola Tuecke <sven-ola@gmx.de> from
http://download-master.berlin.freifunk.net/sven-ola/nylon/packages/olsrd/files/132-save-the-fish.patch:
really savet he fish and avoid to forward invlaid messages from older olsrd versions

12 years agoPatch from Sven-Ola Tuecke <sven-ola@gmx.de> from
Bernd Petrovitsch [Thu, 29 Nov 2007 00:18:53 +0000 (00:18 +0000)]
Patch from Sven-Ola Tuecke <sven-ola@gmx.de> from
http://download-master.berlin.freifunk.net/sven-ola/nylon/packages/olsrd/files/103-olsrd-rt-exportroute-cleanup.patch:
avoid a malloc()ed list of functions

12 years agoBug Fixes (of stupid and forgotten bugs) from Sven-Ola Tuecke <sven-ola@gmx.de> from
Bernd Petrovitsch [Thu, 29 Nov 2007 00:10:17 +0000 (00:10 +0000)]
Bug Fixes (of stupid and forgotten bugs) from Sven-Ola Tuecke <sven-ola@gmx.de> from
http://download-master.berlin.freifunk.net/sven-ola/nylon/packages/olsrd/files/102-olsrd-cvs-fixes.patch

12 years ago- a forgotten hangelog entry
Bernd Petrovitsch [Thu, 29 Nov 2007 00:07:37 +0000 (00:07 +0000)]
- a forgotten hangelog entry
- a few more trivial BSD fixes

12 years ago* applied (a somewhat modified) patch by Patrick McCarty <mccartyp@gmail.com>
Bernd Petrovitsch [Wed, 28 Nov 2007 10:09:03 +0000 (10:09 +0000)]
* applied (a somewhat modified) patch by Patrick McCarty <mccartyp@gmail.com>

12 years ago* fixed compile warnings
Bernd Petrovitsch [Tue, 27 Nov 2007 13:39:22 +0000 (13:39 +0000)]
* fixed compile warnings

12 years ago* fixed compile warnings
Bernd Petrovitsch [Tue, 27 Nov 2007 13:35:06 +0000 (13:35 +0000)]
* fixed compile warnings

12 years ago* saved a few bytes
Bernd Petrovitsch [Sun, 25 Nov 2007 22:08:57 +0000 (22:08 +0000)]
* saved a few bytes

12 years ago* saved a few bytes
Bernd Petrovitsch [Sun, 25 Nov 2007 22:02:33 +0000 (22:02 +0000)]
* saved a few bytes

12 years ago* fixed name - and commented the unused enum out
Bernd Petrovitsch [Sun, 25 Nov 2007 21:41:05 +0000 (21:41 +0000)]
* fixed name - and commented the unused enum out

12 years ago* oops, fixed typo
Bernd Petrovitsch [Sun, 25 Nov 2007 21:40:35 +0000 (21:40 +0000)]
* oops, fixed typo

12 years ago* rearranged fields a little bit to save space
Bernd Petrovitsch [Sun, 25 Nov 2007 21:38:13 +0000 (21:38 +0000)]
* rearranged fields a little bit to save space

12 years ago* fixed bug: ip4cmp() was severly broken
Bernd Petrovitsch [Sun, 25 Nov 2007 21:23:29 +0000 (21:23 +0000)]
* fixed bug: ip4cmp() was severly broken

12 years ago* added paranoia checks
Bernd Petrovitsch [Sun, 25 Nov 2007 13:08:54 +0000 (13:08 +0000)]
* added paranoia checks

12 years ago* prefix_len is always an unsigned 8 bit int
Bernd Petrovitsch [Fri, 23 Nov 2007 23:40:43 +0000 (23:40 +0000)]
* prefix_len is always an unsigned 8 bit int

12 years ago* bug fix: set "ipsize" and "maxplen" if we set the the "ip_version"
Bernd Petrovitsch [Thu, 22 Nov 2007 11:43:36 +0000 (11:43 +0000)]
* bug fix: set "ipsize" and "maxplen" if we set the the "ip_version"

12 years ago* #define MSG_NOSIGNAL only if it's really not defined. Thanks to
Bernd Petrovitsch [Tue, 20 Nov 2007 23:20:23 +0000 (23:20 +0000)]
* #define MSG_NOSIGNAL only if it's really not defined. Thanks to
  G.Fischer@vt.TU-Berlin.DE for reporting this

12 years ago* use "__attribute__((unused))"
Bernd Petrovitsch [Tue, 20 Nov 2007 23:19:08 +0000 (23:19 +0000)]
* use "__attribute__((unused))"
* "olsr_argv = argv" is not used in Win32 so compile completely it out
* Fixed a compiler warning reported by G.Fischer@vt.TU-Berlin.DE
* avoid to cluttered source
* sanitize macros

12 years ago* added "#include <limits.h>" as we use some constant from it
Bernd Petrovitsch [Tue, 20 Nov 2007 23:16:17 +0000 (23:16 +0000)]
* added "#include <limits.h>" as we use some constant from it

12 years ago* added support for EXTRA_CPPFLAGS
Bernd Petrovitsch [Mon, 19 Nov 2007 14:35:10 +0000 (14:35 +0000)]
* added support for EXTRA_CPPFLAGS

12 years ago- olsr_process_message_neighbors is now a static function and called process_message_...
Bernd Petrovitsch [Sun, 18 Nov 2007 22:28:35 +0000 (22:28 +0000)]
- olsr_process_message_neighbors is now a static function and called process_message_neighbors
- olsr_linking_this_2_entries is now a static function and called  linking_this_2_entries
- lookup_mpr_status() is now a static function
All of them are defined at the to allow automatic inlining.

12 years ago* killed an unused field
Bernd Petrovitsch [Sun, 18 Nov 2007 21:58:32 +0000 (21:58 +0000)]
* killed an unused field

12 years ago* and a few lines in the CHANGELOG
Bernd Petrovitsch [Sun, 18 Nov 2007 20:39:09 +0000 (20:39 +0000)]
* and a few lines in the CHANGELOG

12 years ago- use ip{4,}cmp in lq_avl.[ch] to resue the code. inline_avl_comp_ipv4
Bernd Petrovitsch [Sun, 18 Nov 2007 20:35:59 +0000 (20:35 +0000)]
- use ip{4,}cmp in lq_avl.[ch] to resue the code. inline_avl_comp_ipv4
  is superflous now (and replaced by ip4cmp).
- use the global MIN and MAX macro instead of AVLMIN and AVLMAX

12 years agoconsolidated ip{4,6,}{cmp,equal}: all are nwo inline functions using only
Bernd Petrovitsch [Sun, 18 Nov 2007 20:01:08 +0000 (20:01 +0000)]
consolidated ip{4,6,}{cmp,equal}: all are nwo inline functions using only
the minimal necessary operations. Thanks to Hannes Gredler
<hannes@gedler.at> and Sven-Ola Tuecke <mail2news@commando.de> for pointing
that out and suggesting the `inline`, respectively.

12 years ago* patch by Hannes Gredler <hannes@grwedler.at>: fixed a compile warning
Bernd Petrovitsch [Sat, 17 Nov 2007 00:05:54 +0000 (00:05 +0000)]
* patch by Hannes Gredler <hannes@grwedler.at>: fixed a compile warning

12 years ago* added -Wcast-qual: this killed lots of unnecessary type-casts
Bernd Petrovitsch [Fri, 16 Nov 2007 22:56:54 +0000 (22:56 +0000)]
* added -Wcast-qual: this killed lots of unnecessary type-casts

12 years agoPATCH by Hannes Gredler <hannes@gredler.at>:
Bernd Petrovitsch [Fri, 16 Nov 2007 21:43:55 +0000 (21:43 +0000)]
PATCH by Hannes Gredler <hannes@gredler.at>:
- refactoring of TC parsing to kill another pile of malloc()/free()s
  saving (again) code and especially run.time performance.

12 years ago* fixed bug: we got garbled output on the line with "shape=box"
Bernd Petrovitsch [Fri, 16 Nov 2007 19:52:09 +0000 (19:52 +0000)]
* fixed bug: we got garbled output on the line with "shape=box"
* fixed file descriptor leaks ipc_action()
* killed the two indicator variables "ipc_open" and "ipc_socket_up". We
  use the filedescriptors as we can easily use -1 as the "socket is down"
  indocation
* killed unused return values
* reduced the clutter: we have now a ipc_send_fmt() function which
  does the snprintf() and not spread that all over

12 years ago* added -Wbad-function-cast
Bernd Petrovitsch [Fri, 16 Nov 2007 19:34:26 +0000 (19:34 +0000)]
* added -Wbad-function-cast

12 years ago* added -WWendif-labels
Bernd Petrovitsch [Fri, 16 Nov 2007 19:14:33 +0000 (19:14 +0000)]
* added -WWendif-labels

12 years ago* added -Wwrite-strings
Bernd Petrovitsch [Fri, 16 Nov 2007 19:12:56 +0000 (19:12 +0000)]
* added -Wwrite-strings

12 years agocleanup: merged html.h into the places where it is used since it is much
Bernd Petrovitsch [Thu, 15 Nov 2007 00:35:32 +0000 (00:35 +0000)]
cleanup: merged html.h into the places where it is used since it is much
         easier to see what's going on
cleanup: avoid hard-coded values and use sizeof()
fixed the generated html

12 years ago* and somethigng here too
Bernd Petrovitsch [Wed, 14 Nov 2007 11:08:05 +0000 (11:08 +0000)]
* and somethigng here too

12 years agoPatch by Hannes Gredler <hannes@gredler.at> to avoid setting routes
Bernd Petrovitsch [Wed, 14 Nov 2007 11:03:52 +0000 (11:03 +0000)]
Patch by Hannes Gredler <hannes@gredler.at> to avoid setting routes
with an invalid impossible netmask.

12 years ago* fixed a bug in the olsr_netmask_to_prefix() function which produced
Bernd Petrovitsch [Wed, 14 Nov 2007 11:01:03 +0000 (11:01 +0000)]
* fixed a bug in the olsr_netmask_to_prefix() function which produced
  invalid netmasks if feeded with 255.255.255.255.
  Thnaks to Hannes Gredler <hannes@gredler.at> for pointing to that
  function.
* replaced the second "(for()" loop with a simple "switch()" for the
  9 legal/valid/supported values of 1 byte netmasks. So we can now detect
  illegal ones and report this with returning UINT_MAX as prefix length
  (and writing something out).
  That really shouldn't happen but God knows what some clowns sends over
  the net to annoy us.

12 years agofixed and improved the `gcc-warnings` script:
Bernd Petrovitsch [Mon, 12 Nov 2007 00:12:15 +0000 (00:12 +0000)]
fixed and improved the `gcc-warnings` script:
* support older gcc's (as on Debian/Sarge) as they have slightly different
  error messages
* removed superflous lines
* replaced the call of `sed` with shell built-in features fixing syntax
  errors on Debian/Sarge
* set all locale-relevant variables to "C" (just to be sure)

12 years ago* and something for the CHANGELOG
Bernd Petrovitsch [Sun, 11 Nov 2007 23:25:29 +0000 (23:25 +0000)]
* and something for the CHANGELOG

12 years ago* const'ified olsr_ioctl_{add,del}_route{,6}()
Bernd Petrovitsch [Sun, 11 Nov 2007 23:10:25 +0000 (23:10 +0000)]
* const'ified olsr_ioctl_{add,del}_route{,6}()
  There are probably a few "const" missing for win32 and BSD.
* const'ified moer parameters in many more functions in the .h and
  .c files
* init-functions with constant or ignored return values are "void"
* created a typedef fro the callback in "struct export_route_entry"
  and using it!
* moved the initilaization of the {add,chg,del}_kernel_list variables
  into process_routes.c. So they are now "static" there.
* olsr_export_{add,del}_route{,6} are now static in process_routes.c
  since they are not used elsewhere.
* olsr_addroute_add_function() and olsr_deldroute_add_function() were
  almost identical - made one function out of it.
  Same for olsr_addroute_del_function() and olsr_deldroute_del_function().
* factored out common code
* fixed the sort order in avl_comp_ipv4_prefix(): We compare now the IPv4
  values in host byte order (and not network byte order). So the route
  list in the e.g. httpinfo plugin is now nicely sorted.

12 years ago* const'ified ipc_route_send_rtentry
Bernd Petrovitsch [Sun, 11 Nov 2007 22:59:29 +0000 (22:59 +0000)]
* const'ified ipc_route_send_rtentry

12 years ago* killed a superflous "return" at the end of a void function
Bernd Petrovitsch [Sun, 11 Nov 2007 22:56:34 +0000 (22:56 +0000)]
* killed a superflous "return" at the end of a void function

12 years ago* made inline functions from avl_walk_{first,last,next,prev}
Bernd Petrovitsch [Sun, 11 Nov 2007 22:55:17 +0000 (22:55 +0000)]
* made inline functions from avl_walk_{first,last,next,prev}
* created "const" versions of it
* inline_avl_comp_ipv4() is now also an inline function (and not a macro)
* created a typedef for the avl tree comparison functions and use it!
* cleanup: compare tree->comp to NULL as it is a pointer
* killed a superflous "return"at the end of a void function

12 years ago* moved the #define INLINE to a more appropriate .h file
Bernd Petrovitsch [Sun, 11 Nov 2007 22:51:54 +0000 (22:51 +0000)]
* moved the #define INLINE to a more appropriate .h file

12 years ago* do not print / in the routeing table
Bernd Petrovitsch [Sun, 11 Nov 2007 22:00:39 +0000 (22:00 +0000)]
* do not print / in the routeing table

12 years ago* adapted to the one delivered by the Debian package as a result of a recent discussi...
Bernd Petrovitsch [Sun, 11 Nov 2007 21:32:03 +0000 (21:32 +0000)]
* adapted to the one delivered by the Debian package as a result of a recent discussion on olsr-dev@olsr.org

12 years ago* killed gotos
Bernd Petrovitsch [Fri, 9 Nov 2007 00:11:01 +0000 (00:11 +0000)]
* killed gotos

12 years ago* added a comment
Bernd Petrovitsch [Thu, 8 Nov 2007 23:54:28 +0000 (23:54 +0000)]
* added a comment

12 years ago* win32 doesn't support that feature
Bernd Petrovitsch [Thu, 8 Nov 2007 23:33:54 +0000 (23:33 +0000)]
* win32 doesn't support that feature

12 years ago * and make it compile on Win32
Bernd Petrovitsch [Thu, 8 Nov 2007 23:23:13 +0000 (23:23 +0000)]
 * and make it compile on Win32

12 years agoAnother fat commit:
Bernd Petrovitsch [Thu, 8 Nov 2007 22:47:43 +0000 (22:47 +0000)]
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!

12 years ago* use automatic variables
Bernd Petrovitsch [Thu, 8 Nov 2007 22:17:08 +0000 (22:17 +0000)]
* use automatic variables

12 years ago* killed a superflous variable
Bernd Petrovitsch [Thu, 8 Nov 2007 15:34:11 +0000 (15:34 +0000)]
* killed a superflous variable

12 years ago* s/-lpthread/$(OS_LIB_PTHREAD)/
Bernd Petrovitsch [Thu, 8 Nov 2007 15:28:48 +0000 (15:28 +0000)]
* s/-lpthread/$(OS_LIB_PTHREAD)/

12 years agoand an entry here
Bernd Petrovitsch [Mon, 5 Nov 2007 15:34:37 +0000 (15:34 +0000)]
and an entry here

12 years agoCleanup:
Bernd Petrovitsch [Mon, 5 Nov 2007 15:32:55 +0000 (15:32 +0000)]
Cleanup:
* Merged "struct hna4_entry" and "struct hna6_entry" into
  "struct local_hna_entry" (as "struct hna_entry" is a different thing)
  Both have almost the same data (IP address + netmask/prefix) so we use
  the quite new "struct olsr_ip_prefix" to store it.
  Also merged the "hna4" and "hna6" pointer in "struct olsr_config" -
  look at the global "olsr_cnf->ip_version".
* const'ified here and there
* added a olsr_ip_prefix_to_string() function

12 years ago* removed left-over target
Bernd Petrovitsch [Sun, 4 Nov 2007 23:34:57 +0000 (23:34 +0000)]
* removed left-over target

12 years ago* added a TMPFILES variable. Place all files there which should be removed on
Bernd Petrovitsch [Sun, 4 Nov 2007 19:07:43 +0000 (19:07 +0000)]
* added a TMPFILES variable. Place all files there which should be removed on
  a "clean" (which are usually temporary files - thus the name).
* Killed the recursive make of the src/cfgparser directory
 - extracted the directory-local dependencies etc. into src/cfgparser/local.mk
   src/cfgparser/Makefile retains all of the rest to build in the local directory.
   Does actually anyone need that?
 - include'ing that in Makefile
 - removed all special handling/casing of cfgparser parts in Makefile
* cleanup: plugin rules are now all more similar

12 years agoPatch committed in bug 1825587 from the SF bugtracker. This should add functionallity...
Andreas Tonnesen [Sun, 4 Nov 2007 18:57:17 +0000 (18:57 +0000)]
Patch committed in bug 1825587 from the SF bugtracker. This should add functionallity for detecting WLAN interfaces on openBSD. Committing this since the only available devs to assign bugs to are me and Thomas(which is not very active anymore either).

12 years ago* also check -m
Bernd Petrovitsch [Sun, 4 Nov 2007 18:45:30 +0000 (18:45 +0000)]
* also check -m

12 years ago* cleanup:
Bernd Petrovitsch [Sun, 4 Nov 2007 17:52:13 +0000 (17:52 +0000)]
* cleanup:
  - #ifdef more away if NODEBUG is enabled.
  - reduce the size of the data and code

12 years ago* do not generate a dependency file for the generated .c file since it makes no sense
Bernd Petrovitsch [Sun, 4 Nov 2007 15:27:50 +0000 (15:27 +0000)]
* do not generate a dependency file for the generated .c file since it makes no sense

12 years agoKilled "struct olsrd_config *cnf" in src/cfgparser/olsrd_conf.h and replaced
Bernd Petrovitsch [Sat, 3 Nov 2007 23:21:28 +0000 (23:21 +0000)]
Killed "struct olsrd_config *cnf" in src/cfgparser/olsrd_conf.h and replaced
it's usage with "olsr_cnf" from src/defs.h.
Serious cleanup: olsrd_get_default_cnf() does no longer initialize the global
"cnf" variable" but uses a local one which is returned as before. And
olsrd_parse_cnf() does no longer return the global variable it is working on.

12 years agoPATCH by John Hay <jhay@meraka.org.za>:
Bernd Petrovitsch [Sat, 3 Nov 2007 23:11:40 +0000 (23:11 +0000)]
PATCH by John Hay <jhay@meraka.org.za>:
- also printout our own HNAs in the dotdraw plugin.

12 years agoOK, I was too silly to throw it into the correct plugin.
Bernd Petrovitsch [Sat, 3 Nov 2007 23:03:55 +0000 (23:03 +0000)]
OK, I was too silly to throw it into the correct plugin.
Should be fixed now.

12 years agoadded http://meshcube.org/nylon/utils/olsr-topology-view.pl into
Bernd Petrovitsch [Sat, 3 Nov 2007 22:56:07 +0000 (22:56 +0000)]
added meshcube.org/nylon/utils/olsr-topology-view.pl into
lib/httpinfo/misc as suggested by Jens Nachtigall <nachtigall@web.de>

12 years ago* added a comment
Bernd Petrovitsch [Fri, 2 Nov 2007 22:00:26 +0000 (22:00 +0000)]
* added a comment

12 years agoSome minor and trivial cleanup: Added two functions to calculate the ETX
Bernd Petrovitsch [Fri, 2 Nov 2007 20:58:07 +0000 (20:58 +0000)]
Some minor and trivial cleanup: Added two functions to calculate the ETX
value from a struct tc_edge_entry and a struct link_entry, respectively.
And use them everywhere.

12 years agoWhile working on something else, I stumbled over this. Obviously no one\ 1
Bernd Petrovitsch [Fri, 2 Nov 2007 15:51:46 +0000 (15:51 +0000)]
While working on something else, I stumbled over this. Obviously no one\ 1
ever used the "secure" plugin on 64bit hardware:
- fixed lib/secure/src/md5.h: This was broken as it had
  "typedef unsigned long int UINT4;". "unsigned long int" is 8 bytes on
  x86_64.
  We are using now the standardized types from <inttypes.h>.
- fixed warnings and improved lib/secure/src/md5.c:
  * we are using memcpy() and memset() instead of the open-coded loops as
    suggested
  * const'ified
  * added function prototypes for static functions
  * moved static functions to the top so that their declaration is before
    their use to allow gcc to inline if only used once.
  It remains ugly - God knows why there are that so many useless
  type-casts.

12 years ago* ooops, hide the dependency generation calls again
Bernd Petrovitsch [Fri, 2 Nov 2007 15:37:09 +0000 (15:37 +0000)]
* ooops, hide the dependency generation calls again

12 years ago* completed changelog message
Bernd Petrovitsch [Fri, 2 Nov 2007 10:57:30 +0000 (10:57 +0000)]
* completed changelog message

12 years agoWith the help of Patrick McCarty <mccartyp@gmail.com>, we got olsr to build
Bernd Petrovitsch [Fri, 2 Nov 2007 10:16:39 +0000 (10:16 +0000)]
With the help of Patrick McCarty <mccartyp@gmail.com>, we got olsr to build
on OpenBSD again:
* OpenBSD'd `sed` is pretty conservative and doesn't understand 's|re|sub|'.
  So we fall back to the old 's/re/sub/' and quote all '/' and '.' correctly
  (which was the main reason to use '|').
* OpenBSD needs an explicit "#include <sys/types.h>" before
  "#include <netinet/in.h>".