olsrd.git
12 years agoformat correct wallclock timestamps and add GMT to local conversion
Hannes Gredler [Fri, 29 Feb 2008 16:31:40 +0000 (17:31 +0100)]
format correct wallclock timestamps and add GMT to local conversion

12 years agofix minor display issue
Hannes Gredler [Fri, 29 Feb 2008 14:39:47 +0000 (15:39 +0100)]
fix minor display issue

12 years agoremove last remnant of olsr_etc_to_string()
Hannes Gredler [Fri, 29 Feb 2008 14:37:11 +0000 (15:37 +0100)]
remove last remnant of olsr_etc_to_string()

12 years agoAutomated merge with http://olsrd.sf.net/hg/olsrd
Hannes Gredler [Fri, 29 Feb 2008 14:31:57 +0000 (15:31 +0100)]
Automated merge with http://olsrd.sf.net/hg/olsrd

12 years agofix some timer-refactoring compiler warnings
Hannes Gredler [Fri, 29 Feb 2008 14:24:20 +0000 (15:24 +0100)]
fix some timer-refactoring compiler warnings

12 years agomerge sf.net tree
Erik Tromp [Fri, 29 Feb 2008 09:50:43 +0000 (10:50 +0100)]
merge sf.net tree

12 years agobugfix fpm display precicion issues
Sven-Ola Tuecke [Fri, 29 Feb 2008 09:45:48 +0000 (10:45 +0100)]
bugfix fpm display precicion issues

12 years agoupdate in bmf due to new flags field in tc_edge_entry
Erik Tromp [Mon, 25 Feb 2008 19:20:49 +0000 (20:20 +0100)]
update in bmf due to new flags field in tc_edge_entry

12 years agosquelch compiler warnings
Hannes Gredler [Tue, 19 Feb 2008 23:08:51 +0000 (00:08 +0100)]
squelch compiler warnings

12 years agoFrom Hannes Gredler <hannes@gredler.at>: refactor the timer implementation
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.

12 years agoFrom Clemens Hopfer <datacop@inode.at>: dot_draw plugin: close the connection after...
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.

12 years agoFrom Henning Rogge <rogge@fgan.de>: parser refactoring
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)

12 years agouse calloc rather than malloc for lazy callers
Hannes Gredler [Mon, 18 Feb 2008 19:24:34 +0000 (20:24 +0100)]
use calloc rather than malloc for lazy callers

12 years agoFrom Sven-Ola Tuecke <sven-ola@gmx.de>: minor fixed point math bugfix/optimization
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

12 years agoFrom Joe Gio <joezgio@gmail.com>: track if AC power is connected/disconnected
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

12 years agoFrom Sven-Ola Tuecke <sven-ola@gmx.de>: add support for fixedpoint math
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.

12 years agotip of tree is now 0.5.6pre
Hannes Gredler [Wed, 6 Feb 2008 19:03:43 +0000 (20:03 +0100)]
tip of tree is now 0.5.6pre

12 years agotip of tree is now 0.5.6
Hannes Gredler [Wed, 6 Feb 2008 18:48:03 +0000 (19:48 +0100)]
tip of tree is now 0.5.6

12 years agoAdded tag OLSRD_0_5_5 for changeset 233036647bca
Hannes Gredler [Wed, 6 Feb 2008 18:32:49 +0000 (19:32 +0100)]
Added tag OLSRD_0_5_5 for changeset 233036647bca

12 years agochange version to 0.5.5 OLSRD_0_5_5
Hannes Gredler [Wed, 6 Feb 2008 18:32:39 +0000 (19:32 +0100)]
change version to 0.5.5

12 years agoFrom John Hay <jhay@meraka.org.za>: bugfix: do not account for IP headers when buildi...
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

12 years agosquelch compiler warnings
Hannes Gredler [Thu, 31 Jan 2008 15:29:25 +0000 (16:29 +0100)]
squelch compiler warnings

12 years agoturn off SPF_PROFILING
Hannes Gredler [Thu, 31 Jan 2008 15:29:02 +0000 (16:29 +0100)]
turn off SPF_PROFILING

12 years agoFrom Andreas Jacobs <andjac@kawo1.rwth-aachen.de>: bugfix for scheduler
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.

12 years agoFrom Jo-Philipp Wich <freifunk@wwsnet.net: bugfix: avoid infinite loop in the message...
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

12 years agoFrom Sven-Ola Tuecke <sven-ola@gmx.de>: bugfix on Windows Vista: add interface metric...
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

12 years agoAdded tag OLSRD_0_5_5_RC1 for changeset 669b81f6918e
Hannes Gredler [Wed, 23 Jan 2008 09:43:39 +0000 (10:43 +0100)]
Added tag OLSRD_0_5_5_RC1 for changeset 669b81f6918e

12 years agoversion bump to 0.5.5rc1 OLSRD_0_5_5_RC1
Hannes Gredler [Wed, 23 Jan 2008 09:43:09 +0000 (10:43 +0100)]
version bump to 0.5.5rc1

12 years agomerge hannes' private tree
Hannes Gredler [Tue, 22 Jan 2008 22:27:02 +0000 (23:27 +0100)]
merge hannes' private tree

12 years agoclean up code-style
Hannes Gredler [Tue, 22 Jan 2008 21:34:51 +0000 (22:34 +0100)]
clean up code-style

12 years agoclean up code-style
Hannes Gredler [Tue, 22 Jan 2008 20:55:26 +0000 (21:55 +0100)]
clean up code-style

12 years agoFrom John Hay <jhay@meraka.org.za>: compile clean on FreeBSD
Hannes Gredler [Tue, 22 Jan 2008 14:05:34 +0000 (15:05 +0100)]
From John Hay <jhay@meraka.org.za>: compile clean on FreeBSD

12 years agoFrom Dario Borriello <dario_bodj@hotmail.com>: bugfix: do not update LQ if not configured
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

12 years agoFrom Jo-Philipp Wich <freifunk@wwsnet.net: fix olsr_ip_to_string() buffer quirk
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

12 years agoFrom Henning Rogge <rogge@fgan.de>: join LQ and non-LQ Hello execution paths
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

12 years agomerge sven-ola's tree
Hannes Gredler [Fri, 4 Jan 2008 12:52:57 +0000 (13:52 +0100)]
merge sven-ola's tree

12 years agoFrom Jo-Pilipp Wich: fix txtinfo format quirks in HNA table
Hannes Gredler [Fri, 4 Jan 2008 11:08:52 +0000 (12:08 +0100)]
From Jo-Pilipp Wich: fix txtinfo format quirks in HNA table

12 years agolqtc-seqno: Optimize check for old seqno numbers in LQTC messages
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

12 years agorttable-default: (from otti) configures a new policy routing table for the default...
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

12 years agolqnatthresh: maintain an advantage for the current (NAT) inet gw
Sven-Ola Tuecke [Wed, 2 Jan 2008 13:37:52 +0000 (14:37 +0100)]
lqnatthresh: maintain an advantage for the current (NAT) inet gw

12 years agofisheye-startup: Changed to MAX_TTL for the first 32 LQTCs
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

12 years ago102-olsrd-windowsfix-missing: Added and removed files necessary for win32 compile
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

12 years agoFix for hg: do not remove anything in .hg with 'make uberclean'
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'

12 years agosquelsh compiler warnings on Mac OSX
Hannes Gredler [Tue, 1 Jan 2008 20:07:23 +0000 (21:07 +0100)]
squelsh compiler warnings on Mac OSX

12 years agoFrom Sven-Ola Tuecke: remainder of 133-fix-lqneigh.patch
Hannes Gredler [Fri, 28 Dec 2007 17:02:54 +0000 (18:02 +0100)]
From Sven-Ola Tuecke: remainder of 133-fix-lqneigh.patch

12 years agoFrom Sven-Ola Tuecke: 121-olsrd-fib-metric-approx.patch
Hannes Gredler [Fri, 28 Dec 2007 16:57:59 +0000 (17:57 +0100)]
From Sven-Ola Tuecke: 121-olsrd-fib-metric-approx.patch

12 years agoFrom Sven-Ola Tuecke: 104-olsrd-verysmallfix.patch
Hannes Gredler [Fri, 28 Dec 2007 16:53:47 +0000 (17:53 +0100)]
From Sven-Ola Tuecke: 104-olsrd-verysmallfix.patch

12 years agoFrom Jo-Philipp Wich <freifunk@wwsnet.net>: name-service plugin - write MID entries...
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

12 years agoFrom Sven-Ola Tuecke: 138-optimize-message-generation
Hannes Gredler [Fri, 28 Dec 2007 10:58:48 +0000 (11:58 +0100)]
From Sven-Ola Tuecke: 138-optimize-message-generation

12 years agoFrom Sven-Ola Tuecke: 136-optimize-invalidip-check
Hannes Gredler [Fri, 28 Dec 2007 10:52:53 +0000 (11:52 +0100)]
From Sven-Ola Tuecke: 136-optimize-invalidip-check

12 years agoFrom Sven-Ola Tuecke: 110-bmf-v152
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

12 years agoFrom Sven-Ola Tuecke: 104-olsrd-verysmallfix.patch
Hannes Gredler [Fri, 28 Dec 2007 10:12:52 +0000 (11:12 +0100)]
From Sven-Ola Tuecke: 104-olsrd-verysmallfix.patch

12 years agobugfix: fix broken prefix insertion
Hannes Gredler [Fri, 28 Dec 2007 09:35:59 +0000 (10:35 +0100)]
bugfix: fix broken prefix insertion

12 years agoremove CVS ID markers
Hannes Gredler [Thu, 27 Dec 2007 23:18:19 +0000 (00:18 +0100)]
remove CVS ID markers

12 years agoFrom Lorenz Shori <lorenz.schori@gmx.ch>: Mac OSX fixes
Hannes Gredler [Thu, 27 Dec 2007 10:44:50 +0000 (11:44 +0100)]
From Lorenz Shori <lorenz.schori@gmx.ch>: Mac OSX fixes

12 years agoremove all .cvsignore files
Hannes Gredler [Fri, 21 Dec 2007 15:18:49 +0000 (16:18 +0100)]
remove all .cvsignore files

12 years agoFrom Sven-Ola Tuecke: 105-fix-lq-buffer-quirks
Hannes Gredler [Fri, 21 Dec 2007 14:36:39 +0000 (15:36 +0100)]
From Sven-Ola Tuecke: 105-fix-lq-buffer-quirks

12 years agoignore emacs backup files
Hannes Gredler [Fri, 21 Dec 2007 14:35:32 +0000 (15:35 +0100)]
ignore emacs backup files

12 years agoignore *.rej, *.orig and TAGS files
Hannes Gredler [Fri, 21 Dec 2007 13:14:42 +0000 (14:14 +0100)]
ignore *.rej, *.orig and TAGS files

12 years agoFrom Sven-Ola Tuecke: 106-fix-seqnocheck
Hannes Gredler [Fri, 21 Dec 2007 11:21:49 +0000 (12:21 +0100)]
From Sven-Ola Tuecke: 106-fix-seqnocheck

12 years agoReworked WIN32 Code
Sven-Ola Tuecke [Tue, 18 Dec 2007 12:35:55 +0000 (13:35 +0100)]
Reworked WIN32 Code

12 years agoadd .hgignore
Hannes Gredler [Mon, 17 Dec 2007 10:29:56 +0000 (11:29 +0100)]
add .hgignore

12 years agofix +x permissions for scripts
Hannes Gredler [Mon, 17 Dec 2007 10:22:05 +0000 (11:22 +0100)]
fix +x permissions for scripts

12 years agoadd introduction blurb for the SPF implementation
Hannes Gredler [Mon, 17 Dec 2007 10:09:40 +0000 (11:09 +0100)]
add introduction blurb for the SPF implementation

12 years agoremove CVS ID markers
Hannes Gredler [Mon, 17 Dec 2007 10:01:54 +0000 (11:01 +0100)]
remove CVS ID markers

12 years agofix +x permissions for scripts
Hannes Gredler [Mon, 17 Dec 2007 09:00:46 +0000 (10:00 +0100)]
fix +x permissions for scripts

12 years agoAdded 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_8 for changeset e9beaf82c0ea

12 years agoAdded tag OLSRD_0_4_9 for changeset 43d67c4814ef
Hannes Gredler [Mon, 17 Dec 2007 08:55:59 +0000 (09:55 +0100)]
Added tag OLSRD_0_4_9 for changeset 43d67c4814ef

12 years agoAdded 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_4_10 for changeset a39cda38836b

12 years agoAdded tag OLSRD_0_5_0 for changeset 612f5a21a303
Hannes Gredler [Mon, 17 Dec 2007 08:55:58 +0000 (09:55 +0100)]
Added tag OLSRD_0_5_0 for changeset 612f5a21a303

12 years agoAdded 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_1 for changeset c23aab9db1e1

12 years agoAdded tag OLSRD_0_5_2 for changeset 283effb1472c
Hannes Gredler [Mon, 17 Dec 2007 08:55:57 +0000 (09:55 +0100)]
Added tag OLSRD_0_5_2 for changeset 283effb1472c

12 years agoAdded 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_3 for changeset 00991ca84047

12 years agoAdded tag OLSRD_0_5_4 for changeset 60f04fc39707
Hannes Gredler [Mon, 17 Dec 2007 08:55:56 +0000 (09:55 +0100)]
Added tag OLSRD_0_5_4 for changeset 60f04fc39707

12 years ago- add #ifdef DEBUG for 2 OLSR_PRINTF() as suggested by hannes@gredler.at
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

12 years ago* fixed another compile error
Bernd Petrovitsch [Wed, 12 Dec 2007 23:38:52 +0000 (23:38 +0000)]
* fixed another compile error

12 years ago* avoid the "%1$" in format strigns: CygWin (IIRC) doesn't support this.
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.

12 years ago* fixed comments
Bernd Petrovitsch [Wed, 12 Dec 2007 22:47:04 +0000 (22:47 +0000)]
* fixed comments

12 years agoadded configuration file support for "flat fib metrics".
Bernd Petrovitsch [Wed, 12 Dec 2007 22:39:36 +0000 (22:39 +0000)]
added configuration file support for "flat fib metrics".

12 years ago* do not generate netmasks but the prefixlen
Bernd Petrovitsch [Wed, 12 Dec 2007 22:06:24 +0000 (22:06 +0000)]
* do not generate netmasks but the prefixlen

12 years ago* do not generate netmasks and fixed up some comments
Bernd Petrovitsch [Wed, 12 Dec 2007 22:05:53 +0000 (22:05 +0000)]
* do not generate netmasks and fixed up some comments

12 years ago* fixed variable definitions
Bernd Petrovitsch [Wed, 12 Dec 2007 22:04:08 +0000 (22:04 +0000)]
* fixed variable definitions

12 years ago* added a missing variable definition
Bernd Petrovitsch [Wed, 12 Dec 2007 22:03:37 +0000 (22:03 +0000)]
* added a missing variable definition

12 years agoapplied patch by Hannes Gredler <hannes@gredler.at>::
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.

12 years ago* allow IPv6 HNA addresses only in IPv6 mode. The same for IPv4.
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.

12 years ago* ooops, fixed typo
Bernd Petrovitsch [Wed, 12 Dec 2007 09:39:50 +0000 (09:39 +0000)]
* ooops, fixed typo

12 years ago- Replaced "which" with a /bin/sh script snippet.
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

12 years ago- Replaced "which" with a /bin/sh script snippet.
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

12 years ago* avoid left over "a.out"
Bernd Petrovitsch [Thu, 6 Dec 2007 22:07:29 +0000 (22:07 +0000)]
* avoid left over "a.out"

12 years ago* made a local never changed constant variable a #define
Bernd Petrovitsch [Thu, 6 Dec 2007 21:46:07 +0000 (21:46 +0000)]
* made a local never changed constant variable a #define

12 years ago* removed the unused functions get_if_property_id(), add_if_geninfo(),
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.

12 years ago* src/linux/net.h is used by one .c file only. No need for a separate file.
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.

12 years ago* 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

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