[Olsr-cvs] olsrd-current/src .cvsignore, 1.1, 1.2 defs.h, 1.62, 1.63 lq_route.c, 1.51, 1.52 main.c, 1.98, 1.99 net_olsr.c, 1.29, 1.30 net_olsr.h, 1.12, 1.13 olsr.c, 1.57, 1.58 olsr_cfg.h, 1.33, 1.34 routing_table.c, 1.30, 1.31 routing_table.h, 1.21, 1.22
Bernd Petrovitsch
(spam-protected)
Sun Sep 16 23:20:19 CEST 2007
Update of /cvsroot/olsrd/olsrd-current/src
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv8566/src
Modified Files:
.cvsignore defs.h lq_route.c main.c net_olsr.c net_olsr.h
olsr.c olsr_cfg.h routing_table.c routing_table.h
Log Message:
* creating builddata.c containing build time information as date+time,
host and version
and using it througout
* activated links in the httpinfo plugin again if we have host links
other minor HTML cleanups there
* replaced the olsr_host_rt_maxplen() function with a field in
"struct olsr_cfg" similar to "ipsize"
Index: lq_route.c
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/src/lq_route.c,v
retrieving revision 1.51
retrieving revision 1.52
diff -C2 -d -r1.51 -r1.52
*** lq_route.c 13 Sep 2007 15:31:59 -0000 1.51
--- lq_route.c 16 Sep 2007 21:20:07 -0000 1.52
***************
*** 302,306 ****
struct avl_tree cand_tree;
struct list_node path_list;
! int i, plen, max_host_plen, path_count = 0;
struct tc_entry *tc;
struct tc_edge_entry *tc_edge;
--- 302,306 ----
struct avl_tree cand_tree;
struct list_node path_list;
! int i, plen, path_count = 0;
struct tc_entry *tc;
struct tc_edge_entry *tc_edge;
***************
*** 319,324 ****
#endif
- max_host_plen = olsr_host_rt_maxplen();
-
/*
* Prepare the candidate tree and result list.
--- 319,322 ----
***************
*** 427,431 ****
/* add a route to the main address of the destination node */
! olsr_insert_routing_table(&vert->addr, max_host_plen, &vert->addr,
&link->neighbor_iface_addr, inter->if_index,
vert->hops, vert->path_etx);
--- 425,429 ----
/* add a route to the main address of the destination node */
! olsr_insert_routing_table(&vert->addr, olsr_cnf->maxplen, &vert->addr,
&link->neighbor_iface_addr, inter->if_index,
vert->hops, vert->path_etx);
***************
*** 436,440 ****
mid_walker = mid_walker->next_alias) {
! olsr_insert_routing_table(&mid_walker->alias, max_host_plen, &vert->addr,
&link->neighbor_iface_addr, inter->if_index,
vert->hops, vert->path_etx);
--- 434,438 ----
mid_walker = mid_walker->next_alias) {
! olsr_insert_routing_table(&mid_walker->alias, olsr_cnf->maxplen, &vert->addr,
&link->neighbor_iface_addr, inter->if_index,
vert->hops, vert->path_etx);
Index: .cvsignore
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/src/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** .cvsignore 14 Dec 2006 11:28:32 -0000 1.1
--- .cvsignore 16 Sep 2007 21:20:07 -0000 1.2
***************
*** 1 ****
--- 1,2 ----
*.d
+ builddata.c
Index: net_olsr.h
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/src/net_olsr.h,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** net_olsr.h 12 Sep 2007 23:40:14 -0000 1.12
--- net_olsr.h 16 Sep 2007 21:20:16 -0000 1.13
***************
*** 92,98 ****
olsr_netmask_to_prefix(const union olsr_ip_addr *);
- int
- olsr_host_rt_maxplen(void);
-
char *
sockaddr_to_string(const struct sockaddr *);
--- 92,95 ----
Index: defs.h
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/src/defs.h,v
retrieving revision 1.62
retrieving revision 1.63
diff -C2 -d -r1.62 -r1.63
*** defs.h 19 Aug 2007 23:00:22 -0000 1.62
--- defs.h 16 Sep 2007 21:20:07 -0000 1.63
***************
*** 60,65 ****
#include "olsr_cfg.h"
! #define SOFTWARE_VERSION "olsr.org - " VERSION
! #define OLSRD_VERSION_DATE " *** " SOFTWARE_VERSION " (" __DATE__ ") ***\n"
#ifndef OLSRD_GLOBAL_CONF_FILE
--- 60,66 ----
#include "olsr_cfg.h"
! extern const char olsrd_version[];
! extern const char build_date[];
! extern const char build_host[];
#ifndef OLSRD_GLOBAL_CONF_FILE
***************
*** 73,76 ****
--- 74,78 ----
#define MIN_PACKET_SIZE(ver) ((int)(sizeof(olsr_u8_t) * (((ver) == AF_INET) ? 4 : 7)))
+
/* Debug helper macro */
#ifdef DEBUG
Index: olsr_cfg.h
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/src/olsr_cfg.h,v
retrieving revision 1.33
retrieving revision 1.34
diff -C2 -d -r1.33 -r1.34
*** olsr_cfg.h 13 Sep 2007 16:08:13 -0000 1.33
--- olsr_cfg.h 16 Sep 2007 21:20:17 -0000 1.34
***************
*** 233,236 ****
--- 233,237 ----
/* Stuff set by olsrd */
size_t ipsize; /* Size of address */
+ olsr_8_t maxplen; /* maximum prefix len */
olsr_u16_t system_tick_divider; /* Tick resolution */
olsr_bool del_gws; /* Delete InternetGWs at startup */
Index: net_olsr.c
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/src/net_olsr.c,v
retrieving revision 1.29
retrieving revision 1.30
diff -C2 -d -r1.29 -r1.30
*** net_olsr.c 5 Sep 2007 16:11:11 -0000 1.29
--- net_olsr.c 16 Sep 2007 21:20:16 -0000 1.30
***************
*** 528,548 ****
}
- /**
- * olsr_host_rt_maxplen
- *
- * @return the maxium prefix length based wether v4 or v6 is configured
- */
- int
- olsr_host_rt_maxplen(void)
- {
- if(olsr_cnf->ip_version == AF_INET) {
- /* IPv4 */
- return 32;
- } else {
- /* IPv6 */
- return 128;
- }
- }
-
/**
--- 528,531 ----
Index: routing_table.c
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/src/routing_table.c,v
retrieving revision 1.30
retrieving revision 1.31
diff -C2 -d -r1.30 -r1.31
*** routing_table.c 5 Sep 2007 16:17:36 -0000 1.30
--- routing_table.c 16 Sep 2007 21:20:17 -0000 1.31
***************
*** 169,173 ****
*/
struct rt_entry *
! olsr_lookup_routing_table(union olsr_ip_addr *dst)
{
struct avl_node *rt_tree_node;
--- 169,173 ----
*/
struct rt_entry *
! olsr_lookup_routing_table(const union olsr_ip_addr *dst)
{
struct avl_node *rt_tree_node;
***************
*** 175,179 ****
COPY_IP(&prefix, dst);
! prefix.prefix_len = olsr_host_rt_maxplen();
rt_tree_node = avl_find(&routingtree, &prefix);
--- 175,179 ----
COPY_IP(&prefix, dst);
! prefix.prefix_len = olsr_cnf->maxplen;
rt_tree_node = avl_find(&routingtree, &prefix);
***************
*** 293,298 ****
* field from the route entry or best route path shall be used.
*/
! struct rt_nexthop *
! olsr_get_nh(struct rt_entry *rt)
{
--- 293,298 ----
* field from the route entry or best route path shall be used.
*/
! const struct rt_nexthop *
! olsr_get_nh(const struct rt_entry *rt)
{
***************
*** 515,519 ****
olsr_fill_routing_table_with_neighbors(void)
{
! int index, max_host_plen;
float etx;
--- 515,519 ----
olsr_fill_routing_table_with_neighbors(void)
{
! int index;
float etx;
***************
*** 522,527 ****
#endif
- max_host_plen = olsr_host_rt_maxplen();
-
for (index=0;index<HASHSIZE;index++) {
--- 522,525 ----
***************
*** 564,568 ****
/* neighbor main IP address */
! olsr_insert_routing_table(&link->neighbor_iface_addr, max_host_plen,
&link->neighbor->neighbor_main_addr,
&link->neighbor_iface_addr,
--- 562,566 ----
/* neighbor main IP address */
! olsr_insert_routing_table(&link->neighbor_iface_addr, olsr_cnf->maxplen,
&link->neighbor->neighbor_main_addr,
&link->neighbor_iface_addr,
***************
*** 570,574 ****
/* this is the nexthop route that all routes will be tracking */
! olsr_insert_routing_table(&addrs2->alias, max_host_plen,
&link->neighbor->neighbor_main_addr,
&link->neighbor_iface_addr,
--- 568,572 ----
/* this is the nexthop route that all routes will be tracking */
! olsr_insert_routing_table(&addrs2->alias, olsr_cnf->maxplen,
&link->neighbor->neighbor_main_addr,
&link->neighbor_iface_addr,
Index: main.c
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/src/main.c,v
retrieving revision 1.98
retrieving revision 1.99
diff -C2 -d -r1.98 -r1.99
*** main.c 13 Sep 2007 16:08:13 -0000 1.98
--- main.c 16 Sep 2007 21:20:16 -0000 1.99
***************
*** 155,161 ****
}
! printf("\n *** %s ***\n Build date: %s\n http://www.olsr.org\n\n",
! SOFTWARE_VERSION,
! __DATE__);
/* Using PID as random seed */
--- 155,162 ----
}
! printf("\n *** %s ***\n Build date: %s on %s\n http://www.olsr.org\n\n",
! olsrd_version,
! build_date,
! build_host);
/* Using PID as random seed */
***************
*** 334,344 ****
if(olsr_cnf->ip_version == AF_INET6)
{
! OLSR_PRINTF(1, "Using IP version 6\n");
olsr_cnf->ipsize = sizeof(struct in6_addr);
}
else
{
! OLSR_PRINTF(1, "Using IP version 4\n");
! olsr_cnf->ipsize = sizeof(olsr_u32_t);
}
--- 335,347 ----
if(olsr_cnf->ip_version == AF_INET6)
{
! OLSR_PRINTF(1, "Using IP version %d\n", 6);
olsr_cnf->ipsize = sizeof(struct in6_addr);
+ olsr_cnf->maxplen = 128;
}
else
{
! OLSR_PRINTF(1, "Using IP version %d\n", 4);
! olsr_cnf->ipsize = sizeof(struct in_addr);
! olsr_cnf->maxplen = 32;
}
***************
*** 383,387 ****
if((olsr_cnf->debug_level == 0) && (!olsr_cnf->no_fork))
{
! printf("%s detaching from the current process...\n", SOFTWARE_VERSION);
if(daemon(0, 0) < 0)
{
--- 386,390 ----
if((olsr_cnf->debug_level == 0) && (!olsr_cnf->no_fork))
{
! printf("%s detaching from the current process...\n", olsrd_version);
if(daemon(0, 0) < 0)
{
***************
*** 398,402 ****
/* Start syslog entry */
! olsr_syslog(OLSR_LOG_INFO, "%s successfully started", SOFTWARE_VERSION);
/*
--- 401,405 ----
/* Start syslog entry */
! olsr_syslog(OLSR_LOG_INFO, "%s successfully started", olsrd_version);
/*
***************
*** 512,518 ****
#endif
! olsr_syslog(OLSR_LOG_INFO, "%s stopped", SOFTWARE_VERSION);
! OLSR_PRINTF(1, "\n <<<< %s - terminating >>>>\n http://www.olsr.org\n", SOFTWARE_VERSION);
exit(olsr_cnf->exit_value);
--- 515,521 ----
#endif
! olsr_syslog(OLSR_LOG_INFO, "%s stopped", olsrd_version);
! OLSR_PRINTF(1, "\n <<<< %s - terminating >>>>\n http://www.olsr.org\n", olsrd_version);
exit(olsr_cnf->exit_value);
Index: olsr.c
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/src/olsr.c,v
retrieving revision 1.57
retrieving revision 1.58
diff -C2 -d -r1.57 -r1.58
*** olsr.c 5 Sep 2007 16:11:11 -0000 1.57
--- olsr.c 16 Sep 2007 21:20:16 -0000 1.58
***************
*** 157,161 ****
{
clear_console();
! printf("%s", OLSRD_VERSION_DATE);
}
--- 157,161 ----
{
clear_console();
! printf(" *** %s (%s on %s) ***\n", olsrd_version, build_date, build_host);
}
Index: routing_table.h
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/src/routing_table.h,v
retrieving revision 1.21
retrieving revision 1.22
diff -C2 -d -r1.21 -r1.22
*** routing_table.h 12 Sep 2007 23:40:47 -0000 1.21
--- routing_table.h 16 Sep 2007 21:20:17 -0000 1.22
***************
*** 163,167 ****
void olsr_print_routing_table(struct avl_tree *);
! struct rt_nexthop * olsr_get_nh(struct rt_entry *);
struct rt_path *
--- 163,167 ----
void olsr_print_routing_table(struct avl_tree *);
! const struct rt_nexthop * olsr_get_nh(const struct rt_entry *);
struct rt_path *
***************
*** 172,176 ****
struct rt_entry *
! olsr_lookup_routing_table(union olsr_ip_addr *);
--- 172,176 ----
struct rt_entry *
! olsr_lookup_routing_table(const union olsr_ip_addr *);
More information about the Olsr-cvs
mailing list