Marek Lindner | 1 Dec 2008 05:19
Picon
Favicon

Re: 0.3.1 rv1152 - some test results

On Monday 01 December 2008 06:43:33 Chris W. wrote:
> You're right, modules are an individual thing. I rather hoped for a hint
> to a  backported openwrt-0.9 makefile ;-).

I'm not sure what an "openwrt-0.9" is but may be this helps you:
https://dev.open-mesh.net/batman/wiki/Patches

> It is working as you described, here it takes about one minute to switch
> to an active gateway.

Yeah, it always takes one minute - its the internal timeout for inactive 
gateways.  :-)

By the way, you still can ping around and test the connection yourself. Either 
by using a simple cron script which runs every x minutes or by triggering your 
test script via the routing script. Depending on your setup/firewall/ISP you 
might experience problems pinging around. Also, if your users expect the 
internet to work for 2 hours per day you waste time and bandwidth in the other 
22 hours of the day.

Regards,
Marek
Marek Lindner | 1 Dec 2008 05:30
Picon
Favicon

Re: 0.3.1 rv1152 - some test results

On Saturday 29 November 2008 06:31:25 Chris W. wrote:
> Uh, this would mean double NAT in the network, sip phones don't like it.

I overlooked that comment thats why my answer comes a bit late:

Are you sure that the batman setup is a problem for SIP ? I'm definitely not 
the SIP expert but I don't think it is a problem (correct me if I'm wrong).

The normal double NAT setup looks like this:

NET_A -> NET_B -> Internet

SIP & STUN get in trouble here.

In the batman network it looks a bit different:

NET_A -> NET_B -> NET_A -> Internet

The second NAT is used for internal transport only. I guess STUN will not 
notice that there is the second network in between. Could you verify that ?

Regards,
Marek
Sven Eckelmann | 1 Dec 2008 19:56
Picon
Picon

Intel CC warning smashing

Hi,
I had a small discussion with Simon Wunderlich about r1166 and showed
him a output intels c compiler to proof that the current code compiles
"fine" with it. The output shows a big amount of warnings which were
more or less useful. I promised him to send some patches to the
mailinglist so more people can have a look at them and check if they
are somewhat helpful.

Best regards,
	Sven Eckelmann
Sven Eckelmann | 1 Dec 2008 19:56
Picon
Picon

[PATCH] Correct parameter in declaration of use_gateway_module

Signed-off-by: Sven Eckelmann <sven.eckelmann@...>
---
 batman/linux/kernel.c            |    2 +-
 batman/linux/modules/gateway.c   |    6 +++---
 batman/linux/modules/gateway24.c |    6 +++---
 batman/originator.c              |    2 +-
 batman/originator.h              |    2 +-
 batman/os.h                      |   20 ++++++++++----------
 batman/posix/init.c              |   10 +++++-----
 batman/posix/posix.c             |   18 +++++++++---------
 batman/posix/tunnel.c            |    2 +-
 batman/profile.c                 |    4 ++--
 batman/profile.h                 |    2 +-
 11 files changed, 37 insertions(+), 37 deletions(-)

diff --git a/batman/linux/kernel.c b/batman/linux/kernel.c
index 1d79013..edf8093 100644
--- a/batman/linux/kernel.c
+++ b/batman/linux/kernel.c
 <at>  <at>  -193,7 +193,7  <at>  <at>  int8_t bind_to_iface( int32_t sock, char *dev ) {

 

-int8_t use_gateway_module() {
+int8_t use_gateway_module(char *BATMANUNUSED(dev)) {

 	int32_t fd;

diff --git a/batman/linux/modules/gateway.c b/batman/linux/modules/gateway.c
index b1b346c..7ccbc3f 100644
(Continue reading)

Sven Eckelmann | 1 Dec 2008 19:56
Picon
Picon

[PATCH] Remove unused variable debug_level_info in posix/posix.c

Signed-off-by: Sven Eckelmann <sven.eckelmann@...>
---
 batman/posix/posix.c |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)

diff --git a/batman/posix/posix.c b/batman/posix/posix.c
index 1a67e13..048cf94 100644
--- a/batman/posix/posix.c
+++ b/batman/posix/posix.c
 <at>  <at>  -523,7 +523,6  <at>  <at>  void segmentation_fault(int32_t BATMANUNUSED(sig)) {
 void cleanup(void) {

 	int8_t i;
-	struct debug_level_info *debug_level_info;
 	struct list_head *debug_pos, *debug_pos_tmp;

 
 <at>  <at>  -533,8 +532,6  <at>  <at>  void cleanup(void) {

 			list_for_each_safe( debug_pos, debug_pos_tmp, (struct list_head *)debug_clients.fd_list[i] ) {

-				debug_level_info = list_entry(debug_pos, struct debug_level_info, list);
-
 				list_del( (struct list_head *)debug_clients.fd_list[i], debug_pos, (struct list_head_first
*)debug_clients.fd_list[i] );
 				debugFree( debug_pos, 1218 );

--

-- 
1.6.0.4
(Continue reading)

Sven Eckelmann | 1 Dec 2008 19:56
Picon
Picon

[PATCH] Use declaration of vis_if from batman.h

---
 batman/posix/posix.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/batman/posix/posix.c b/batman/posix/posix.c
index 048cf94..17b0667 100644
--- a/batman/posix/posix.c
+++ b/batman/posix/posix.c
 <at>  <at>  -42,8 +42,6  <at>  <at> 
 #define BAT_LOGO_END(x,y) printf("\x1B[8;0H");fflush(NULL);bat_wait( x, y );              /* end of current
picture */
 #define IOCREMDEV 2

-extern struct vis_if vis_if;
-
 static clock_t last_clock_tick;
 static float system_tick;

--

-- 
1.6.0.4
Sven Eckelmann | 1 Dec 2008 19:56
Picon
Picon

[PATCH] Respect (un)signess of parameter in printf format strings

Signed-off-by: Sven Eckelmann <sven.eckelmann@...>
---
 batman/batman.h            |    2 +-
 batman/linux/route.c       |    2 +-
 batman/posix/init.c        |    2 +-
 batman/posix/unix_socket.c |    4 ++--
 4 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/batman/batman.h b/batman/batman.h
index c69f83a..bac3a82 100644
--- a/batman/batman.h
+++ b/batman/batman.h
 <at>  <at>  -77,7 +77,7  <at>  <at> 

 #define JITTER 100
 #define TTL 50                /* Time To Live of broadcast messages */
-#define PURGE_TIMEOUT 200000  /* purge originators after time in ms if no valid packet comes in -> TODO:
check influence on TQ_LOCAL_WINDOW_SIZE */
+#define PURGE_TIMEOUT 200000u  /* purge originators after time in ms if no valid packet comes in -> TODO:
check influence on TQ_LOCAL_WINDOW_SIZE */
 #define TQ_LOCAL_WINDOW_SIZE 64     /* sliding packet range of received originator messages in squence
numbers (should be a multiple of our word size) */
 #define TQ_GLOBAL_WINDOW_SIZE 10
 #define TQ_LOCAL_BIDRECT_SEND_MINIMUM 1
diff --git a/batman/linux/route.c b/batman/linux/route.c
index e77fb63..ec5185a 100644
--- a/batman/linux/route.c
+++ b/batman/linux/route.c
 <at>  <at>  -270,7 +270,7  <at>  <at>  void add_del_rule(uint32_t network, uint8_t netmask, int8_t rt_table, uint32_t p
 	inet_ntop(AF_INET, &network, str1, sizeof (str1));
(Continue reading)

Sven Eckelmann | 1 Dec 2008 19:57
Picon
Picon

[PATCH] Mark function which are only declared locally as static

Signed-off-by: Sven Eckelmann <sven.eckelmann@...>
---
 batman/allocate.c     |    4 ++--
 batman/batman.c       |   12 ++++++------
 batman/list-batman.c  |    4 ++--
 batman/posix/init.c   |   10 +++++-----
 batman/posix/posix.c  |    6 +++---
 batman/posix/tunnel.c |   12 ++++++------
 6 files changed, 24 insertions(+), 24 deletions(-)

diff --git a/batman/allocate.c b/batman/allocate.c
index 3ae365b..7160daf 100644
--- a/batman/allocate.c
+++ b/batman/allocate.c
 <at>  <at>  -65,7 +65,7  <at>  <at>  struct memoryUsage
 };

 
-void addMemory( uint32_t length, int32_t tag ) {
+static void addMemory( uint32_t length, int32_t tag ) {

 	struct memoryUsage *walker;

 <at>  <at>  -98,7 +98,7  <at>  <at>  void addMemory( uint32_t length, int32_t tag ) {
 }

 
-void removeMemory( int32_t tag, int32_t freetag ) {
+static void removeMemory( int32_t tag, int32_t freetag ) {

(Continue reading)

Sven Eckelmann | 1 Dec 2008 19:57
Picon
Picon

[PATCH] Remove unused functions isDuplicate and isBntog

---
 batman/batman.c |   37 -------------------------------------
 1 files changed, 0 insertions(+), 37 deletions(-)

diff --git a/batman/batman.c b/batman/batman.c
index ebe5aab..0c17f33 100644
--- a/batman/batman.c
+++ b/batman/batman.c
 <at>  <at>  -666,43 +666,6  <at>  <at>  unsigned char get_gw_class(int down, int up)

 

-int isDuplicate(struct orig_node *orig_node, uint16_t seqno)
-{
-	struct list_head *neigh_pos;
-	struct neigh_node *neigh_node;
-
-	prof_start( PROF_is_duplicate );
-
-	list_for_each( neigh_pos, &orig_node->neigh_list ) {
-
-		neigh_node = list_entry( neigh_pos, struct neigh_node, list );
-
-		if ( get_bit_status( neigh_node->real_bits, orig_node->last_real_seqno, seqno ) ) {
-
-			prof_stop( PROF_is_duplicate );
-			return 1;
-
-		}
-
(Continue reading)

Sven Eckelmann | 1 Dec 2008 19:57
Picon
Picon

[PATCH] Don't convert uint64_t to float when only comparing against 0

Signed-off-by: Sven Eckelmann <sven.eckelmann@...>
---
 batman/profile.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/batman/profile.c b/batman/profile.c
index 55b0450..d9eaf13 100644
--- a/batman/profile.c
+++ b/batman/profile.c
 <at>  <at>  -65,7 +65,7  <at>  <at>  void prof_print(void) {

 	for ( index = 0; index < PROF_COUNT; index++ ) {

-		debug_output( 5, "   %''30s: cpu time = %10.3f, calls = %''10i, avg time per call = %4.10f \n",
prof_container[index].name, (float)prof_container[index].total_time/CLOCKS_PER_SEC,
prof_container[index].calls, ( (float)prof_container[index].calls == 0 ? 0.0 : ( (
(float)prof_container[index].total_time/CLOCKS_PER_SEC ) /
(float)prof_container[index].calls ) ) );
+		debug_output( 5, "   %''30s: cpu time = %10.3f, calls = %''10i, avg time per call = %4.10f \n",
prof_container[index].name, (float)prof_container[index].total_time/CLOCKS_PER_SEC,
prof_container[index].calls, ( prof_container[index].calls == 0 ? 0.0 : ( (
(float)prof_container[index].total_time/CLOCKS_PER_SEC ) /
(float)prof_container[index].calls ) ) );

 	}

--

-- 
1.6.0.4

Gmane