olsrd.git
4 years agolq: minor optimisation
Ferry Huberts [Mon, 11 Apr 2016 12:45:12 +0000 (14:45 +0200)]
lq: minor optimisation

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agolq: add get_linkcost_scaled function
Ferry Huberts [Mon, 11 Apr 2016 10:19:40 +0000 (12:19 +0200)]
lq: add get_linkcost_scaled function

For later use

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agolq plugins: remove print_cost, use get_cost_scaled in generic function
Ferry Huberts [Sat, 9 Apr 2016 14:29:10 +0000 (16:29 +0200)]
lq plugins: remove print_cost, use get_cost_scaled in generic function

The were all the same

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agolq plugins: make the print_cost_float functions behave the same
Ferry Huberts [Sat, 9 Apr 2016 12:33:34 +0000 (14:33 +0200)]
lq plugins: make the print_cost_float functions behave the same

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agolq plugins: add get_cost_scaled function
Ferry Huberts [Sat, 9 Apr 2016 12:24:45 +0000 (14:24 +0200)]
lq plugins: add get_cost_scaled function

For later use

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agofpm: add fpmtod function
Ferry Huberts [Sat, 9 Apr 2016 12:25:08 +0000 (14:25 +0200)]
fpm: add fpmtod function

For later use

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agolq plugins: explicit unsigned for LINK_COST_BROKEN and ROUTE_COST_BROKEN
Ferry Huberts [Sat, 9 Apr 2016 21:36:05 +0000 (23:36 +0200)]
lq plugins: explicit unsigned for LINK_COST_BROKEN and ROUTE_COST_BROKEN

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agolq plugins: safer checking against LINK_COST_BROKEN and ROUTE_COST_BROKEN
Ferry Huberts [Sat, 9 Apr 2016 21:36:57 +0000 (23:36 +0200)]
lq plugins: safer checking against LINK_COST_BROKEN and ROUTE_COST_BROKEN

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agosgw: safer checking against LINK_COST_BROKEN and ROUTE_COST_BROKEN
Ferry Huberts [Sat, 9 Apr 2016 21:37:35 +0000 (23:37 +0200)]
sgw: safer checking against LINK_COST_BROKEN and ROUTE_COST_BROKEN

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agopud: safer checking against LINK_COST_BROKEN and ROUTE_COST_BROKEN
Ferry Huberts [Sat, 9 Apr 2016 21:37:43 +0000 (23:37 +0200)]
pud: safer checking against LINK_COST_BROKEN and ROUTE_COST_BROKEN

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agorouting table: safer checking against LINK_COST_BROKEN & ROUTE_COST_BROKEN
Ferry Huberts [Sat, 9 Apr 2016 21:37:23 +0000 (23:37 +0200)]
routing table: safer checking against LINK_COST_BROKEN & ROUTE_COST_BROKEN

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agospf: safer checking against LINK_COST_BROKEN and ROUTE_COST_BROKEN
Ferry Huberts [Sat, 9 Apr 2016 21:37:06 +0000 (23:37 +0200)]
spf: safer checking against LINK_COST_BROKEN and ROUTE_COST_BROKEN

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agospf: tc->path_cost is a route cost, fix level 2 OLSR_PRINTF messages
Ferry Huberts [Sun, 10 Apr 2016 18:53:38 +0000 (20:53 +0200)]
spf: tc->path_cost is a route cost, fix level 2 OLSR_PRINTF messages

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agosgw: remove struct costs_weights and max_cost_etx_max from the costs API
Ferry Huberts [Sun, 10 Apr 2016 18:38:29 +0000 (20:38 +0200)]
sgw: remove struct costs_weights and max_cost_etx_max from the costs API

They all come from olsr_cnf, use them directly.

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agoinfo: lazily initialise the cache
Ferry Huberts [Fri, 8 Apr 2016 08:27:25 +0000 (10:27 +0200)]
info: lazily initialise the cache

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agoinfo: completely switch of caching for timeouts <= 0
Ferry Huberts [Fri, 8 Apr 2016 07:59:29 +0000 (09:59 +0200)]
info: completely switch of caching for timeouts <= 0

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agoinfo: reflect that the SIW defines are 64 bit wide
Ferry Huberts [Thu, 7 Apr 2016 21:42:19 +0000 (23:42 +0200)]
info: reflect that the SIW defines are 64 bit wide

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agoinfo: minor fix
Ferry Huberts [Thu, 7 Apr 2016 21:00:34 +0000 (23:00 +0200)]
info: minor fix

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agoinfo: add support for caching and use it
Ferry Huberts [Thu, 7 Apr 2016 18:44:16 +0000 (20:44 +0200)]
info: add support for caching and use it

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agoscheduler: export the olsr_times function
Ferry Huberts [Thu, 7 Apr 2016 17:29:41 +0000 (19:29 +0200)]
scheduler: export the olsr_times function

Will need it later

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agocfgfile: cache the generated configuration file
Ferry Huberts [Thu, 7 Apr 2016 17:30:40 +0000 (19:30 +0200)]
cfgfile: cache the generated configuration file

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agoabuf: add abuf_concat function
Ferry Huberts [Thu, 7 Apr 2016 11:13:14 +0000 (13:13 +0200)]
abuf: add abuf_concat function

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agoplugin util: add set_plugin_long function
Ferry Huberts [Thu, 7 Apr 2016 19:31:23 +0000 (21:31 +0200)]
plugin util: add set_plugin_long function

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agoplugin util: make set_plugin_boolean actually set a bool
Ferry Huberts [Thu, 7 Apr 2016 19:01:37 +0000 (21:01 +0200)]
plugin util: make set_plugin_boolean actually set a bool

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agoinfo: make SIW_ENTRIES accessible from other functions
Ferry Huberts [Thu, 7 Apr 2016 16:35:32 +0000 (18:35 +0200)]
info: make SIW_ENTRIES accessible from other functions

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agoinfo: make the INFO_PLUGIN_CONFIG_PLUGIN_PARAMETERS a bit safer
Ferry Huberts [Thu, 7 Apr 2016 18:56:09 +0000 (20:56 +0200)]
info: make the INFO_PLUGIN_CONFIG_PLUGIN_PARAMETERS a bit safer

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agoinfo: move some type delcarations up in a header file
Ferry Huberts [Thu, 7 Apr 2016 16:32:08 +0000 (18:32 +0200)]
info: move some type delcarations up in a header file

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agoinfo: fix a type
Ferry Huberts [Thu, 7 Apr 2016 16:36:44 +0000 (18:36 +0200)]
info: fix a type

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agoinfo: use AUTOBUFCHUNK instead of hard-coding it
Ferry Huberts [Thu, 7 Apr 2016 17:32:23 +0000 (19:32 +0200)]
info: use AUTOBUFCHUNK instead of hard-coding it

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agoinfo: minor layout improvements
Ferry Huberts [Thu, 7 Apr 2016 19:06:16 +0000 (21:06 +0200)]
info: minor layout improvements

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agosgw: remove some dead code left over in the previous commit
Ferry Huberts [Thu, 7 Apr 2016 17:38:35 +0000 (19:38 +0200)]
sgw: remove some dead code left over in the previous commit

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agosgw: do not show unused tunnels in the status file
Ferry Huberts [Thu, 7 Apr 2016 10:51:00 +0000 (12:51 +0200)]
sgw: do not show unused tunnels in the status file

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agomake: improve jsoninfo and txtinfo dependencies on info
Ferry Huberts [Tue, 5 Apr 2016 19:46:57 +0000 (21:46 +0200)]
make: improve jsoninfo and txtinfo dependencies on info

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agojsoninfo: in /sgw separate prefixes and their lengths
Ferry Huberts [Tue, 29 Mar 2016 14:44:30 +0000 (16:44 +0200)]
jsoninfo: in /sgw separate prefixes and their lengths

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agojsoninfo: do not null-deref prefix in abuf_json_prefix
Ferry Huberts [Tue, 29 Mar 2016 12:10:16 +0000 (14:10 +0200)]
jsoninfo: do not null-deref prefix in abuf_json_prefix

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agojsoninfo: also show egress information in /sgw
Ferry Huberts [Tue, 29 Mar 2016 07:46:40 +0000 (09:46 +0200)]
jsoninfo: also show egress information in /sgw

SO that the same information is shown as in the sgw status file.

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agosgw: add isEgressSelected function
Ferry Huberts [Tue, 29 Mar 2016 07:47:07 +0000 (09:47 +0200)]
sgw: add isEgressSelected function

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agoinfo: rename json helpers files
Ferry Huberts [Tue, 29 Mar 2016 06:45:46 +0000 (08:45 +0200)]
info: rename json helpers files

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agoinfo: move iterating over a table of siw/function entries into a function
Ferry Huberts [Mon, 28 Mar 2016 15:54:19 +0000 (17:54 +0200)]
info: move iterating over a table of siw/function entries into a function

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agoinfo: minor layout improvements
Ferry Huberts [Mon, 28 Mar 2016 15:52:20 +0000 (17:52 +0200)]
info: minor layout improvements

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agoinfo: add abuf_json_prefix json helper
Ferry Huberts [Mon, 28 Mar 2016 11:07:13 +0000 (13:07 +0200)]
info: add abuf_json_prefix json helper

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agoinfo: move json helpers here from jsoninfo
Ferry Huberts [Mon, 28 Mar 2016 10:02:48 +0000 (12:02 +0200)]
info: move json helpers here from jsoninfo

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agosgw: update a comment
Ferry Huberts [Thu, 24 Mar 2016 17:21:39 +0000 (18:21 +0100)]
sgw: update a comment

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agoRevert "sgw: fix a mask in the sgw status file"
Ferry Huberts [Thu, 24 Mar 2016 17:13:17 +0000 (18:13 +0100)]
Revert "sgw: fix a mask in the sgw status file"

This reverts commit 3f329381a1d4edb3988cf84daa1bf85c586d42a0.

4 years agosgw: fix a mask in the sgw status file
Ferry Huberts [Thu, 24 Mar 2016 16:57:17 +0000 (17:57 +0100)]
sgw: fix a mask in the sgw status file

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agojsoninfo: fix a typo in /config
Ferry Huberts [Thu, 24 Mar 2016 11:52:46 +0000 (12:52 +0100)]
jsoninfo: fix a typo in /config

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agojsoninfo: remove a derived field from the /config output
Ferry Huberts [Tue, 22 Mar 2016 15:33:36 +0000 (16:33 +0100)]
jsoninfo: remove a derived field from the /config output

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agojsoninfo: in /config rename sgw weight section to costsCalculation
Ferry Huberts [Mon, 21 Mar 2016 14:18:17 +0000 (15:18 +0100)]
jsoninfo: in /config rename sgw weight section to costsCalculation

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agojsoninfo: improve /config
Ferry Huberts [Mon, 21 Mar 2016 13:38:55 +0000 (14:38 +0100)]
jsoninfo: improve /config

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agojsoninfo: allow key to be NULL when printing a string
Ferry Huberts [Fri, 18 Mar 2016 16:34:19 +0000 (17:34 +0100)]
jsoninfo: allow key to be NULL when printing a string

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agojsoninfo: in /interfaces show message times like validity times
Ferry Huberts [Fri, 18 Mar 2016 13:26:01 +0000 (14:26 +0100)]
jsoninfo: in /interfaces show message times like validity times

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agojsoninfo: remove an obsolete comment
Ferry Huberts [Fri, 18 Mar 2016 12:58:22 +0000 (13:58 +0100)]
jsoninfo: remove an obsolete comment

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agojsoninfo: in /interfaces use the new IP address helper function
Ferry Huberts [Fri, 18 Mar 2016 12:57:40 +0000 (13:57 +0100)]
jsoninfo: in /interfaces use the new IP address helper function

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agojsoninfo: in /interfaces show 'state' text as 'up' boolean
Ferry Huberts [Fri, 18 Mar 2016 12:57:18 +0000 (13:57 +0100)]
jsoninfo: in /interfaces show 'state' text as 'up' boolean

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agojsoninfo: add a function to directly convert an IP address
Ferry Huberts [Fri, 18 Mar 2016 12:55:37 +0000 (13:55 +0100)]
jsoninfo: add a function to directly convert an IP address

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agoinfo: create more space for more info commands
Ferry Huberts [Fri, 18 Mar 2016 08:22:21 +0000 (09:22 +0100)]
info: create more space for more info commands

By changing the bitmask to ULL.

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agojsoninfo: minor simplification in /2hop
Ferry Huberts [Thu, 17 Mar 2016 17:59:50 +0000 (18:59 +0100)]
jsoninfo: minor simplification in /2hop

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agojsoninfo: print the 2-hops neighbors as a simple list of IP addresses
Ferry Huberts [Thu, 17 Mar 2016 17:33:35 +0000 (18:33 +0100)]
jsoninfo: print the 2-hops neighbors as a simple list of IP addresses

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agojsoninfo: allow key to be NULL when printing an IP address
Ferry Huberts [Thu, 17 Mar 2016 17:31:10 +0000 (18:31 +0100)]
jsoninfo: allow key to be NULL when printing an IP address

For simple lists/sets

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agojsoninfo: in /plugins list plugin parameters as map entries
Ferry Huberts [Thu, 17 Mar 2016 16:29:25 +0000 (17:29 +0100)]
jsoninfo: in /plugins list plugin parameters as map entries

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agojsoninfo: simplify /mid output
Ferry Huberts [Thu, 17 Mar 2016 14:04:53 +0000 (15:04 +0100)]
jsoninfo: simplify /mid output

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agojsoninfo: in /plugins show parameters as name/value
Ferry Huberts [Wed, 9 Mar 2016 15:03:33 +0000 (16:03 +0100)]
jsoninfo: in /plugins show parameters as name/value

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agojsoninfo: in /plugins list plugin parameters as array entries
Ferry Huberts [Wed, 9 Mar 2016 13:37:06 +0000 (14:37 +0100)]
jsoninfo: in /plugins list plugin parameters as array entries

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agojsoninfo: protect against out-of-bounds accesses of TXT array
Ferry Huberts [Wed, 9 Mar 2016 13:00:09 +0000 (14:00 +0100)]
jsoninfo: protect against out-of-bounds accesses of TXT array

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agojsoninfo: protect against nulll-deref in print_interface_config
Ferry Huberts [Wed, 9 Mar 2016 12:43:29 +0000 (13:43 +0100)]
jsoninfo: protect against nulll-deref in print_interface_config

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agojsoninfo: add some asserts
Ferry Huberts [Wed, 9 Mar 2016 12:43:05 +0000 (13:43 +0100)]
jsoninfo: add some asserts

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agoinfo: re-introduce composite commands
Ferry Huberts [Wed, 9 Mar 2016 10:19:18 +0000 (11:19 +0100)]
info: re-introduce composite commands

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agoinfo: skip multiple leading slashes on the command
Ferry Huberts [Tue, 8 Mar 2016 15:59:04 +0000 (16:59 +0100)]
info: skip multiple leading slashes on the command

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agoinfo: strip trailing slashes from the command
Ferry Huberts [Tue, 8 Mar 2016 15:39:04 +0000 (16:39 +0100)]
info: strip trailing slashes from the command

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agojsoninfo: move some static functions around
Ferry Huberts [Wed, 9 Mar 2016 12:00:43 +0000 (13:00 +0100)]
jsoninfo: move some static functions around

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agojsoninfo: do not show interface /sys/class/net/data in /interfaces
Ferry Huberts [Tue, 8 Mar 2016 14:13:42 +0000 (15:13 +0100)]
jsoninfo: do not show interface /sys/class/net/data in /interfaces

Has nothing to do with olsrd and can be obtained through other means

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agojsoninfo: improve /interfaces
Ferry Huberts [Mon, 7 Mar 2016 09:43:47 +0000 (10:43 +0100)]
jsoninfo: improve /interfaces

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agojsoninfo: add print_interface_config function and use it
Ferry Huberts [Tue, 8 Mar 2016 09:22:45 +0000 (10:22 +0100)]
jsoninfo: add print_interface_config function and use it

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agojsoninfo: use print_link_quality_multipliers_array_entry in /interfaces
Ferry Huberts [Mon, 7 Mar 2016 13:23:05 +0000 (14:23 +0100)]
jsoninfo: use print_link_quality_multipliers_array_entry in /interfaces

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agojsoninfo: use the abuf_json_ip_address helper
Ferry Huberts [Mon, 7 Mar 2016 19:30:21 +0000 (20:30 +0100)]
jsoninfo: use the abuf_json_ip_address helper

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agojsoninfo: improve and update /config
Ferry Huberts [Mon, 7 Mar 2016 09:41:19 +0000 (10:41 +0100)]
jsoninfo: improve and update /config

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agojsoninfo: put printing a hna entry into a function and use it
Ferry Huberts [Mon, 7 Mar 2016 19:21:09 +0000 (20:21 +0100)]
jsoninfo: put printing a hna entry into a function and use it

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agojsoninfo: minor improvements
Ferry Huberts [Mon, 7 Mar 2016 13:21:45 +0000 (14:21 +0100)]
jsoninfo: minor improvements

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agojsoninfo: simplify output_error by using an abuf
Ferry Huberts [Mon, 7 Mar 2016 13:20:52 +0000 (14:20 +0100)]
jsoninfo: simplify output_error by using an abuf

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agojsoninfo: add some comments
Ferry Huberts [Mon, 7 Mar 2016 09:41:39 +0000 (10:41 +0100)]
jsoninfo: add some comments

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agojsoninfo: helpers: account for NaN and INF in float printing
Ferry Huberts [Tue, 8 Mar 2016 13:50:04 +0000 (14:50 +0100)]
jsoninfo: helpers: account for NaN and INF in float printing

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agojsoninfo: helpers: output an empty string when the string is null
Ferry Huberts [Mon, 7 Mar 2016 09:17:17 +0000 (10:17 +0100)]
jsoninfo: helpers: output an empty string when the string is null

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agojsoninfo: helpers: add asserts
Ferry Huberts [Mon, 7 Mar 2016 09:15:18 +0000 (10:15 +0100)]
jsoninfo: helpers: add asserts

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agojsoninfo: helpers: move a static string declaration
Ferry Huberts [Mon, 7 Mar 2016 09:16:33 +0000 (10:16 +0100)]
jsoninfo: helpers: move a static string declaration

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agojsoninfo: minor improvement to /2hop
Ferry Huberts [Mon, 7 Mar 2016 09:29:28 +0000 (10:29 +0100)]
jsoninfo: minor improvement to /2hop

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agomain: do not allow nested shutdown
Ferry Huberts [Mon, 7 Mar 2016 14:45:35 +0000 (15:45 +0100)]
main: do not allow nested shutdown

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agoscheduler: make olsr_flush_timers more robust
Ferry Huberts [Mon, 7 Mar 2016 14:20:06 +0000 (15:20 +0100)]
scheduler: make olsr_flush_timers more robust

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agoscheduler: do not stop timers that are not running
Ferry Huberts [Mon, 7 Mar 2016 14:19:42 +0000 (15:19 +0100)]
scheduler: do not stop timers that are not running

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agoscheduler: fix a typo
Ferry Huberts [Mon, 7 Mar 2016 14:18:47 +0000 (15:18 +0100)]
scheduler: fix a typo

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agojsoninfo: fix a windows compile error
Ferry Huberts [Mon, 7 Mar 2016 15:12:34 +0000 (16:12 +0100)]
jsoninfo: fix a windows compile error

src/olsrd_jsoninfo_helpers.c: In function 'abuf_json_int':
src/olsrd_jsoninfo_helpers.c:145:22: error: unknown conversion type character 'l' in format [-Werror=format=]
   abuf_appendf(abuf, "\"%s\": %lld", key, value);
                      ^
src/olsrd_jsoninfo_helpers.c:145:22: error: too many arguments for format [-Werror=format-extra-args]

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agojsoninfo: simplify /plugins
Ferry Huberts [Sun, 6 Mar 2016 11:38:58 +0000 (12:38 +0100)]
jsoninfo: simplify /plugins

Treat all plugin parameters as strings, just like the
plugin loader does and just like in the configuration
file.

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agojsoninfo: make abuf_json_int take a long long value
Ferry Huberts [Sun, 6 Mar 2016 11:37:42 +0000 (12:37 +0100)]
jsoninfo: make abuf_json_int take a long long value

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agobmf: ignore case on the BmfMechanism plugin parameter value
Ferry Huberts [Sun, 6 Mar 2016 12:50:37 +0000 (13:50 +0100)]
bmf: ignore case on the BmfMechanism plugin parameter value

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agoconfig: always lower-case plugin parameter names
Ferry Huberts [Sun, 6 Mar 2016 16:03:38 +0000 (17:03 +0100)]
config: always lower-case plugin parameter names

Case is already ignored and this avoids extra code in other plugins.

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agojsoninfo: show more information in /version
Ferry Huberts [Sun, 6 Mar 2016 09:59:26 +0000 (10:59 +0100)]
jsoninfo: show more information in /version

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agobuilddata: generate more build information
Ferry Huberts [Sat, 5 Mar 2016 21:03:12 +0000 (22:03 +0100)]
builddata: generate more build information

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agojsoninfo: improve the skip condition in ipc_print_gateways_ipvx
Ferry Huberts [Sat, 5 Mar 2016 20:33:07 +0000 (21:33 +0100)]
jsoninfo: improve the skip condition in ipc_print_gateways_ipvx

Make it more readable, all the negations were confusing.

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agojsoninfo: improve the ipc_print_gateways_ipvx function
Ferry Huberts [Sat, 5 Mar 2016 20:24:22 +0000 (21:24 +0100)]
jsoninfo: improve the ipc_print_gateways_ipvx function

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agojsoninfo: improve printing a gateway entry, and add expiry/cleanup timers
Ferry Huberts [Sat, 5 Mar 2016 19:36:31 +0000 (20:36 +0100)]
jsoninfo: improve printing a gateway entry, and add expiry/cleanup timers

Affects /gateways and /sgw

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agojsoninfo: improve /mid and add validityTime of mid entry itself
Ferry Huberts [Sat, 5 Mar 2016 17:11:11 +0000 (18:11 +0100)]
jsoninfo: improve /mid and add validityTime of mid entry itself

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>