Hannes Gredler [Tue, 19 Feb 2008 23:08:51 +0000 (00:08 +0100)]
squelch compiler warnings
Hannes Gredler [Tue, 19 Feb 2008 22:49:52 +0000 (23:49 +0100)]
From Hannes Gredler <hannes@gredler.at>: refactor the timer implementation
-slash all timeout functions and the corresponding infrastructure
-slash all event functions and the corresponding infrastructure
that means all polling based timer comparisions have been removed.
the scheduler rate can be now brought down to 10ms without much
additional overhead.
-introduce a new wheel based timer similar to the BSD kernel implementation
described in http://www.olsr.org/docs/wucs-95-23.pdf
there are three major calls
olsr_start_timer()
olsr_stop_timer()
olsr_change_timer()
alternatively there is a one-stop shop that figures out on its own what
to do.
olsr_set_timer()
this comes handy for avoiding a lot of copy and paste code updating
all the client code.
the new timer API supports periodical and singleshot timers.
once the timer expires a provided function along with a context pointer
is called back. After the singleshot timer fires the used memeory for
the timer is not freed but rather returned to a free memory pool for
avoiding malloc() churn.
the implementation is very efficient as all timer start/stop/change operations
are done in O(1) complexity. walking the timer slot in the main scheduler loop
has a complexity of O(N/K) where K is 256 which should give reasonable defaults
for thousands of timers in the system.
as a sideeffect all wallclock timer references have been removed. now only
one non-wallclock timer obtained by the times() call is maintained.
note that the olsr_secure plugin does keep its wallclock based timer.
it is left to the olsrd_secure plugin authors to convert this to a
non-wallclock based timers to avoid disaster events like when the system
clock changes.
Hannes Gredler [Tue, 19 Feb 2008 21:58:52 +0000 (22:58 +0100)]
From Clemens Hopfer <datacop@inode.at>: dot_draw plugin: close the connection after graph output.
Hannes Gredler [Tue, 19 Feb 2008 21:55:49 +0000 (22:55 +0100)]
From Henning Rogge <rogge@fgan.de>: parser refactoring
refactored the parser of olsrd so that this is done by two new functions:
void olsr_preprocessor_add_function(preprocessor_function);
int olsr_preprocessor_remove_function(preprocessor_function);
The "preprocessor_function" has the type
char *preprocessor_function(char *packet, struct interface *, union olsr_ip_addr *, int *length);
all registered preprocessors are called before the package is decoded by olsrd.
This way the secure plugin (and other possible plugins) can check the
packages, modify them or discard them (by returning NULL)
Hannes Gredler [Mon, 18 Feb 2008 19:24:34 +0000 (20:24 +0100)]
use calloc rather than malloc for lazy callers
Hannes Gredler [Fri, 15 Feb 2008 09:24:54 +0000 (10:24 +0100)]
From Sven-Ola Tuecke <sven-ola@gmx.de>: minor fixed point math bugfix/optimization
Hannes Gredler [Thu, 14 Feb 2008 09:09:28 +0000 (10:09 +0100)]
From Joe Gio <joezgio@gmail.com>: track if AC power is connected/disconnected
Hannes Gredler [Thu, 14 Feb 2008 08:56:01 +0000 (09:56 +0100)]
From Sven-Ola Tuecke <sven-ola@gmx.de>: add support for fixedpoint math
Fixed point math replaces floating point calculations by integer counterparts.
The 20 higher bits of a typical 32 bit hold the digits before the decimal
point > 1.0, the lower 12 bits hold the digits after the decimal point. An
old trick, e.g. used in gaming to speed up calculations, because long (+-*/)
long is always faster than float (+-*/). Of course, all calculations and
automatic number conversions have to be found and adpated.
To help in debugging, added and #ifdef USE_FPM to toggle betwenn FPM and
normal maths. One can remove that at a later stage if we are sure it works
correct. For this, I added CPPFLAGS+=USE_FPM to the central Makefile.inc.
Also critical: When using 20+12 bits, one have to check for overflows and
underflows. This is done by a number of assert() statements active only if
you compile with "make DEBUG=1". The olsrd compiled in this way will of
course save no CPU cycles.
Hannes Gredler [Wed, 6 Feb 2008 19:03:43 +0000 (20:03 +0100)]
tip of tree is now 0.5.6pre
Hannes Gredler [Wed, 6 Feb 2008 18:48:03 +0000 (19:48 +0100)]
tip of tree is now 0.5.6
Hannes Gredler [Wed, 6 Feb 2008 18:32:49 +0000 (19:32 +0100)]
Added tag OLSRD_0_5_5 for changeset
233036647bca
Hannes Gredler [Wed, 6 Feb 2008 18:32:39 +0000 (19:32 +0100)]
change version to 0.5.5
Hannes Gredler [Tue, 5 Feb 2008 10:53:06 +0000 (11:53 +0100)]
From John Hay <jhay@meraka.org.za>: bugfix: do not account for IP headers when building MID6 messages
Hannes Gredler [Thu, 31 Jan 2008 15:29:25 +0000 (16:29 +0100)]
squelch compiler warnings
Hannes Gredler [Thu, 31 Jan 2008 15:29:02 +0000 (16:29 +0100)]
turn off SPF_PROFILING
Hannes Gredler [Wed, 30 Jan 2008 15:13:30 +0000 (16:13 +0100)]
From Andreas Jacobs <andjac@kawo1.rwth-aachen.de>: bugfix for scheduler
After each iteration of the scheduler's main loop the scheduler
calculates, how much time this iteration took, and then sleeps for
the rest of the scheduler interval. The bug lies in the calculation
of the elapsed time, which is converted from a tick count to a
'struct timeval' which consists of a seconds value and a microseconds
value. The seconds are filled in correctly, but the microseconds
field is filled a milliseconds value instead of a microseconds value.
Consequently the elapsed time is always underestimated and afterwards
the scheduler sleeps too long.
Hannes Gredler [Mon, 28 Jan 2008 21:52:38 +0000 (22:52 +0100)]
From Jo-Philipp Wich <freifunk@wwsnet.net: bugfix: avoid infinite loop in the message parser
Hannes Gredler [Sun, 27 Jan 2008 18:04:33 +0000 (19:04 +0100)]
From Sven-Ola Tuecke <sven-ola@gmx.de>: bugfix on Windows Vista: add interface metric to SPF computed metric
Hannes Gredler [Wed, 23 Jan 2008 09:43:39 +0000 (10:43 +0100)]
Added tag OLSRD_0_5_5_RC1 for changeset
669b81f6918e
Hannes Gredler [Wed, 23 Jan 2008 09:43:09 +0000 (10:43 +0100)]
version bump to 0.5.5rc1
Hannes Gredler [Tue, 22 Jan 2008 22:27:02 +0000 (23:27 +0100)]
merge hannes' private tree
Hannes Gredler [Tue, 22 Jan 2008 21:34:51 +0000 (22:34 +0100)]
clean up code-style
Hannes Gredler [Tue, 22 Jan 2008 20:55:26 +0000 (21:55 +0100)]
clean up code-style
Hannes Gredler [Tue, 22 Jan 2008 14:05:34 +0000 (15:05 +0100)]
From John Hay <jhay@meraka.org.za>: compile clean on FreeBSD
Hannes Gredler [Mon, 21 Jan 2008 11:25:26 +0000 (12:25 +0100)]
From Dario Borriello <dario_bodj@hotmail.com>: bugfix: do not update LQ if not configured
Hannes Gredler [Wed, 16 Jan 2008 13:56:44 +0000 (14:56 +0100)]
From Jo-Philipp Wich <freifunk@wwsnet.net: fix olsr_ip_to_string() buffer quirk
Hannes Gredler [Mon, 14 Jan 2008 15:53:50 +0000 (16:53 +0100)]
From Henning Rogge <rogge@fgan.de>: join LQ and non-LQ Hello execution paths
Hannes Gredler [Fri, 4 Jan 2008 12:52:57 +0000 (13:52 +0100)]
merge sven-ola's tree
Hannes Gredler [Fri, 4 Jan 2008 11:08:52 +0000 (12:08 +0100)]
From Jo-Pilipp Wich: fix txtinfo format quirks in HNA table
Sven-Ola Tuecke [Wed, 2 Jan 2008 13:43:11 +0000 (14:43 +0100)]
lqtc-seqno: Optimize check for old seqno numbers in LQTC messages
Sven-Ola Tuecke [Wed, 2 Jan 2008 13:41:35 +0000 (14:41 +0100)]
rttable-default: (from otti) configures a new policy routing table for the default route
Sven-Ola Tuecke [Wed, 2 Jan 2008 13:37:52 +0000 (14:37 +0100)]
lqnatthresh: maintain an advantage for the current (NAT) inet gw
Sven-Ola Tuecke [Wed, 2 Jan 2008 10:47:40 +0000 (11:47 +0100)]
fisheye-startup: Changed to MAX_TTL for the first 32 LQTCs
Sven-Ola Tuecke [Wed, 2 Jan 2008 10:43:03 +0000 (11:43 +0100)]
102-olsrd-windowsfix-missing: Added and removed files necessary for win32 compile
Sven-Ola Tuecke [Wed, 2 Jan 2008 10:37:11 +0000 (11:37 +0100)]
Fix for hg: do not remove anything in .hg with 'make uberclean'
Hannes Gredler [Tue, 1 Jan 2008 20:07:23 +0000 (21:07 +0100)]
squelsh compiler warnings on Mac OSX
Hannes Gredler [Fri, 28 Dec 2007 17:02:54 +0000 (18:02 +0100)]
From Sven-Ola Tuecke: remainder of 133-fix-lqneigh.patch
Hannes Gredler [Fri, 28 Dec 2007 16:57:59 +0000 (17:57 +0100)]
From Sven-Ola Tuecke: 121-olsrd-fib-metric-approx.patch
Hannes Gredler [Fri, 28 Dec 2007 16:53:47 +0000 (17:53 +0100)]
From Sven-Ola Tuecke: 104-olsrd-verysmallfix.patch
Hannes Gredler [Fri, 28 Dec 2007 11:17:46 +0000 (12:17 +0100)]
From Jo-Philipp Wich <freifunk@wwsnet.net>: name-service plugin - write MID entries to hosts file
Hannes Gredler [Fri, 28 Dec 2007 10:58:48 +0000 (11:58 +0100)]
From Sven-Ola Tuecke: 138-optimize-message-generation
Hannes Gredler [Fri, 28 Dec 2007 10:52:53 +0000 (11:52 +0100)]
From Sven-Ola Tuecke: 136-optimize-invalidip-check
Hannes Gredler [Fri, 28 Dec 2007 10:14:55 +0000 (11:14 +0100)]
From Sven-Ola Tuecke: 110-bmf-v152
Grabbed a copy of eric's plugin and adapted that to HEAD
Hannes Gredler [Fri, 28 Dec 2007 10:12:52 +0000 (11:12 +0100)]
From Sven-Ola Tuecke: 104-olsrd-verysmallfix.patch
Hannes Gredler [Fri, 28 Dec 2007 09:35:59 +0000 (10:35 +0100)]
bugfix: fix broken prefix insertion
Hannes Gredler [Thu, 27 Dec 2007 23:18:19 +0000 (00:18 +0100)]
remove CVS ID markers
Hannes Gredler [Thu, 27 Dec 2007 10:44:50 +0000 (11:44 +0100)]
From Lorenz Shori <lorenz.schori@gmx.ch>: Mac OSX fixes
Hannes Gredler [Fri, 21 Dec 2007 15:18:49 +0000 (16:18 +0100)]
remove all .cvsignore files
Hannes Gredler [Fri, 21 Dec 2007 14:36:39 +0000 (15:36 +0100)]
From Sven-Ola Tuecke: 105-fix-lq-buffer-quirks
Hannes Gredler [Fri, 21 Dec 2007 14:35:32 +0000 (15:35 +0100)]
ignore emacs backup files
Hannes Gredler [Fri, 21 Dec 2007 13:14:42 +0000 (14:14 +0100)]
ignore *.rej, *.orig and TAGS files
Hannes Gredler [Fri, 21 Dec 2007 11:21:49 +0000 (12:21 +0100)]
From Sven-Ola Tuecke: 106-fix-seqnocheck
Sven-Ola Tuecke [Tue, 18 Dec 2007 12:35:55 +0000 (13:35 +0100)]
Reworked WIN32 Code
Hannes Gredler [Mon, 17 Dec 2007 10:29:56 +0000 (11:29 +0100)]
add .hgignore
Hannes Gredler [Mon, 17 Dec 2007 10:22:05 +0000 (11:22 +0100)]
fix +x permissions for scripts
Hannes Gredler [Mon, 17 Dec 2007 10:09:40 +0000 (11:09 +0100)]
add introduction blurb for the SPF implementation
Hannes Gredler [Mon, 17 Dec 2007 10:01:54 +0000 (11:01 +0100)]
remove CVS ID markers
Hannes Gredler [Mon, 17 Dec 2007 09:00:46 +0000 (10:00 +0100)]
fix +x permissions for scripts
Hannes Gredler [Mon, 17 Dec 2007 08:55:59 +0000 (09:55 +0100)]
Added tag OLSRD_0_4_8 for changeset
e9beaf82c0ea
Hannes Gredler [Mon, 17 Dec 2007 08:55:59 +0000 (09:55 +0100)]
Added tag OLSRD_0_4_9 for changeset
43d67c4814ef
Hannes Gredler [Mon, 17 Dec 2007 08:55:58 +0000 (09:55 +0100)]
Added tag OLSRD_0_4_10 for changeset
a39cda38836b
Hannes Gredler [Mon, 17 Dec 2007 08:55:58 +0000 (09:55 +0100)]
Added tag OLSRD_0_5_0 for changeset
612f5a21a303
Hannes Gredler [Mon, 17 Dec 2007 08:55:57 +0000 (09:55 +0100)]
Added tag OLSRD_0_5_1 for changeset
c23aab9db1e1
Hannes Gredler [Mon, 17 Dec 2007 08:55:57 +0000 (09:55 +0100)]
Added tag OLSRD_0_5_2 for changeset
283effb1472c
Hannes Gredler [Mon, 17 Dec 2007 08:55:56 +0000 (09:55 +0100)]
Added tag OLSRD_0_5_3 for changeset
00991ca84047
Hannes Gredler [Mon, 17 Dec 2007 08:55:56 +0000 (09:55 +0100)]
Added tag OLSRD_0_5_4 for changeset
60f04fc39707
Bernd Petrovitsch [Thu, 13 Dec 2007 11:34:35 +0000 (11:34 +0000)]
- add #ifdef DEBUG for 2 OLSR_PRINTF() as suggested by hannes@gredler.at
- fixed compile regressions
Bernd Petrovitsch [Wed, 12 Dec 2007 23:38:52 +0000 (23:38 +0000)]
* fixed another compile error
Bernd Petrovitsch [Wed, 12 Dec 2007 22:49:04 +0000 (22:49 +0000)]
* avoid the "%1$" in format strigns: CygWin (IIRC) doesn't support this.
Bernd Petrovitsch [Wed, 12 Dec 2007 22:47:04 +0000 (22:47 +0000)]
* fixed comments
Bernd Petrovitsch [Wed, 12 Dec 2007 22:39:36 +0000 (22:39 +0000)]
added configuration file support for "flat fib metrics".
Bernd Petrovitsch [Wed, 12 Dec 2007 22:06:24 +0000 (22:06 +0000)]
* do not generate netmasks but the prefixlen
Bernd Petrovitsch [Wed, 12 Dec 2007 22:05:53 +0000 (22:05 +0000)]
* do not generate netmasks and fixed up some comments
Bernd Petrovitsch [Wed, 12 Dec 2007 22:04:08 +0000 (22:04 +0000)]
* fixed variable definitions
Bernd Petrovitsch [Wed, 12 Dec 2007 22:03:37 +0000 (22:03 +0000)]
* added a missing variable definition
Bernd Petrovitsch [Wed, 12 Dec 2007 21:57:56 +0000 (21:57 +0000)]
applied patch by Hannes Gredler <hannes@gredler.at>::
pls find attached a pointer for further CPU savings in olsrd.
even in large networks (>250 nodes) the avg. CPU utilization
does not get beyond 0.5% CPU load on standard 200Mhz WRT hardware.
patch from http://gredler.at/download/olsrd/rib2-refactoring4.diff
change-list:
- avoid the periodical rib-tree insertion
- add a FOR_ALL_HNA_RT_ENTRIES() macro for the snmp folks
(or any parties who want to walk HNA entries).
- add an olsr_cnf option 'flat_fib_metrics' which defaults to TRUE.
this is as per sven-olas request who has expressed concerns
that the current flap-metric style is a bit unpleasant for troubleshooting.
note that i have not yet added the cfg file parser routine for that -
just the required tweaks in the change-processing FIB code.
Bernd Petrovitsch [Wed, 12 Dec 2007 21:50:40 +0000 (21:50 +0000)]
* allow IPv6 HNA addresses only in IPv6 mode. The same for IPv4.
Bernd Petrovitsch [Wed, 12 Dec 2007 09:39:50 +0000 (09:39 +0000)]
* ooops, fixed typo
Bernd Petrovitsch [Tue, 11 Dec 2007 17:20:06 +0000 (17:20 +0000)]
- Replaced "which" with a /bin/sh script snippet.
- inspired by Sven-Ola Tuecke: avoid a bash'ism (i.e. "OPTS="${OPTS//$opt}") in
gcc-warnings and ld-warnings. But we do not replace it with `sed` (since it
costs a fork(2) and an exec(3)) but also with shell code which doesn't use
any external program.
For a specification of /bin/sh: see
http://www.opengroup.org/onlinepubs/
000095399/utilities/xcu_chap02.html#tag_02
Bernd Petrovitsch [Tue, 11 Dec 2007 17:16:03 +0000 (17:16 +0000)]
- Replaced "which" with a /bin/sh script snippet.
- inspired by Sven-Ola Tuecke: avoid a bash'ism (i.e. "OPTS="${OPTS//$opt}") in
gcc-warnings and ld-warnings. But we do not replace it with `sed` (since it
costs a fork(2) and an exec(3)) but also with shell code which doesn't use
any external program.
For a specification of /bin/sh: see
http://www.opengroup.org/onlinepubs/
000095399/utilities/xcu_chap02.html#tag_02
Bernd Petrovitsch [Thu, 6 Dec 2007 22:07:29 +0000 (22:07 +0000)]
* avoid left over "a.out"
Bernd Petrovitsch [Thu, 6 Dec 2007 21:46:07 +0000 (21:46 +0000)]
* made a local never changed constant variable a #define
Bernd Petrovitsch [Thu, 6 Dec 2007 21:12:56 +0000 (21:12 +0000)]
* removed the unused functions get_if_property_id(), add_if_geninfo(),
get_if_geninfo(), del_if_geninfo()
* if_ifwithindex() is used only locally: made it "static"
* Simplified a little bit: addrsock and addrsock6 are defined and
initialized in interfaces.c, used in src/*/net.c and passed as parameter
to the functions getsocket{,6}() in src/*/ifnet.c.
We now just define and initialize that locally.
Bernd Petrovitsch [Thu, 6 Dec 2007 21:01:14 +0000 (21:01 +0000)]
* src/linux/net.h is used by one .c file only. No need for a separate file.
Bernd Petrovitsch [Thu, 6 Dec 2007 20:43:15 +0000 (20:43 +0000)]
* src/linux/net.h is used by one .c file only. No need for a separate file.
* removed an "extern" declaration which doesn't belong here
* removed superflous #include's
Bernd Petrovitsch [Thu, 6 Dec 2007 20:41:51 +0000 (20:41 +0000)]
* added niclude files needed by this header file
Bernd Petrovitsch [Thu, 6 Dec 2007 20:25:47 +0000 (20:25 +0000)]
* commented out unused functions
Bernd Petrovitsch [Thu, 6 Dec 2007 20:22:37 +0000 (20:22 +0000)]
adding $(OS_LIB_PTHREAD) once in Makefile.inc is enough
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.
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
Bernd Petrovitsch [Thu, 6 Dec 2007 20:10:19 +0000 (20:10 +0000)]
* similar to gcc-warnings but for linker options
Bernd Petrovitsch [Thu, 6 Dec 2007 18:17:35 +0000 (18:17 +0000)]
* make it work with gcc-3.2.3 and beautified it
Bernd Petrovitsch [Sun, 2 Dec 2007 19:00:30 +0000 (19:00 +0000)]
* ISO8859-1 -> UTF-8
Bernd Petrovitsch [Thu, 29 Nov 2007 23:40:08 +0000 (23:40 +0000)]
* fixed a warning on 64bit
Bernd Petrovitsch [Thu, 29 Nov 2007 23:03:48 +0000 (23:03 +0000)]
* added more warnings
Bernd Petrovitsch [Thu, 29 Nov 2007 23:03:07 +0000 (23:03 +0000)]
- killed hna_chgestruct to reduce malloc()/free() churn
Bernd Petrovitsch [Thu, 29 Nov 2007 22:59:51 +0000 (22:59 +0000)]
* fixed warnings
Bernd Petrovitsch [Thu, 29 Nov 2007 22:40:11 +0000 (22:40 +0000)]
* missed the changelog
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.
Bernd Petrovitsch [Thu, 29 Nov 2007 18:20:45 +0000 (18:20 +0000)]
* more fixes fro MacOSX