From (spam-protected) Sun Apr 1 23:44:16 2007 From: (spam-protected) (Bernd Petrovitsch) Date: Sun, 01 Apr 2007 21:44:16 +0000 Subject: [Olsr-cvs] olsrd-current Makefile,1.75,1.76 CHANGELOG,1.57,1.58 Message-ID: Update of /cvsroot/olsrd/olsrd-current In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv2860 Modified Files: Makefile CHANGELOG Log Message: * set version to 0.5.0 and added a section in the CHANGELOG Index: Makefile =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/Makefile,v retrieving revision 1.75 retrieving revision 1.76 diff -C2 -d -r1.75 -r1.76 *** Makefile 5 Feb 2007 21:17:26 -0000 1.75 --- Makefile 1 Apr 2007 21:44:14 -0000 1.76 *************** *** 38,42 **** # $Id$ ! VERS = 0.5.0pre TOPDIR = . --- 38,42 ---- # $Id$ ! VERS = 0.5.0 TOPDIR = . Index: CHANGELOG =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/CHANGELOG,v retrieving revision 1.57 retrieving revision 1.58 diff -C2 -d -r1.57 -r1.58 *** CHANGELOG 13 Dec 2006 23:06:23 -0000 1.57 --- CHANGELOG 1 Apr 2007 21:44:14 -0000 1.58 *************** *** 2,5 **** --- 2,21 ---- $Id$ + 0.5.0 --------------------------------------------------------------------- + + APPLIED PATCHES FROM FREIFUNK-FIRMWARE + libsmake, dyngwplain, nameservices+services, tzxtinfo, quagga, quagga-routehandler, + optimize, fixes from Eric Tromp and Sven-Ola Tücke, CPU-optimize, secure key, HNA-IP + + CLEANUPS + removed hardcoded limit on the number of interfaces (at least in the Unix part) + made Makefile targets much more consistent + + BUGFIXES + all over the place + + MISC + put Bmf-1.3 plugin into it + 0.4.11 -------------------------------------------------------------------- From (spam-protected) Mon Apr 2 01:49:33 2007 From: (spam-protected) (Bernd Petrovitsch) Date: Sun, 01 Apr 2007 23:49:33 +0000 Subject: [Olsr-cvs] olsrd-current Makefile,1.76,1.77 Message-ID: Update of /cvsroot/olsrd/olsrd-current In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv24598 Modified Files: Makefile Log Message: * changed the version to 0.5.1pre Index: Makefile =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/Makefile,v retrieving revision 1.76 retrieving revision 1.77 diff -C2 -d -r1.76 -r1.77 *** Makefile 1 Apr 2007 21:44:14 -0000 1.76 --- Makefile 1 Apr 2007 23:49:31 -0000 1.77 *************** *** 38,42 **** # $Id$ ! VERS = 0.5.0 TOPDIR = . --- 38,42 ---- # $Id$ ! VERS = 0.5.1pre TOPDIR = . From (spam-protected) Mon Apr 2 11:40:50 2007 From: (spam-protected) (Thomas Lopatic) Date: Mon, 02 Apr 2007 09:40:50 +0000 Subject: [Olsr-cvs] olsrd-current Makefile,1.77,1.78 Message-ID: Update of /cvsroot/olsrd/olsrd-current In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv29108 Modified Files: Makefile Log Message: Pull version from makefile. Tested on Linux. To be tested on Windows. Reset version from 0.5.1pre to 0.5.0. Index: Makefile =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/Makefile,v retrieving revision 1.77 retrieving revision 1.78 diff -C2 -d -r1.77 -r1.78 *** Makefile 1 Apr 2007 23:49:31 -0000 1.77 --- Makefile 2 Apr 2007 09:40:48 -0000 1.78 *************** *** 38,42 **** # $Id$ ! VERS = 0.5.1pre TOPDIR = . --- 38,44 ---- # $Id$ ! VERS = 0.5.0 ! ! CFLAGS += -DVERSION=\"$(VERS)\" TOPDIR = . From (spam-protected) Mon Apr 2 11:40:50 2007 From: (spam-protected) (Thomas Lopatic) Date: Mon, 02 Apr 2007 09:40:50 +0000 Subject: [Olsr-cvs] olsrd-current/src defs.h,1.55,1.56 Message-ID: Update of /cvsroot/olsrd/olsrd-current/src In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv29108/src Modified Files: defs.h Log Message: Pull version from makefile. Tested on Linux. To be tested on Windows. Reset version from 0.5.1pre to 0.5.0. Index: defs.h =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/defs.h,v retrieving revision 1.55 retrieving revision 1.56 diff -C2 -d -r1.55 -r1.56 *** defs.h 31 Jan 2007 12:36:50 -0000 1.55 --- defs.h 2 Apr 2007 09:40:48 -0000 1.56 *************** *** 60,64 **** #include "olsr_cfg.h" - #define VERSION "0.5.0-pre" #define SOFTWARE_VERSION "olsr.org - " VERSION #define OLSRD_VERSION_DATE " *** " SOFTWARE_VERSION " (" __DATE__ ") ***\n" --- 60,63 ---- From (spam-protected) Mon Apr 2 12:07:46 2007 From: (spam-protected) (Bernd Petrovitsch) Date: Mon, 02 Apr 2007 10:07:46 +0000 Subject: [Olsr-cvs] olsrd-current Makefile,1.78,1.79 Message-ID: Update of /cvsroot/olsrd/olsrd-current In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv8032 Modified Files: Makefile Log Message: * changed the version to 0.5.1pre Index: Makefile =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/Makefile,v retrieving revision 1.78 retrieving revision 1.79 diff -C2 -d -r1.78 -r1.79 *** Makefile 2 Apr 2007 09:40:48 -0000 1.78 --- Makefile 2 Apr 2007 10:07:44 -0000 1.79 *************** *** 38,42 **** # $Id$ ! VERS = 0.5.0 CFLAGS += -DVERSION=\"$(VERS)\" --- 38,42 ---- # $Id$ ! VERS = 0.5.1pre CFLAGS += -DVERSION=\"$(VERS)\" From (spam-protected) Tue Apr 3 00:22:28 2007 From: (spam-protected) (Bernd Petrovitsch) Date: Mon, 02 Apr 2007 22:22:28 +0000 Subject: [Olsr-cvs] olsrd-current/lib/httpinfo/src olsrd_httpinfo.c, 1.61, 1.62 olsrd_plugin.c, 1.13, 1.14 olsrd_plugin.h, 1.21, 1.22 Message-ID: Update of /cvsroot/olsrd/olsrd-current/lib/httpinfo/src In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv25929/lib/httpinfo/src Modified Files: olsrd_httpinfo.c olsrd_plugin.c olsrd_plugin.h Log Message: * Added an option to activate reverse resolving the hostnames Activate it at your own risk! * Fixup the HTML - at least partly. Index: olsrd_httpinfo.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/lib/httpinfo/src/olsrd_httpinfo.c,v retrieving revision 1.61 retrieving revision 1.62 diff -C2 -d -r1.61 -r1.62 *** olsrd_httpinfo.c 4 Feb 2007 22:37:36 -0000 1.61 --- olsrd_httpinfo.c 2 Apr 2007 22:22:25 -0000 1.62 *************** *** 50,53 **** --- 50,54 ---- #include #include + #include #include "olsr.h" *************** *** 706,710 **** --- 707,770 ---- } + static int + build_ip_txt(char *buf, const olsr_u32_t bufsize, const olsr_bool want_link, const char * const ipstr, const char * const maskstr); + static int + build_ip_txt(char *buf, const olsr_u32_t bufsize, const olsr_bool want_link, const char * const ipstr, const char * const maskstr) + { + int size = 0; + if (want_link && maskstr == NULL) { /* Print the link only if there is not netmask */ + size += sprintf(&buf[size], + "", + ipstr, + http_port); + } + size += sprintf(&buf[size], "%s", ipstr); + if (maskstr) { + size += sprintf(&buf[size], "/%s", maskstr); + } + if (want_link && maskstr == NULL) { /* Print the link only if there is not netmask */ + size += sprintf(&buf[size], ""); + } + return size; + } + static int + build_ipaddr_link(char *buf, const olsr_u32_t bufsize, const olsr_bool want_link, union olsr_ip_addr * const ipaddr, const union hna_netmask * const mask); + static int + build_ipaddr_link(char *buf, const olsr_u32_t bufsize, const olsr_bool want_link, union olsr_ip_addr * const ipaddr, const union hna_netmask * const mask) + { + int size = 0; + char maskbuf[32]; + char *maskstr; + const struct hostent * const hp = resolve_ip_addresses ? gethostbyaddr(ipaddr, olsr_cnf->ipsize, olsr_cnf->ip_version) : NULL; + if (mask != NULL) { + if (olsr_cnf->ip_version == AF_INET) { + if (mask->v4 == ~0U) { + maskstr = NULL; + } else { + struct in_addr in; + in.s_addr = mask->v4; + snprintf(maskbuf, sizeof(maskbuf), "%s", inet_ntoa(in)); + maskstr = maskbuf; + } + } else { + snprintf(maskbuf, sizeof(maskbuf), "%d", mask->v6); + maskstr = maskbuf; + } + } else { + maskstr = NULL; + } + size += sprintf(&buf[size], "", resolve_ip_addresses && hp ? "" : " colspan=\"2\""); + size += build_ip_txt(&buf[size], bufsize, want_link, olsr_ip_to_string(ipaddr), maskstr); + if (hp) { + size += sprintf(&buf[size], "("); + size += build_ip_txt(&buf[size], bufsize, want_link, hp->h_name, NULL); + size += sprintf(&buf[size], ")"); + } + size += sprintf(&buf[size], ""); + return size; + } + #define build_ipaddr_with_link(buf, bufsize, ipaddr, mask) build_ipaddr_link((buf), (bufsize), OLSR_TRUE, (ipaddr), (mask)) + #define build_ipaddr_no_link(buf, bufsize, ipaddr, mask) build_ipaddr_link((buf), (bufsize), OLSR_FALSE, (ipaddr), (mask)) int *************** *** 716,720 **** size += sprintf(&buf[size], "

OLSR routes in kernel

\n"); ! size += sprintf(&buf[size], ""); if (olsr_cnf->lq_level > 0) size += sprintf(&buf[size], ""); --- 776,781 ---- size += sprintf(&buf[size], "

OLSR routes in kernel

\n"); ! size += sprintf(&buf[size], "
DestinationGatewayMetricETX
Destination", ! resolve_ip_addresses ? " colspan=\"2\"" : ""); if (olsr_cnf->lq_level > 0) size += sprintf(&buf[size], ""); *************** *** 728,744 **** routes = routes->next) { ! size += sprintf(&buf[size], ! "" ! "" ! "", ! olsr_ip_to_string(&routes->rt_dst), ! http_port, ! olsr_ip_to_string(&routes->rt_dst), ! olsr_ip_to_string(&routes->rt_router), ! http_port, ! olsr_ip_to_string(&routes->rt_router), ! routes->rt_metric); if (olsr_cnf->lq_level > 0) ! size += sprintf(&buf[size], "", routes->rt_etx); size += sprintf(&buf[size], "" --- 789,799 ---- routes = routes->next) { ! size += sprintf(&buf[size], ""); ! size += build_ipaddr_with_link(&buf[size], bufsize - size, &routes->rt_dst, NULL); ! size += build_ipaddr_with_link(&buf[size], bufsize - size, &routes->rt_router, NULL); ! ! size += sprintf(&buf[size], "", routes->rt_metric); if (olsr_cnf->lq_level > 0) ! size += sprintf(&buf[size], "", routes->rt_etx); size += sprintf(&buf[size], "" *************** *** 755,769 **** routes = routes->next) { size += sprintf(&buf[size], ! "" ! "" ! "", ! olsr_ip_to_string(&routes->rt_dst), ! olsr_ip_to_string(&routes->rt_router), ! http_port, ! olsr_ip_to_string(&routes->rt_router), routes->rt_metric); if (olsr_cnf->lq_level > 0) ! size += sprintf(&buf[size], "", routes->rt_etx); size += sprintf(&buf[size], "" --- 810,821 ---- routes = routes->next) { + size += sprintf(&buf[size], ""); + size += build_ipaddr_with_link(&buf[size], bufsize - size, &routes->rt_dst, &routes->rt_mask); + size += build_ipaddr_with_link(&buf[size], bufsize - size, &routes->rt_router, NULL); size += sprintf(&buf[size], ! "", routes->rt_metric); if (olsr_cnf->lq_level > 0) ! size += sprintf(&buf[size], "", routes->rt_etx); size += sprintf(&buf[size], "" *************** *** 950,955 **** size += sprintf(&buf[size], "
GatewayMetricETX
%s%s%d%.2f%s
%d%.2f%s
%s%s%d%.2f%s
%d%.2f%s
\n"); ! } ! else if((olsr_cnf->ip_version == AF_INET6) && (olsr_cnf->hna6_entries)) { struct hna6_entry *hna6; --- 1002,1007 ---- size += sprintf(&buf[size], "\n"); ! } ! else if((olsr_cnf->ip_version == AF_INET6) && (olsr_cnf->hna6_entries)) { struct hna6_entry *hna6; *************** *** 983,987 **** size += sprintf(&buf[size], "

Links

\n"); ! size += sprintf(&buf[size], "\n"); if (olsr_cnf->lq_level > 0) size += sprintf(&buf[size], "\n"); --- 1035,1039 ---- size += sprintf(&buf[size], "

Links

\n"); ! size += sprintf(&buf[size], "
Local IPremote IPHysteresisLinkQualitylosttotalNLQETX
\n"); if (olsr_cnf->lq_level > 0) size += sprintf(&buf[size], "\n"); *************** *** 992,1012 **** while(link) { size += sprintf(&buf[size], ! "" ! "" ! "", ! olsr_ip_to_string(&link->local_iface_addr), ! olsr_ip_to_string(&link->neighbor_iface_addr), ! http_port, ! olsr_ip_to_string(&link->neighbor_iface_addr), link->L_link_quality); if (olsr_cnf->lq_level > 0) { size += sprintf(&buf[size], ! "" "" "" ! "" ! "\n", link->loss_link_quality, link->lost_packets, --- 1044,1061 ---- while(link) { + size += sprintf(&buf[size], ""); + size += build_ipaddr_no_link(&buf[size], bufsize, &link->local_iface_addr, NULL); + size += build_ipaddr_with_link(&buf[size], bufsize, &link->neighbor_iface_addr, NULL); size += sprintf(&buf[size], ! "", link->L_link_quality); if (olsr_cnf->lq_level > 0) { size += sprintf(&buf[size], ! "" "" "" ! "" ! "\n", link->loss_link_quality, link->lost_packets, *************** *** 1031,1043 **** neigh = neigh->next) { size += sprintf(&buf[size], - "" "" "" "" "", - olsr_ip_to_string(&neigh->neighbor_main_addr), - http_port, - olsr_ip_to_string(&neigh->neighbor_main_addr), (neigh->status == SYM) ? "YES" : "NO", neigh->is_mpr ? "YES" : "NO", --- 1080,1090 ---- neigh = neigh->next) { + size += sprintf(&buf[size], ""); + size += build_ipaddr_with_link(&buf[size], bufsize, &neigh->neighbor_main_addr, NULL); size += sprintf(&buf[size], "" "" "" "", (neigh->status == SYM) ? "YES" : "NO", neigh->is_mpr ? "YES" : "NO", *************** *** 1054,1058 **** list_2 = list_2->next) { ! size += sprintf(&buf[size], "\n", olsr_ip_to_string(&list_2->neighbor_2->neighbor_2_addr)); thop_cnt ++; } --- 1101,1105 ---- list_2 = list_2->next) { ! size += sprintf(&buf[size], "", olsr_ip_to_string(&list_2->neighbor_2->neighbor_2_addr)); thop_cnt ++; } *************** *** 1078,1082 **** ! size += sprintf(&buf[size], "

Topology entries

\n
Local IPRemote IPHysteresisLinkQualitylosttotalNLQETX
%s%s%0.2f%0.2f%d%d%0.2f%0.2f
%0.2f%0.2f%d%d%0.2f%0.2f
%s%s%s%s%d
%s%s%s%d
"); if (olsr_cnf->lq_level > 0) size += sprintf(&buf[size], ""); --- 1125,1129 ---- ! size += sprintf(&buf[size], "

Topology entries

\n
Destination IPLast hop IPLQILQETX
"); if (olsr_cnf->lq_level > 0) size += sprintf(&buf[size], ""); *************** *** 1095,1116 **** while(dst_entry != &entry->destinations) { ! size += sprintf(&buf[size], ! "" ! "", ! olsr_ip_to_string(&dst_entry->T_dest_addr), ! http_port, ! olsr_ip_to_string(&dst_entry->T_dest_addr), ! olsr_ip_to_string(&entry->T_last_addr), ! http_port, ! olsr_ip_to_string(&entry->T_last_addr)); if (olsr_cnf->lq_level > 0) { size += sprintf(&buf[size], ! "" ! "" ! "\n", dst_entry->link_quality, dst_entry->inverse_link_quality, ! (dst_entry->link_quality * dst_entry->inverse_link_quality) ? 1.0 / (dst_entry->link_quality * dst_entry->inverse_link_quality) : 0.0); } size += sprintf(&buf[size], "\n"); --- 1142,1158 ---- while(dst_entry != &entry->destinations) { ! size += sprintf(&buf[size], ""); ! size += build_ipaddr_with_link(&buf[size], bufsize, &dst_entry->T_dest_addr, NULL); ! size += build_ipaddr_with_link(&buf[size], bufsize, &entry->T_last_addr, NULL); if (olsr_cnf->lq_level > 0) { + const double d = dst_entry->link_quality * dst_entry->inverse_link_quality; size += sprintf(&buf[size], ! "" ! "" ! "\n", dst_entry->link_quality, dst_entry->inverse_link_quality, ! d ? 1.0 / d : 0.0); } size += sprintf(&buf[size], "\n"); *************** *** 1153,1164 **** while(tmp_net != &tmp_hna->networks) { ! size += sprintf(&buf[size], "", ! olsr_ip_to_string(&tmp_net->A_network_addr)); size += sprintf(&buf[size], "", olsr_netmask_to_string(&tmp_net->A_netmask)); ! size += sprintf(&buf[size], "\n", ! olsr_ip_to_string(&tmp_hna->A_gateway_addr), ! http_port, ! olsr_ip_to_string(&tmp_hna->A_gateway_addr)); tmp_net = tmp_net->next; } --- 1195,1203 ---- while(tmp_net != &tmp_hna->networks) { ! size += sprintf(&buf[size], ""); ! size += build_ipaddr_no_link(&buf[size], bufsize, &tmp_net->A_network_addr, NULL); size += sprintf(&buf[size], "", olsr_netmask_to_string(&tmp_net->A_netmask)); ! size += build_ipaddr_with_link(&buf[size], bufsize, &tmp_hna->A_gateway_addr, NULL); tmp_net = tmp_net->next; } *************** *** 1190,1197 **** while(entry != &mid_set[index]) { ! size += sprintf(&buf[size], "\n", ! olsr_ip_to_string(&entry->main_addr), ! http_port, ! olsr_ip_to_string(&entry->main_addr)); size += sprintf(&buf[size], ""); ! size += build_ipaddr_with_link(&buf[size], bufsize, &entry->main_addr, NULL); size += sprintf(&buf[size], "\n"); ! size += sprintf(&buf[size], admin_basic_setting_int, "Debug level:", "debug_level", 2, olsr_cnf->debug_level); ! size += sprintf(&buf[size], admin_basic_setting_float, "Pollrate:", "pollrate", 4, olsr_cnf->pollrate); ! size += sprintf(&buf[size], admin_basic_setting_string, "TOS:", "tos", 6, "TBD"); ! size += sprintf(&buf[size], "\n"); ! size += sprintf(&buf[size], "\n"); ! size += sprintf(&buf[size], admin_basic_setting_int, "TC redundancy:", "tc_redundancy", 1, olsr_cnf->tc_redundancy); ! size += sprintf(&buf[size], admin_basic_setting_int, "MPR coverage:", "mpr_coverage", 1, olsr_cnf->mpr_coverage); ! size += sprintf(&buf[size], admin_basic_setting_int, "Willingness:", "willingness", 1, olsr_cnf->willingness); ! size += sprintf(&buf[size], "\n"); ! size += sprintf(&buf[size], "\n"); if(olsr_cnf->use_hysteresis) { ! size += sprintf(&buf[size], admin_basic_setting_float, "Hyst scaling:", "hyst_scaling", 4, olsr_cnf->hysteresis_param.scaling); ! size += sprintf(&buf[size], admin_basic_setting_float, "Lower thr:", "hyst_lower", 4, olsr_cnf->hysteresis_param.thr_low); ! size += sprintf(&buf[size], admin_basic_setting_float, "Upper thr:", "hyst_upper", 4, olsr_cnf->hysteresis_param.thr_high); } else { ! size += sprintf(&buf[size], "\n"); } ! size += sprintf(&buf[size], "\n"); ! size += sprintf(&buf[size], "\n"); if(olsr_cnf->lq_level) { ! size += sprintf(&buf[size], admin_basic_setting_int, "LQ level:", "lq_level", 1, olsr_cnf->lq_level); ! size += sprintf(&buf[size], admin_basic_setting_int, "LQ winsize:", "lq_wsize", 2, olsr_cnf->lq_wsize); } else { ! size += sprintf(&buf[size], "\n"); } ! size += sprintf(&buf[size], "\n"); ! size += sprintf(&buf[size], "\n"); ! size += sprintf(&buf[size], "\n"); i++; --- 79,139 ---- ! size += snprintf(&buf[size], bufsize-size, "\n"); ! size += snprintf(&buf[size], bufsize-size, admin_basic_setting_int, "Debug level:", "debug_level", 2, olsr_cnf->debug_level); ! size += snprintf(&buf[size], bufsize-size, admin_basic_setting_float, "Pollrate:", "pollrate", 4, olsr_cnf->pollrate); ! size += snprintf(&buf[size], bufsize-size, admin_basic_setting_string, "TOS:", "tos", 6, "TBD"); ! size += snprintf(&buf[size], bufsize-size, "\n"); ! size += snprintf(&buf[size], bufsize-size, "\n"); ! size += snprintf(&buf[size], bufsize-size, admin_basic_setting_int, "TC redundancy:", "tc_redundancy", 1, olsr_cnf->tc_redundancy); ! size += snprintf(&buf[size], bufsize-size, admin_basic_setting_int, "MPR coverage:", "mpr_coverage", 1, olsr_cnf->mpr_coverage); ! size += snprintf(&buf[size], bufsize-size, admin_basic_setting_int, "Willingness:", "willingness", 1, olsr_cnf->willingness); ! size += snprintf(&buf[size], bufsize-size, "\n"); ! size += snprintf(&buf[size], bufsize-size, "\n"); if(olsr_cnf->use_hysteresis) { ! size += snprintf(&buf[size], bufsize-size, admin_basic_setting_float, "Hyst scaling:", "hyst_scaling", 4, olsr_cnf->hysteresis_param.scaling); ! size += snprintf(&buf[size], bufsize-size, admin_basic_setting_float, "Lower thr:", "hyst_lower", 4, olsr_cnf->hysteresis_param.thr_low); ! size += snprintf(&buf[size], bufsize-size, admin_basic_setting_float, "Upper thr:", "hyst_upper", 4, olsr_cnf->hysteresis_param.thr_high); } else { ! size += snprintf(&buf[size], bufsize-size, "\n"); } ! size += snprintf(&buf[size], bufsize-size, "\n"); ! size += snprintf(&buf[size], bufsize-size, "\n"); if(olsr_cnf->lq_level) { ! size += snprintf(&buf[size], bufsize-size, admin_basic_setting_int, "LQ level:", "lq_level", 1, olsr_cnf->lq_level); ! size += snprintf(&buf[size], bufsize-size, admin_basic_setting_int, "LQ winsize:", "lq_wsize", 2, olsr_cnf->lq_wsize); } else { ! size += snprintf(&buf[size], bufsize-size, "\n"); } ! size += snprintf(&buf[size], bufsize-size, "\n"); ! size += snprintf(&buf[size], bufsize-size, "\n"); ! size += snprintf(&buf[size], bufsize-size, "\n"); i++; *************** *** 135,139 **** while(admin_frame[i] && strcmp(admin_frame[i], "\n")) { ! size += sprintf(&buf[size], admin_frame[i]); i++; } --- 141,145 ---- while(admin_frame[i] && strcmp(admin_frame[i], "\n")) { ! size += snprintf(&buf[size], bufsize-size, admin_frame[i]); i++; } *************** *** 150,154 **** for(hna4 = olsr_cnf->hna4_entries; hna4; hna4 = hna4->next) { ! size += sprintf(&buf[size], admin_frame[i], olsr_ip_to_string((union olsr_ip_addr *)&hna4->net), olsr_ip_to_string((union olsr_ip_addr *)&hna4->netmask), --- 156,160 ---- for(hna4 = olsr_cnf->hna4_entries; hna4; hna4 = hna4->next) { ! size += snprintf(&buf[size], bufsize-size, admin_frame[i], olsr_ip_to_string((union olsr_ip_addr *)&hna4->net), olsr_ip_to_string((union olsr_ip_addr *)&hna4->netmask), *************** *** 163,167 **** for(hna6 = olsr_cnf->hna6_entries; hna6; hna6 = hna6->next) { ! size += sprintf(&buf[size], admin_frame[i], olsr_ip_to_string((union olsr_ip_addr *)&hna6->net), "TBD"/*hna6->prefix_len*/); --- 169,173 ---- for(hna6 = olsr_cnf->hna6_entries; hna6; hna6 = hna6->next) { ! size += snprintf(&buf[size], bufsize-size, admin_frame[i], olsr_ip_to_string((union olsr_ip_addr *)&hna6->net), "TBD"/*hna6->prefix_len*/); *************** *** 173,177 **** while(admin_frame[i]) { ! size += sprintf(&buf[size], admin_frame[i]); i++; } --- 179,183 ---- while(admin_frame[i]) { ! size += snprintf(&buf[size], bufsize-size, admin_frame[i]); i++; } *************** *** 335,339 **** } add_local_hna4_entry((union olsr_ip_addr *)&curr_hna_net, ! (union hna_netmask *)&in.s_addr); return 1; --- 341,345 ---- } add_local_hna4_entry((union olsr_ip_addr *)&curr_hna_net, ! (union olsr_ip_addr *)&in.s_addr); return 1; *************** *** 367,371 **** remove_local_hna4_entry((union olsr_ip_addr *)&net.s_addr, ! (union hna_netmask *)&mask.s_addr); return 1; --- 373,377 ---- remove_local_hna4_entry((union olsr_ip_addr *)&net.s_addr, ! (union olsr_ip_addr *)&mask.s_addr); return 1; *************** *** 379,386 **** int ! process_set_values(char *data, olsr_u32_t data_size, char *buf, olsr_u32_t bufsize) { int size = 0; ! int i, val_start, key_start; printf("Dynamic Data: %s\n", data); --- 385,393 ---- int ! process_set_values(char *data, olsr_u32_t data_size, char *buf, olsr_u32_t bufsize __attribute__((unused))) { int size = 0; ! int val_start, key_start; ! olsr_u32_t i; printf("Dynamic Data: %s\n", data); *************** *** 404,408 **** if(!process_param(&data[key_start], &data[val_start])) { ! size += sprintf(&buf[size], "

FAILED PROCESSING!


Key: %s Value: %s
\n", &data[key_start], &data[val_start]); return -1; --- 411,415 ---- if(!process_param(&data[key_start], &data[val_start])) { ! size += snprintf(&buf[size], bufsize-size, "

FAILED PROCESSING!


Key: %s Value: %s
\n", &data[key_start], &data[val_start]); return -1; *************** *** 417,421 **** if(!process_param(&data[key_start], &data[val_start])) { ! size += sprintf(&buf[size], "FAILED PROCESSING!
Key: %s Value: %s
\n", &data[key_start], &data[val_start]); return -1; --- 424,428 ---- if(!process_param(&data[key_start], &data[val_start])) { ! size += snprintf(&buf[size], bufsize-size, "FAILED PROCESSING!
Key: %s Value: %s
\n", &data[key_start], &data[val_start]); return -1; *************** *** 425,430 **** &data[key_start], &data[val_start]); ! size += sprintf(&buf[size], "

UPDATE SUCESSFULL!


Press BACK and RELOAD in your browser to return to the plugin
\n\n\n"); ! size += sprintf(&buf[size], "\n\n\n"); return size; --- 432,437 ---- &data[key_start], &data[val_start]); ! size += snprintf(&buf[size], bufsize-size, "

UPDATE SUCESSFULL!


Press BACK and RELOAD in your browser to return to the plugin
\n\n\n"); ! size += snprintf(&buf[size], bufsize-size, "\n\n\n"); return size; Index: olsrd_plugin.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/lib/httpinfo/src/olsrd_plugin.c,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** olsrd_plugin.c 2 Apr 2007 22:22:26 -0000 1.14 --- olsrd_plugin.c 20 Apr 2007 14:06:18 -0000 1.15 *************** *** 71,75 **** */ int ! olsrd_plugin_interface_version() { return PLUGIN_INTERFACE_VERSION; --- 71,75 ---- */ int ! olsrd_plugin_interface_version(void) { return PLUGIN_INTERFACE_VERSION; *************** *** 82,86 **** */ static void ! my_init() { /* Print plugin info to stdout */ --- 82,86 ---- */ static void ! my_init(void) { /* Print plugin info to stdout */ *************** *** 94,98 **** */ static void ! my_fini() { --- 94,98 ---- */ static void ! my_fini(void) { From (spam-protected) Fri Apr 20 16:18:58 2007 From: (spam-protected) (Bernd Petrovitsch) Date: Fri, 20 Apr 2007 14:18:58 +0000 Subject: [Olsr-cvs] olsrd-current/lib/mini/src olsrd_plugin.h,1.2,1.3 Message-ID: Update of /cvsroot/olsrd/olsrd-current/lib/mini/src In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv12353/lib/mini/src Added Files: olsrd_plugin.h Log Message: * and a header file like all the other plugins --- NEW FILE: olsrd_plugin.h --- (This appears to be a binary file; contents omitted.) From (spam-protected) Fri Apr 20 16:19:46 2007 From: (spam-protected) (Bernd Petrovitsch) Date: Fri, 20 Apr 2007 14:19:46 +0000 Subject: [Olsr-cvs] olsrd-current/lib/dyn_gw/src olsrd_plugin.c,1.13,1.14 Message-ID: Update of /cvsroot/olsrd/olsrd-current/lib/dyn_gw/src In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv12834/lib/dyn_gw/src Modified Files: olsrd_plugin.c Log Message: * #include the own header file Index: olsrd_plugin.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/lib/dyn_gw/src/olsrd_plugin.c,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** olsrd_plugin.c 20 Apr 2007 14:06:18 -0000 1.13 --- olsrd_plugin.c 20 Apr 2007 14:19:44 -0000 1.14 *************** *** 42,45 **** --- 42,46 ---- #include "olsrd_plugin.h" + #include "olsrd_dyn_gw.h" #include From (spam-protected) Fri Apr 20 16:20:14 2007 From: (spam-protected) (Bernd Petrovitsch) Date: Fri, 20 Apr 2007 14:20:14 +0000 Subject: [Olsr-cvs] olsrd-current/lib/dot_draw/src olsrd_dot_draw.h,1.7,1.8 Message-ID: Update of /cvsroot/olsrd/olsrd-current/lib/dot_draw/src In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv12981/lib/dot_draw/src Modified Files: olsrd_dot_draw.h Log Message: * declare all non-static functions Index: olsrd_dot_draw.h =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/lib/dot_draw/src/olsrd_dot_draw.h,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** olsrd_dot_draw.h 29 May 2005 12:47:40 -0000 1.7 --- olsrd_dot_draw.h 20 Apr 2007 14:20:11 -0000 1.8 *************** *** 52,59 **** --- 52,64 ---- extern int ipc_port; + int + olsrd_plugin_interface_version(void); int olsrd_plugin_init(void); + int + olsrd_plugin_register_param(char *key, char *value); + void olsr_plugin_exit(void); From (spam-protected) Fri Apr 20 16:23:12 2007 From: (spam-protected) (Bernd Petrovitsch) Date: Fri, 20 Apr 2007 14:23:12 +0000 Subject: [Olsr-cvs] olsrd-current/src olsr.c,1.51,1.52 Message-ID: Update of /cvsroot/olsrd/olsrd-current/src In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv14508/src Modified Files: olsr.c Log Message: * fixup fucntion definition Index: olsr.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/olsr.c,v retrieving revision 1.51 retrieving revision 1.52 diff -C2 -d -r1.51 -r1.52 *** olsr.c 20 Apr 2007 13:46:04 -0000 1.51 --- olsr.c 20 Apr 2007 14:23:10 -0000 1.52 *************** *** 100,104 **** */ olsr_u16_t ! get_msg_seqno(void) { return message_seqno++; --- 100,104 ---- */ olsr_u16_t ! get_msg_seqno() { return message_seqno++; From (spam-protected) Fri Apr 20 16:23:43 2007 From: (spam-protected) (Bernd Petrovitsch) Date: Fri, 20 Apr 2007 14:23:43 +0000 Subject: [Olsr-cvs] olsrd-current/src/olsr_switch main.c,1.23,1.24 Message-ID: Update of /cvsroot/olsrd/olsrd-current/src/olsr_switch In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv14562/src/olsr_switch Modified Files: main.c Log Message: * killed all "inline"s Index: main.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/olsr_switch/main.c,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** main.c 5 Nov 2006 23:03:56 -0000 1.23 --- main.c 20 Apr 2007 14:23:41 -0000 1.24 *************** *** 85,89 **** ohs_init_new_connection(int); ! inline static int ohs_route_data(struct ohs_connection *); --- 85,89 ---- ohs_init_new_connection(int); ! static int ohs_route_data(struct ohs_connection *); *************** *** 264,268 **** } ! inline static int ohs_route_data(struct ohs_connection *oc) { --- 264,268 ---- } ! static int ohs_route_data(struct ohs_connection *oc) { From (spam-protected) Fri Apr 20 16:23:43 2007 From: (spam-protected) (Bernd Petrovitsch) Date: Fri, 20 Apr 2007 14:23:43 +0000 Subject: [Olsr-cvs] olsrd-current/src mid_set.c, 1.18, 1.19 lq_avl.c, 1.8, 1.9 hysteresis.c, 1.18, 1.19 Message-ID: Update of /cvsroot/olsrd/olsrd-current/src In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv14562/src Modified Files: mid_set.c lq_avl.c hysteresis.c Log Message: * killed all "inline"s Index: mid_set.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/mid_set.c,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** mid_set.c 20 Apr 2007 13:46:04 -0000 1.18 --- mid_set.c 20 Apr 2007 14:23:41 -0000 1.19 *************** *** 328,332 **** *@return a linked list of addresses structs */ ! inline struct mid_address * mid_lookup_aliases(union olsr_ip_addr *adr) { --- 328,332 ---- *@return a linked list of addresses structs */ ! struct mid_address * mid_lookup_aliases(union olsr_ip_addr *adr) { Index: hysteresis.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/hysteresis.c,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** hysteresis.c 10 Feb 2007 19:27:32 -0000 1.18 --- hysteresis.c 20 Apr 2007 14:23:41 -0000 1.19 *************** *** 52,56 **** #define hlow olsr_cnf->hysteresis_param.thr_low ! inline float olsr_hyst_calc_stability(float old_quality) { --- 52,56 ---- #define hlow olsr_cnf->hysteresis_param.thr_low ! float olsr_hyst_calc_stability(float old_quality) { *************** *** 60,64 **** ! inline float olsr_hyst_calc_instability(float old_quality) { --- 60,64 ---- ! float olsr_hyst_calc_instability(float old_quality) { Index: lq_avl.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/lq_avl.c,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** lq_avl.c 29 Mar 2007 00:05:50 -0000 1.8 --- lq_avl.c 20 Apr 2007 14:23:41 -0000 1.9 *************** *** 428,432 **** } ! static inline struct avl_node *local_min(struct avl_node *node) { while (node->left != NULL) --- 428,432 ---- } ! static struct avl_node *local_min(struct avl_node *node) { while (node->left != NULL) From (spam-protected) Fri Apr 20 16:58:38 2007 From: (spam-protected) (Bernd Petrovitsch) Date: Fri, 20 Apr 2007 14:58:38 +0000 Subject: [Olsr-cvs] olsrd-current/lib/bmf/src Bmf.c,1.3,1.4 Message-ID: Update of /cvsroot/olsrd/olsrd-current/lib/bmf/src In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv28697/lib/bmf/src Modified Files: Bmf.c Log Message: * fixed warnings on 64bit hardware Index: Bmf.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/lib/bmf/src/Bmf.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Bmf.c 20 Apr 2007 14:06:17 -0000 1.3 --- Bmf.c 20 Apr 2007 14:58:35 -0000 1.4 *************** *** 196,203 **** OLSR_PRINTF( 9, ! "%s: %s pkt of %d bytes captured on %s interface \"%s\": %s->%s\n", PLUGIN_NAME_SHORT, sllPkttype == PACKET_OUTGOING ? "outgoing" : "incoming", ! ethPktLen, isFromOlsrIntf ? "OLSR" : "non-OLSR", intf->ifName, --- 196,203 ---- OLSR_PRINTF( 9, ! "%s: %s pkt of %ld bytes captured on %s interface \"%s\": %s->%s\n", PLUGIN_NAME_SHORT, sllPkttype == PACKET_OUTGOING ? "outgoing" : "incoming", ! (long)ethPktLen, isFromOlsrIntf ? "OLSR" : "non-OLSR", intf->ifName, *************** *** 543,549 **** OLSR_PRINTF( 9, ! "%s: encapsulated pkt of %d bytes incoming on \"%s\": %s->", PLUGIN_NAME_SHORT, ! ethPktLen, intf->ifName, inet_ntoa(ipData->ip_src)); --- 543,549 ---- OLSR_PRINTF( 9, ! "%s: encapsulated pkt of %ld bytes incoming on \"%s\": %s->", PLUGIN_NAME_SHORT, ! (long)ethPktLen, intf->ifName, inet_ntoa(ipData->ip_src)); *************** *** 806,812 **** OLSR_PRINTF( 9, ! "%s: outgoing pkt of %d bytes captured on tuntap interface \"%s\": %s->%s\n", PLUGIN_NAME_SHORT, ! ethPktLen, EtherTunTapIfName, olsr_ip_to_string(&srcIp), --- 806,812 ---- OLSR_PRINTF( 9, ! "%s: outgoing pkt of %ld bytes captured on tuntap interface \"%s\": %s->%s\n", PLUGIN_NAME_SHORT, ! (long)ethPktLen, EtherTunTapIfName, olsr_ip_to_string(&srcIp), From (spam-protected) Fri Apr 20 15:46:07 2007 From: (spam-protected) (Bernd Petrovitsch) Date: Fri, 20 Apr 2007 13:46:07 +0000 Subject: [Olsr-cvs] olsrd-current/src build_msg.c, 1.33, 1.34 defs.h, 1.56, 1.57 duplicate_set.c, 1.13, 1.14 generate_msg.c, 1.24, 1.25 hashing.c, 1.10, 1.11 hna_set.c, 1.17, 1.18 hysteresis.h, 1.8, 1.9 interfaces.c, 1.29, 1.30 interfaces.h, 1.38, 1.39 ipc_frontend.c, 1.28, 1.29 ipc_frontend.h, 1.12, 1.13 link_set.c, 1.66, 1.67 local_hna_set.c, 1.12, 1.13 log.h, 1.5, 1.6 main.c, 1.93, 1.94 mid_set.c, 1.17, 1.18 mpr.c, 1.15, 1.16 mpr_selector_set.c, 1.15, 1.16 neighbor_table.c, 1.30, 1.31 net_olsr.c, 1.20, 1.21 net_olsr.h, 1.7, 1.8 olsr.c, 1.50, 1.51 olsr.h, 1.25, 1.26 olsr_types.h, 1.5, 1.6 olsrd_plugin.h, 1.1, 1.2 parser.c, 1.32, 1.33 plugin_loader.c, 1.23, 1.24 process_package.c, 1.38, 1.39 process_routes.c, 1.30, 1.31 routing_table.c, 1.25, 1.26 scheduler.c, 1.37, 1.38 scheduler.h, 1.12, 1.13 socket_parser.c, 1.23, 1.24 tc_set.c, 1.24, 1.25 two_hop_neighbor_table.c, 1.16, 1.17 Message-ID: Update of /cvsroot/olsrd/olsrd-current/src In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv30814/src Modified Files: build_msg.c defs.h duplicate_set.c generate_msg.c hashing.c hna_set.c hysteresis.h interfaces.c interfaces.h ipc_frontend.c ipc_frontend.h link_set.c local_hna_set.c log.h main.c mid_set.c mpr.c mpr_selector_set.c neighbor_table.c net_olsr.c net_olsr.h olsr.c olsr.h olsr_types.h olsrd_plugin.h parser.c plugin_loader.c process_package.c process_routes.c routing_table.c scheduler.c scheduler.h socket_parser.c tc_set.c two_hop_neighbor_table.c Log Message: cleanup, 1. step (to get some local changes away): * killed lots of warnings * added __attribure__((unused)) and __attribure__((format(printf, ..., ...))) * added "const" * moved declarations of static functions into .c files * added "static" declarations * removed all "inline" declarations. Usually the compiler knows better anyways. * removed emtpy "return" statements at the end of functions * localized declarations * avoided unnecessary data copies * removed lots of empty lines There is much more to do. Index: ipc_frontend.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/ipc_frontend.c,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** ipc_frontend.c 7 Jan 2006 08:16:20 -0000 1.28 --- ipc_frontend.c 20 Apr 2007 13:46:04 -0000 1.29 *************** *** 66,69 **** --- 66,79 ---- #endif + static int ipc_sock = -1; + static int ipc_conn = -1; + + static int + ipc_send_all_routes(int fd); + + static int + ipc_send_net_info(int fd); + + /** *Create the socket to use for IPC to the *************** *** 73,77 **** */ int ! ipc_init() { //int flags; --- 83,87 ---- */ int ! ipc_init(void) { //int flags; *************** *** 139,143 **** addrlen = sizeof (struct sockaddr_in); ! if ((ipc_connection = accept(ipc_sock, (struct sockaddr *) &pin, &addrlen)) == -1) { perror("IPC accept"); --- 149,153 ---- addrlen = sizeof (struct sockaddr_in); ! if ((ipc_conn = accept(fd, (struct sockaddr *) &pin, &addrlen)) == -1) { perror("IPC accept"); *************** *** 151,156 **** { ipc_active = OLSR_TRUE; ! ipc_send_net_info(); ! ipc_send_all_routes(); OLSR_PRINTF(1, "Connection from %s\n",addr) } --- 161,166 ---- { ipc_active = OLSR_TRUE; ! ipc_send_net_info(ipc_conn); ! ipc_send_all_routes(ipc_conn); OLSR_PRINTF(1, "Connection from %s\n",addr) } *************** *** 159,163 **** OLSR_PRINTF(1, "Front end-connection from foregin host(%s) not allowed!\n", addr) olsr_syslog(OLSR_LOG_ERR, "OLSR: Front end-connection from foregin host(%s) not allowed!\n", addr); ! close(ipc_connection); } } --- 169,173 ---- OLSR_PRINTF(1, "Front end-connection from foregin host(%s) not allowed!\n", addr) olsr_syslog(OLSR_LOG_ERR, "OLSR: Front end-connection from foregin host(%s) not allowed!\n", addr); ! CLOSE(ipc_conn); } } *************** *** 201,205 **** */ int ! ipc_input(int sock) { /* --- 211,215 ---- */ int ! ipc_input(int sock __attribute__((unused))) { /* *************** *** 229,233 **** */ void ! frontend_msgparser(union olsr_message *msg, struct interface *in_if, union olsr_ip_addr *from_addr) { int size; --- 239,243 ---- */ void ! frontend_msgparser(union olsr_message *msg, struct interface *in_if __attribute__((unused)), union olsr_ip_addr *from_addr __attribute__((unused))) { int size; *************** *** 241,248 **** size = ntohs(msg->v6.olsr_msgsize); ! if (send(ipc_connection, (void *)msg, size, MSG_NOSIGNAL) < 0) { OLSR_PRINTF(1, "(OUTPUT)IPC connection lost!\n") ! close(ipc_connection); //olsr_cnf->open_ipc = 0; ipc_active = OLSR_FALSE; --- 251,258 ---- size = ntohs(msg->v6.olsr_msgsize); ! if (send(ipc_conn, (void *)msg, size, MSG_NOSIGNAL) < 0) { OLSR_PRINTF(1, "(OUTPUT)IPC connection lost!\n") ! CLOSE(ipc_conn); //olsr_cnf->open_ipc = 0; ipc_active = OLSR_FALSE; *************** *** 309,316 **** */ ! if (send(ipc_connection, tmp, IPC_PACK_SIZE, MSG_NOSIGNAL) < 0) // MSG_NOSIGNAL to avoid sigpipe { OLSR_PRINTF(1, "(RT_ENTRY)IPC connection lost!\n") ! close(ipc_connection); //olsr_cnf->open_ipc = 0; ipc_active = OLSR_FALSE; --- 319,326 ---- */ ! if (send(ipc_conn, tmp, IPC_PACK_SIZE, MSG_NOSIGNAL) < 0) // MSG_NOSIGNAL to avoid sigpipe { OLSR_PRINTF(1, "(RT_ENTRY)IPC connection lost!\n") ! CLOSE(ipc_conn); //olsr_cnf->open_ipc = 0; ipc_active = OLSR_FALSE; *************** *** 323,328 **** ! int ! ipc_send_all_routes() { struct rt_entry *destination; --- 333,338 ---- ! static int ! ipc_send_all_routes(int fd) { struct rt_entry *destination; *************** *** 371,378 **** tmp = (char *) &packet; ! if (send(ipc_connection, tmp, IPC_PACK_SIZE, MSG_NOSIGNAL) < 0) // MSG_NOSIGNAL to avoid sigpipe { OLSR_PRINTF(1, "(RT_ENTRY)IPC connection lost!\n") ! close(ipc_connection); //olsr_cnf->open_ipc = 0; ipc_active = OLSR_FALSE; --- 381,388 ---- tmp = (char *) &packet; ! if (send(fd, tmp, IPC_PACK_SIZE, MSG_NOSIGNAL) < 0) // MSG_NOSIGNAL to avoid sigpipe { OLSR_PRINTF(1, "(RT_ENTRY)IPC connection lost!\n") ! CLOSE(ipc_conn); //olsr_cnf->open_ipc = 0; ipc_active = OLSR_FALSE; *************** *** 416,423 **** tmp = (char *) &packet; ! if (send(ipc_connection, tmp, IPC_PACK_SIZE, MSG_NOSIGNAL) < 0) // MSG_NOSIGNAL to avoid sigpipe { OLSR_PRINTF(1, "(RT_ENTRY)IPC connection lost!\n") ! close(ipc_connection); //olsr_cnf->open_ipc = 0; ipc_active = OLSR_FALSE; --- 426,433 ---- tmp = (char *) &packet; ! if (send(ipc_conn, tmp, IPC_PACK_SIZE, MSG_NOSIGNAL) < 0) // MSG_NOSIGNAL to avoid sigpipe { OLSR_PRINTF(1, "(RT_ENTRY)IPC connection lost!\n") ! CLOSE(ipc_conn); //olsr_cnf->open_ipc = 0; ipc_active = OLSR_FALSE; *************** *** 441,446 **** *@return negative on error */ ! int ! ipc_send_net_info() { struct ipc_net_msg *net_msg; --- 451,456 ---- *@return negative on error */ ! static int ! ipc_send_net_info(int fd) { struct ipc_net_msg *net_msg; *************** *** 519,526 **** ! if (send(ipc_connection, (char *)net_msg, sizeof(struct ipc_net_msg), MSG_NOSIGNAL) < 0) { OLSR_PRINTF(1, "(NETINFO)IPC connection lost!\n") ! close(ipc_connection); //olsr_cnf->open_ipc = 0; return -1; --- 529,536 ---- ! if (send(fd, (char *)net_msg, sizeof(struct ipc_net_msg), MSG_NOSIGNAL) < 0) { OLSR_PRINTF(1, "(NETINFO)IPC connection lost!\n") ! CLOSE(ipc_conn); //olsr_cnf->open_ipc = 0; return -1; *************** *** 534,542 **** int ! shutdown_ipc() { OLSR_PRINTF(1, "Shutting down IPC...\n") ! close(ipc_sock); ! close(ipc_connection); return 1; --- 544,552 ---- int ! shutdown_ipc(void) { OLSR_PRINTF(1, "Shutting down IPC...\n") ! CLOSE(ipc_sock); ! CLOSE(ipc_conn); return 1; Index: ipc_frontend.h =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/ipc_frontend.h,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** ipc_frontend.h 21 Nov 2004 11:28:56 -0000 1.12 --- ipc_frontend.h 20 Apr 2007 13:46:04 -0000 1.13 *************** *** 99,104 **** - int ipc_connection; - int ipc_sock; olsr_bool ipc_active; --- 99,102 ---- *************** *** 109,115 **** ipc_accept(int); - int - ipc_send_all_routes(void); - void frontend_msgparser(union olsr_message *, struct interface *, union olsr_ip_addr *); --- 107,110 ---- Index: hna_set.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/hna_set.c,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** hna_set.c 29 May 2005 12:47:45 -0000 1.17 --- hna_set.c 20 Apr 2007 13:46:04 -0000 1.18 *************** *** 53,57 **** */ int ! olsr_init_hna_set() { --- 53,57 ---- */ int ! olsr_init_hna_set(void) { *************** *** 266,270 **** */ void ! olsr_time_out_hna_set(void *foo) { int index; --- 266,270 ---- */ void ! olsr_time_out_hna_set(void *foo __attribute__((unused))) { int index; *************** *** 320,324 **** */ void ! olsr_print_hna_set() { int index; --- 320,324 ---- */ void ! olsr_print_hna_set(void) { int index; Index: generate_msg.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/generate_msg.c,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** generate_msg.c 7 Jan 2006 08:16:20 -0000 1.24 --- generate_msg.c 20 Apr 2007 13:46:04 -0000 1.25 *************** *** 122,126 **** void ! generate_stdout_pulse(void *foo) { if(olsr_cnf->debug_level == 0) --- 122,126 ---- void ! generate_stdout_pulse(void *foo __attribute__((unused))) { if(olsr_cnf->debug_level == 0) Index: two_hop_neighbor_table.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/two_hop_neighbor_table.c,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** two_hop_neighbor_table.c 29 May 2005 12:47:46 -0000 1.16 --- two_hop_neighbor_table.c 20 Apr 2007 13:46:04 -0000 1.17 *************** *** 55,59 **** */ int ! olsr_init_two_hop_table() { int index; --- 55,59 ---- */ int ! olsr_init_two_hop_table(void) { int index; *************** *** 243,247 **** */ void ! olsr_print_two_hop_neighbor_table() { int i; --- 243,247 ---- */ void ! olsr_print_two_hop_neighbor_table(void) { int i; Index: interfaces.h =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/interfaces.h,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -d -r1.38 -r1.39 *** interfaces.h 10 Feb 2007 19:59:51 -0000 1.38 --- interfaces.h 20 Apr 2007 13:46:04 -0000 1.39 *************** *** 112,116 **** struct olsr_netbuf { ! olsr_u8_t *buff;/* Pointer to the allocated buffer */ int bufsize; /* Size of the buffer */ int maxsize; /* Max bytes of payload that can be added to the buffer */ --- 112,116 ---- struct olsr_netbuf { ! olsr_u8_t *buff; /* Pointer to the allocated buffer */ int bufsize; /* Size of the buffer */ int maxsize; /* Max bytes of payload that can be added to the buffer */ Index: link_set.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/link_set.c,v retrieving revision 1.66 retrieving revision 1.67 diff -C2 -d -r1.66 -r1.67 *** link_set.c 10 Feb 2007 19:27:32 -0000 1.66 --- link_set.c 20 Apr 2007 13:46:04 -0000 1.67 *************** *** 80,84 **** clock_t ! get_hold_time_neighbor() { return hold_time_neighbor; --- 80,84 ---- clock_t ! get_hold_time_neighbor(void) { return hold_time_neighbor; *************** *** 86,90 **** struct link_entry * ! get_link_set() { return link_set; --- 86,90 ---- struct link_entry * ! get_link_set(void) { return link_set; *************** *** 92,96 **** void ! olsr_init_link_set() { --- 92,96 ---- void ! olsr_init_link_set(void) { *************** *** 820,824 **** */ static void ! olsr_time_out_link_set() { --- 820,824 ---- */ static void ! olsr_time_out_link_set(void) { *************** *** 897,901 **** */ static void ! olsr_time_out_hysteresis() { struct link_entry *tmp_link_set; --- 897,901 ---- */ static void ! olsr_time_out_hysteresis(void) { struct link_entry *tmp_link_set; *************** *** 1139,1143 **** } ! static void olsr_time_out_packet_loss() { struct link_entry *walker; --- 1139,1143 ---- } ! static void olsr_time_out_packet_loss(void) { struct link_entry *walker; *************** *** 1168,1172 **** } ! void olsr_update_dijkstra_link_qualities() { struct link_entry *walker; --- 1168,1172 ---- } ! void olsr_update_dijkstra_link_qualities(void) { struct link_entry *walker; Index: hashing.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/hashing.c,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** hashing.c 31 Jan 2007 12:36:50 -0000 1.10 --- hashing.c 20 Apr 2007 13:46:04 -0000 1.11 *************** *** 40,44 **** */ - #include "olsr_protocol.h" #include "hashing.h" --- 40,43 ---- Index: process_routes.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/process_routes.c,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** process_routes.c 31 Jan 2007 12:36:50 -0000 1.30 --- process_routes.c 20 Apr 2007 13:46:04 -0000 1.31 *************** *** 149,153 **** void ! olsr_init_export_route() { olsr_addroute_add_function(&olsr_ioctl_add_route, AF_INET); --- 149,153 ---- void ! olsr_init_export_route(void) { olsr_addroute_add_function(&olsr_ioctl_add_route, AF_INET); *************** *** 212,216 **** int ! olsr_init_old_table() { int index; --- 212,216 ---- int ! olsr_init_old_table(void) { int index; *************** *** 239,250 **** olsr_find_up_route(struct rt_entry *dst, struct rt_entry *table) { ! struct rt_entry *destination; ! olsr_u32_t hash; ! ! hash = olsr_hashing(&dst->rt_dst); ! for(destination = table[hash].next; ! destination != &table[hash]; ! destination = destination->next) { //printf("Checking %s hc: %d ", olsr_ip_to_string(&dst->rt_dst), dst->rt_metric); --- 239,246 ---- olsr_find_up_route(struct rt_entry *dst, struct rt_entry *table) { ! struct rt_entry *destination; ! const olsr_u32_t hash = olsr_hashing(&dst->rt_dst); ! for(destination = table[hash].next; destination != &table[hash]; destination = destination->next) { //printf("Checking %s hc: %d ", olsr_ip_to_string(&dst->rt_dst), dst->rt_metric); *************** *** 264,270 **** } } - return 0; - } --- 260,264 ---- *************** *** 319,340 **** */ int ! olsr_delete_all_kernel_routes() { ! struct destination_n *delete_kernel_list = NULL; ! struct destination_n *tmp = NULL; ! union olsr_ip_addr *tmp_addr; OLSR_PRINTF(1, "Deleting all routes...\n") - delete_kernel_list = olsr_build_update_list(hna_routes, old_hna); - - tmp = delete_kernel_list; - OLSR_PRINTF(1, "HNA list:\n") ! while(tmp) { ! tmp_addr = &tmp->destination->rt_dst; OLSR_PRINTF(1, "Dest: %s\n", olsr_ip_to_string(tmp_addr)) - tmp = tmp->next; } --- 313,328 ---- */ int ! olsr_delete_all_kernel_routes(void) { ! struct destination_n *delete_kernel_list; ! struct destination_n *tmp; OLSR_PRINTF(1, "Deleting all routes...\n") delete_kernel_list = olsr_build_update_list(hna_routes, old_hna); OLSR_PRINTF(1, "HNA list:\n") ! for(tmp = delete_kernel_list;tmp;tmp = tmp->next) { ! union olsr_ip_addr *tmp_addr = &tmp->destination->rt_dst; OLSR_PRINTF(1, "Dest: %s\n", olsr_ip_to_string(tmp_addr)) } *************** *** 343,358 **** delete_kernel_list = olsr_build_update_list(routingtable,old_routes); - tmp = delete_kernel_list; - OLSR_PRINTF(1, "Route list:\n") ! while(tmp) { ! tmp_addr = &tmp->destination->rt_dst; ! OLSR_PRINTF(1, "Dest: %s\n", olsr_ip_to_string(tmp_addr)) ! tmp = tmp->next; } - olsr_delete_routes_from_kernel(delete_kernel_list); - return 1; } --- 331,341 ---- delete_kernel_list = olsr_build_update_list(routingtable,old_routes); OLSR_PRINTF(1, "Route list:\n") ! for(tmp = delete_kernel_list;tmp;tmp = tmp->next) { ! union olsr_ip_addr *tmp_addr = &tmp->destination->rt_dst; ! OLSR_PRINTF(1, "Dest: %s\n", olsr_ip_to_string(tmp_addr)) } olsr_delete_routes_from_kernel(delete_kernel_list); return 1; } *************** *** 366,373 **** */ void ! olsr_update_kernel_routes() { ! struct destination_n *delete_kernel_list = NULL; ! struct destination_n *add_kernel_list = NULL; OLSR_PRINTF(3, "Updating kernel routes...\n") --- 349,356 ---- */ void ! olsr_update_kernel_routes(void) { ! struct destination_n *delete_kernel_list; ! struct destination_n *add_kernel_list; OLSR_PRINTF(3, "Updating kernel routes...\n") *************** *** 388,400 **** */ void ! olsr_update_kernel_hna_routes() { ! struct destination_n *delete_kernel_list = NULL; ! //struct destination_n *delete_kernel_list2; ! struct destination_n *add_kernel_list = NULL; OLSR_PRINTF(3, "Updating kernel HNA routes...\n") - delete_kernel_list = olsr_build_update_list(old_hna, hna_routes); add_kernel_list = olsr_build_update_list(hna_routes, old_hna); --- 371,381 ---- */ void ! olsr_update_kernel_hna_routes(void) { ! struct destination_n *delete_kernel_list; ! struct destination_n *add_kernel_list; OLSR_PRINTF(3, "Updating kernel HNA routes...\n") delete_kernel_list = olsr_build_update_list(old_hna, hna_routes); add_kernel_list = olsr_build_update_list(hna_routes, old_hna); Index: neighbor_table.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/neighbor_table.c,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** neighbor_table.c 7 Jan 2006 08:16:20 -0000 1.30 --- neighbor_table.c 20 Apr 2007 13:46:04 -0000 1.31 *************** *** 57,66 **** void ! olsr_init_neighbor_table() { int i; olsr_register_timeout_function(&olsr_time_out_neighborhood_tables); - for(i = 0; i < HASHSIZE; i++) { --- 57,65 ---- void ! olsr_init_neighbor_table(void) { int i; olsr_register_timeout_function(&olsr_time_out_neighborhood_tables); for(i = 0; i < HASHSIZE; i++) { *************** *** 438,466 **** } - - - - void ! olsr_time_out_neighborhood_tables() { ! olsr_u8_t index; for(index=0;indexnext; } } } - - - - /** *Prints the registered neighbors and two hop neighbors --- 437,455 ---- } void ! olsr_time_out_neighborhood_tables(void) { ! olsr_u8_t index; for(index=0;indexnext) { olsr_time_out_two_hop_neighbors(entry); } } } /** *Prints the registered neighbors and two hop neighbors *************** *** 470,474 **** */ void ! olsr_print_neighbor_table() { int i; --- 459,463 ---- */ void ! olsr_print_neighbor_table(void) { int i; *************** *** 482,518 **** if (olsr_cnf->ip_version == AF_INET) ! { ! OLSR_PRINTF(1, "IP address LQ NLQ SYM MPR MPRS will\n") ! fstr = "%-15s %5.3f %5.3f %s %s %s %d\n"; ! } ! else ! { ! OLSR_PRINTF(1, "IP address LQ NLQ SYM MPR MPRS will\n") ! fstr = "%-39s %5.3f %5.3f %s %s %s %d\n"; ! } for (i = 0; i < HASHSIZE; i++) { struct neighbor_entry *neigh; ! for(neigh = neighbortable[i].next; neigh != &neighbortable[i]; ! neigh = neigh->next) { ! struct link_entry *link = ! get_best_link_to_neighbor(&neigh->neighbor_main_addr); ! double best_lq, inv_best_lq; ! ! if(!link) ! continue; ! ! best_lq = link->neigh_link_quality; ! inv_best_lq = link->loss_link_quality; ! OLSR_PRINTF(1, fstr, olsr_ip_to_string(&neigh->neighbor_main_addr), ! inv_best_lq, best_lq, ! (neigh->status == SYM) ? "YES " : "NO ", ! neigh->is_mpr ? "YES " : "NO ", ! olsr_lookup_mprs_set(&neigh->neighbor_main_addr) == NULL ? "NO " : "YES ", ! neigh->willingness) } } --- 471,502 ---- if (olsr_cnf->ip_version == AF_INET) ! { ! OLSR_PRINTF(1, "IP address LQ NLQ SYM MPR MPRS will\n") ! fstr = "%-15s %5.3f %5.3f %s %s %s %d\n"; ! } else ! { ! OLSR_PRINTF(1, "IP address LQ NLQ SYM MPR MPRS will\n") ! fstr = "%-39s %5.3f %5.3f %s %s %s %d\n"; ! } for (i = 0; i < HASHSIZE; i++) { struct neighbor_entry *neigh; ! for(neigh = neighbortable[i].next; neigh != &neighbortable[i]; neigh = neigh->next) { ! struct link_entry *link = get_best_link_to_neighbor(&neigh->neighbor_main_addr); ! if(link) ! { ! double best_lq = link->neigh_link_quality; ! double inv_best_lq = link->loss_link_quality; ! OLSR_PRINTF(1, fstr, olsr_ip_to_string(&neigh->neighbor_main_addr), ! inv_best_lq, best_lq, ! (neigh->status == SYM) ? "YES " : "NO ", ! neigh->is_mpr ? "YES " : "NO ", ! olsr_lookup_mprs_set(&neigh->neighbor_main_addr) == NULL ? "NO " : "YES ", ! neigh->willingness) ! } } } Index: interfaces.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/interfaces.c,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** interfaces.c 17 Apr 2006 18:31:09 -0000 1.29 --- interfaces.c 20 Apr 2007 13:46:04 -0000 1.30 *************** *** 73,77 **** */ int ! ifinit() { struct olsr_if *tmp_if; --- 73,77 ---- */ int ! ifinit(void) { struct olsr_if *tmp_if; *************** *** 124,128 **** olsr_u32_t ! get_if_property_id() { return if_property_id++; --- 124,128 ---- olsr_u32_t ! get_if_property_id(void) { return if_property_id++; Index: olsrd_plugin.h =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/olsrd_plugin.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** olsrd_plugin.h 29 May 2005 12:47:45 -0000 1.1 --- olsrd_plugin.h 20 Apr 2007 13:46:04 -0000 1.2 *************** *** 49,52 **** --- 49,59 ---- ****************************************************************************/ + #if 1 + /* We hide them from the compiler here to allow the plugins itself to declare them + * as they also implement them if we activate -Wredundant-decls. + * Normally we leave it seen so that we enforce a check by the compiler if they are + * identical. + */ + /** * Plugin interface version *************** *** 71,75 **** int olsrd_plugin_init(void); ! #endif --- 78,82 ---- int olsrd_plugin_init(void); ! #endif #endif Index: olsr_types.h =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/olsr_types.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** olsr_types.h 31 Jan 2007 12:36:50 -0000 1.5 --- olsr_types.h 20 Apr 2007 13:46:04 -0000 1.6 *************** *** 93,96 **** --- 93,99 ---- union olsr_ip_addr { + /* + struct in_addr v4; + */ olsr_u32_t v4; olsr_u8_t v4x[4]; Index: socket_parser.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/socket_parser.c,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** socket_parser.c 29 May 2005 12:47:45 -0000 1.23 --- socket_parser.c 20 Apr 2007 13:46:04 -0000 1.24 *************** *** 158,166 **** void ! poll_sockets() { int n; struct olsr_socket_entry *olsr_sockets; - static struct tms tms_buf; /* If there are no registered sockets we --- 158,165 ---- void ! poll_sockets(void) { int n; struct olsr_socket_entry *olsr_sockets; /* If there are no registered sockets we *************** *** 173,181 **** /* Adding file-descriptors to FD set */ ! olsr_sockets = olsr_socket_entries; ! while(olsr_sockets) { ! FD_SET(olsr_sockets->fd, &ibits); ! olsr_sockets = olsr_sockets->next; } --- 172,179 ---- /* Adding file-descriptors to FD set */ ! ! for(olsr_sockets = olsr_socket_entries; olsr_sockets; olsr_sockets = olsr_sockets->next) { ! FD_SET(olsr_sockets->fd, &ibits); } *************** *** 198,213 **** /* Update time since this is much used by the parsing functions */ gettimeofday(&now, NULL); ! now_times = times(&tms_buf); ! olsr_sockets = olsr_socket_entries; ! while(olsr_sockets) { if(FD_ISSET(olsr_sockets->fd, &ibits)) - { olsr_sockets->process_function(olsr_sockets->fd); ! } ! olsr_sockets = olsr_sockets->next; ! } ! } --- 196,206 ---- /* Update time since this is much used by the parsing functions */ gettimeofday(&now, NULL); ! now_times = times(NULL); ! for(olsr_sockets = olsr_socket_entries;olsr_sockets;olsr_sockets = olsr_sockets->next) { if(FD_ISSET(olsr_sockets->fd, &ibits)) olsr_sockets->process_function(olsr_sockets->fd); ! } } Index: duplicate_set.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/duplicate_set.c,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** duplicate_set.c 31 Jan 2007 12:36:50 -0000 1.13 --- duplicate_set.c 20 Apr 2007 13:46:04 -0000 1.14 *************** *** 58,62 **** */ void ! olsr_init_duplicate_table() { int i; --- 58,62 ---- */ void ! olsr_init_duplicate_table(void) { int i; *************** *** 226,230 **** void ! olsr_time_out_duplicate_table(void *foo) { int i; --- 226,230 ---- void ! olsr_time_out_duplicate_table(void *foo __attribute__((unused))) { int i; *************** *** 345,356 **** } - - - - - - void ! olsr_print_duplicate_table() { int i; --- 345,350 ---- } void ! olsr_print_duplicate_table(void) { int i; *************** *** 371,375 **** } } ! printf("\n"); } --- 365,369 ---- } } ! printf("\n"); } Index: local_hna_set.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/local_hna_set.c,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** local_hna_set.c 10 Feb 2007 19:27:32 -0000 1.12 --- local_hna_set.c 20 Apr 2007 13:46:04 -0000 1.13 *************** *** 107,113 **** remove_local_hna6_entry(union olsr_ip_addr *net, olsr_u16_t prefix_len) { ! struct hna6_entry *h6 = olsr_cnf->hna6_entries, *h6prev = NULL; ! while(h6) { if((memcmp(net, &h6->net, olsr_cnf->ipsize) == 0) && --- 107,113 ---- remove_local_hna6_entry(union olsr_ip_addr *net, olsr_u16_t prefix_len) { ! struct hna6_entry *h6, *h6prev = NULL; ! for(h6 = olsr_cnf->hna6_entries; h6; h6 = h6->next) { if((memcmp(net, &h6->net, olsr_cnf->ipsize) == 0) && *************** *** 124,130 **** } h6prev = h6; - h6 = h6->next; } - return 0; } --- 124,128 ---- *************** *** 172,188 **** int ! check_inet_gw() { - struct hna4_entry *h4 = olsr_cnf->hna4_entries; - if(olsr_cnf->ip_version == AF_INET) { ! while(h4) { if(h4->netmask.v4 == 0 && h4->net.v4 == 0) return 1; - h4 = h4->next; } - return 0; } return 0; --- 170,183 ---- int ! check_inet_gw(void) { if(olsr_cnf->ip_version == AF_INET) { ! struct hna4_entry *h4; ! for(h4 = olsr_cnf->hna4_entries; h4; h4 = h4->next) { if(h4->netmask.v4 == 0 && h4->net.v4 == 0) return 1; } } return 0; Index: plugin_loader.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/plugin_loader.c,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** plugin_loader.c 29 May 2005 12:47:45 -0000 1.23 --- plugin_loader.c 20 Apr 2007 13:46:04 -0000 1.24 *************** *** 61,74 **** */ int ! olsr_load_plugins() { ! struct plugin_entry *entry; ! int loaded; ! ! entry = olsr_cnf->plugins; ! loaded = 0; ! OLSR_PRINTF(1, "Loading plugins...\n\n") - while(entry) { --- 61,69 ---- */ int ! olsr_load_plugins(void) { ! struct plugin_entry *entry = olsr_cnf->plugins; ! int loaded = 0; OLSR_PRINTF(1, "Loading plugins...\n\n") while(entry) { *************** *** 76,80 **** OLSR_PRINTF(1, "-- PLUGIN LOADING FAILED! --\n\n") else ! loaded ++; entry = entry->next; --- 71,75 ---- OLSR_PRINTF(1, "-- PLUGIN LOADING FAILED! --\n\n") else ! loaded++; entry = entry->next; *************** *** 208,221 **** init_olsr_plugin(struct olsr_plugin *entry) { - struct plugin_param *params = entry->params; - int retval; - if(entry->register_param) { OLSR_PRINTF(1, "Sending parameters...\n") ! while(params) { OLSR_PRINTF(1, "\"%s\"/\"%s\"... ", params->key, params->value) ! if((retval = entry->register_param(params->key, params->value)) < 0) { fprintf(stderr, "\nFatal error in plugin parameter \"%s\"/\"%s\"\n", params->key, params->value); --- 203,215 ---- init_olsr_plugin(struct olsr_plugin *entry) { if(entry->register_param) { + struct plugin_param *params; OLSR_PRINTF(1, "Sending parameters...\n") ! for(params = entry->params;params;params = params->next) { + int retval = entry->register_param(params->key, params->value); OLSR_PRINTF(1, "\"%s\"/\"%s\"... ", params->key, params->value) ! if(retval < 0) { fprintf(stderr, "\nFatal error in plugin parameter \"%s\"/\"%s\"\n", params->key, params->value); *************** *** 223,228 **** } OLSR_PRINTF(1, "%s\n", retval == 0 ? "FAILED" : "OK") - - params = params->next; } } --- 217,220 ---- *************** *** 237,250 **** */ void ! olsr_close_plugins() { struct olsr_plugin *entry; OLSR_PRINTF(1, "Closing plugins...\n") ! for(entry = olsr_plugins; ! entry != NULL ; ! entry = entry->next) ! { dlclose(entry->dlhandle); - } } --- 229,238 ---- */ void ! olsr_close_plugins(void) { struct olsr_plugin *entry; OLSR_PRINTF(1, "Closing plugins...\n") ! for(entry = olsr_plugins; entry != NULL; entry = entry->next) dlclose(entry->dlhandle); } Index: net_olsr.h =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/net_olsr.h,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** net_olsr.h 10 Feb 2007 19:59:51 -0000 1.7 --- net_olsr.h 20 Apr 2007 13:46:04 -0000 1.8 *************** *** 94,105 **** sockaddr_to_string(struct sockaddr *); ! char * ! ip_to_string(olsr_u32_t *); ! char * ! ip6_to_string(struct in6_addr *); ! char * ! olsr_ip_to_string(union olsr_ip_addr *); int --- 94,105 ---- sockaddr_to_string(struct sockaddr *); ! const char * ! ip_to_string(const olsr_u32_t *); ! const char * ! ip6_to_string(const struct in6_addr *); ! const char * ! olsr_ip_to_string(const union olsr_ip_addr *); int Index: hysteresis.h =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/hysteresis.h,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** hysteresis.h 14 Dec 2006 11:29:19 -0000 1.8 --- hysteresis.h 20 Apr 2007 13:46:04 -0000 1.9 *************** *** 39,44 **** * $Id$ */ - - #ifndef _OLSR_HYSTERESIS #define _OLSR_HYSTERESIS --- 39,42 ---- *************** *** 46,55 **** #include "link_set.h" ! ! ! inline float olsr_hyst_calc_stability(float); ! inline int olsr_process_hysteresis(struct link_entry *); --- 44,51 ---- #include "link_set.h" ! float olsr_hyst_calc_stability(float); ! int olsr_process_hysteresis(struct link_entry *); Index: defs.h =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/defs.h,v retrieving revision 1.56 retrieving revision 1.57 diff -C2 -d -r1.56 -r1.57 *** defs.h 2 Apr 2007 09:40:48 -0000 1.56 --- defs.h 20 Apr 2007 13:46:04 -0000 1.57 *************** *** 75,81 **** /* Debug helper macro */ #ifdef DEBUG ! #define olsr_debug(lvl,format,args...) \ OLSR_PRINTF(lvl, "%s (%s:%d): ", __func__, __FILE__, __LINE__); \ ! OLSR_PRINTF(lvl, format, ##args); #endif --- 75,82 ---- /* Debug helper macro */ #ifdef DEBUG ! #define olsr_debug(lvl,format,args...) do { \ OLSR_PRINTF(lvl, "%s (%s:%d): ", __func__, __FILE__, __LINE__); \ ! OLSR_PRINTF(lvl, format, ##args); \ ! } while (0) #endif *************** *** 102,105 **** --- 103,108 ---- + #define ARRAYSIZE(x) (sizeof(x)/sizeof(*(x))) + /* * Queueing macros *************** *** 119,122 **** --- 122,127 ---- + #define CLOSE(fd) do { close(fd); (fd) = -1;} while (0) + /* * Global olsrd configuragtion *************** *** 149,155 **** int - ipc_send_net_info(void); - - int ipc_route_send_rtentry(union olsr_ip_addr*, union olsr_ip_addr *, int, int, char *); --- 154,157 ---- Index: process_package.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/process_package.c,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -d -r1.38 -r1.39 *** process_package.c 10 Feb 2007 19:27:32 -0000 1.38 --- process_package.c 20 Apr 2007 13:46:04 -0000 1.39 *************** *** 61,65 **** */ void ! olsr_init_package_process() { if (olsr_cnf->lq_level == 0) --- 61,65 ---- */ void ! olsr_init_package_process(void) { if (olsr_cnf->lq_level == 0) *************** *** 82,100 **** union olsr_ip_addr *from_addr) { - struct link_entry *link; struct neighbor_entry *neighbor; - struct hello_neighbor *walker; - double saved_lq; - double rel_lq; /* * Update link status */ ! link = update_link_entry(&in_if->ip_addr, from_addr, message, in_if); if (olsr_cnf->lq_level > 0) { // just in case our neighbor has changed its HELLO interval - olsr_update_packet_loss_hello_int(link, message->htime); --- 82,98 ---- union olsr_ip_addr *from_addr) { struct neighbor_entry *neighbor; /* * Update link status */ ! struct link_entry *link = update_link_entry(&in_if->ip_addr, from_addr, message, in_if); if (olsr_cnf->lq_level > 0) { + double saved_lq; + double rel_lq; + struct hello_neighbor *walker; // just in case our neighbor has changed its HELLO interval olsr_update_packet_loss_hello_int(link, message->htime); Index: mid_set.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/mid_set.c,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** mid_set.c 10 Feb 2007 19:27:32 -0000 1.17 --- mid_set.c 20 Apr 2007 13:46:04 -0000 1.18 *************** *** 61,65 **** int ! olsr_init_mid_set() { int index; --- 61,65 ---- int ! olsr_init_mid_set(void) { int index; *************** *** 462,466 **** */ void ! olsr_time_out_mid_set(void *foo) { int index; --- 462,466 ---- */ void ! olsr_time_out_mid_set(void *foo __attribute__((unused))) { int index; *************** *** 528,534 **** */ void ! olsr_print_mid_set() { - int index; --- 528,533 ---- */ void ! olsr_print_mid_set(void) { int index; *************** *** 539,553 **** struct mid_entry *tmp_list = mid_set[index].next; /*Traverse MID list*/ ! for(tmp_list = mid_set[index].next; ! tmp_list != &mid_set[index]; ! tmp_list = tmp_list->next) { ! struct mid_address *tmp_addr = tmp_list->aliases; ! OLSR_PRINTF(1, "%s: ", olsr_ip_to_string(&tmp_list->main_addr)) ! while(tmp_addr) { OLSR_PRINTF(1, " %s ", olsr_ip_to_string(&tmp_addr->alias)) - tmp_addr = tmp_addr->next_alias; } OLSR_PRINTF(1, "\n") --- 538,549 ---- struct mid_entry *tmp_list = mid_set[index].next; /*Traverse MID list*/ ! for(tmp_list = mid_set[index].next; tmp_list != &mid_set[index]; tmp_list = tmp_list->next) { ! struct mid_address *tmp_addr; ! OLSR_PRINTF(1, "%s: ", olsr_ip_to_string(&tmp_list->main_addr)) ! for(tmp_addr = tmp_list->aliases;tmp_addr;tmp_addr = tmp_addr->next_alias) { OLSR_PRINTF(1, " %s ", olsr_ip_to_string(&tmp_addr->alias)) } OLSR_PRINTF(1, "\n") Index: net_olsr.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/net_olsr.c,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** net_olsr.c 20 Apr 2007 10:38:01 -0000 1.20 --- net_olsr.c 20 Apr 2007 13:46:04 -0000 1.21 *************** *** 78,83 **** static struct ptf *ptf_list; - static char ipv6_buf[100]; /* for address coversion */ - static struct deny_address_entry *deny_entries; --- 78,81 ---- *************** *** 105,114 **** init_net(void) { - union olsr_ip_addr addr; - int i; - /* Block invalid addresses */ if(olsr_cnf->ip_version == AF_INET) { /* IPv4 */ for(i = 0; deny_ipv4_defaults[i] != NULL; i++) --- 103,111 ---- init_net(void) { /* Block invalid addresses */ if(olsr_cnf->ip_version == AF_INET) { + union olsr_ip_addr addr; + int i; /* IPv4 */ for(i = 0; deny_ipv4_defaults[i] != NULL; i++) *************** *** 125,128 **** --- 122,127 ---- else { + union olsr_ip_addr addr; + int i; /* IPv6 */ for(i = 0; deny_ipv6_defaults[i] != NULL; i++) *************** *** 418,426 **** *Call possible packet transform functions registered by plugins */ ! tmp_ptf_list = ptf_list; ! while(tmp_ptf_list != NULL) { tmp_ptf_list->function(ifp->netbuf.buff, &ifp->netbuf.pending); - tmp_ptf_list = tmp_ptf_list->next; } --- 417,423 ---- *Call possible packet transform functions registered by plugins */ ! for (tmp_ptf_list = ptf_list; tmp_ptf_list != NULL; tmp_ptf_list = tmp_ptf_list->next) { tmp_ptf_list->function(ifp->netbuf.buff, &ifp->netbuf.pending); } *************** *** 586,593 **** */ ! char * ! ip_to_string(olsr_u32_t *address) { - struct in_addr in; in.s_addr=*address; --- 583,589 ---- */ ! const char * ! ip_to_string(const olsr_u32_t *address) { struct in_addr in; in.s_addr=*address; *************** *** 596,602 **** } - - - /** *Converts the 32bit olsr_u32_t datatype to --- 592,595 ---- *************** *** 609,642 **** */ ! char * ! ip6_to_string(struct in6_addr *addr6) { ! return (char *)inet_ntop(AF_INET6, addr6, ipv6_buf, sizeof(ipv6_buf)); } ! char * ! olsr_ip_to_string(union olsr_ip_addr *addr) { static int index = 0; ! static char buff[4][100]; ! char *ret; ! struct in_addr in; if(olsr_cnf->ip_version == AF_INET) { ! in.s_addr=addr->v4; ! ret = inet_ntoa(in); } else { /* IPv6 */ ! ret = (char *)inet_ntop(AF_INET6, &addr->v6, ipv6_buf, sizeof(ipv6_buf)); } - - strncpy(buff[index], ret, 100); - - ret = buff[index]; - index = (index + 1) & 3; --- 602,635 ---- */ ! const char * ! ip6_to_string(const struct in6_addr *addr6) { ! static char ipv6_buf[INET6_ADDRSTRLEN]; /* for address coversion */ ! return inet_ntop(AF_INET6, addr6, ipv6_buf, sizeof(ipv6_buf)); } ! const char * ! olsr_ip_to_string(const union olsr_ip_addr *addr) { static int index = 0; ! static char buff[4][INET6_ADDRSTRLEN > INET_ADDRSTRLEN ? INET6_ADDRSTRLEN : INET_ADDRSTRLEN]; ! const char *ret; if(olsr_cnf->ip_version == AF_INET) { ! #if 0 ! struct in_addr in; ! in.s_addr = addr->v4; ! ret = inet_ntop(AF_INET, &in, buff[index], sizeof(buff[index])); ! #else ! ret = inet_ntop(AF_INET, &addr->v6, buff[index], sizeof(buff[index])); ! #endif } else { /* IPv6 */ ! ret = inet_ntop(AF_INET6, &addr->v6, buff[index], sizeof(buff[index])); } index = (index + 1) & 3; Index: build_msg.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/build_msg.c,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** build_msg.c 14 Dec 2006 11:29:19 -0000 1.33 --- build_msg.c 20 Apr 2007 13:46:04 -0000 1.34 *************** *** 40,44 **** */ - #include "defs.h" #include "olsr.h" --- 40,43 ---- *************** *** 114,118 **** */ clock_t ! get_empty_tc_timer() { return send_empty_tc; --- 113,117 ---- */ clock_t ! get_empty_tc_timer(void) { return send_empty_tc; Index: routing_table.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/routing_table.c,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** routing_table.c 10 Feb 2007 19:27:32 -0000 1.25 --- routing_table.c 20 Apr 2007 13:46:04 -0000 1.26 *************** *** 49,52 **** --- 49,53 ---- #include "olsr.h" #include "link_set.h" + #include "routing_table.h" *************** *** 83,90 **** */ int ! olsr_init_routing_table() { int index; - /* *The hna routes hash will almost always --- 84,90 ---- */ int ! olsr_init_routing_table(void) { int index; /* *The hna routes hash will almost always *************** *** 117,123 **** struct rt_entry *rt_table; ! olsr_u32_t hash; ! ! hash = olsr_hashing(dst); for(rt_table = routingtable[hash].next; --- 117,121 ---- struct rt_entry *rt_table; ! olsr_u32_t hash = olsr_hashing(dst); for(rt_table = routingtable[hash].next; *************** *** 127,134 **** if (COMP_IP(&rt_table->rt_dst, dst)) { ! return(rt_table); } } ! return(NULL); } --- 125,132 ---- if (COMP_IP(&rt_table->rt_dst, dst)) { ! return rt_table; } } ! return NULL; } *************** *** 250,256 **** */ static int ! olsr_fill_routing_table_with_neighbors() { ! olsr_u8_t index; #ifdef DEBUG --- 248,254 ---- */ static int ! olsr_fill_routing_table_with_neighbors(void) { ! int index; #ifdef DEBUG *************** *** 261,270 **** { struct neighbor_entry *neighbor; - for(neighbor = neighbortable[index].next; neighbor != &neighbortable[index]; neighbor=neighbor->next) { - if(neighbor->status == SYM) { --- 259,266 ---- *************** *** 278,284 **** COPY_IP(&addrs.alias, &neighbor->neighbor_main_addr); addrs.next_alias = mid_lookup_aliases(&neighbor->neighbor_main_addr); - addrs2 = &addrs; ! while(addrs2!=NULL) { struct link_entry *link = get_best_link_to_neighbor(&addrs2->alias); --- 274,279 ---- COPY_IP(&addrs.alias, &neighbor->neighbor_main_addr); addrs.next_alias = mid_lookup_aliases(&neighbor->neighbor_main_addr); ! for(addrs2 = &addrs;addrs2!=NULL;addrs2 = addrs2->next_alias) { struct link_entry *link = get_best_link_to_neighbor(&addrs2->alias); *************** *** 299,310 **** } } - - addrs2 = addrs2->next_alias; } } } } - - return 1; } --- 294,301 ---- *************** *** 343,350 **** static struct destination_n * ! olsr_fill_routing_table_with_two_hop_neighbors() { struct destination_n *list_destination_n=NULL; ! olsr_u8_t index; //printf("FILL ROUTING TABLE WITH TWO HOP NEIGHBORS\n"); --- 334,341 ---- static struct destination_n * ! olsr_fill_routing_table_with_two_hop_neighbors(void) { struct destination_n *list_destination_n=NULL; ! int index; //printf("FILL ROUTING TABLE WITH TWO HOP NEIGHBORS\n"); *************** *** 393,399 **** COPY_IP(&addrs.alias, n2_addr); addrs.next_alias = mid_lookup_aliases(n2_addr); - addrsp = &addrs; ! while(addrsp!=NULL) { struct link_entry *link = get_best_link_to_neighbor(&neighbor->neighbor_main_addr); --- 384,389 ---- COPY_IP(&addrs.alias, n2_addr); addrs.next_alias = mid_lookup_aliases(n2_addr); ! for(addrsp = &addrs; addrsp; addrsp = addrsp->next_alias) { struct link_entry *link = get_best_link_to_neighbor(&neighbor->neighbor_main_addr); *************** *** 403,407 **** if(link) { ! struct interface *iface = link->if_name ? if_ifwithname(link->if_name) : if_ifwithaddr(&link->local_iface_addr); if(iface) --- 393,397 ---- if(link) { ! struct interface *iface = link->if_name ? if_ifwithname(link->if_name) : if_ifwithaddr(&link->local_iface_addr); if(iface) *************** *** 416,442 **** if(new_route_entry != NULL) { ! struct destination_n *list_destination_tmp; ! list_destination_tmp = olsr_malloc(sizeof(struct destination_n), ! "Fill rt table 2 hop tmp"); ! ! list_destination_tmp->destination = new_route_entry; ! list_destination_tmp->next = list_destination_n; ! list_destination_n = list_destination_tmp; } } } - addrsp = addrsp->next_alias; } } ! } ! } - return list_destination_n; } - - - /** *Recalculate the routing table --- 406,424 ---- if(new_route_entry != NULL) { ! struct destination_n *tmp = olsr_malloc(sizeof(struct destination_n), ! "Fill rt table 2 hop tmp"); ! tmp->destination = new_route_entry; ! tmp->next = list_destination_n; ! list_destination_n = tmp; } } } } } ! } } return list_destination_n; } /** *Recalculate the routing table *************** *** 445,451 **** */ void ! olsr_calculate_routing_table() { ! struct destination_n *list_destination_n_1 = NULL; olsr_move_route_table(routingtable, old_routes); --- 427,433 ---- */ void ! olsr_calculate_routing_table(void) { ! struct destination_n *list_destination_n_1; olsr_move_route_table(routingtable, old_routes); *************** *** 454,460 **** olsr_fill_routing_table_with_neighbors(); /* Add two hop enighbors - now they are the "outer rim" */ list_destination_n_1 = olsr_fill_routing_table_with_two_hop_neighbors(); ! ! while(list_destination_n_1!=NULL) { /* List_destination_n_1 holds the "outer rim" */ --- 436,442 ---- olsr_fill_routing_table_with_neighbors(); /* Add two hop enighbors - now they are the "outer rim" */ + list_destination_n_1 = olsr_fill_routing_table_with_two_hop_neighbors(); ! while(list_destination_n_1) { /* List_destination_n_1 holds the "outer rim" */ *************** *** 644,650 **** */ void ! olsr_calculate_hna_routes() { ! olsr_u32_t index; #ifdef DEBUG --- 626,632 ---- */ void ! olsr_calculate_hna_routes(void) { ! int index; #ifdef DEBUG *************** *** 654,658 **** olsr_move_route_table(hna_routes, old_hna); - for(index=0;indexA_gateway_addr)) == NULL) - { continue; - } /* If there exists a better or equal entry - skip */ if(olsr_check_for_higher_quality(hna_routes, tmp_net, tmp_rt->rt_etx) != NULL) - { continue; - } /* If we find an entry with lower quality we just edit it */ --- 656,664 ---- *************** *** 745,749 **** olsr_free_routing_table(old_hna); - } --- 722,725 ---- *************** *** 760,769 **** olsr_print_routing_table(struct rt_entry *table) { ! ! olsr_u8_t index; printf("ROUTING TABLE\n"); printf("DESTINATION\tNEXT HOP\tHOPCNT\tINTERFACE\n"); ! for(index=0;index] [ -i interface1 interface2 ... ]\n"); ! fprintf(stderr, " [-d ] [-ipv6] [-multi ]\n"); ! fprintf(stderr, " [-lql ] [-lqw ]\n"); ! fprintf(stderr, " [-bcast ] [-ipc] [-dispin] [-dispout] [-delgw]\n"); ! fprintf(stderr, " [-hint ] [-tcint ]\n"); ! fprintf(stderr, " [-midint ] [-hnaint ]\n"); ! fprintf(stderr, " [-T ] [-nofork] [-hemu ] \n"); ! fprintf(stderr, " [-lql ] [-lqw ]\n"); } --- 505,521 ---- */ static void ! print_usage(void) { ! fprintf(stderr, ! "An error occured somwhere between your keyboard and your chair!\n" ! "usage: olsrd [-f ] [ -i interface1 interface2 ... ]\n" ! " [-d ] [-ipv6] [-multi ]\n" ! " [-lql ] [-lqw ]\n" ! " [-bcast ] [-ipc] [-dispin] [-dispout] [-delgw]\n" ! " [-hint ] [-tcint ]\n" ! " [-midint ] [-hnaint ]\n" ! " [-T ] [-nofork] [-hemu ]\n" ! " [-lql ] [-lqw ]\n"); } Index: olsr.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/olsr.c,v retrieving revision 1.50 retrieving revision 1.51 diff -C2 -d -r1.50 -r1.51 *** olsr.c 4 Feb 2007 22:47:45 -0000 1.50 --- olsr.c 20 Apr 2007 13:46:04 -0000 1.51 *************** *** 89,93 **** */ void ! init_msg_seqno() { message_seqno = random() & 0xFFFF; --- 89,93 ---- */ void ! init_msg_seqno(void) { message_seqno = random() & 0xFFFF; *************** *** 99,104 **** *@return the seqno */ ! inline olsr_u16_t ! get_msg_seqno() { return message_seqno++; --- 99,104 ---- *@return the seqno */ ! olsr_u16_t ! get_msg_seqno(void) { return message_seqno++; *************** *** 130,136 **** */ void ! olsr_process_changes() { - struct pcf *tmp_pc_list; --- 130,135 ---- */ void ! olsr_process_changes(void) { struct pcf *tmp_pc_list; *************** *** 256,262 **** */ void ! olsr_init_tables() ! { ! changes_topology = OLSR_FALSE; changes_neighborhood = OLSR_FALSE; --- 255,260 ---- */ void ! olsr_init_tables(void) ! { changes_topology = OLSR_FALSE; changes_neighborhood = OLSR_FALSE; *************** *** 291,303 **** /* Initialize HNA set */ ! olsr_init_hna_set(); ! } - - - - - /** *Check if a message is to be forwarded and forward --- 289,295 ---- /* Initialize HNA set */ ! olsr_init_hna_set(); } /** *Check if a message is to be forwarded and forward *************** *** 332,340 **** /* Lookup sender address */ ! if(!(src = mid_lookup_main_addr(from_addr))) src = from_addr; ! ! if(NULL == (neighbor=olsr_lookup_neighbor_table(src))) return 0; --- 324,333 ---- /* Lookup sender address */ ! src = mid_lookup_main_addr(from_addr); ! if(!src) src = from_addr; ! neighbor=olsr_lookup_neighbor_table(src); ! if(!neighbor) return 0; *************** *** 355,359 **** } - /* Treat TTL hopcnt */ if(olsr_cnf->ip_version == AF_INET) --- 348,351 ---- *************** *** 370,381 **** } - - /* Update dup forwarded */ olsr_set_dup_forward(originator, seqno); /* Update packet data */ - - msgsize = ntohs(m->v4.olsr_msgsize); --- 362,369 ---- *************** *** 400,407 **** olsr_syslog(OLSR_LOG_ERR, "Received message to big to be forwarded on %s(%d bytes)!", ifn->int_name, msgsize); } - } } - else { --- 388,393 ---- *************** *** 416,422 **** } } - return 1; - } --- 402,406 ---- *************** *** 432,442 **** ifn->fwdtimer = GET_TIMESTAMP(jitter*1000); - } - - void ! olsr_init_willingness() { if(olsr_cnf->willingness_auto) --- 416,423 ---- ifn->fwdtimer = GET_TIMESTAMP(jitter*1000); } void ! olsr_init_willingness(void) { if(olsr_cnf->willingness_auto) *************** *** 446,454 **** void ! olsr_update_willingness(void *foo) { ! int tmp_will; ! ! tmp_will = olsr_cnf->willingness; /* Re-calculate willingness */ --- 427,433 ---- void ! olsr_update_willingness(void *foo __attribute__((unused))) { ! int tmp_will = olsr_cnf->willingness; /* Re-calculate willingness */ *************** *** 471,475 **** olsr_u8_t ! olsr_calculate_willingness() { struct olsr_apm_info ainfo; --- 450,454 ---- olsr_u8_t ! olsr_calculate_willingness(void) { struct olsr_apm_info ainfo; *************** *** 625,640 **** olsr_printf(int loglevel, char *format, ...) { - va_list arglist; - if((loglevel <= olsr_cnf->debug_level) && debug_handle) { va_start(arglist, format); - vfprintf(debug_handle, format, arglist); - va_end(arglist); } - - return 0; } --- 604,614 ---- olsr_printf(int loglevel, char *format, ...) { if((loglevel <= olsr_cnf->debug_level) && debug_handle) { + va_list arglist; va_start(arglist, format); vfprintf(debug_handle, format, arglist); va_end(arglist); } return 0; } Index: mpr.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/mpr.c,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** mpr.c 7 Jan 2006 08:16:20 -0000 1.15 --- mpr.c 20 Apr 2007 13:46:04 -0000 1.16 *************** *** 277,292 **** */ static void ! olsr_clear_mprs() { olsr_u32_t index; - struct neighbor_entry *a_neighbor; - struct neighbor_2_list_entry *two_hop_list; for (index=0;indexnext) { /* Clear MPR selection */ if(a_neighbor->is_mpr) --- 277,292 ---- */ static void ! olsr_clear_mprs(void) { olsr_u32_t index; for (index=0;indexnext) { + struct neighbor_2_list_entry *two_hop_list; /* Clear MPR selection */ if(a_neighbor->is_mpr) *************** *** 305,309 **** } } - } --- 305,308 ---- *************** *** 315,322 **** */ static int ! olsr_check_mpr_changes() { olsr_u32_t index; - struct neighbor_entry *a_neighbor; int retval; --- 314,320 ---- */ static int ! olsr_check_mpr_changes(void) { olsr_u32_t index; int retval; *************** *** 325,328 **** --- 323,327 ---- for (index=0;indexnext) { ! count = 0; ! n_count = 0; ! ! if(a_neighbor->status == NOT_SYM) { a_neighbor->neighbor_2_nocov = count; --- 379,389 ---- for(index=0;indexnext) { ! struct neighbor_2_list_entry *twohop_neighbors; ! olsr_u16_t count = 0; ! olsr_u16_t n_count = 0; ! if(a_neighbor->status == NOT_SYM) { a_neighbor->neighbor_2_nocov = count; *************** *** 406,411 **** { //printf("\tChecking %s....", olsr_ip_to_string(&twohop_neighbors->neighbor_2->neighbor_2_addr)); ! ! dup_neighbor = olsr_lookup_neighbor_table(&twohop_neighbors->neighbor_2->neighbor_2_addr); if((dup_neighbor == NULL) || (dup_neighbor->status != SYM)) --- 396,400 ---- { //printf("\tChecking %s....", olsr_ip_to_string(&twohop_neighbors->neighbor_2->neighbor_2_addr)); ! struct neighbor_entry *dup_neighbor = olsr_lookup_neighbor_table(&twohop_neighbors->neighbor_2->neighbor_2_addr); if((dup_neighbor == NULL) || (dup_neighbor->status != SYM)) *************** *** 437,448 **** */ static olsr_u16_t ! add_will_always_nodes() { ! olsr_u8_t index; - struct neighbor_entry *a_neighbor; - olsr_u16_t count; - - count = 0; //printf("\nAdding WILL ALWAYS nodes....\n"); --- 426,433 ---- */ static olsr_u16_t ! add_will_always_nodes(void) { ! olsr_u16_t count = 0; olsr_u8_t index; //printf("\nAdding WILL ALWAYS nodes....\n"); *************** *** 450,453 **** --- 435,439 ---- for(index=0;index WILL_NEVER; i--) { ! two_hop_list = olsr_find_2_hop_neighbors_with_1_link(i); while(two_hop_list != NULL) { //printf("CHOSEN FROM 1 LINK\n"); if(!two_hop_list->neighbor_2->neighbor_2_nblist.next->neighbor->is_mpr) --- 477,486 ---- for(i = WILL_ALWAYS - 1; i > WILL_NEVER; i--) { ! struct neighbor_entry *mprs; ! struct neighbor_2_list_entry *two_hop_list = olsr_find_2_hop_neighbors_with_1_link(i); while(two_hop_list != NULL) { + struct neighbor_2_list_entry *tmp; //printf("CHOSEN FROM 1 LINK\n"); if(!two_hop_list->neighbor_2->neighbor_2_nblist.next->neighbor->is_mpr) *************** *** 558,566 **** */ static void ! olsr_optimize_mpr_set() { ! int i, remove, index; ! struct neighbor_2_list_entry *two_hop_list; ! struct neighbor_entry *a_neighbor, *dup_neighbor; //printf("\n**MPR OPTIMIZING**\n\n"); --- 540,546 ---- */ static void ! olsr_optimize_mpr_set(void) { ! int i, remove; //printf("\n**MPR OPTIMIZING**\n\n"); *************** *** 568,575 **** for(i = WILL_NEVER + 1; i < WILL_ALWAYS; i++) { ! for(index=0;indexis_mpr) { + struct neighbor_2_list_entry *two_hop_list; //printf("\tChecking %s\n", olsr_ip_to_string(&a_neighbor->neighbor_main_addr)); remove = 1; *************** *** 590,594 **** { ! dup_neighbor = olsr_lookup_neighbor_table(&two_hop_list->neighbor_2->neighbor_2_addr); if((dup_neighbor != NULL) && (dup_neighbor->status != NOT_SYM)) --- 571,575 ---- { ! const struct neighbor_entry * const dup_neighbor = olsr_lookup_neighbor_table(&two_hop_list->neighbor_2->neighbor_2_addr); if((dup_neighbor != NULL) && (dup_neighbor->status != NOT_SYM)) *************** *** 606,619 **** a_neighbor->is_mpr = OLSR_FALSE; } - - } } - } - - } - } --- 587,594 ---- *************** *** 621,628 **** void ! olsr_print_mpr_set() { ! int index; ! struct neighbor_entry *a_neighbor; OLSR_PRINTF(1, "MPR SET: ") --- 596,602 ---- void ! olsr_print_mpr_set(void) { ! int index; OLSR_PRINTF(1, "MPR SET: ") *************** *** 630,638 **** for(index=0;indexnext) { - /* * Remove MPR settings --- 604,612 ---- for(index=0;indexnext) { /* * Remove MPR settings *************** *** 642,647 **** } } - OLSR_PRINTF(1, "\n") - } --- 616,619 ---- Index: tc_set.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/tc_set.c,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** tc_set.c 7 Jan 2006 08:16:20 -0000 1.24 --- tc_set.c 20 Apr 2007 13:46:04 -0000 1.25 *************** *** 56,60 **** int ! olsr_init_tc() { int index; --- 56,60 ---- int ! olsr_init_tc(void) { int index; *************** *** 365,373 **** } - - - - - /** * Time out entries --- 365,368 ---- *************** *** 377,397 **** void ! olsr_time_out_tc_set() { ! int index, deleted; ! struct tc_entry *entry, *entry2; ! struct topo_dst *dst_entry, *dst_to_delete; ! for(index=0;indexdestinations.next; while(dst_entry != &entry->destinations) { --- 372,390 ---- void ! olsr_time_out_tc_set(void) { ! int index; for(index=0;indexdestinations.next; while(dst_entry != &entry->destinations) { *************** *** 399,402 **** --- 392,396 ---- if(TIMED_OUT(dst_entry->T_time)) { + struct topo_dst *dst_to_delete; deleted = 1; /* Dequeue */ *************** *** 421,426 **** } } - - return; } --- 415,418 ---- *************** *** 430,438 **** */ int ! olsr_print_tc_table() { int i; - struct tc_entry *entry; - struct topo_dst *dst_entry; char *fstr; float etx; --- 422,428 ---- */ int ! olsr_print_tc_table(void) { int i; char *fstr; float etx; *************** *** 445,489 **** if (olsr_cnf->ip_version == AF_INET) ! { ! OLSR_PRINTF(1, "Source IP addr Dest IP addr LQ ILQ ETX\n") ! fstr = "%-15s %-15s %5.3f %5.3f %.2f\n"; ! } ! else ! { ! OLSR_PRINTF(1, "Source IP addr Dest IP addr LQ ILQ ETX\n") ! fstr = "%-30s%-30s %5.3f %5.3f %.2f\n"; ! } for (i = 0; i < HASHSIZE; i++) - { - entry = tc_table[i].next; - - while (entry != &tc_table[i]) { ! dst_entry = entry->destinations.next; ! ! while(dst_entry != &entry->destinations) ! { ! if (dst_entry->link_quality < MIN_LINK_QUALITY || ! dst_entry->inverse_link_quality < MIN_LINK_QUALITY) ! etx = 0.0; ! ! else ! etx = 1.0 / (dst_entry->link_quality * ! dst_entry->inverse_link_quality); ! ! OLSR_PRINTF(1, fstr, olsr_ip_to_string(&entry->T_last_addr), ! olsr_ip_to_string(&dst_entry->T_dest_addr), ! dst_entry->link_quality, dst_entry->inverse_link_quality, ! etx) ! ! dst_entry = dst_entry->next; ! } ! entry = entry->next; } - } - return 1; } --- 435,469 ---- if (olsr_cnf->ip_version == AF_INET) ! { ! OLSR_PRINTF(1, "Source IP addr Dest IP addr LQ ILQ ETX\n") ! fstr = "%-15s %-15s %5.3f %5.3f %.2f\n"; ! } else ! { ! OLSR_PRINTF(1, "Source IP addr Dest IP addr LQ ILQ ETX\n") ! fstr = "%-30s%-30s %5.3f %5.3f %.2f\n"; ! } for (i = 0; i < HASHSIZE; i++) { ! struct tc_entry *entry; ! for(entry = tc_table[i].next;entry != &tc_table[i];entry = entry->next) ! { ! struct topo_dst *dst_entry; ! for(dst_entry = entry->destinations.next;dst_entry != &entry->destinations;dst_entry = dst_entry->next) ! { ! if (dst_entry->link_quality < MIN_LINK_QUALITY || ! dst_entry->inverse_link_quality < MIN_LINK_QUALITY) ! etx = 0.0; ! else ! etx = 1.0 / (dst_entry->link_quality * dst_entry->inverse_link_quality); ! OLSR_PRINTF(1, fstr, olsr_ip_to_string(&entry->T_last_addr), ! olsr_ip_to_string(&dst_entry->T_dest_addr), ! dst_entry->link_quality, dst_entry->inverse_link_quality, ! etx) ! } ! } } return 1; } Index: mpr_selector_set.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/mpr_selector_set.c,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** mpr_selector_set.c 7 Jan 2006 08:16:20 -0000 1.15 --- mpr_selector_set.c 20 Apr 2007 13:46:04 -0000 1.16 *************** *** 56,60 **** int ! olsr_init_mprs_set() { OLSR_PRINTF(5, "MPRS: Init\n") --- 56,60 ---- int ! olsr_init_mprs_set(void) { OLSR_PRINTF(5, "MPRS: Init\n") *************** *** 66,70 **** mprs_list.next = &mprs_list; mprs_list.prev = &mprs_list; - return 1; --- 66,69 ---- *************** *** 73,77 **** olsr_u16_t ! get_local_ansn() { return ansn; --- 72,76 ---- olsr_u16_t ! get_local_ansn(void) { return ansn; *************** *** 79,83 **** void ! increase_local_ansn() { ansn++; --- 78,82 ---- void ! increase_local_ansn(void) { ansn++; *************** *** 89,93 **** */ olsr_bool ! olsr_is_mpr() { return ((mprs_list.next == &mprs_list) ? OLSR_FALSE : OLSR_TRUE); --- 88,92 ---- */ olsr_bool ! olsr_is_mpr(void) { return ((mprs_list.next == &mprs_list) ? OLSR_FALSE : OLSR_TRUE); *************** *** 196,203 **** } - - - - /** *Time out MPR selector entries --- 195,198 ---- *************** *** 206,218 **** */ void ! olsr_time_out_mprs_set() { ! struct mpr_selector *mprs; ! ! mprs = mprs_list.next; while(mprs != &mprs_list) { - if(TIMED_OUT(mprs->MS_time)) { --- 201,210 ---- */ void ! olsr_time_out_mprs_set(void) { ! struct mpr_selector *mprs = mprs_list.next; while(mprs != &mprs_list) { if(TIMED_OUT(mprs->MS_time)) { *************** *** 232,256 **** mprs = mprs->next; } - } - - /** *Print the current MPR selector set to STDOUT */ void ! olsr_print_mprs_set() { struct mpr_selector *mprs; - - - mprs = mprs_list.next; OLSR_PRINTF(1, "MPR SELECTORS: ") ! while(mprs != &mprs_list) { OLSR_PRINTF(1, "%s ", olsr_ip_to_string(&mprs->MS_main_addr)) - mprs = mprs->next; } OLSR_PRINTF(1, "\n") --- 224,241 ---- mprs = mprs->next; } } /** *Print the current MPR selector set to STDOUT */ void ! olsr_print_mprs_set(void) { struct mpr_selector *mprs; OLSR_PRINTF(1, "MPR SELECTORS: ") ! for(mprs = mprs_list.next; mprs != &mprs_list; mprs = mprs->next) { OLSR_PRINTF(1, "%s ", olsr_ip_to_string(&mprs->MS_main_addr)) } OLSR_PRINTF(1, "\n") Index: parser.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/parser.c,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** parser.c 31 Jan 2007 12:36:50 -0000 1.32 --- parser.c 20 Apr 2007 13:46:04 -0000 1.33 *************** *** 88,92 **** */ void ! olsr_init_parser() { OLSR_PRINTF(3, "Initializing parser...\n") --- 88,92 ---- */ void ! olsr_init_parser(void) { OLSR_PRINTF(3, "Initializing parser...\n") Index: scheduler.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/scheduler.c,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -d -r1.37 -r1.38 *** scheduler.c 31 Jan 2007 12:36:50 -0000 1.37 --- scheduler.c 20 Apr 2007 13:46:04 -0000 1.38 *************** *** 78,82 **** static void ! trigger_dijkstra(void *dummy) { OLSR_PRINTF(3, "Triggering Dijkstra\n"); --- 78,82 ---- static void ! trigger_dijkstra(void *foo __attribute__((unused))) { OLSR_PRINTF(3, "Triggering Dijkstra\n"); *************** *** 99,103 **** void ! scheduler() { struct timespec remainder_spec; --- 99,103 ---- void ! scheduler(void) { struct timespec remainder_spec; *************** *** 139,143 **** for(;;) { - /* Update now_times */ now_times = times(&tms_buf); --- 139,142 ---- *************** *** 315,319 **** /* * ! *@param initial how long utnil the first generation *@param trigger pointer to a boolean indicating that *this function should be triggered immediatley --- 314,318 ---- /* * ! *@param initial how long until the first generation *@param trigger pointer to a boolean indicating that *this function should be triggered immediatley *************** *** 323,327 **** void *par, float interval, ! float initial, olsr_u8_t *trigger) { --- 322,326 ---- void *par, float interval, ! float initial __attribute__((unused)), olsr_u8_t *trigger) { Index: log.h =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/log.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** log.h 21 Nov 2004 11:28:56 -0000 1.5 --- log.h 20 Apr 2007 13:46:04 -0000 1.6 *************** *** 56,60 **** void ! olsr_syslog(int level, char *format, ...); --- 56,60 ---- void ! olsr_syslog(int level, char *format, ...) __attribute__((format(printf,2,3))); Index: scheduler.h =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/scheduler.h,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** scheduler.h 7 Jan 2006 08:16:20 -0000 1.12 --- scheduler.h 20 Apr 2007 13:46:04 -0000 1.13 *************** *** 85,89 **** void ! scheduler(void); #endif --- 85,89 ---- void ! scheduler(void) __attribute__((noreturn)); #endif From (spam-protected) Sun Apr 22 19:25:19 2007 From: (spam-protected) (Bernd Petrovitsch) Date: Sun, 22 Apr 2007 17:25:19 +0000 Subject: [Olsr-cvs] olsrd-current Makefile,1.81,1.82 Message-ID: Update of /cvsroot/olsrd/olsrd-current In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv3303 Modified Files: Makefile Log Message: * fixed broken find Index: Makefile =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/Makefile,v retrieving revision 1.81 retrieving revision 1.82 diff -C2 -d -r1.81 -r1.82 *** Makefile 20 Apr 2007 14:04:30 -0000 1.81 --- Makefile 22 Apr 2007 17:25:17 -0000 1.82 *************** *** 82,86 **** uberclean: clean clean_libs -rm -f $(TAGFILE) ! find . \( -name '*.[od]' -o -name '*~'\) -print | xargs -r rm -f $(MAKECMD) -C $(CFGDIR) uberclean $(MAKECMD) -C $(SWITCHDIR) clean --- 82,86 ---- uberclean: clean clean_libs -rm -f $(TAGFILE) ! find . \( -name '*.[od]' -o -name '*~' \) -print | xargs -r rm -f $(MAKECMD) -C $(CFGDIR) uberclean $(MAKECMD) -C $(SWITCHDIR) clean From (spam-protected) Sun Apr 22 19:40:40 2007 From: (spam-protected) (Bernd Petrovitsch) Date: Sun, 22 Apr 2007 17:40:40 +0000 Subject: [Olsr-cvs] olsrd-current/lib/bmf Makefile, 1.2, 1.3 README_BMF.txt, 1.2, 1.3 Message-ID: Update of /cvsroot/olsrd/olsrd-current/lib/bmf In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv10087/lib/bmf Modified Files: Makefile README_BMF.txt Log Message: * bmf-plugin 1.4 Index: Makefile =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/lib/bmf/Makefile,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Makefile 10 Feb 2007 17:05:55 -0000 1.2 --- Makefile 22 Apr 2007 17:40:38 -0000 1.3 *************** *** 32,40 **** # POSSIBILITY OF SUCH DAMAGE. # - # $Id$ OLSRD_PLUGIN = true PLUGIN_NAME = olsrd_bmf ! PLUGIN_VER = 1.3 TOPDIR = ../.. --- 32,39 ---- # POSSIBILITY OF SUCH DAMAGE. # OLSRD_PLUGIN = true PLUGIN_NAME = olsrd_bmf ! PLUGIN_VER = 1.4 TOPDIR = ../.. Index: README_BMF.txt =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/lib/bmf/README_BMF.txt,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** README_BMF.txt 10 Feb 2007 17:05:55 -0000 1.2 --- README_BMF.txt 22 Apr 2007 17:40:38 -0000 1.3 *************** *** 1,5 **** BASIC MULTICAST FORWARDING PLUGIN FOR OLSRD by Erik Tromp (erik.tromp at nl.thalesgroup.com, erik_tromp at hotmail.com) ! Version 1.3 1. Introduction --- 1,5 ---- BASIC MULTICAST FORWARDING PLUGIN FOR OLSRD by Erik Tromp (erik.tromp at nl.thalesgroup.com, erik_tromp at hotmail.com) ! Version 1.4 1. Introduction *************** *** 18,22 **** --------------------------- ! Download the olsr-bmf-v1.3.tar.gz file and save it into your OLSRD base install directory. --- 18,22 ---- --------------------------- ! Download the olsr-bmf-v1.4.tar.gz file and save it into your OLSRD base install directory. *************** *** 25,29 **** At the command prompt, type: ! tar -zxvf ./olsr-bmf-v1.3.tar.gz then type: --- 25,29 ---- At the command prompt, type: ! tar -zxvf ./olsr-bmf-v1.4.tar.gz then type: *************** *** 48,52 **** to load the BMF plugin. For example, add the following lines: ! LoadPlugin "olsrd_bmf.so.1.3" { # No PlParam entries required for basic operation --- 48,52 ---- to load the BMF plugin. For example, add the following lines: ! LoadPlugin "olsrd_bmf.so.1.4" { # No PlParam entries required for basic operation *************** *** 65,70 **** ---------- Plugin loader ---------- ! Library: olsrd_bmf.so.1.3 ! OLSRD Basic Multicast Forwarding plugin 1.3 (Dec 18 2006 11:23:51) (C) Thales Communications Huizen, Netherlands Erik Tromp (erik.tromp at nl.thalesgroup.com) --- 65,70 ---- ---------- Plugin loader ---------- ! Library: olsrd_bmf.so.1.4 ! OLSRD Basic Multicast Forwarding plugin 1.4 (Mar 30 2007 14:30:57) (C) Thales Communications Huizen, Netherlands Erik Tromp (erik.tromp at nl.thalesgroup.com) *************** *** 85,89 **** ping 224.0.0.1 ! All OLSR-BMF hosts in the OLSR network should respond. For example, assume we have three hosts, with IP addresses 192.168.151.50, --- 85,89 ---- ping 224.0.0.1 ! All OLSR-BMF hosts in the OLSR network should respond. For example, assume we have three hosts, with IP addresses 192.168.151.50, *************** *** 92,96 **** root at IsdbServer:~# ping 224.0.0.1 ! PING 224.0.0.1 (224.0.0.1) from 192.168.151.50 eth1: 56(84) bytes of data. 64 bytes from 192.168.151.50: icmp_seq=1 ttl=64 time=0.511 ms 64 bytes from 192.168.151.53: icmp_seq=1 ttl=64 time=4.67 ms (DUP!) --- 92,96 ---- root at IsdbServer:~# ping 224.0.0.1 ! PING 224.0.0.1 (224.0.0.1) 56(84) bytes of data. 64 bytes from 192.168.151.50: icmp_seq=1 ttl=64 time=0.511 ms 64 bytes from 192.168.151.53: icmp_seq=1 ttl=64 time=4.67 ms (DUP!) *************** *** 111,114 **** --- 111,130 ---- other hosts (correctly seen as DUPlicates by ping). + Note: when using an older version of ping than the standard from + iputils-20020927, as found in most current Linux distributions, you may want + to test BMF by specifying the output interface to the ping command: + + ping -I bmf0 224.0.0.1 + + Older versions of 'ping' (e.g. as found in iputils-20020124) may bind to the + autoselected source address, which may be incorrect. Since BMF re-uses + one of the existing IP addresses for the "bmf0" network interface, the + older-version ping command may 'autobind' to the wrong interface. + + See also the note in the iputils-20020927/RELNOTES file: + "* Mads Martin J�rgensen : ping should not bind to autoselected + source address, it used to work when routing changes. Return classic + behaviour, option -B is added to enforce binding." + 5. How does it work *************** *** 174,178 **** configured: ! LoadPlugin "olsrd_bmf.so.1.3" { # Specify the name of the BMF network interface. --- 190,194 ---- configured: ! LoadPlugin "olsrd_bmf.so.1.4" { # Specify the name of the BMF network interface. *************** *** 206,209 **** --- 222,234 ---- PlParam "CapturePacketsOnOlsrInterfaces" "yes" + # The forwarding mechanism to use. Either "Broadcast" or + # "UnicastPromiscuous". Defaults to "Broadcast". + # In the "UnicastPromiscuous" mode, packets are forwarded (unicast) to the + # best candidate neighbor; other neighbors listen promiscuously. IP-local + # broadcast is not used. This saves air time on 802.11 WLAN networks, + # on which unicast packets are usually sent at a much higher bit rate + # than broadcast packets (which are sent at a basic bit rate). + PlParam "BmfMechanism" "UnicastPromiscuous" + # List of non-OLSR interfaces to include PlParam "NonOlsrIf" "eth2" *************** *** 310,314 **** of /etc/olsrd.conf. For example: ! LoadPlugin "olsrd_bmf.so.1.3" { # Non-OLSR interfaces to participate in the multicast flooding --- 335,339 ---- of /etc/olsrd.conf. For example: ! LoadPlugin "olsrd_bmf.so.1.4" { # Non-OLSR interfaces to participate in the multicast flooding *************** *** 368,372 **** For example: ! LoadPlugin "olsrd_bmf.so.1.3" { PlParam "BmfInterfaceIp" "10.10.10.4/24" --- 393,397 ---- For example: ! LoadPlugin "olsrd_bmf.so.1.4" { PlParam "BmfInterfaceIp" "10.10.10.4/24" *************** *** 437,442 **** situation that some hosts in the network cannot directly see other hosts (as 1-hop neighbors) but only indirectly (as 2- or more-hop neighbors). ! To simulate that situation, the iptables tool is often used. For BMF, ! however, that is nog enough. For OLSR testing, setup iptables on each host to drop packets from --- 462,467 ---- situation that some hosts in the network cannot directly see other hosts (as 1-hop neighbors) but only indirectly (as 2- or more-hop neighbors). ! To simulate that situation, the iptables tool is often used (see ! www.netfilter.org). For BMF, however, that is nog enough. For OLSR testing, setup iptables on each host to drop packets from *************** *** 454,458 **** interfaces if they are in promiscuous mode.) For example: ! LoadPlugin "olsrd_bmf.so.1.3" { # Drop all packets received from the following MAC sources --- 479,483 ---- interfaces if they are in promiscuous mode.) For example: ! LoadPlugin "olsrd_bmf.so.1.4" { # Drop all packets received from the following MAC sources *************** *** 462,465 **** --- 487,492 ---- } + See also the notes in the 'packet' manpage ("Packet sockets are not + subject to the input or output firewall chains"). *************** *** 489,492 **** --- 516,520 ---- file. + --------- Question: *************** *** 510,516 **** modprobe tun ! If "modprobe tun" says something like "module tun not found", then either it is not compiled at all or it is not compiled into the kernel. --------- --- 538,552 ---- modprobe tun ! If "modprobe tun" says something like "modprobe: Can't locate module tun", then either it is not compiled at all or it is not compiled into the kernel. + Note: if you do not want to receive multicast packets, only forward the packets + that other hosts send, then you do not need the tuntap interface. This could be the + case if your host is purely an OLSR router; normally no traffic will be directed + to the router itself. In that case you can ignore this error message. Beware, though, + that you will then not be able to do the simple 'ping 224.0.0.1' test (as described in + section 4. How to check if it works) to check for the presence of all OLSR-BMF routers + in the network. + --------- *************** *** 529,532 **** --- 565,590 ---- ------------------- + 31 Mar 2007: Version 1.4 + * Optimized the standard forwarding mechanism in such a way that + retransmissions of packets are only done on those network interfaces + that make a host a multi-point relay (MPR) for the sender. I.e.: + retransmitting a packet on a network interface is not done if that + does not lead to any new hosts being reached. + * Optimized the standard forwarding mechanism such that, if the network + topology indicates there is only one neighbor on an interface, packets are + sent to the specific IP address (unicast) of that neighbor. If the network + topology indicates there are multiple neighbors, then BMF will still send + packets to the IP local-broadcast address. + * Introduced a new forwarding mechanism, using only IP-unicast to + forward packets. Packets are forwarded to the best candidate neighbor; + other neighbors listen promiscuously. IP-local broadcast is not used. + This saves air time on 802.11 WLAN networks, on which unicast packets are + usually sent at a much higher bit rate than broadcast packets (which are + sent at a basic bit rate). + This mechanism can be activated by specifying the following plugin + parameter: + PlParam "BmfMechanism" "UnicastPromiscuous" + See also section 6 - Advanced configuration. + 18 Dec 2006: Version 1.3 * Added the possibility to configure the BMF network interface: *************** *** 573,577 **** * Debug level 9 gives a better indication of what happens to each handled multicast/broadcast packet. To run the olsr daemon with ! debug level 9, run "olsrd -d 9". * Can now deal with network interface removal ("ifdown eth1") and addition ("ifup eth1"). --- 631,636 ---- * Debug level 9 gives a better indication of what happens to each handled multicast/broadcast packet. To run the olsr daemon with ! debug level 9, run "olsrd -d 9"; if you're only interested in ! BMF debug messages, run "olsrd -d 9 | grep -i bmf". * Can now deal with network interface removal ("ifdown eth1") and addition ("ifup eth1"). From (spam-protected) Sun Apr 22 19:40:41 2007 From: (spam-protected) (Bernd Petrovitsch) Date: Sun, 22 Apr 2007 17:40:41 +0000 Subject: [Olsr-cvs] olsrd-current/lib/bmf/src Address.c, 1.3, 1.4 Address.h, 1.2, 1.3 Bmf.c, 1.4, 1.5 Bmf.h, 1.2, 1.3 DropList.c, 1.2, 1.3 DropList.h, 1.2, 1.3 NetworkInterfaces.c, 1.4, 1.5 NetworkInterfaces.h, 1.2, 1.3 Packet.c, 1.3, 1.4 Packet.h, 1.2, 1.3 PacketHistory.c, 1.3, 1.4 PacketHistory.h, 1.2, 1.3 olsrd_plugin.c, 1.3, 1.4 Message-ID: Update of /cvsroot/olsrd/olsrd-current/lib/bmf/src In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv10087/lib/bmf/src Modified Files: Address.c Address.h Bmf.c Bmf.h DropList.c DropList.h NetworkInterfaces.c NetworkInterfaces.h Packet.c Packet.h PacketHistory.c PacketHistory.h olsrd_plugin.c Log Message: * bmf-plugin 1.4 Index: Packet.h =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/lib/bmf/src/Packet.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Packet.h 10 Feb 2007 17:05:56 -0000 1.2 --- Packet.h 22 Apr 2007 17:40:38 -0000 1.3 *************** *** 39,43 **** * Created : 29 Jun 2006 * - * $Id$ * ------------------------------------------------------------------------- */ --- 39,42 ---- *************** *** 68,72 **** } __attribute__((__packed__)); ! #define ENCAP_HDR_LEN (sizeof(struct TEncapHeader)) struct TSaveTtl --- 67,71 ---- } __attribute__((__packed__)); ! #define ENCAP_HDR_LEN ((int)sizeof(struct TEncapHeader)) struct TSaveTtl *************** *** 76,85 **** } __attribute__((__packed__)); ! int GetIpPacketLength(unsigned char* buffer); ! int GetIpHeaderLength(unsigned char* buffer); ! int GetIpTtl(unsigned char* buffer); ! void SaveTtlAndChecksum(unsigned char* buffer, struct TSaveTtl* sttl); ! void RestoreTtlAndChecksum(unsigned char* buffer, struct TSaveTtl* sttl); ! void DecreaseTtlAndUpdateHeaderChecksum(unsigned char* buffer); #endif /* _BMF_PACKET_H */ --- 75,92 ---- } __attribute__((__packed__)); ! int IsIpFragment(unsigned char* ipPacket); ! u_int16_t GetTotalLength(unsigned char* ipPacket); ! unsigned int GetHeaderLength(unsigned char* ipPacket); ! u_int8_t GetTtl(unsigned char* ipPacket); ! void SaveTtlAndChecksum(unsigned char* ipPacket, struct TSaveTtl* sttl); ! void RestoreTtlAndChecksum(unsigned char* ipPacket, struct TSaveTtl* sttl); ! void DecreaseTtlAndUpdateHeaderChecksum(unsigned char* ipPacket); ! u_int16_t GetEtherType(unsigned char* ethernetFrame); ! struct ip* GetIpHeader(unsigned char* ethernetFrame); ! unsigned char* GetIpPacket(unsigned char* ethernetFrame); ! u_int16_t GetFrameLength(unsigned char* ethernetFrame); ! void SetFrameSourceMac(unsigned char* ethernetFrame, unsigned char* srcMac); ! unsigned char* GetEthernetFrame(unsigned char* encapsulationUdpData); ! u_int16_t GetEncapsulationUdpDataLength(unsigned char* encapsulationUdpData); #endif /* _BMF_PACKET_H */ Index: Address.h =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/lib/bmf/src/Address.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Address.h 10 Feb 2007 17:05:55 -0000 1.2 --- Address.h 22 Apr 2007 17:40:38 -0000 1.3 *************** *** 39,43 **** * Created : 29 Jun 2006 * - * $Id$ * ------------------------------------------------------------------------- */ --- 39,42 ---- *************** *** 51,56 **** int DoLocalBroadcast(const char* enable); int IsMulticast(union olsr_ip_addr* ipAddress); ! int IsLocalBroadcast(union olsr_ip_addr* destIp, struct sockaddr* broadAddr); ! int IsOlsrOrBmfPacket(struct TBmfInterface* intf, unsigned char* ethPkt, size_t len); #endif /* _BMF_ADDRESS_H */ --- 50,54 ---- int DoLocalBroadcast(const char* enable); int IsMulticast(union olsr_ip_addr* ipAddress); ! int IsOlsrOrBmfPacket(unsigned char* ipPacket); #endif /* _BMF_ADDRESS_H */ Index: DropList.h =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/lib/bmf/src/DropList.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** DropList.h 10 Feb 2007 17:05:56 -0000 1.2 --- DropList.h 22 Apr 2007 17:40:38 -0000 1.3 *************** *** 39,43 **** * Created : 29 Jun 2006 * - * $Id$ * ------------------------------------------------------------------------- */ --- 39,42 ---- Index: Packet.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/lib/bmf/src/Packet.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Packet.c 10 Feb 2007 17:05:56 -0000 1.3 --- Packet.c 22 Apr 2007 17:40:38 -0000 1.4 *************** *** 33,40 **** /* ------------------------------------------------------------------------- * File : Packet.c ! * Description: BMF and IP packet processing functions * Created : 29 Jun 2006 * - * $Id$ * ------------------------------------------------------------------------- */ --- 33,39 ---- /* ------------------------------------------------------------------------- * File : Packet.c ! * Description: IP packet and Ethernet frame processing functions * Created : 29 Jun 2006 * * ------------------------------------------------------------------------- */ *************** *** 42,105 **** /* System includes */ #include /* assert() */ ! #include /* u_int32_t */ #include /* ntohs(), htons() */ #include /* struct iphdr */ - #include /* ------------------------------------------------------------------------- ! * Function : GetIpPacketLength ! * Description: Retrieve the IP packet length (in bytes) of the passed ! * ethernet-IP packet ! * Input : buffer - the ethernet-IP packet * Output : none * Return : IP packet length * Data Used : none * ------------------------------------------------------------------------- */ ! int GetIpPacketLength(unsigned char* buffer) { struct iphdr* iph; ! assert(buffer != NULL); ! iph = (struct iphdr*) (buffer + IP_HDR_OFFSET); return ntohs(iph->tot_len); } /* ------------------------------------------------------------------------- ! * Function : GetIpHeaderLength ! * Description: Retrieve the IP header length (in bytes) of the passed ! * ethernet-IP packet ! * Input : buffer - the ethernet-IP packet * Output : none * Return : IP header length * Data Used : none * ------------------------------------------------------------------------- */ ! int GetIpHeaderLength(unsigned char* buffer) { struct iphdr* iph; ! assert(buffer != NULL); ! iph = (struct iphdr*) (buffer + IP_HDR_OFFSET); return iph->ihl << 2; } /* ------------------------------------------------------------------------- ! * Function : GetIpTtl * Description: Retrieve the TTL (Time To Live) value from the IP header of ! * the passed ethernet-IP packet ! * Input : buffer - the ethernet-IP packet * Output : none * Return : TTL value * Data Used : none * ------------------------------------------------------------------------- */ ! int GetIpTtl(unsigned char* buffer) { struct iphdr* iph; ! assert(buffer != NULL); ! iph = (struct iphdr*) (buffer + IP_HDR_OFFSET); return iph->ttl; } --- 41,126 ---- /* System includes */ + #include /* NULL */ #include /* assert() */ ! #include /* memcpy() */ ! #include /* u_int8_t, u_int16_t, u_int32_t */ #include /* ntohs(), htons() */ #include /* struct iphdr */ /* ------------------------------------------------------------------------- ! * Function : IsIpFragment ! * Description: Check if an IP packet is an IP fragment ! * Input : ipPacket - the IP packet ! * Output : none ! * Return : true (1) or false (0) ! * Data Used : none ! * ------------------------------------------------------------------------- */ ! int IsIpFragment(unsigned char* ipPacket) ! { ! struct ip* iph; ! ! assert(ipPacket != NULL); ! ! iph = (struct ip*) ipPacket; ! if ((ntohs(iph->ip_off) & IP_OFFMASK) != 0) ! { ! return 1; ! } ! return 0; ! } ! ! /* ------------------------------------------------------------------------- ! * Function : GetTotalLength ! * Description: Retrieve the total length of the IP packet (in bytes) of ! * an IP packet ! * Input : ipPacket - the IP packet * Output : none * Return : IP packet length * Data Used : none * ------------------------------------------------------------------------- */ ! u_int16_t GetTotalLength(unsigned char* ipPacket) { struct iphdr* iph; ! assert(ipPacket != NULL); ! iph = (struct iphdr*) ipPacket; return ntohs(iph->tot_len); } /* ------------------------------------------------------------------------- ! * Function : GetHeaderLength ! * Description: Retrieve the IP header length (in bytes) of an IP packet ! * Input : ipPacket - the IP packet * Output : none * Return : IP header length * Data Used : none * ------------------------------------------------------------------------- */ ! unsigned int GetHeaderLength(unsigned char* ipPacket) { struct iphdr* iph; ! assert(ipPacket != NULL); ! iph = (struct iphdr*) ipPacket; return iph->ihl << 2; } /* ------------------------------------------------------------------------- ! * Function : GetTtl * Description: Retrieve the TTL (Time To Live) value from the IP header of ! * an IP packet ! * Input : ipPacket - the IP packet * Output : none * Return : TTL value * Data Used : none * ------------------------------------------------------------------------- */ ! u_int8_t GetTtl(unsigned char* ipPacket) { struct iphdr* iph; ! assert(ipPacket != NULL); ! iph = (struct iphdr*) ipPacket; return iph->ttl; } *************** *** 108,124 **** * Function : SaveTtlAndChecksum * Description: Save the TTL (Time To Live) value and IP checksum as found in ! * the IP header of the passed ethernet-IP packet ! * Input : buffer - the ethernet-IP packet * Output : sttl - the TTL and checksum values * Return : none * Data Used : none * ------------------------------------------------------------------------- */ ! void SaveTtlAndChecksum(unsigned char* buffer, struct TSaveTtl* sttl) { struct iphdr* iph; ! assert(buffer != NULL && sttl != NULL); ! iph = (struct iphdr*) (buffer + IP_HDR_OFFSET); sttl->ttl = iph->ttl; sttl->check = ntohs(iph->check); --- 129,145 ---- * Function : SaveTtlAndChecksum * Description: Save the TTL (Time To Live) value and IP checksum as found in ! * the IP header of an IP packet ! * Input : ipPacket - the IP packet * Output : sttl - the TTL and checksum values * Return : none * Data Used : none * ------------------------------------------------------------------------- */ ! void SaveTtlAndChecksum(unsigned char* ipPacket, struct TSaveTtl* sttl) { struct iphdr* iph; ! assert(ipPacket != NULL && sttl != NULL); ! iph = (struct iphdr*) ipPacket; sttl->ttl = iph->ttl; sttl->check = ntohs(iph->check); *************** *** 128,133 **** * Function : RestoreTtlAndChecksum * Description: Restore the TTL (Time To Live) value and IP checksum in ! * the IP header of the passed ethernet-IP packet ! * Input : buffer - the ethernet-IP packet * sttl - the TTL and checksum values * Output : none --- 149,154 ---- * Function : RestoreTtlAndChecksum * Description: Restore the TTL (Time To Live) value and IP checksum in ! * the IP header of an IP packet ! * Input : ipPacket - the IP packet * sttl - the TTL and checksum values * Output : none *************** *** 135,145 **** * Data Used : none * ------------------------------------------------------------------------- */ ! void RestoreTtlAndChecksum(unsigned char* buffer, struct TSaveTtl* sttl) { struct iphdr* iph; ! assert(buffer != NULL && sttl != NULL); ! iph = (struct iphdr*) (buffer + IP_HDR_OFFSET); iph->ttl = sttl->ttl; iph->check = htons(sttl->check); --- 156,166 ---- * Data Used : none * ------------------------------------------------------------------------- */ ! void RestoreTtlAndChecksum(unsigned char* ipPacket, struct TSaveTtl* sttl) { struct iphdr* iph; ! assert(ipPacket != NULL && sttl != NULL); ! iph = (struct iphdr*) ipPacket; iph->ttl = sttl->ttl; iph->check = htons(sttl->check); *************** *** 150,154 **** * Description: For an IP packet, decrement the TTL value and update the IP header * checksum accordingly. ! * Input : buffer - the ethernet-IP packet * Output : none * Return : none --- 171,175 ---- * Description: For an IP packet, decrement the TTL value and update the IP header * checksum accordingly. ! * Input : ipPacket - the IP packet * Output : none * Return : none *************** *** 156,167 **** * Notes : See also RFC1141 * ------------------------------------------------------------------------- */ ! void DecreaseTtlAndUpdateHeaderChecksum(unsigned char* buffer) { struct iphdr* iph; u_int32_t sum; ! assert(buffer != NULL); ! iph = (struct iphdr*) (buffer + IP_HDR_OFFSET); iph->ttl--; /* decrement ttl */ --- 177,188 ---- * Notes : See also RFC1141 * ------------------------------------------------------------------------- */ ! void DecreaseTtlAndUpdateHeaderChecksum(unsigned char* ipPacket) { struct iphdr* iph; u_int32_t sum; ! assert(ipPacket != NULL); ! iph = (struct iphdr*) ipPacket; iph->ttl--; /* decrement ttl */ *************** *** 169,170 **** --- 190,287 ---- iph->check = htons(sum + (sum>>16)); /* add carry */ } + + /* ------------------------------------------------------------------------- + * Function : GetEtherType + * Description: Retrieve the EtherType of an Ethernet frame + * Input : ethernetFrame - the Ethernet frame + * Output : none + * Return : EtherType + * Data Used : none + * ------------------------------------------------------------------------- */ + u_int16_t GetEtherType(unsigned char* ethernetFrame) + { + u_int16_t type; + memcpy(&type, ethernetFrame + ETH_TYPE_OFFSET, 2); + return ntohs(type); + } + + /* ------------------------------------------------------------------------- + * Function : GetIpHeader + * Description: Retrieve the IP header from an Ethernet frame + * Input : ethernetFrame - the Ethernet frame + * Output : none + * Return : IP header + * Data Used : none + * ------------------------------------------------------------------------- */ + struct ip* GetIpHeader(unsigned char* ethernetFrame) + { + return (struct ip*)(ethernetFrame + IP_HDR_OFFSET); + } + + /* ------------------------------------------------------------------------- + * Function : GetIpPacket + * Description: Retrieve the IP packet from an Ethernet frame + * Input : ethernetFrame - the Ethernet frame + * Output : none + * Return : IP packet + * Data Used : none + * ------------------------------------------------------------------------- */ + unsigned char* GetIpPacket(unsigned char* ethernetFrame) + { + return ethernetFrame + IP_HDR_OFFSET; + } + + /* ------------------------------------------------------------------------- + * Function : GetFrameLength + * Description: Return the Ethernet frame length of an Ethernet frame containing + * an IP packet + * Input : ethernetFrame - the Ethernet frame + * Output : none + * Return : The frame length + * Data Used : none + * ------------------------------------------------------------------------- */ + u_int16_t GetFrameLength(unsigned char* ethernetFrame) + { + return GetTotalLength(GetIpPacket(ethernetFrame)) + IP_HDR_OFFSET; + } + + /* ------------------------------------------------------------------------- + * Function : SetFrameSourceMac + * Description: Set the source MAC address of an Ethernet frame + * Input : ethernetFrame - the Ethernet frame + : srcMac - the source MAC address + * Output : none + * Return : none + * Data Used : none + * ------------------------------------------------------------------------- */ + void SetFrameSourceMac(unsigned char* ethernetFrame, unsigned char* srcMac) + { + memcpy(ethernetFrame + IFHWADDRLEN, srcMac, IFHWADDRLEN); + } + + /* ------------------------------------------------------------------------- + * Function : GetEthernetFrame + * Description: Retrieve the Ethernet frame from BMF encapsulation UDP data + * Input : encapsulationUdpData - the encapsulation UDP data + * Output : none + * Return : The Ethernet frame + * Data Used : none + * ------------------------------------------------------------------------- */ + unsigned char* GetEthernetFrame(unsigned char* encapsulationUdpData) + { + return encapsulationUdpData + ENCAP_HDR_LEN; + } + + /* ------------------------------------------------------------------------- + * Function : GetEncapsulationUdpDataLength + * Description: Return the length of BMF encapsulation UDP data + * Input : encapsulationUdpData - the encapsulation UDP data + * Output : none + * Return : The packet length + * Data Used : none + * ------------------------------------------------------------------------- */ + u_int16_t GetEncapsulationUdpDataLength(unsigned char* encapsulationUdpData) + { + return GetFrameLength(GetEthernetFrame(encapsulationUdpData)) + ENCAP_HDR_LEN; + } + Index: olsrd_plugin.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/lib/bmf/src/olsrd_plugin.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** olsrd_plugin.c 20 Apr 2007 14:06:18 -0000 1.3 --- olsrd_plugin.c 22 Apr 2007 17:40:39 -0000 1.4 *************** *** 36,45 **** * Created : 29 Jun 2006 * - * $Id$ * ------------------------------------------------------------------------- */ /* System includes */ #include /* assert() */ ! #include /* OLSRD includes */ --- 36,44 ---- * Created : 29 Jun 2006 * * ------------------------------------------------------------------------- */ /* System includes */ #include /* assert() */ ! #include /* NULL */ /* OLSRD includes */ Index: DropList.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/lib/bmf/src/DropList.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** DropList.c 10 Feb 2007 17:05:55 -0000 1.2 --- DropList.c 22 Apr 2007 17:40:38 -0000 1.3 *************** *** 37,41 **** * Created : 29 Jun 2006 * - * $Id$ * ------------------------------------------------------------------------- */ --- 37,40 ---- *************** *** 45,49 **** /* System includes */ #include /* assert() */ ! #include /* NULL */ #include /* malloc */ #include /* memcmp */ --- 44,49 ---- /* System includes */ #include /* assert() */ ! #include /* NULL */ ! #include /* sscanf */ #include /* malloc */ #include /* memcmp */ Index: Address.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/lib/bmf/src/Address.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Address.c 20 Apr 2007 14:06:17 -0000 1.3 --- Address.c 22 Apr 2007 17:40:38 -0000 1.4 *************** *** 36,40 **** * Created : 29 Jun 2006 * - * $Id$ * ------------------------------------------------------------------------- */ --- 36,39 ---- *************** *** 42,45 **** --- 41,45 ---- /* System includes */ + #include /* NULL */ #include /* assert() */ #include /* struct ip */ *************** *** 100,227 **** /* ------------------------------------------------------------------------- - * Function : IsLocalBroadcast - * Description: Check if an IP address is a local broadcast address for a - * given network interface - * Input : destIp, broadAddr - * Output : none - * Return : true (1) or false (0) - * Data Used : none - * ------------------------------------------------------------------------- */ - int IsLocalBroadcast(union olsr_ip_addr* destIp, struct sockaddr* broadAddr) - { - struct sockaddr_in* sin; - - assert(destIp != NULL && broadAddr != NULL); - - /* Cast down to correct sockaddr subtype */ - sin = (struct sockaddr_in*)broadAddr; - - return COMP_IP(&(sin->sin_addr.s_addr), destIp); - } - - /* ------------------------------------------------------------------------- * Function : IsOlsrOrBmfPacket ! * Description: Check if an ethernet packet is an OLSR packet or a BMF packet ! * Input : intf, ethPkt, len * Output : none * Return : true (1) or false (0) * Data Used : none - * Assumption : len >= IP_HDR_OFFSET + GetIpHeaderLength(ethPkt) * ------------------------------------------------------------------------- */ ! int IsOlsrOrBmfPacket(struct TBmfInterface* intf __attribute__((unused)), unsigned char* ethPkt, size_t len) { ! struct ip* ipData; unsigned int ipHeaderLen; ! struct udphdr* udpData; u_int16_t destPort; ! assert(ethPkt != NULL); ! /* Consider OLSR and BMF packets not to be local broadcast ! * OLSR packets are UDP - port 698 * OLSR-BMF packets are UDP - port 50698 ! * OLSR-Autodetect probe packets are UDP - port 51698 ! * Fragments of the above packets are also not local broadcast */ ! ipData = (struct ip*) (ethPkt + IP_HDR_OFFSET); ! if (ipData->ip_p != SOL_UDP) { return 0; } ! /* Check if the packet is an IP-fragment */ ! if ((ntohs(ipData->ip_off) & IP_OFFMASK) != 0) ! { ! #if 0 ! int i; ! for (i = 0; i < FRAGMENT_HISTORY_SIZE; i++) ! { ! /* Quick-access pointer */ ! struct TFragmentHistory* entry = &intf->fragmentHistory[i]; ! ! /* Match */ ! if (entry->ipId == ntohs(ipData->ip_id) && ! entry->ipProto == ipData->ip_p && ! entry->ipSrc.s_addr == ntohl(ipData->ip_src.s_addr) && ! entry->ipDst.s_addr == ntohl(ipData->ip_dst.s_addr)) ! { ! /* Found matching history entry, so packet is assumed to be a fragment ! * of an earlier OLSR/OLSR-BMF/OLSR-Autodetect packet */ ! ! /* More fragments? If not, invalidate entry */ ! if (((ntohs(ipData->ip_off) & IP_MF) == 0)) ! { ! memset(entry, 0, sizeof(struct TFragmentHistory)); ! } ! ! return 1; ! } ! } ! ! /* Matching history entry not found, so packet is not assumed to be a fragment ! * of an earlier OLSR/OLSR-BMF/OLSR-Autodetect packet */ ! #endif ! /* OOPS! IP-fragments may come in earlier than their main packet. In that case, ! * their relation with the main packet is not detected by the above code, resulting ! * in stray fragments being forwarded all ove the network. Solution for now is to ! * not forward any IP-fragments at all. */ ! /*return 0;*/ ! return 1; ! } ! ! /* The packet is the first (or only) IP-fragment */ ! ! /* Check length first */ ! ipHeaderLen = ipData->ip_hl << 2; ! if (len < IP_HDR_OFFSET + ipHeaderLen + sizeof(struct udphdr)) { return 0; } /* Go into the UDP header and check port number */ ! udpData = (struct udphdr*) (ethPkt + IP_HDR_OFFSET + ipHeaderLen); ! destPort = ntohs(udpData->dest); if (destPort == OLSRPORT || destPort == BMF_ENCAP_PORT || destPort == 51698) /* TODO: #define for 51698 */ { - #if 0 - /* If more fragments are expected, keep a record in the fragment history */ - if ((ntohs(ipData->ip_off) & IP_MF) != 0) - { - /* Quick-access pointer */ - struct TFragmentHistory* entry = &intf->fragmentHistory[intf->nextFragmentHistoryEntry]; - - /* Store in fragment history */ - entry->ipId = ntohs(ipData->ip_id); - entry->ipProto = ipData->ip_p; - entry->ipSrc.s_addr = ntohl(ipData->ip_src.s_addr); - entry->ipDst.s_addr = ntohl(ipData->ip_dst.s_addr); - - /* Advance to next entry */ - intf->nextFragmentHistoryEntry++; - intf->nextFragmentHistoryEntry %= FRAGMENT_HISTORY_SIZE; - } - #endif return 1; } --- 100,146 ---- /* ------------------------------------------------------------------------- * Function : IsOlsrOrBmfPacket ! * Description: Check if an IP packet is either an OLSR packet or a BMF packet ! * Input : ipPacket * Output : none * Return : true (1) or false (0) * Data Used : none * ------------------------------------------------------------------------- */ ! int IsOlsrOrBmfPacket(unsigned char* ipPacket) { ! struct ip* ipHeader; unsigned int ipHeaderLen; ! struct udphdr* udpHeader; u_int16_t destPort; ! assert(ipPacket != NULL); ! /* OLSR packets are UDP - port 698 * OLSR-BMF packets are UDP - port 50698 ! * OLSR-Autodetect probe packets are UDP - port 51698 */ ! /* Check if UDP */ ! ipHeader = (struct ip*) ipPacket; ! if (ipHeader->ip_p != SOL_UDP) { + /* Not UDP */ return 0; } ! /* The total length must be at least large enough to store the UDP header */ ! ipHeaderLen = GetHeaderLength(ipPacket); ! if (GetTotalLength(ipPacket) < ipHeaderLen + sizeof(struct udphdr)) { + /* Not long enough */ return 0; } /* Go into the UDP header and check port number */ ! udpHeader = (struct udphdr*) (ipPacket + ipHeaderLen); ! destPort = ntohs(udpHeader->dest); if (destPort == OLSRPORT || destPort == BMF_ENCAP_PORT || destPort == 51698) /* TODO: #define for 51698 */ { return 1; } Index: Bmf.h =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/lib/bmf/src/Bmf.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Bmf.h 10 Feb 2007 17:05:55 -0000 1.2 --- Bmf.h 22 Apr 2007 17:40:38 -0000 1.3 *************** *** 39,43 **** * Created : 29 Jun 2006 * - * $Id$ * ------------------------------------------------------------------------- */ --- 39,42 ---- *************** *** 45,49 **** #define PLUGIN_NAME "OLSRD Basic Multicast Forwarding (BMF) plugin" #define PLUGIN_NAME_SHORT "OLSRD BMF" ! #define PLUGIN_VERSION "1.3 (" __DATE__ " " __TIME__ ")" #define PLUGIN_COPYRIGHT " (C) Thales Communications Huizen, Netherlands" #define PLUGIN_AUTHOR " Erik Tromp (erik.tromp at nl.thalesgroup.com)" --- 44,48 ---- #define PLUGIN_NAME "OLSRD Basic Multicast Forwarding (BMF) plugin" #define PLUGIN_NAME_SHORT "OLSRD BMF" ! #define PLUGIN_VERSION "1.4 (" __DATE__ " " __TIME__ ")" #define PLUGIN_COPYRIGHT " (C) Thales Communications Huizen, Netherlands" #define PLUGIN_AUTHOR " Erik Tromp (erik.tromp at nl.thalesgroup.com)" *************** *** 53,58 **** --- 52,60 ---- #define BMF_ENCAP_PORT 50698 + /* Forward declaration of OLSR interface type */ struct interface; + void BmfPError(char* format, ...) __attribute__((format(printf, 1, 2))); + union olsr_ip_addr* MainAddressOf(union olsr_ip_addr* ip); int InterfaceChange(struct interface* interf, int action); int InitBmf(struct interface* skipThisIntf); Index: PacketHistory.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/lib/bmf/src/PacketHistory.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** PacketHistory.c 20 Apr 2007 14:06:18 -0000 1.3 --- PacketHistory.c 22 Apr 2007 17:40:38 -0000 1.4 *************** *** 37,41 **** * Created : 29 Jun 2006 * - * $Id$ * ------------------------------------------------------------------------- */ --- 37,40 ---- *************** *** 43,46 **** --- 42,46 ---- /* System includes */ + #include /* NULL */ #include /* assert() */ #include /* memset */ *************** *** 51,55 **** #include "olsr.h" /* olsr_printf */ ! /* Plugin includes */ #include "Packet.h" --- 51,55 ---- #include "olsr.h" /* olsr_printf */ ! /* NULLPlugin includes */ #include "Packet.h" *************** *** 147,153 **** /* ------------------------------------------------------------------------- * Function : PacketCrc32 ! * Description: Calculates the CRC-32 value for an Ethernet packet ! * Input : ethPkt - the Ethernet packet ! * len - the number of octets in the Ethernet packet * Output : none * Return : 32-bits hash value --- 147,153 ---- /* ------------------------------------------------------------------------- * Function : PacketCrc32 ! * Description: Calculates the CRC-32 value for an Ethernet frame ! * Input : ethernetFrame - the Ethernet frame ! * len - the number of octets in the Ethernet frame * Output : none * Return : 32-bits hash value *************** *** 156,167 **** * in the CRC calculation. * ------------------------------------------------------------------------- */ ! u_int32_t PacketCrc32(unsigned char* ethPkt, ssize_t len) { ssize_t nCrcBytes; struct TSaveTtl sttl; ! struct iphdr* iph; u_int32_t result; ! assert(ethPkt != NULL); /* Start CRC calculation at ethertype; skip source and destination MAC --- 156,167 ---- * in the CRC calculation. * ------------------------------------------------------------------------- */ ! u_int32_t PacketCrc32(unsigned char* ethernetFrame, ssize_t len) { ssize_t nCrcBytes; struct TSaveTtl sttl; ! struct ip* ipHeader; u_int32_t result; ! assert(ethernetFrame != NULL); /* Start CRC calculation at ethertype; skip source and destination MAC *************** *** 184,196 **** } ! SaveTtlAndChecksum(ethPkt, &sttl); ! iph = (struct iphdr*) (ethPkt + IP_HDR_OFFSET); ! iph->ttl = 0xFF; /* fixed value of TTL for CRC-32 calculation */ ! iph->check = 0x5A5A; /* fixed value of IP header checksum for CRC-32 calculation */ ! result = CalcCrc32(ethPkt + IP_HDR_OFFSET, nCrcBytes); ! RestoreTtlAndChecksum(ethPkt, &sttl); return result; } --- 184,196 ---- } ! SaveTtlAndChecksum(GetIpPacket(ethernetFrame), &sttl); ! ipHeader = GetIpHeader(ethernetFrame); ! ipHeader->ip_ttl = 0xFF; /* fixed value of TTL for CRC-32 calculation */ ! ipHeader->ip_sum = 0x5A5A; /* fixed value of IP header checksum for CRC-32 calculation */ ! result = CalcCrc32(ethernetFrame + IP_HDR_OFFSET, nCrcBytes); ! RestoreTtlAndChecksum(GetIpPacket(ethernetFrame), &sttl); return result; } Index: NetworkInterfaces.h =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/lib/bmf/src/NetworkInterfaces.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** NetworkInterfaces.h 10 Feb 2007 17:05:56 -0000 1.2 --- NetworkInterfaces.h 22 Apr 2007 17:40:38 -0000 1.3 *************** *** 39,43 **** * Created : 29 Jun 2006 * - * $Id$ * ------------------------------------------------------------------------- */ --- 39,42 ---- *************** *** 45,48 **** --- 44,50 ---- #include /* struct in_addr */ + /* OLSR includes */ + #include "olsr_types.h" /* olsr_ip_addr */ + /* Plugin includes */ #include "Packet.h" /* IFHWADDRLEN */ *************** *** 60,63 **** --- 62,69 ---- int encapsulatingSkfd; + /* File descriptor of UDP packet socket, used for listening to encapsulation packets. + * Used only when PlParam "BmfMechanism" is set to "UnicastPromiscuous". */ + int listeningSkfd; + unsigned char macAddr[IFHWADDRLEN]; *************** *** 69,76 **** /* IP address of this network interface */ ! struct sockaddr intAddr; /* Broadcast address of this network interface */ ! struct sockaddr broadAddr; #define FRAGMENT_HISTORY_SIZE 10 --- 75,82 ---- /* IP address of this network interface */ ! union olsr_ip_addr intAddr; /* Broadcast address of this network interface */ ! union olsr_ip_addr broadAddr; #define FRAGMENT_HISTORY_SIZE 10 *************** *** 85,88 **** --- 91,99 ---- int nextFragmentHistoryEntry; + /* Number of received and transmitted BMF packets on this interface */ + u_int32_t nBmfPacketsRx; + u_int32_t nBmfPacketsRxDup; + u_int32_t nBmfPacketsTx; + /* Next element in list */ struct TBmfInterface* next; *************** *** 98,101 **** --- 109,115 ---- extern char EtherTunTapIfName[]; + /* 10.255.255.253 in host byte order */ + #define ETHERTUNTAPDEFAULTIP 0x0AFFFFFD + extern u_int32_t EtherTunTapIp; extern u_int32_t EtherTunTapIpMask; *************** *** 107,114 **** --- 121,140 ---- extern enum TTunOrTap TunOrTap; + enum TBmfMechanism { BM_BROADCAST = 0, BM_UNICAST_PROMISCUOUS }; + extern enum TBmfMechanism BmfMechanism; + int SetBmfInterfaceName(const char* ifname); int SetBmfInterfaceType(const char* iftype); int SetBmfInterfaceIp(const char* ip); int SetCapturePacketsOnOlsrInterfaces(const char* enable); + int SetBmfMechanism(const char* mechanism); + int DeactivateSpoofFilter(void); + void RestoreSpoofFilter(void); + struct link_entry* GetBestNeighbor( + struct TBmfInterface* intf, + union olsr_ip_addr* source, + union olsr_ip_addr* forwardedBy, + union olsr_ip_addr* forwardedTo, + int* multipleNeighbors); int CreateBmfNetworkInterfaces(struct interface* skipThisIntf); void AddInterface(struct interface* newIntf); *************** *** 116,120 **** int AddNonOlsrBmfIf(const char* ifName); int IsNonOlsrBmfIf(const char* ifName); ! void CheckAndUpdateLocalBroadcast(unsigned char* buffer, struct sockaddr* broadAddr); #endif /* _BMF_NETWORKINTERFACES_H */ --- 142,148 ---- int AddNonOlsrBmfIf(const char* ifName); int IsNonOlsrBmfIf(const char* ifName); ! void CheckAndUpdateLocalBroadcast(unsigned char* ipPacket, union olsr_ip_addr* broadAddr); ! void AddMulticastRoute(void); ! void DeleteMulticastRoute(void); #endif /* _BMF_NETWORKINTERFACES_H */ Index: Bmf.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/lib/bmf/src/Bmf.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Bmf.c 20 Apr 2007 14:58:35 -0000 1.4 --- Bmf.c 22 Apr 2007 17:40:38 -0000 1.5 *************** *** 36,40 **** * Created : 29 Jun 2006 * - * $Id$ * ------------------------------------------------------------------------- */ --- 36,39 ---- *************** *** 44,50 **** /* System includes */ [...2251 lines suppressed...] ! BmfPError("pthread_join() error"); } ! /* Clean up after the BmfThread has been killed */ CloseBmfNetworkInterfaces(); } *************** *** 1367,1372 **** --- 1456,1466 ---- return SetCapturePacketsOnOlsrInterfaces(value); } + else if (strcmp(key, "BmfMechanism") == 0) + { + return SetBmfMechanism(value); + } /* Key not recognized */ return 0; } + Index: NetworkInterfaces.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/lib/bmf/src/NetworkInterfaces.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** NetworkInterfaces.c 20 Apr 2007 14:06:17 -0000 1.4 --- NetworkInterfaces.c 22 Apr 2007 17:40:38 -0000 1.5 *************** *** 36,40 **** * Created : 29 Jun 2006 * - * $Id$ * ------------------------------------------------------------------------- */ --- 36,39 ---- *************** *** 42,45 **** --- 41,45 ---- [...1993 lines suppressed...] + ((struct sockaddr_in*)&kernel_route.rt_genmask)->sin_family = AF_INET; + + /* 224.0.0.0/4 */ + ((struct sockaddr_in *)&kernel_route.rt_dst)->sin_addr.s_addr = htonl(0xE0000000); + ((struct sockaddr_in *)&kernel_route.rt_genmask)->sin_addr.s_addr = htonl(0xF0000000); + + kernel_route.rt_metric = 0; + kernel_route.rt_flags = RTF_UP; + + kernel_route.rt_dev = EtherTunTapIfName; + + if (ioctl(ioctlSkfd, SIOCDELRT, &kernel_route) < 0) + { + BmfPError("error deleting multicast route via EtherTunTap interface \"%s\"", EtherTunTapIfName); + + /* Continue anyway */ + } + close(ioctlSkfd); + } + } Index: PacketHistory.h =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/lib/bmf/src/PacketHistory.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** PacketHistory.h 10 Feb 2007 17:05:56 -0000 1.2 --- PacketHistory.h 22 Apr 2007 17:40:39 -0000 1.3 *************** *** 40,44 **** * Created : 29 Jun 2006 * - * $Id$ * ------------------------------------------------------------------------- */ --- 40,43 ---- From (spam-protected) Sun Apr 22 21:54:33 2007 From: (spam-protected) (Bernd Petrovitsch) Date: Sun, 22 Apr 2007 19:54:33 +0000 Subject: [Olsr-cvs] olsrd-current/lib/txtinfo/src olsrd_txtinfo.c,1.3,1.4 Message-ID: Update of /cvsroot/olsrd/olsrd-current/lib/txtinfo/src In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv2348/lib/txtinfo/src Modified Files: olsrd_txtinfo.c Log Message: * committed txtinfo patch by Jo-Philipp Wich Index: olsrd_txtinfo.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/lib/txtinfo/src/olsrd_txtinfo.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** olsrd_txtinfo.c 20 Apr 2007 13:46:04 -0000 1.3 --- olsrd_txtinfo.c 22 Apr 2007 19:54:31 -0000 1.4 *************** *** 114,117 **** --- 114,120 ---- ipc_print_hna(void); + static void + ipc_print_mid(void); + #define TXT_IPC_BUFSIZE 256 static int *************** *** 486,489 **** --- 489,532 ---- } + static void + ipc_print_mid(void) + { + olsr_u8_t index; + unsigned short is_first; + struct mid_entry *entry; + struct mid_address *alias; + + ipc_sendf("Table: MID\nIP\tAliases\n"); + + /* MID */ + for( index = 0; index < HASHSIZE; index++ ) + { + entry = mid_set[index].next; + + while( entry != &mid_set[index] ) + { + ipc_sendf( olsr_ip_to_string( &entry->main_addr ) ); + alias = entry->aliases; + is_first = 1; + + while( alias ) + { + ipc_sendf( "%s%s", + ( is_first ? "\t" : ";" ), + olsr_ip_to_string( &alias->alias ) + ); + + alias = alias->next_alias; + is_first = 0; + } + + entry = entry->next; + ipc_sendf("\n"); + } + } + + ipc_sendf("\n"); + } + static void *************** *** 506,509 **** --- 549,555 ---- if (!neighonly) ipc_print_hna(); + /* mid */ + if (!neighonly) ipc_print_mid(); + /* routes */ if (!neighonly) ipc_print_routes(); From (spam-protected) Sun Apr 22 22:25:50 2007 From: (spam-protected) (Bernd Petrovitsch) Date: Sun, 22 Apr 2007 20:25:50 +0000 Subject: [Olsr-cvs] olsrd-current/gui/linux-gtk/src olsr_protocol.h, 1.1, 1.2 packet.h, 1.2, 1.3 Message-ID: Update of /cvsroot/olsrd/olsrd-current/gui/linux-gtk/src In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv14900/gui/linux-gtk/src Modified Files: olsr_protocol.h packet.h Log Message: * s|tcmsg|olsr_tcmsg| in preparation for a Sven-Ola patch Index: packet.h =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/gui/linux-gtk/src/packet.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** packet.h 19 Sep 2004 11:48:20 -0000 1.2 --- packet.h 22 Apr 2007 20:25:48 -0000 1.3 *************** *** 52,57 **** union tc_message { ! struct tcmsg v4; ! struct tcmsg6 v6; }; --- 52,57 ---- union tc_message { ! struct olsr_tcmsg v4; ! struct olsr_tcmsg6 v6; }; Index: olsr_protocol.h =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/gui/linux-gtk/src/olsr_protocol.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** olsr_protocol.h 14 Sep 2004 16:45:41 -0000 1.1 --- olsr_protocol.h 22 Apr 2007 20:25:48 -0000 1.2 *************** *** 248,252 **** ! struct tcmsg { olsr_u16_t ansn; --- 248,252 ---- ! struct olsr_tcmsg { olsr_u16_t ansn; *************** *** 266,270 **** ! struct tcmsg6 { olsr_u16_t ansn; --- 266,270 ---- ! struct olsr_tcmsg6 { olsr_u16_t ansn; *************** *** 367,371 **** { struct hellomsg hello; ! struct tcmsg tc; struct hnamsg hna; struct midmsg mid; --- 367,371 ---- { struct hellomsg hello; ! struct olsr_tcmsg tc; struct hnamsg hna; struct midmsg mid; *************** *** 391,395 **** { struct hellomsg6 hello; ! struct tcmsg6 tc; struct hnamsg6 hna; struct midmsg6 mid; --- 391,395 ---- { struct hellomsg6 hello; ! struct olsr_tcmsg6 tc; struct hnamsg6 hna; struct midmsg6 mid; From (spam-protected) Sun Apr 22 22:25:50 2007 From: (spam-protected) (Bernd Petrovitsch) Date: Sun, 22 Apr 2007 20:25:50 +0000 Subject: [Olsr-cvs] olsrd-current/src build_msg.c, 1.34, 1.35 olsr_protocol.h, 1.21, 1.22 print_packet.c, 1.9, 1.10 rebuild_packet.c, 1.19, 1.20 Message-ID: Update of /cvsroot/olsrd/olsrd-current/src In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv14900/src Modified Files: build_msg.c olsr_protocol.h print_packet.c rebuild_packet.c Log Message: * s|tcmsg|olsr_tcmsg| in preparation for a Sven-Ola patch Index: build_msg.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/build_msg.c,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** build_msg.c 20 Apr 2007 13:46:04 -0000 1.34 --- build_msg.c 22 Apr 2007 20:25:48 -0000 1.35 *************** *** 604,608 **** struct tc_mpr_addr *mprs; union olsr_message *m; ! struct tcmsg *tc; struct neigh_info *mprsaddr; olsr_bool found = OLSR_FALSE, partial_sent = OLSR_FALSE; --- 604,608 ---- struct tc_mpr_addr *mprs; union olsr_message *m; ! struct olsr_tcmsg *tc; struct neigh_info *mprsaddr; olsr_bool found = OLSR_FALSE, partial_sent = OLSR_FALSE; *************** *** 730,734 **** struct tc_mpr_addr *mprs; union olsr_message *m; ! struct tcmsg6 *tc6; struct neigh_info6 *mprsaddr6; olsr_bool found = OLSR_FALSE, partial_sent = OLSR_FALSE; --- 730,734 ---- struct tc_mpr_addr *mprs; union olsr_message *m; ! struct olsr_tcmsg6 *tc6; struct neigh_info6 *mprsaddr6; olsr_bool found = OLSR_FALSE, partial_sent = OLSR_FALSE; Index: rebuild_packet.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/rebuild_packet.c,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** rebuild_packet.c 28 May 2005 16:01:14 -0000 1.19 --- rebuild_packet.c 22 Apr 2007 20:25:48 -0000 1.20 *************** *** 480,484 **** { /* IPv4 */ ! struct tcmsg *tc; struct neigh_info *mprsaddr, *maddr; --- 480,484 ---- { /* IPv4 */ ! struct olsr_tcmsg *tc; struct neigh_info *mprsaddr, *maddr; *************** *** 521,525 **** { /* IPv6 */ ! struct tcmsg6 *tc6; struct neigh_info6 *mprsaddr6, *maddr6; --- 521,525 ---- { /* IPv6 */ ! struct olsr_tcmsg6 *tc6; struct neigh_info6 *mprsaddr6, *maddr6; Index: olsr_protocol.h =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/olsr_protocol.h,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** olsr_protocol.h 12 Jan 2006 11:00:49 -0000 1.21 --- olsr_protocol.h 22 Apr 2007 20:25:48 -0000 1.22 *************** *** 254,258 **** ! struct tcmsg { olsr_u16_t ansn; --- 254,258 ---- ! struct olsr_tcmsg { olsr_u16_t ansn; *************** *** 273,277 **** ! struct tcmsg6 { olsr_u16_t ansn; --- 273,277 ---- ! struct olsr_tcmsg6 { olsr_u16_t ansn; *************** *** 374,378 **** { struct hellomsg hello; ! struct tcmsg tc; struct hnamsg hna; struct midmsg mid; --- 374,378 ---- { struct hellomsg hello; ! struct olsr_tcmsg tc; struct hnamsg hna; struct midmsg mid; *************** *** 398,402 **** { struct hellomsg6 hello; ! struct tcmsg6 tc; struct hnamsg6 hna; struct midmsg6 mid; --- 398,402 ---- { struct hellomsg6 hello; ! struct olsr_tcmsg6 tc; struct hnamsg6 hna; struct midmsg6 mid; Index: print_packet.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/print_packet.c,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** print_packet.c 7 Jan 2006 08:16:20 -0000 1.9 --- print_packet.c 22 Apr 2007 20:25:48 -0000 1.10 *************** *** 56,63 **** static void ! print_tcmsg(FILE *, olsr_u8_t *, olsr_16_t); static void ! print_tcmsg_lq(FILE *, olsr_u8_t *, olsr_16_t); static void --- 56,63 ---- static void ! print_olsr_tcmsg(FILE *, olsr_u8_t *, olsr_16_t); static void ! print_olsr_tcmsg_lq(FILE *, olsr_u8_t *, olsr_16_t); static void *************** *** 132,136 **** break; case(TC_MESSAGE): ! print_tcmsg(handle, (olsr_cnf->ip_version == AF_INET) ? (olsr_u8_t *)&msg->v4.message : (olsr_u8_t *)&msg->v6.message, --- 132,136 ---- break; case(TC_MESSAGE): ! print_olsr_tcmsg(handle, (olsr_cnf->ip_version == AF_INET) ? (olsr_u8_t *)&msg->v4.message : (olsr_u8_t *)&msg->v6.message, *************** *** 138,142 **** break; case(LQ_TC_MESSAGE): ! print_tcmsg_lq(handle, (olsr_cnf->ip_version == AF_INET) ? (olsr_u8_t *)&msg->v4.message : (olsr_u8_t *)&msg->v6.message, --- 138,142 ---- break; case(LQ_TC_MESSAGE): ! print_olsr_tcmsg_lq(handle, (olsr_cnf->ip_version == AF_INET) ? (olsr_u8_t *)&msg->v4.message : (olsr_u8_t *)&msg->v6.message, *************** *** 324,332 **** static void ! print_tcmsg_lq(FILE *handle, olsr_u8_t *data, olsr_16_t totsize) { int remsize = totsize - ((olsr_cnf->ip_version == AF_INET) ? OLSR_MSGHDRSZ_IPV4 : OLSR_MSGHDRSZ_IPV6); ! fprintf(handle, " +ANSN: %d\n", htons(((struct tcmsg *)data)->ansn)); data += 4; --- 324,332 ---- static void ! print_olsr_tcmsg_lq(FILE *handle, olsr_u8_t *data, olsr_16_t totsize) { int remsize = totsize - ((olsr_cnf->ip_version == AF_INET) ? OLSR_MSGHDRSZ_IPV4 : OLSR_MSGHDRSZ_IPV6); ! fprintf(handle, " +ANSN: %d\n", htons(((struct olsr_tcmsg *)data)->ansn)); data += 4; *************** *** 348,356 **** static void ! print_tcmsg(FILE *handle, olsr_u8_t *data, olsr_16_t totsize) { int remsize = totsize - ((olsr_cnf->ip_version == AF_INET) ? OLSR_MSGHDRSZ_IPV4 : OLSR_MSGHDRSZ_IPV6); ! fprintf(handle, " +ANSN: %d\n", htons(((struct tcmsg *)data)->ansn)); data += 4; --- 348,356 ---- static void ! print_olsr_tcmsg(FILE *handle, olsr_u8_t *data, olsr_16_t totsize) { int remsize = totsize - ((olsr_cnf->ip_version == AF_INET) ? OLSR_MSGHDRSZ_IPV4 : OLSR_MSGHDRSZ_IPV6); ! fprintf(handle, " +ANSN: %d\n", htons(((struct olsr_tcmsg *)data)->ansn)); data += 4; From (spam-protected) Sun Apr 22 23:33:35 2007 From: (spam-protected) (Bernd Petrovitsch) Date: Sun, 22 Apr 2007 21:33:35 +0000 Subject: [Olsr-cvs] olsrd-current Makefile,1.82,1.83 Message-ID: Update of /cvsroot/olsrd/olsrd-current In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv9732 Modified Files: Makefile Log Message: * add the version string after including MAkefile.inc - God knows what make me move this a few days go Index: Makefile =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/Makefile,v retrieving revision 1.82 retrieving revision 1.83 diff -C2 -d -r1.82 -r1.83 *** Makefile 22 Apr 2007 17:25:17 -0000 1.82 --- Makefile 22 Apr 2007 21:33:33 -0000 1.83 *************** *** 40,48 **** VERS = 0.5.1pre - CFLAGS += -DVERSION=\"$(VERS)\" - TOPDIR = . include Makefile.inc MAKECMD = $(MAKE) OS=$(OS) --- 40,48 ---- VERS = 0.5.1pre TOPDIR = . include Makefile.inc + CFLAGS += -DVERSION=\"$(VERS)\" + MAKECMD = $(MAKE) OS=$(OS) From (spam-protected) Sun Apr 22 23:50:20 2007 From: (spam-protected) (Bernd Petrovitsch) Date: Sun, 22 Apr 2007 21:50:20 +0000 Subject: [Olsr-cvs] olsrd-current/src olsr.c,1.52,1.53 Message-ID: Update of /cvsroot/olsrd/olsrd-current/src In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv16402/src Modified Files: olsr.c Log Message: * fixed an old-style function definition Index: olsr.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/olsr.c,v retrieving revision 1.52 retrieving revision 1.53 diff -C2 -d -r1.52 -r1.53 *** olsr.c 20 Apr 2007 14:23:10 -0000 1.52 --- olsr.c 22 Apr 2007 21:50:18 -0000 1.53 *************** *** 100,104 **** */ olsr_u16_t ! get_msg_seqno() { return message_seqno++; --- 100,104 ---- */ olsr_u16_t ! get_msg_seqno(void) { return message_seqno++; From (spam-protected) Thu Apr 26 00:08:19 2007 From: (spam-protected) (Bernd Petrovitsch) Date: Wed, 25 Apr 2007 22:08:19 +0000 Subject: [Olsr-cvs] olsrd-current/src/bsd kernel_routes.c, 1.9, 1.10 net.c, 1.32, 1.33 Message-ID: Update of /cvsroot/olsrd/olsrd-current/src/bsd In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv2640/src/bsd Modified Files: kernel_routes.c net.c Log Message: * OLSR_PRINTF() is now a real C expression * removed superflous type-casts Index: net.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/bsd/net.c,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** net.c 14 Mar 2007 14:01:13 -0000 1.32 --- net.c 25 Apr 2007 22:08:17 -0000 1.33 *************** *** 525,529 **** ! OLSR_PRINTF(3, "OK\n") return 0; } --- 525,529 ---- ! OLSR_PRINTF(3, "OK\n"); return 0; } *************** *** 640,644 **** if (context == NULL) { ! OLSR_PRINTF (1, "libnet init: %s\n", libnet_geterror (context)) return (0); } --- 640,644 ---- if (context == NULL) { ! OLSR_PRINTF (1, "libnet init: %s\n", libnet_geterror (context)); return (0); } *************** *** 660,664 **** if (udp_tag == -1) { ! OLSR_PRINTF (1, "libnet UDP header: %s\n", libnet_geterror (context)) return (0); } --- 660,664 ---- if (udp_tag == -1) { ! OLSR_PRINTF (1, "libnet UDP header: %s\n", libnet_geterror (context)); return (0); } *************** *** 679,683 **** if (ip_tag == -1) { ! OLSR_PRINTF (1, "libnet IP header: %s\n", libnet_geterror (context)) return (0); } --- 679,683 ---- if (ip_tag == -1) { ! OLSR_PRINTF (1, "libnet IP header: %s\n", libnet_geterror (context)); return (0); } *************** *** 692,696 **** if (ether_tag == -1) { ! OLSR_PRINTF (1, "libnet ethernet header: %s\n", libnet_geterror (context)) return (0); } --- 692,696 ---- if (ether_tag == -1) { ! OLSR_PRINTF (1, "libnet ethernet header: %s\n", libnet_geterror (context)); return (0); } *************** *** 699,703 **** if (status == -1) { ! OLSR_PRINTF (1, "libnet packet write: %s\n", libnet_geterror (context)) return (0); } --- 699,703 ---- if (status == -1) { ! OLSR_PRINTF (1, "libnet packet write: %s\n", libnet_geterror (context)); return (0); } *************** *** 864,872 **** if(ioctl(olsr_cnf->ioctl_s, SIOCGIFMEDIA, &ifm) < 0) { ! OLSR_PRINTF(1, "Error SIOCGIFMEDIA(%s)\n", ifm.ifm_name) return WEIGHT_ETHERNET_DEFAULT; } ! OLSR_PRINTF(1, "%s: STATUS 0x%08x\n", ifm.ifm_name, ifm.ifm_status) #endif return WEIGHT_ETHERNET_DEFAULT; --- 864,872 ---- if(ioctl(olsr_cnf->ioctl_s, SIOCGIFMEDIA, &ifm) < 0) { ! OLSR_PRINTF(1, "Error SIOCGIFMEDIA(%s)\n", ifm.ifm_name); return WEIGHT_ETHERNET_DEFAULT; } ! OLSR_PRINTF(1, "%s: STATUS 0x%08x\n", ifm.ifm_name, ifm.ifm_status); #endif return WEIGHT_ETHERNET_DEFAULT; Index: kernel_routes.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/bsd/kernel_routes.c,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** kernel_routes.c 14 Feb 2007 09:09:16 -0000 1.9 --- kernel_routes.c 25 Apr 2007 22:08:17 -0000 1.10 *************** *** 69,73 **** OLSR_PRINTF(1, "%s IPv4 route to %s/%s via %s.\n", ! (add != 0) ? "Adding" : "Removing", Str1, Str2, Str3) memset(buff, 0, sizeof (buff)); --- 69,73 ---- OLSR_PRINTF(1, "%s IPv4 route to %s/%s via %s.\n", ! (add != 0) ? "Adding" : "Removing", Str1, Str2, Str3); memset(buff, 0, sizeof (buff)); From (spam-protected) Thu Apr 26 00:08:19 2007 From: (spam-protected) (Bernd Petrovitsch) Date: Wed, 25 Apr 2007 22:08:19 +0000 Subject: [Olsr-cvs] olsrd-current/src/cfgparser Makefile,1.23,1.24 Message-ID: Update of /cvsroot/olsrd/olsrd-current/src/cfgparser In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv2640/src/cfgparser Modified Files: Makefile Log Message: * OLSR_PRINTF() is now a real C expression * removed superflous type-casts Index: Makefile =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/cfgparser/Makefile,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** Makefile 20 Apr 2007 13:46:05 -0000 1.23 --- Makefile 25 Apr 2007 22:08:17 -0000 1.24 *************** *** 91,101 **** oscan.c: oscan.lex Makefile ! $(FLEX) -Cem -ooscan.c oscan.lex ! mv oscan.c oscan.c-tmp && \ ! sed -e '/^static/s/yy_get_next_buffer[\(][\)]/yy_get_next_buffer(void)/' \ ! -e '/^static/s/yy_get_previous_state[\(][\)]/yy_get_previous_state(void)/' \ ! -e '/^static/s/input[\(][\)]/input(void)/' \ ! -e '/^static *void *yy_fatal_error/s/^\(.*)\)\();\)$$/\1 __attribute__((noreturn)) \2/' \ ! < oscan.c-tmp >oscan.c $(RM) oscan.c-tmp --- 91,100 ---- oscan.c: oscan.lex Makefile ! $(FLEX) -Cem -ooscan.c-tmp oscan.lex ! sed -e '/^static/s/yy_get_next_buffer[\(][\)]/yy_get_next_buffer(void)/' \ ! -e '/^static/s/yy_get_previous_state[\(][\)]/yy_get_previous_state(void)/' \ ! -e '/^static/s/input[\(][\)]/input(void)/' \ ! -e '/^static *void *yy_fatal_error/s/^\(.*)\)\();\)$$/\1 __attribute__((noreturn)) \2/' \ ! < oscan.c-tmp >oscan.c $(RM) oscan.c-tmp *************** *** 112,116 **** clean: ! rm -f *.[od~] rm -f $(LIBNAME) rm -f $(BINNAME) --- 111,115 ---- clean: ! rm -f *.[od~] oscan.c oparse.[ch] rm -f $(LIBNAME) rm -f $(BINNAME) From (spam-protected) Thu Apr 26 00:08:20 2007 From: (spam-protected) (Bernd Petrovitsch) Date: Wed, 25 Apr 2007 22:08:20 +0000 Subject: [Olsr-cvs] olsrd-current/src/unix ifnet.c,1.47,1.48 Message-ID: Update of /cvsroot/olsrd/olsrd-current/src/unix In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv2640/src/unix Modified Files: ifnet.c Log Message: * OLSR_PRINTF() is now a real C expression * removed superflous type-casts Index: ifnet.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/unix/ifnet.c,v retrieving revision 1.47 retrieving revision 1.48 diff -C2 -d -r1.47 -r1.48 *** ifnet.c 20 Apr 2007 13:46:05 -0000 1.47 --- ifnet.c 25 Apr 2007 22:08:18 -0000 1.48 *************** *** 114,118 **** #ifdef DEBUG ! OLSR_PRINTF(3, "Checking for updates in the interface set\n") #endif --- 114,118 ---- #ifdef DEBUG ! OLSR_PRINTF(3, "Checking for updates in the interface set\n"); #endif *************** *** 164,168 **** #ifdef DEBUG ! OLSR_PRINTF(3, "Checking if %s is set down or changed\n", iface->name) #endif --- 164,168 ---- #ifdef DEBUG ! OLSR_PRINTF(3, "Checking if %s is set down or changed\n", iface->name); #endif *************** *** 186,190 **** if (ioctl(olsr_cnf->ioctl_s, SIOCGIFFLAGS, &ifr) < 0) { ! OLSR_PRINTF(3, "No such interface: %s\n", iface->name) goto remove_interface; } --- 186,190 ---- if (ioctl(olsr_cnf->ioctl_s, SIOCGIFFLAGS, &ifr) < 0) { ! OLSR_PRINTF(3, "No such interface: %s\n", iface->name); goto remove_interface; } *************** *** 198,202 **** if ((ifp->int_flags & IFF_UP) == 0) { ! OLSR_PRINTF(1, "\tInterface %s not up - removing it...\n", iface->name) goto remove_interface; } --- 198,202 ---- if ((ifp->int_flags & IFF_UP) == 0) { ! OLSR_PRINTF(1, "\tInterface %s not up - removing it...\n", iface->name); goto remove_interface; } *************** *** 213,217 **** (!(ifp->int_flags & IFF_BROADCAST))) { ! OLSR_PRINTF(3, "\tNo broadcast - removing\n") goto remove_interface; } --- 213,217 ---- (!(ifp->int_flags & IFF_BROADCAST))) { ! OLSR_PRINTF(3, "\tNo broadcast - removing\n"); goto remove_interface; } *************** *** 219,223 **** if (ifp->int_flags & IFF_LOOPBACK) { ! OLSR_PRINTF(3, "\tThis is a loopback interface - removing it...\n") goto remove_interface; } --- 219,223 ---- if (ifp->int_flags & IFF_LOOPBACK) { ! OLSR_PRINTF(3, "\tThis is a loopback interface - removing it...\n"); goto remove_interface; } *************** *** 266,272 **** { if(iface->cnf->ipv6_addrtype == IPV6_ADDR_SITELOCAL) ! OLSR_PRINTF(3, "\tCould not find site-local IPv6 address for %s\n", ifr.ifr_name) else ! OLSR_PRINTF(3, "\tCould not find global IPv6 address for %s\n", ifr.ifr_name) --- 266,272 ---- { if(iface->cnf->ipv6_addrtype == IPV6_ADDR_SITELOCAL) ! OLSR_PRINTF(3, "\tCould not find site-local IPv6 address for %s\n", ifr.ifr_name); else ! OLSR_PRINTF(3, "\tCould not find global IPv6 address for %s\n", ifr.ifr_name); *************** *** 275,286 **** #ifdef DEBUG ! OLSR_PRINTF(3, "\tAddress: %s\n", ip6_to_string(&tmp_saddr6.sin6_addr)) #endif if(memcmp(&tmp_saddr6.sin6_addr, &ifp->int6_addr.sin6_addr, olsr_cnf->ipsize) != 0) { ! OLSR_PRINTF(1, "New IP address for %s:\n", ifr.ifr_name) ! OLSR_PRINTF(1, "\tOld: %s\n", ip6_to_string(&ifp->int6_addr.sin6_addr)) ! OLSR_PRINTF(1, "\tNew: %s\n", ip6_to_string(&tmp_saddr6.sin6_addr)) /* Check main addr */ --- 275,286 ---- #ifdef DEBUG ! OLSR_PRINTF(3, "\tAddress: %s\n", ip6_to_string(&tmp_saddr6.sin6_addr)); #endif if(memcmp(&tmp_saddr6.sin6_addr, &ifp->int6_addr.sin6_addr, olsr_cnf->ipsize) != 0) { ! OLSR_PRINTF(1, "New IP address for %s:\n", ifr.ifr_name); ! OLSR_PRINTF(1, "\tOld: %s\n", ip6_to_string(&ifp->int6_addr.sin6_addr)); ! OLSR_PRINTF(1, "\tNew: %s\n", ip6_to_string(&tmp_saddr6.sin6_addr)); /* Check main addr */ *************** *** 308,317 **** if(ioctl(olsr_cnf->ioctl_s, SIOCGIFADDR, &ifr) < 0) { ! OLSR_PRINTF(1, "\tCould not get address of interface - removing it\n") goto remove_interface; } #ifdef DEBUG ! OLSR_PRINTF(3, "\tAddress:%s\n", sockaddr_to_string(&ifr.ifr_addr)) #endif --- 308,317 ---- if(ioctl(olsr_cnf->ioctl_s, SIOCGIFADDR, &ifr) < 0) { ! OLSR_PRINTF(1, "\tCould not get address of interface - removing it\n"); goto remove_interface; } #ifdef DEBUG ! OLSR_PRINTF(3, "\tAddress:%s\n", sockaddr_to_string(&ifr.ifr_addr)); #endif *************** *** 321,327 **** { /* New address */ ! OLSR_PRINTF(1, "IPv4 address changed for %s\n", ifr.ifr_name) ! OLSR_PRINTF(1, "\tOld:%s\n", sockaddr_to_string(&ifp->int_addr)) ! OLSR_PRINTF(1, "\tNew:%s\n", sockaddr_to_string(&ifr.ifr_addr)) ifp->int_addr = ifr.ifr_addr; --- 321,327 ---- { /* New address */ ! OLSR_PRINTF(1, "IPv4 address changed for %s\n", ifr.ifr_name); ! OLSR_PRINTF(1, "\tOld:%s\n", sockaddr_to_string(&ifp->int_addr)); ! OLSR_PRINTF(1, "\tNew:%s\n", sockaddr_to_string(&ifr.ifr_addr)); ifp->int_addr = ifr.ifr_addr; *************** *** 331,335 **** olsr_cnf->ipsize) == 0) { ! OLSR_PRINTF(1, "New main address: %s\n", sockaddr_to_string(&ifr.ifr_addr)) olsr_syslog(OLSR_LOG_INFO, "New main address: %s\n", sockaddr_to_string(&ifr.ifr_addr)); memcpy(&olsr_cnf->main_addr, --- 331,335 ---- olsr_cnf->ipsize) == 0) { ! OLSR_PRINTF(1, "New main address: %s\n", sockaddr_to_string(&ifr.ifr_addr)); olsr_syslog(OLSR_LOG_INFO, "New main address: %s\n", sockaddr_to_string(&ifr.ifr_addr)); memcpy(&olsr_cnf->main_addr, *************** *** 353,357 **** #ifdef DEBUG ! OLSR_PRINTF(3, "\tNetmask:%s\n", sockaddr_to_string(&ifr.ifr_netmask)) #endif --- 353,357 ---- #ifdef DEBUG ! OLSR_PRINTF(3, "\tNetmask:%s\n", sockaddr_to_string(&ifr.ifr_netmask)); #endif *************** *** 361,367 **** { /* New address */ ! OLSR_PRINTF(1, "IPv4 netmask changed for %s\n", ifr.ifr_name) ! OLSR_PRINTF(1, "\tOld:%s\n", sockaddr_to_string(&ifp->int_netmask)) ! OLSR_PRINTF(1, "\tNew:%s\n", sockaddr_to_string(&ifr.ifr_netmask)) ifp->int_netmask = ifr.ifr_netmask; --- 361,367 ---- { /* New address */ ! OLSR_PRINTF(1, "IPv4 netmask changed for %s\n", ifr.ifr_name); ! OLSR_PRINTF(1, "\tOld:%s\n", sockaddr_to_string(&ifp->int_netmask)); ! OLSR_PRINTF(1, "\tNew:%s\n", sockaddr_to_string(&ifr.ifr_netmask)); ifp->int_netmask = ifr.ifr_netmask; *************** *** 380,384 **** #ifdef DEBUG ! OLSR_PRINTF(3, "\tBroadcast address:%s\n", sockaddr_to_string(&ifr.ifr_broadaddr)) #endif --- 380,384 ---- #ifdef DEBUG ! OLSR_PRINTF(3, "\tBroadcast address:%s\n", sockaddr_to_string(&ifr.ifr_broadaddr)); #endif *************** *** 389,395 **** /* New address */ ! OLSR_PRINTF(1, "IPv4 broadcast changed for %s\n", ifr.ifr_name) ! OLSR_PRINTF(1, "\tOld:%s\n", sockaddr_to_string(&ifp->int_broadaddr)) ! OLSR_PRINTF(1, "\tNew:%s\n", sockaddr_to_string(&ifr.ifr_broadaddr)) ifp->int_broadaddr = ifr.ifr_broadaddr; --- 389,395 ---- /* New address */ ! OLSR_PRINTF(1, "IPv4 broadcast changed for %s\n", ifr.ifr_name); ! OLSR_PRINTF(1, "\tOld:%s\n", sockaddr_to_string(&ifp->int_broadaddr)); ! OLSR_PRINTF(1, "\tNew:%s\n", sockaddr_to_string(&ifr.ifr_broadaddr)); ifp->int_broadaddr = ifr.ifr_broadaddr; *************** *** 406,410 **** remove_interface: ! OLSR_PRINTF(1, "Removing interface %s\n", iface->name) olsr_syslog(OLSR_LOG_INFO, "Removing interface %s\n", iface->name); --- 406,410 ---- remove_interface: ! OLSR_PRINTF(1, "Removing interface %s\n", iface->name); olsr_syslog(OLSR_LOG_INFO, "Removing interface %s\n", iface->name); *************** *** 442,451 **** /* No more interfaces */ memset(&olsr_cnf->main_addr, 0, olsr_cnf->ipsize); ! OLSR_PRINTF(1, "No more interfaces...\n") } else { COPY_IP(&olsr_cnf->main_addr, &ifnet->ip_addr); ! OLSR_PRINTF(1, "New main address: %s\n", olsr_ip_to_string(&olsr_cnf->main_addr)) olsr_syslog(OLSR_LOG_INFO, "New main address: %s\n", olsr_ip_to_string(&olsr_cnf->main_addr)); } --- 442,451 ---- /* No more interfaces */ memset(&olsr_cnf->main_addr, 0, olsr_cnf->ipsize); ! OLSR_PRINTF(1, "No more interfaces...\n"); } else { COPY_IP(&olsr_cnf->main_addr, &ifnet->ip_addr); ! OLSR_PRINTF(1, "New main address: %s\n", olsr_ip_to_string(&olsr_cnf->main_addr)); olsr_syslog(OLSR_LOG_INFO, "New main address: %s\n", olsr_ip_to_string(&olsr_cnf->main_addr)); } *************** *** 510,514 **** if((ifnet == NULL) && (!olsr_cnf->allow_no_interfaces)) { ! OLSR_PRINTF(1, "No more active interfaces - exiting.\n") olsr_syslog(OLSR_LOG_INFO, "No more active interfaces - exiting.\n"); olsr_cnf->exit_value = EXIT_FAILURE; --- 510,514 ---- if((ifnet == NULL) && (!olsr_cnf->allow_no_interfaces)) { ! OLSR_PRINTF(1, "No more active interfaces - exiting.\n"); olsr_syslog(OLSR_LOG_INFO, "No more active interfaces - exiting.\n"); olsr_cnf->exit_value = EXIT_FAILURE; *************** *** 547,551 **** strcpy(ifp->int_name, "hcif01"); ! OLSR_PRINTF(1, "Adding %s(host emulation):\n", ifp->int_name) OLSR_PRINTF(1, " Address:%s\n", olsr_ip_to_string(&iface->hemu_ip)); --- 547,551 ---- strcpy(ifp->int_name, "hcif01"); ! OLSR_PRINTF(1, "Adding %s(host emulation):\n", ifp->int_name); OLSR_PRINTF(1, " Address:%s\n", olsr_ip_to_string(&iface->hemu_ip)); *************** *** 562,566 **** { COPY_IP(&olsr_cnf->main_addr, &iface->hemu_ip); ! OLSR_PRINTF(1, "New main address: %s\n", olsr_ip_to_string(&olsr_cnf->main_addr)) olsr_syslog(OLSR_LOG_INFO, "New main address: %s\n", olsr_ip_to_string(&olsr_cnf->main_addr)); } --- 562,566 ---- { COPY_IP(&olsr_cnf->main_addr, &iface->hemu_ip); ! OLSR_PRINTF(1, "New main address: %s\n", olsr_ip_to_string(&olsr_cnf->main_addr)); olsr_syslog(OLSR_LOG_INFO, "New main address: %s\n", olsr_ip_to_string(&olsr_cnf->main_addr)); } *************** *** 746,755 **** strncpy(ifr.ifr_name, iface->name, IFNAMSIZ); ! OLSR_PRINTF(debuglvl, "Checking %s:\n", ifr.ifr_name) /* Get flags (and check if interface exists) */ if (ioctl(olsr_cnf->ioctl_s, SIOCGIFFLAGS, &ifr) < 0) { ! OLSR_PRINTF(debuglvl, "\tNo such interface!\n") return 0; } --- 746,755 ---- strncpy(ifr.ifr_name, iface->name, IFNAMSIZ); ! OLSR_PRINTF(debuglvl, "Checking %s:\n", ifr.ifr_name); /* Get flags (and check if interface exists) */ if (ioctl(olsr_cnf->ioctl_s, SIOCGIFFLAGS, &ifr) < 0) { ! OLSR_PRINTF(debuglvl, "\tNo such interface!\n"); return 0; } *************** *** 761,765 **** if ((ifs.int_flags & IFF_UP) == 0) { ! OLSR_PRINTF(debuglvl, "\tInterface not up - skipping it...\n") return 0; } --- 761,765 ---- if ((ifs.int_flags & IFF_UP) == 0) { ! OLSR_PRINTF(debuglvl, "\tInterface not up - skipping it...\n"); return 0; } *************** *** 770,774 **** (!(ifs.int_flags & IFF_BROADCAST))) { ! OLSR_PRINTF(debuglvl, "\tNo broadcast - skipping\n") return 0; } --- 770,774 ---- (!(ifs.int_flags & IFF_BROADCAST))) { ! OLSR_PRINTF(debuglvl, "\tNo broadcast - skipping\n"); return 0; } *************** *** 777,781 **** if (ifs.int_flags & IFF_LOOPBACK) { ! OLSR_PRINTF(debuglvl, "\tThis is a loopback interface - skipping it...\n") return 0; } --- 777,781 ---- if (ifs.int_flags & IFF_LOOPBACK) { ! OLSR_PRINTF(debuglvl, "\tThis is a loopback interface - skipping it...\n"); return 0; } *************** *** 787,793 **** if(ifs.is_wireless) ! OLSR_PRINTF(debuglvl, "\tWireless interface detected\n") else ! OLSR_PRINTF(debuglvl, "\tNot a wireless interface\n") --- 787,793 ---- if(ifs.is_wireless) ! OLSR_PRINTF(debuglvl, "\tWireless interface detected\n"); else ! OLSR_PRINTF(debuglvl, "\tNot a wireless interface\n"); *************** *** 800,811 **** { if(iface->cnf->ipv6_addrtype == IPV6_ADDR_SITELOCAL) ! OLSR_PRINTF(debuglvl, "\tCould not find site-local IPv6 address for %s\n", ifr.ifr_name) else ! OLSR_PRINTF(debuglvl, "\tCould not find global IPv6 address for %s\n", ifr.ifr_name) return 0; } ! OLSR_PRINTF(debuglvl, "\tAddress: %s\n", ip6_to_string(&ifs.int6_addr.sin6_addr)) /* Multicast */ --- 800,811 ---- { if(iface->cnf->ipv6_addrtype == IPV6_ADDR_SITELOCAL) ! OLSR_PRINTF(debuglvl, "\tCould not find site-local IPv6 address for %s\n", ifr.ifr_name); else ! OLSR_PRINTF(debuglvl, "\tCould not find global IPv6 address for %s\n", ifr.ifr_name); return 0; } ! OLSR_PRINTF(debuglvl, "\tAddress: %s\n", ip6_to_string(&ifs.int6_addr.sin6_addr)); /* Multicast */ *************** *** 822,826 **** #endif ! OLSR_PRINTF(debuglvl, "\tMulticast: %s\n", ip6_to_string(&ifs.int6_multaddr.sin6_addr)) } --- 822,826 ---- #endif ! OLSR_PRINTF(debuglvl, "\tMulticast: %s\n", ip6_to_string(&ifs.int6_multaddr.sin6_addr)); } *************** *** 831,835 **** if(ioctl(olsr_cnf->ioctl_s, SIOCGIFADDR, &ifr) < 0) { ! OLSR_PRINTF(debuglvl, "\tCould not get address of interface - skipping it\n") return 0; } --- 831,835 ---- if(ioctl(olsr_cnf->ioctl_s, SIOCGIFADDR, &ifr) < 0) { ! OLSR_PRINTF(debuglvl, "\tCould not get address of interface - skipping it\n"); return 0; } *************** *** 886,890 **** else ifs.int_metric = calculate_if_metric(ifr.ifr_name); ! OLSR_PRINTF(1, "\tMetric: %d\n", ifs.int_metric) /* setting the interfaces number*/ --- 886,890 ---- else ifs.int_metric = calculate_if_metric(ifr.ifr_name); ! OLSR_PRINTF(1, "\tMetric: %d\n", ifs.int_metric); /* setting the interfaces number*/ *************** *** 905,923 **** net_add_buffer(&ifs); ! OLSR_PRINTF(1, "\tMTU - IPhdr: %d\n", ifs.int_mtu) olsr_syslog(OLSR_LOG_INFO, "Adding interface %s\n", iface->name); ! OLSR_PRINTF(1, "\tIndex %d\n", ifs.if_nr) if(olsr_cnf->ip_version == AF_INET) { ! OLSR_PRINTF(1, "\tAddress:%s\n", sockaddr_to_string(&ifs.int_addr)) ! OLSR_PRINTF(1, "\tNetmask:%s\n", sockaddr_to_string(&ifs.int_netmask)) ! OLSR_PRINTF(1, "\tBroadcast address:%s\n", sockaddr_to_string(&ifs.int_broadaddr)) } else { ! OLSR_PRINTF(1, "\tAddress: %s\n", ip6_to_string(&ifs.int6_addr.sin6_addr)) ! OLSR_PRINTF(1, "\tMulticast: %s\n", ip6_to_string(&ifs.int6_multaddr.sin6_addr)) } --- 905,923 ---- net_add_buffer(&ifs); ! OLSR_PRINTF(1, "\tMTU - IPhdr: %d\n", ifs.int_mtu); olsr_syslog(OLSR_LOG_INFO, "Adding interface %s\n", iface->name); ! OLSR_PRINTF(1, "\tIndex %d\n", ifs.if_nr); if(olsr_cnf->ip_version == AF_INET) { ! OLSR_PRINTF(1, "\tAddress:%s\n", sockaddr_to_string(&ifs.int_addr)); ! OLSR_PRINTF(1, "\tNetmask:%s\n", sockaddr_to_string(&ifs.int_netmask)); ! OLSR_PRINTF(1, "\tBroadcast address:%s\n", sockaddr_to_string(&ifs.int_broadaddr)); } else { ! OLSR_PRINTF(1, "\tAddress: %s\n", ip6_to_string(&ifs.int6_addr.sin6_addr)); ! OLSR_PRINTF(1, "\tMulticast: %s\n", ip6_to_string(&ifs.int6_multaddr.sin6_addr)); } *************** *** 1016,1020 **** { COPY_IP(&olsr_cnf->main_addr, &ifp->ip_addr); ! OLSR_PRINTF(1, "New main address: %s\n", olsr_ip_to_string(&olsr_cnf->main_addr)) olsr_syslog(OLSR_LOG_INFO, "New main address: %s\n", olsr_ip_to_string(&olsr_cnf->main_addr)); } --- 1016,1020 ---- { COPY_IP(&olsr_cnf->main_addr, &ifp->ip_addr); ! OLSR_PRINTF(1, "New main address: %s\n", olsr_ip_to_string(&olsr_cnf->main_addr)); olsr_syslog(OLSR_LOG_INFO, "New main address: %s\n", olsr_ip_to_string(&olsr_cnf->main_addr)); } From (spam-protected) Thu Apr 26 00:08:20 2007 From: (spam-protected) (Bernd Petrovitsch) Date: Wed, 25 Apr 2007 22:08:20 +0000 Subject: [Olsr-cvs] olsrd-current/src/linux apm.c, 1.17, 1.18 kernel_routes.c, 1.21, 1.22 link_layer.c, 1.12, 1.13 net.c, 1.33, 1.34 Message-ID: Update of /cvsroot/olsrd/olsrd-current/src/linux In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv2640/src/linux Modified Files: apm.c kernel_routes.c link_layer.c net.c Log Message: * OLSR_PRINTF() is now a real C expression * removed superflous type-casts Index: apm.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/linux/apm.c,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** apm.c 20 Apr 2007 13:46:05 -0000 1.17 --- apm.c 25 Apr 2007 22:08:17 -0000 1.18 *************** *** 129,133 **** method = -1; ! OLSR_PRINTF(3, "Initializing APM\n") if(((fd_index = acpi_probe()) >= 0) && apm_read_acpi(&ainfo)) --- 129,133 ---- method = -1; ! OLSR_PRINTF(3, "Initializing APM\n"); if(((fd_index = acpi_probe()) >= 0) && apm_read_acpi(&ainfo)) *************** *** 149,153 **** ainfo->ac_line_status, ainfo->battery_percentage, ! ainfo->battery_time_left) } --- 149,153 ---- ainfo->ac_line_status, ainfo->battery_percentage, ! ainfo->battery_time_left); } Index: net.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/linux/net.c,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** net.c 20 Apr 2007 13:46:05 -0000 1.33 --- net.c 25 Apr 2007 22:08:18 -0000 1.34 *************** *** 77,81 **** *Bind to device using the SO_BINDTODEVICE flag */ ! OLSR_PRINTF(3, "Binding socket %d to device %s\n", sock, dev_name) return setsockopt(sock, SOL_SOCKET, SO_BINDTODEVICE, dev_name, strlen(dev_name)+1); } --- 77,81 ---- *Bind to device using the SO_BINDTODEVICE flag */ ! OLSR_PRINTF(3, "Binding socket %d to device %s\n", sock, dev_name); return setsockopt(sock, SOL_SOCKET, SO_BINDTODEVICE, dev_name, strlen(dev_name)+1); } *************** *** 119,123 **** if(orig_fwd_state == '1') { ! OLSR_PRINTF(3, "\nIP forwarding is enabled on this system\n") } else --- 119,123 ---- if(orig_fwd_state == '1') { ! OLSR_PRINTF(3, "\nIP forwarding is enabled on this system\n"); } else *************** *** 261,265 **** struct interface *ifs; ! OLSR_PRINTF(1, "Restoring network state\n") /* Restore IP forwarding to "off" */ --- 261,265 ---- struct interface *ifs; ! OLSR_PRINTF(1, "Restoring network state\n"); /* Restore IP forwarding to "off" */ *************** *** 566,570 **** #if !defined __FreeBSD__ && !defined __MacOSX__ && !defined __NetBSD__ ! OLSR_PRINTF(3, "Interface %s joining multicast %s...", ifs->int_name, olsr_ip_to_string((union olsr_ip_addr *)&ifs->int6_multaddr.sin6_addr)) /* Send multicast */ if(setsockopt(sock, --- 566,570 ---- #if !defined __FreeBSD__ && !defined __MacOSX__ && !defined __NetBSD__ ! OLSR_PRINTF(3, "Interface %s joining multicast %s...", ifs->int_name, olsr_ip_to_string((union olsr_ip_addr *)&ifs->int6_multaddr.sin6_addr)); /* Send multicast */ if(setsockopt(sock, *************** *** 617,621 **** ! OLSR_PRINTF(3, "OK\n") return 0; } --- 617,621 ---- ! OLSR_PRINTF(3, "OK\n"); return 0; } *************** *** 646,656 **** addr6p[0], addr6p[1], addr6p[2], addr6p[3], addr6p[4], addr6p[5], addr6p[6], addr6p[7]); ! OLSR_PRINTF(5, "\tinet6 addr: %s\n", addr6) ! OLSR_PRINTF(5, "\tScope: %d\n", scope) if(scope == scope_in) { OLSR_PRINTF(4, "Found addr: %s:%s:%s:%s:%s:%s:%s:%s\n", addr6p[0], addr6p[1], addr6p[2], addr6p[3], ! addr6p[4], addr6p[5], addr6p[6], addr6p[7]) inet_pton(AF_INET6,addr6,&tmp_sockaddr6); memcpy(&saddr6->sin6_addr, &tmp_sockaddr6, sizeof(struct in6_addr)); --- 646,656 ---- addr6p[0], addr6p[1], addr6p[2], addr6p[3], addr6p[4], addr6p[5], addr6p[6], addr6p[7]); ! OLSR_PRINTF(5, "\tinet6 addr: %s\n", addr6); ! OLSR_PRINTF(5, "\tScope: %d\n", scope); if(scope == scope_in) { OLSR_PRINTF(4, "Found addr: %s:%s:%s:%s:%s:%s:%s:%s\n", addr6p[0], addr6p[1], addr6p[2], addr6p[3], ! addr6p[4], addr6p[5], addr6p[6], addr6p[7]); inet_pton(AF_INET6,addr6,&tmp_sockaddr6); memcpy(&saddr6->sin6_addr, &tmp_sockaddr6, sizeof(struct in6_addr)); *************** *** 781,789 **** if(ioctl(olsr_cnf->ioctl_s, SIOCGIWRATE, &ifr) < 0) { ! OLSR_PRINTF(1, "Not able to find rate for WLAN interface %s\n", ifname) return WEIGHT_WLAN_11MB; } ! OLSR_PRINTF(1, "Bitrate %d\n", ifr.ifr_ifru.ifru_ivalue) //WEIGHT_WLAN_LOW, /* <11Mb WLAN */ --- 781,789 ---- if(ioctl(olsr_cnf->ioctl_s, SIOCGIWRATE, &ifr) < 0) { ! OLSR_PRINTF(1, "Not able to find rate for WLAN interface %s\n", ifname); return WEIGHT_WLAN_11MB; } ! OLSR_PRINTF(1, "Bitrate %d\n", ifr.ifr_ifru.ifru_ivalue); //WEIGHT_WLAN_LOW, /* <11Mb WLAN */ *************** *** 805,809 **** if (errno != ENODEV) OLSR_PRINTF(1, "SIOCGMIIPHY on '%s' failed: %s\n", ! ifr.ifr_name, strerror(errno)) return WEIGHT_ETHERNET_DEFAULT; } --- 805,809 ---- if (errno != ENODEV) OLSR_PRINTF(1, "SIOCGMIIPHY on '%s' failed: %s\n", ! ifr.ifr_name, strerror(errno)); return WEIGHT_ETHERNET_DEFAULT; } *************** *** 812,816 **** if (ioctl(olsr_cnf->ioctl_s, SIOCGMIIREG, &ifr) < 0) { OLSR_PRINTF(1, "SIOCGMIIREG on %s failed: %s\n", ifr.ifr_name, ! strerror(errno)) return WEIGHT_ETHERNET_DEFAULT; } --- 812,816 ---- if (ioctl(olsr_cnf->ioctl_s, SIOCGMIIREG, &ifr) < 0) { OLSR_PRINTF(1, "SIOCGMIIREG on %s failed: %s\n", ifr.ifr_name, ! strerror(errno)); return WEIGHT_ETHERNET_DEFAULT; } *************** *** 818,825 **** ! OLSR_PRINTF(1, "%s: ", ifr.ifr_name) OLSR_PRINTF(1, "%s Mbit, %s duplex\n", (bmcr & MII_BMCR_100MBIT) ? "100" : "10", ! (bmcr & MII_BMCR_DUPLEX) ? "full" : "half") is_if_link_up(ifname); --- 818,825 ---- ! OLSR_PRINTF(1, "%s: ", ifr.ifr_name); OLSR_PRINTF(1, "%s Mbit, %s duplex\n", (bmcr & MII_BMCR_100MBIT) ? "100" : "10", ! (bmcr & MII_BMCR_DUPLEX) ? "full" : "half"); is_if_link_up(ifname); *************** *** 855,859 **** if (errno != ENODEV) OLSR_PRINTF(1, "SIOCGMIIPHY on '%s' failed: %s\n", ! ifr.ifr_name, strerror(errno)) return WEIGHT_ETHERNET_DEFAULT; } --- 855,859 ---- if (errno != ENODEV) OLSR_PRINTF(1, "SIOCGMIIPHY on '%s' failed: %s\n", ! ifr.ifr_name, strerror(errno)); return WEIGHT_ETHERNET_DEFAULT; } *************** *** 861,871 **** if (ioctl(olsr_cnf->ioctl_s, SIOCGMIIREG, &ifr) < 0) { OLSR_PRINTF(1, "SIOCGMIIREG on %s failed: %s\n", ifr.ifr_name, ! strerror(errno)) return WEIGHT_ETHERNET_DEFAULT; } bmsr = mii->val_out; ! OLSR_PRINTF(1, "%s: ", ifr.ifr_name) ! OLSR_PRINTF(1, "%s\n", (bmsr & MII_BMSR_LINK_VALID) ? "link ok " : "no link ") return (bmsr & MII_BMSR_LINK_VALID); --- 861,871 ---- if (ioctl(olsr_cnf->ioctl_s, SIOCGMIIREG, &ifr) < 0) { OLSR_PRINTF(1, "SIOCGMIIREG on %s failed: %s\n", ifr.ifr_name, ! strerror(errno)); return WEIGHT_ETHERNET_DEFAULT; } bmsr = mii->val_out; ! OLSR_PRINTF(1, "%s: ", ifr.ifr_name); ! OLSR_PRINTF(1, "%s\n", (bmsr & MII_BMSR_LINK_VALID) ? "link ok " : "no link "); return (bmsr & MII_BMSR_LINK_VALID); Index: kernel_routes.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/linux/kernel_routes.c,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** kernel_routes.c 20 Apr 2007 13:46:05 -0000 1.21 --- kernel_routes.c 25 Apr 2007 22:08:17 -0000 1.22 *************** *** 74,78 **** OLSR_PRINTF(1, "(ioctl)Adding route with metric %d to %s/%s via %s/%s.\n", destination->rt_metric, dst_str, mask_str, router_str, ! destination->rt_if->int_name) memset(&kernel_route, 0, sizeof(struct rtentry)); --- 74,78 ---- OLSR_PRINTF(1, "(ioctl)Adding route with metric %d to %s/%s via %s/%s.\n", destination->rt_metric, dst_str, mask_str, router_str, ! destination->rt_if->int_name); memset(&kernel_route, 0, sizeof(struct rtentry)); *************** *** 171,175 **** OLSR_PRINTF(2, "(ioctl)Adding route: %s(hopc %d)\n", olsr_ip_to_string(&destination->rt_dst), ! destination->rt_metric + 1) --- 171,175 ---- OLSR_PRINTF(2, "(ioctl)Adding route: %s(hopc %d)\n", olsr_ip_to_string(&destination->rt_dst), ! destination->rt_metric + 1); *************** *** 202,207 **** ! //OLSR_PRINTF(3, "Adding route to %s using gw ", olsr_ip_to_string((union olsr_ip_addr *)&kernel_route.rtmsg_dst)) ! //OLSR_PRINTF(3, "%s\n", olsr_ip_to_string((union olsr_ip_addr *)&kernel_route.rtmsg_gateway)) if((tmp = ioctl(olsr_cnf->ioctl_s, SIOCADDRT, &kernel_route)) >= 0) --- 202,207 ---- ! //OLSR_PRINTF(3, "Adding route to %s using gw ", olsr_ip_to_string((union olsr_ip_addr *)&kernel_route.rtmsg_dst)); ! //OLSR_PRINTF(3, "%s\n", olsr_ip_to_string((union olsr_ip_addr *)&kernel_route.rtmsg_gateway)); if((tmp = ioctl(olsr_cnf->ioctl_s, SIOCADDRT, &kernel_route)) >= 0) *************** *** 242,246 **** OLSR_PRINTF(1, "(ioctl)Deleting route with metric %d to %s/%s via %s.\n", ! destination->rt_metric, dst_str, mask_str, router_str) memset(&kernel_route,0,sizeof(struct rtentry)); --- 242,246 ---- OLSR_PRINTF(1, "(ioctl)Deleting route with metric %d to %s/%s via %s.\n", ! destination->rt_metric, dst_str, mask_str, router_str); memset(&kernel_route,0,sizeof(struct rtentry)); *************** *** 310,317 **** OLSR_PRINTF(2, "(ioctl)Deleting route: %s(hopc %d)\n", olsr_ip_to_string(&destination->rt_dst), ! destination->rt_metric) ! OLSR_PRINTF(1, "Deleting route: %s\n", olsr_ip_to_string(&tmp_addr)) memset(&kernel_route,0,sizeof(struct in6_rtmsg)); --- 310,317 ---- OLSR_PRINTF(2, "(ioctl)Deleting route: %s(hopc %d)\n", olsr_ip_to_string(&destination->rt_dst), ! destination->rt_metric); ! OLSR_PRINTF(1, "Deleting route: %s\n", olsr_ip_to_string(&tmp_addr)); memset(&kernel_route,0,sizeof(struct in6_rtmsg)); *************** *** 354,358 **** struct ifreq *ifr; ! OLSR_PRINTF(1, "Internet gateway detected...\nTrying to delete default gateways\n") /* Get a socket */ --- 354,358 ---- struct ifreq *ifr; ! OLSR_PRINTF(1, "Internet gateway detected...\nTrying to delete default gateways\n"); /* Get a socket */ *************** *** 383,391 **** if(strcmp(ifr->ifr_ifrn.ifrn_name, "lo") == 0) { ! OLSR_PRINTF(1, "Skipping loopback...\n") continue; } ! OLSR_PRINTF(1, "Trying 0.0.0.0/0 %s...", ifr->ifr_ifrn.ifrn_name) --- 383,391 ---- if(strcmp(ifr->ifr_ifrn.ifrn_name, "lo") == 0) { ! OLSR_PRINTF(1, "Skipping loopback...\n"); continue; } ! OLSR_PRINTF(1, "Trying 0.0.0.0/0 %s...", ifr->ifr_ifrn.ifrn_name); *************** *** 419,425 **** if((ioctl(s, SIOCDELRT, &kernel_route)) < 0) ! OLSR_PRINTF(1, "NO\n") else ! OLSR_PRINTF(1, "YES\n") --- 419,425 ---- if((ioctl(s, SIOCDELRT, &kernel_route)) < 0) ! OLSR_PRINTF(1, "NO\n"); else ! OLSR_PRINTF(1, "YES\n"); Index: link_layer.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/linux/link_layer.c,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** link_layer.c 10 Feb 2007 17:11:49 -0000 1.12 --- link_layer.c 25 Apr 2007 22:08:17 -0000 1.13 *************** *** 101,105 **** struct interface *ifd; ! OLSR_PRINTF(1, "Initializing link-layer notification...\n") --- 101,105 ---- struct interface *ifd; ! OLSR_PRINTF(1, "Initializing link-layer notification...\n"); *************** *** 130,134 **** if(ioctl(olsr_cnf->ioctl_s, SIOCSIWSPY, &wrq) < 0) { ! OLSR_PRINTF(1, "Could not clear spylist %s\n", strerror(errno)) return -1; } --- 130,134 ---- if(ioctl(olsr_cnf->ioctl_s, SIOCSIWSPY, &wrq) < 0) { ! OLSR_PRINTF(1, "Could not clear spylist %s\n", strerror(errno)); return -1; } *************** *** 149,153 **** sizeof(struct sockaddr)) * IW_MAX_SPY]; ! OLSR_PRINTF(1, "Adding spynode!\n\n") /* get all addresses already in the driver */ --- 149,153 ---- sizeof(struct sockaddr)) * IW_MAX_SPY]; ! OLSR_PRINTF(1, "Adding spynode!\n\n"); /* get all addresses already in the driver */ *************** *** 161,165 **** if(ioctl(olsr_cnf->ioctl_s, SIOCGIWSPY, &wrq) < 0) { ! OLSR_PRINTF(1, "Could not get old spylist %s\n", strerror(errno)) return 0; } --- 161,165 ---- if(ioctl(olsr_cnf->ioctl_s, SIOCGIWSPY, &wrq) < 0) { ! OLSR_PRINTF(1, "Could not get old spylist %s\n", strerror(errno)); return 0; } *************** *** 169,173 **** memcpy(hw_address, buffer, nbr * sizeof(struct sockaddr)); ! OLSR_PRINTF(1, "Old addresses: %d\n\n", nbr) /* Check upper limit */ --- 169,173 ---- memcpy(hw_address, buffer, nbr * sizeof(struct sockaddr)); ! OLSR_PRINTF(1, "Old addresses: %d\n\n", nbr); /* Check upper limit */ *************** *** 194,198 **** if(ioctl(olsr_cnf->ioctl_s, SIOCSIWSPY, &wrq) < 0) { ! OLSR_PRINTF(1, "Could not clear spylist %s\n", strerror(errno)) return 0; } --- 194,198 ---- if(ioctl(olsr_cnf->ioctl_s, SIOCSIWSPY, &wrq) < 0) { ! OLSR_PRINTF(1, "Could not clear spylist %s\n", strerror(errno)); return 0; } *************** *** 214,218 **** OLSR_PRINTF(1, "\nARP conversion for %s interface %s\n", olsr_ip_to_string(ip), ! interface) tmp_sockaddr.sin_family = AF_INET; --- 214,218 ---- OLSR_PRINTF(1, "\nARP conversion for %s interface %s\n", olsr_ip_to_string(ip), ! interface); tmp_sockaddr.sin_family = AF_INET; *************** *** 231,235 **** !(arp_query.arp_flags & ATF_COM)) /* ATF_COM - hw addr valid */ { ! OLSR_PRINTF(1, "Arp failed: (%s) - trying lookup\n", strerror(errno)) /* No address - create a thread that sends a PING */ --- 231,235 ---- !(arp_query.arp_flags & ATF_COM)) /* ATF_COM - hw addr valid */ { ! OLSR_PRINTF(1, "Arp failed: (%s) - trying lookup\n", strerror(errno)); /* No address - create a thread that sends a PING */ *************** *** 239,243 **** } ! OLSR_PRINTF(1, "Arp success!\n") memcpy(mac, &arp_query.arp_ha, sizeof(struct sockaddr)); --- 239,243 ---- } ! OLSR_PRINTF(1, "Arp success!\n"); memcpy(mac, &arp_query.arp_ha, sizeof(struct sockaddr)); *************** *** 271,279 **** memcpy(&dst_in->sin_addr, ip, olsr_cnf->ipsize); ! OLSR_PRINTF(1, "pinging %s\n\n", olsr_ip_to_string(ip)) if ((ping_s = socket(AF_INET, SOCK_RAW, PF_INET)) < 0) { ! OLSR_PRINTF(1, "Could not create RAW socket for ping!\n%s\n", strerror(errno)) return; } --- 271,279 ---- memcpy(&dst_in->sin_addr, ip, olsr_cnf->ipsize); ! OLSR_PRINTF(1, "pinging %s\n\n", olsr_ip_to_string(ip)); if ((ping_s = socket(AF_INET, SOCK_RAW, PF_INET)) < 0) { ! OLSR_PRINTF(1, "Could not create RAW socket for ping!\n%s\n", strerror(errno)); return; } *************** *** 293,302 **** MAXIPLEN + MAXICMPLEN + 8) { ! OLSR_PRINTF(1, "Error PING: %s\n", strerror(errno)) } /* Nevermind the pong ;-) */ ! OLSR_PRINTF(1, "Ping complete...\n") close(ping_s); --- 293,302 ---- MAXIPLEN + MAXICMPLEN + 8) { ! OLSR_PRINTF(1, "Error PING: %s\n", strerror(errno)); } /* Nevermind the pong ;-) */ ! OLSR_PRINTF(1, "Ping complete...\n"); close(ping_s); *************** *** 320,324 **** struct interface *iflist; ! //OLSR_PRINTF(1, "Polling link-layer notification...\n") for(iflist = ifnet; iflist != NULL; iflist = iflist->int_next) --- 320,324 ---- struct interface *iflist; ! //OLSR_PRINTF(1, "Polling link-layer notification...\n"); for(iflist = ifnet; iflist != NULL; iflist = iflist->int_next) *************** *** 338,342 **** if(ioctl(olsr_cnf->ioctl_s, SIOCGIWSPY, &wrq) < 0) { ! OLSR_PRINTF(1, "%-8.16s Interface doesn't support wireless statistic collection\n\n", iflist->int_name) return; } --- 338,342 ---- if(ioctl(olsr_cnf->ioctl_s, SIOCGIWSPY, &wrq) < 0) { ! OLSR_PRINTF(1, "%-8.16s Interface doesn't support wireless statistic collection\n\n", iflist->int_name); return; } *************** *** 359,366 **** /* Print stats for each address */ ! OLSR_PRINTF(1, "MAC") for(j = 0; j < 6; j++) { ! OLSR_PRINTF(1, ":%02x", (hwa[i].sa_data[j] % 0xffffff00)) } if(!has_range) --- 359,366 ---- /* Print stats for each address */ ! OLSR_PRINTF(1, "MAC"); for(j = 0; j < 6; j++) { ! OLSR_PRINTF(1, ":%02x", (hwa[i].sa_data[j] % 0xffffff00)); } if(!has_range) *************** *** 368,372 **** qual[i].qual, qual[i].level - 0x100, ! qual[i].noise - 0x100) else OLSR_PRINTF(1, " : Quality:%d/%d Signal level:%d dBm Noise level:%d dBm", --- 368,372 ---- qual[i].qual, qual[i].level - 0x100, ! qual[i].noise - 0x100); else OLSR_PRINTF(1, " : Quality:%d/%d Signal level:%d dBm Noise level:%d dBm", *************** *** 374,385 **** range.max_qual.qual, qual[i].level - 0x100, ! qual[i].noise - 0x100) ! OLSR_PRINTF(1, "\n") } } ! //OLSR_PRINTF(1, "\n") return; } --- 374,385 ---- range.max_qual.qual, qual[i].level - 0x100, ! qual[i].noise - 0x100); ! OLSR_PRINTF(1, "\n"); } } ! //OLSR_PRINTF(1, "\n"); return; } *************** *** 412,416 **** if(ioctl(olsr_cnf->ioctl_s, SIOCGIWRANGE, &wrq) < 0) { ! OLSR_PRINTF(1, "NO RANGE\n") return -1; } --- 412,416 ---- if(ioctl(olsr_cnf->ioctl_s, SIOCGIWRANGE, &wrq) < 0) { ! OLSR_PRINTF(1, "NO RANGE\n"); return -1; } From (spam-protected) Thu Apr 26 00:08:20 2007 From: (spam-protected) (Bernd Petrovitsch) Date: Wed, 25 Apr 2007 22:08:20 +0000 Subject: [Olsr-cvs] olsrd-current/src/win32 apm.c, 1.10, 1.11 ifnet.c, 1.34, 1.35 kernel_routes.c, 1.18, 1.19 net.c, 1.20, 1.21 Message-ID: Update of /cvsroot/olsrd/olsrd-current/src/win32 In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv2640/src/win32 Modified Files: apm.c ifnet.c kernel_routes.c net.c Log Message: * OLSR_PRINTF() is now a real C expression * removed superflous type-casts Index: ifnet.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/win32/ifnet.c,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** ifnet.c 29 Mar 2007 16:34:39 -0000 1.34 --- ifnet.c 25 Apr 2007 22:08:18 -0000 1.35 *************** *** 445,453 **** if (ErrNo == ERROR_GEN_FAILURE || ErrNo == ERROR_INVALID_PARAMETER) { ! OLSR_PRINTF(5, "OID not supported. Device probably not wireless.\n") return 0; } ! OLSR_PRINTF(5, "DeviceIoControl() = %08x, %s\n", ErrNo, StrError(ErrNo)) return -1; } --- 445,453 ---- if (ErrNo == ERROR_GEN_FAILURE || ErrNo == ERROR_INVALID_PARAMETER) { ! OLSR_PRINTF(5, "OID not supported. Device probably not wireless.\n"); return 0; } ! OLSR_PRINTF(5, "DeviceIoControl() = %08x, %s\n", ErrNo, StrError(ErrNo)); return -1; } *************** *** 491,495 **** for (Walker = AdInfo; Walker != NULL; Walker = Walker->Next) { ! OLSR_PRINTF(5, "Index = %08x\n", (int)Walker->Index) MiniIndexToIntName(IntName, Walker->Index); --- 491,495 ---- for (Walker = AdInfo; Walker != NULL; Walker = Walker->Next) { ! OLSR_PRINTF(5, "Index = %08x\n", (int)Walker->Index); MiniIndexToIntName(IntName, Walker->Index); *************** *** 520,524 **** struct interface *Int, *Prev; ! OLSR_PRINTF(1, "Removing interface %s.\n", IntConf->name) Int = IntConf->interf; --- 520,524 ---- struct interface *Int, *Prev; ! OLSR_PRINTF(1, "Removing interface %s.\n", IntConf->name); Int = IntConf->interf; *************** *** 541,545 **** { memset(&olsr_cnf->main_addr, 0, olsr_cnf->ipsize); ! OLSR_PRINTF(1, "Removed last interface. Cleared main address.\n") } --- 541,545 ---- { memset(&olsr_cnf->main_addr, 0, olsr_cnf->ipsize); ! OLSR_PRINTF(1, "Removed last interface. Cleared main address.\n"); } *************** *** 547,551 **** { COPY_IP(&olsr_cnf->main_addr, &ifnet->ip_addr); ! OLSR_PRINTF(1, "New main address: %s.\n", olsr_ip_to_string(&olsr_cnf->main_addr)) } } --- 547,551 ---- { COPY_IP(&olsr_cnf->main_addr, &ifnet->ip_addr); ! OLSR_PRINTF(1, "New main address: %s.\n", olsr_ip_to_string(&olsr_cnf->main_addr)); } } *************** *** 594,598 **** if (ifnet == NULL && !olsr_cnf->allow_no_interfaces) { ! OLSR_PRINTF(1, "No more active interfaces - exiting.\n") olsr_cnf->exit_value = EXIT_FAILURE; CallSignalHandler(); --- 594,598 ---- if (ifnet == NULL && !olsr_cnf->allow_no_interfaces) { ! OLSR_PRINTF(1, "No more active interfaces - exiting.\n"); olsr_cnf->exit_value = EXIT_FAILURE; CallSignalHandler(); *************** *** 622,626 **** strcpy(ifp->int_name, "hcif01"); ! OLSR_PRINTF(1, "Adding %s(host emulation):\n", ifp->int_name) OLSR_PRINTF(1, " Address:%s\n", olsr_ip_to_string(&iface->hemu_ip)); --- 622,626 ---- strcpy(ifp->int_name, "hcif01"); ! OLSR_PRINTF(1, "Adding %s(host emulation):\n", ifp->int_name); OLSR_PRINTF(1, " Address:%s\n", olsr_ip_to_string(&iface->hemu_ip)); *************** *** 637,641 **** { COPY_IP(&olsr_cnf->main_addr, &iface->hemu_ip); ! OLSR_PRINTF(1, "New main address: %s\n", olsr_ip_to_string(&olsr_cnf->main_addr)) } --- 637,641 ---- { COPY_IP(&olsr_cnf->main_addr, &iface->hemu_ip); ! OLSR_PRINTF(1, "New main address: %s\n", olsr_ip_to_string(&olsr_cnf->main_addr)); } *************** *** 797,801 **** #ifdef DEBUG ! OLSR_PRINTF(3, "Checking if %s is set down or changed\n", IntConf->name) #endif --- 797,801 ---- #ifdef DEBUG ! OLSR_PRINTF(3, "Checking if %s is set down or changed\n", IntConf->name); #endif *************** *** 817,821 **** if (Int->is_wireless != IsWlan) { ! OLSR_PRINTF(1, "\tLAN/WLAN change: %d -> %d.\n", Int->is_wireless, IsWlan) Int->is_wireless = IsWlan; --- 817,821 ---- if (Int->is_wireless != IsWlan) { ! OLSR_PRINTF(1, "\tLAN/WLAN change: %d -> %d.\n", Int->is_wireless, IsWlan); Int->is_wireless = IsWlan; *************** *** 847,858 **** #ifdef DEBUG ! OLSR_PRINTF(3, "\tAddress: %s\n", olsr_ip_to_string(&NewVal)) #endif if (NewVal.v4 != OldVal.v4) { ! OLSR_PRINTF(1, "\tAddress change.\n") ! OLSR_PRINTF(1, "\tOld: %s\n", olsr_ip_to_string(&OldVal)) ! OLSR_PRINTF(1, "\tNew: %s\n", olsr_ip_to_string(&NewVal)) Int->ip_addr.v4 = NewVal.v4; --- 847,858 ---- #ifdef DEBUG ! OLSR_PRINTF(3, "\tAddress: %s\n", olsr_ip_to_string(&NewVal)); #endif if (NewVal.v4 != OldVal.v4) { ! OLSR_PRINTF(1, "\tAddress change.\n"); ! OLSR_PRINTF(1, "\tOld: %s\n", olsr_ip_to_string(&OldVal)); ! OLSR_PRINTF(1, "\tNew: %s\n", olsr_ip_to_string(&NewVal)); Int->ip_addr.v4 = NewVal.v4; *************** *** 866,870 **** if (olsr_cnf->main_addr.v4 == OldVal.v4) { ! OLSR_PRINTF(1, "\tMain address change.\n") olsr_cnf->main_addr.v4 = NewVal.v4; --- 866,870 ---- if (olsr_cnf->main_addr.v4 == OldVal.v4) { ! OLSR_PRINTF(1, "\tMain address change.\n"); olsr_cnf->main_addr.v4 = NewVal.v4; *************** *** 875,879 **** else ! OLSR_PRINTF(3, "\tNo address change.\n") OldVal.v4 = ((struct sockaddr_in *)&Int->int_netmask)->sin_addr.s_addr; --- 875,879 ---- else ! OLSR_PRINTF(3, "\tNo address change.\n"); OldVal.v4 = ((struct sockaddr_in *)&Int->int_netmask)->sin_addr.s_addr; *************** *** 881,892 **** #ifdef DEBUG ! OLSR_PRINTF(3, "\tNetmask: %s\n", olsr_ip_to_string(&NewVal)) #endif if (NewVal.v4 != OldVal.v4) { ! OLSR_PRINTF(1, "\tNetmask change.\n") ! OLSR_PRINTF(1, "\tOld: %s\n", olsr_ip_to_string(&OldVal)) ! OLSR_PRINTF(1, "\tNew: %s\n", olsr_ip_to_string(&NewVal)) AddrIn = (struct sockaddr_in *)&Int->int_netmask; --- 881,892 ---- #ifdef DEBUG ! OLSR_PRINTF(3, "\tNetmask: %s\n", olsr_ip_to_string(&NewVal)); #endif if (NewVal.v4 != OldVal.v4) { ! OLSR_PRINTF(1, "\tNetmask change.\n"); ! OLSR_PRINTF(1, "\tOld: %s\n", olsr_ip_to_string(&OldVal)); ! OLSR_PRINTF(1, "\tNew: %s\n", olsr_ip_to_string(&NewVal)); AddrIn = (struct sockaddr_in *)&Int->int_netmask; *************** *** 900,904 **** else ! OLSR_PRINTF(3, "\tNo netmask change.\n") OldVal.v4 = ((struct sockaddr_in *)&Int->int_broadaddr)->sin_addr.s_addr; --- 900,904 ---- else ! OLSR_PRINTF(3, "\tNo netmask change.\n"); OldVal.v4 = ((struct sockaddr_in *)&Int->int_broadaddr)->sin_addr.s_addr; *************** *** 906,917 **** #ifdef DEBUG ! OLSR_PRINTF(3, "\tBroadcast address: %s\n", olsr_ip_to_string(&NewVal)) #endif if (NewVal.v4 != OldVal.v4) { ! OLSR_PRINTF(1, "\tBroadcast address change.\n") ! OLSR_PRINTF(1, "\tOld: %s\n", olsr_ip_to_string(&OldVal)) ! OLSR_PRINTF(1, "\tNew: %s\n", olsr_ip_to_string(&NewVal)) AddrIn = (struct sockaddr_in *)&Int->int_broadaddr; --- 906,917 ---- #ifdef DEBUG ! OLSR_PRINTF(3, "\tBroadcast address: %s\n", olsr_ip_to_string(&NewVal)); #endif if (NewVal.v4 != OldVal.v4) { ! OLSR_PRINTF(1, "\tBroadcast address change.\n"); ! OLSR_PRINTF(1, "\tOld: %s\n", olsr_ip_to_string(&OldVal)); ! OLSR_PRINTF(1, "\tNew: %s\n", olsr_ip_to_string(&NewVal)); AddrIn = (struct sockaddr_in *)&Int->int_broadaddr; *************** *** 925,929 **** else ! OLSR_PRINTF(3, "\tNo broadcast address change.\n") if (Res != 0) --- 925,929 ---- else ! OLSR_PRINTF(3, "\tNo broadcast address change.\n"); if (Res != 0) *************** *** 1004,1014 **** OLSR_PRINTF(1, "\tInterface %s set up for use with index %d\n\n", ! IntConf->name, New->if_nr) ! OLSR_PRINTF(1, "\tMTU: %d\n", New->int_mtu) ! OLSR_PRINTF(1, "\tAddress: %s\n", sockaddr_to_string(&New->int_addr)) ! OLSR_PRINTF(1, "\tNetmask: %s\n", sockaddr_to_string(&New->int_netmask)) OLSR_PRINTF(1, "\tBroadcast address: %s\n", ! sockaddr_to_string(&New->int_broadaddr)) New->ip_addr.v4 = --- 1004,1014 ---- OLSR_PRINTF(1, "\tInterface %s set up for use with index %d\n\n", ! IntConf->name, New->if_nr); ! OLSR_PRINTF(1, "\tMTU: %d\n", New->int_mtu); ! OLSR_PRINTF(1, "\tAddress: %s\n", sockaddr_to_string(&New->int_addr)); ! OLSR_PRINTF(1, "\tNetmask: %s\n", sockaddr_to_string(&New->int_netmask)); OLSR_PRINTF(1, "\tBroadcast address: %s\n", ! sockaddr_to_string(&New->int_broadaddr)); New->ip_addr.v4 = *************** *** 1017,1021 **** New->if_index = Info.Index; ! OLSR_PRINTF(3, "\tKernel index: %08x\n", New->if_index) AddrSockAddr = addrsock.sin_addr.s_addr; --- 1017,1021 ---- New->if_index = Info.Index; ! OLSR_PRINTF(3, "\tKernel index: %08x\n", New->if_index); AddrSockAddr = addrsock.sin_addr.s_addr; *************** *** 1046,1050 **** { COPY_IP(&olsr_cnf->main_addr, &New->ip_addr); ! OLSR_PRINTF(1, "New main address: %s\n", olsr_ip_to_string(&olsr_cnf->main_addr)) } --- 1046,1050 ---- { COPY_IP(&olsr_cnf->main_addr, &New->ip_addr); ! OLSR_PRINTF(1, "New main address: %s\n", olsr_ip_to_string(&olsr_cnf->main_addr)); } *************** *** 1105,1109 **** #ifdef DEBUG ! OLSR_PRINTF(3, "Checking for updates in the interface set\n") #endif --- 1105,1109 ---- #ifdef DEBUG ! OLSR_PRINTF(3, "Checking for updates in the interface set\n"); #endif Index: net.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/win32/net.c,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** net.c 5 Nov 2006 23:03:56 -0000 1.20 --- net.c 25 Apr 2007 22:08:18 -0000 1.21 *************** *** 229,233 **** } ! OLSR_PRINTF(3, "Routing enabled.\n") return 0; --- 229,233 ---- } ! OLSR_PRINTF(3, "Routing enabled.\n"); return 0; *************** *** 260,264 **** } ! OLSR_PRINTF(3, "Routing disabled, count = %u.\n", Count) return 0; --- 260,264 ---- } ! OLSR_PRINTF(3, "Routing disabled, count = %u.\n", Count); return 0; *************** *** 344,348 **** McastReq.ipv6mr_interface = Nic->if_index; ! OLSR_PRINTF(3, "Interface %s joining multicast %s...", Nic->int_name, olsr_ip_to_string((union olsr_ip_addr *)&Nic->int6_multaddr.sin6_addr)) /* Send multicast */ if(setsockopt(Sock, --- 344,348 ---- McastReq.ipv6mr_interface = Nic->if_index; ! OLSR_PRINTF(3, "Interface %s joining multicast %s...", Nic->int_name, olsr_ip_to_string((union olsr_ip_addr *)&Nic->int6_multaddr.sin6_addr)); /* Send multicast */ if(setsockopt(Sock, *************** *** 393,397 **** ! OLSR_PRINTF(3, "OK\n") return 0; } --- 393,397 ---- ! OLSR_PRINTF(3, "OK\n"); return 0; } Index: kernel_routes.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/win32/kernel_routes.c,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** kernel_routes.c 28 Mar 2007 12:07:05 -0000 1.18 --- kernel_routes.c 25 Apr 2007 22:08:18 -0000 1.19 *************** *** 64,68 **** OLSR_PRINTF(1, "Adding IPv4 route with metric %d to %s/%s via %s and I/F 0x%x.\n", ! Dest->rt_metric + Dest->rt_if->int_metric, Str1, Str2, Str3, Dest->rt_if->if_index) memset(&Row, 0, sizeof (MIB_IPFORWARDROW)); --- 64,68 ---- OLSR_PRINTF(1, "Adding IPv4 route with metric %d to %s/%s via %s and I/F 0x%x.\n", ! Dest->rt_metric + Dest->rt_if->int_metric, Str1, Str2, Str3, Dest->rt_if->if_index); memset(&Row, 0, sizeof (MIB_IPFORWARDROW)); *************** *** 130,134 **** OLSR_PRINTF(1, "Deleting IPv4 route with metric %d to %s/%s via %s and I/F 0x%x.\n", ! Dest->rt_metric + Dest->rt_if->int_metric, Str1, Str2, Str3, Dest->rt_if->if_index) memset(&Row, 0, sizeof (MIB_IPFORWARDROW)); --- 130,134 ---- OLSR_PRINTF(1, "Deleting IPv4 route with metric %d to %s/%s via %s and I/F 0x%x.\n", ! Dest->rt_metric + Dest->rt_if->int_metric, Str1, Str2, Str3, Dest->rt_if->if_index); memset(&Row, 0, sizeof (MIB_IPFORWARDROW)); Index: apm.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/win32/apm.c,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** apm.c 21 Mar 2005 02:17:36 -0000 1.10 --- apm.c 25 Apr 2007 22:08:18 -0000 1.11 *************** *** 53,57 **** struct olsr_apm_info ApmInfo; ! OLSR_PRINTF(3, "Initializing APM\n") if(apm_read(&ApmInfo) < 0) --- 53,57 ---- struct olsr_apm_info ApmInfo; ! OLSR_PRINTF(3, "Initializing APM\n"); if(apm_read(&ApmInfo) < 0) *************** *** 67,71 **** OLSR_PRINTF(5, "APM info:\n\tAC status %d\n\tBattery percentage %d%%\n\n", ApmInfo->ac_line_status, ! ApmInfo->battery_percentage) } --- 67,71 ---- OLSR_PRINTF(5, "APM info:\n\tAC status %d\n\tBattery percentage %d%%\n\n", ApmInfo->ac_line_status, ! ApmInfo->battery_percentage); } From (spam-protected) Thu Apr 26 00:08:10 2007 From: (spam-protected) (Bernd Petrovitsch) Date: Wed, 25 Apr 2007 22:08:10 +0000 Subject: [Olsr-cvs] olsrd-current/lib/nameservice/src nameservice.c, 1.21, 1.22 Message-ID: Update of /cvsroot/olsrd/olsrd-current/lib/nameservice/src In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv2640/lib/nameservice/src Modified Files: nameservice.c Log Message: * OLSR_PRINTF() is now a real C expression * removed superflous type-casts Index: nameservice.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/lib/nameservice/src/nameservice.c,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** nameservice.c 20 Apr 2007 13:46:02 -0000 1.21 --- nameservice.c 25 Apr 2007 22:08:06 -0000 1.22 *************** *** 530,537 **** } ! if(net_outbuffer_push(ifn, (olsr_u8_t *)message, namesize) != namesize ) { /* send data and try again */ net_output(ifn); ! if(net_outbuffer_push(ifn, (olsr_u8_t *)message, namesize) != namesize ) { olsr_printf(1, "NAME PLUGIN: could not send on interface: %s\n", ifn->int_name); } --- 530,537 ---- } ! if(net_outbuffer_push(ifn, message, namesize) != namesize ) { /* send data and try again */ net_output(ifn); ! if(net_outbuffer_push(ifn, message, namesize) != namesize ) { olsr_printf(1, "NAME PLUGIN: could not send on interface: %s\n", ifn->int_name); } From (spam-protected) Thu Apr 26 00:08:10 2007 From: (spam-protected) (Bernd Petrovitsch) Date: Wed, 25 Apr 2007 22:08:10 +0000 Subject: [Olsr-cvs] olsrd-current/lib/secure/src olsrd_secure.c,1.22,1.23 Message-ID: Update of /cvsroot/olsrd/olsrd-current/lib/secure/src In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv2640/lib/secure/src Modified Files: olsrd_secure.c Log Message: * OLSR_PRINTF() is now a real C expression * removed superflous type-casts Index: olsrd_secure.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/lib/secure/src/olsrd_secure.c,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** olsrd_secure.c 20 Apr 2007 13:46:03 -0000 1.22 --- olsrd_secure.c 25 Apr 2007 22:08:07 -0000 1.23 *************** *** 705,709 **** /* Add to buffer */ ! net_outbuffer_push(olsr_in_if, (olsr_u8_t *)&cmsg, sizeof(struct challengemsg)); /* Send the request */ --- 705,709 ---- /* Add to buffer */ ! net_outbuffer_push(olsr_in_if, &cmsg, sizeof(struct challengemsg)); /* Send the request */ *************** *** 1100,1104 **** /* Add to buffer */ ! net_outbuffer_push(olsr_in_if, (olsr_u8_t *)&crmsg, sizeof(struct c_respmsg)); /* Send the request */ net_output(olsr_in_if); --- 1100,1104 ---- /* Add to buffer */ ! net_outbuffer_push(olsr_in_if, &crmsg, sizeof(struct c_respmsg)); /* Send the request */ net_output(olsr_in_if); *************** *** 1177,1181 **** /* add to buffer */ ! net_outbuffer_push(olsr_in_if, (olsr_u8_t *)&rrmsg, sizeof(struct r_respmsg)); /* Send the request */ --- 1177,1181 ---- /* add to buffer */ ! net_outbuffer_push(olsr_in_if, &rrmsg, sizeof(struct r_respmsg)); /* Send the request */ From (spam-protected) Thu Apr 26 00:19:02 2007 From: (spam-protected) (Bernd Petrovitsch) Date: Wed, 25 Apr 2007 22:19:02 +0000 Subject: [Olsr-cvs] olsrd-current/src/win32 apm.c,1.11,1.12 Message-ID: Update of /cvsroot/olsrd/olsrd-current/src/win32 In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv7534/src/win32 Modified Files: apm.c Log Message: * killed a warning Index: apm.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/win32/apm.c,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** apm.c 25 Apr 2007 22:08:18 -0000 1.11 --- apm.c 25 Apr 2007 22:19:00 -0000 1.12 *************** *** 49,53 **** #undef interface ! int apm_init() { struct olsr_apm_info ApmInfo; --- 49,53 ---- #undef interface ! int apm_init(void) { struct olsr_apm_info ApmInfo; From (spam-protected) Thu Apr 26 00:21:19 2007 From: (spam-protected) (Bernd Petrovitsch) Date: Wed, 25 Apr 2007 22:21:19 +0000 Subject: [Olsr-cvs] olsrd-current/src/win32 ifnet.c,1.35,1.36 Message-ID: Update of /cvsroot/olsrd/olsrd-current/src/win32 In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv8787/src/win32 Modified Files: ifnet.c Log Message: * killed warnings Index: ifnet.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/win32/ifnet.c,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -d -r1.35 -r1.36 *** ifnet.c 25 Apr 2007 22:08:18 -0000 1.35 --- ifnet.c 25 Apr 2007 22:21:17 -0000 1.36 *************** *** 114,118 **** void WinSockPError(char *); char *StrError(unsigned int ErrNo); ! int inet_pton(int af, char *src, void *dst); void ListInterfaces(void); --- 114,118 ---- void WinSockPError(char *); char *StrError(unsigned int ErrNo); ! int inet_pton(int af, const char *src, void *dst); void ListInterfaces(void); *************** *** 124,128 **** int __stdcall SignalHandler(unsigned long Signal); ! static unsigned long __stdcall SignalHandlerWrapper(void *Dummy) { SignalHandler(0); --- 124,128 ---- int __stdcall SignalHandler(unsigned long Signal); ! static unsigned long __stdcall SignalHandlerWrapper(void *Dummy __attribute__((unused))) { SignalHandler(0); *************** *** 933,937 **** } ! int chk_if_up(struct olsr_if *IntConf, int DebugLevel) { struct InterfaceInfo Info; --- 933,937 ---- } ! int chk_if_up(struct olsr_if *IntConf, int DebugLevel __attribute__((unused))) { struct InterfaceInfo Info; *************** *** 1100,1104 **** } ! void check_interface_updates(void *dummy) { struct olsr_if *IntConf; --- 1100,1104 ---- } ! void check_interface_updates(void *dummy __attribute__((unused))) { struct olsr_if *IntConf; From (spam-protected) Thu Apr 26 00:22:18 2007 From: (spam-protected) (Bernd Petrovitsch) Date: Wed, 25 Apr 2007 22:22:18 +0000 Subject: [Olsr-cvs] olsrd-current/src/win32 kernel_routes.c,1.19,1.20 Message-ID: Update of /cvsroot/olsrd/olsrd-current/src/win32 In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv9206/src/win32 Modified Files: kernel_routes.c Log Message: * killed warnings Index: kernel_routes.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/win32/kernel_routes.c,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** kernel_routes.c 25 Apr 2007 22:08:18 -0000 1.19 --- kernel_routes.c 25 Apr 2007 22:22:15 -0000 1.20 *************** *** 114,118 **** // XXX - to be implemented ! int olsr_ioctl_add_route6(struct rt_entry *Dest) { return 0; --- 114,118 ---- // XXX - to be implemented ! int olsr_ioctl_add_route6(struct rt_entry *Dest __attribute__((unused))) { return 0; *************** *** 171,175 **** // XXX - to be implemented ! int olsr_ioctl_del_route6(struct rt_entry *Dest) { return 0; --- 171,175 ---- // XXX - to be implemented ! int olsr_ioctl_del_route6(struct rt_entry *Dest __attribute__((unused))) { return 0; From (spam-protected) Thu Apr 26 00:23:11 2007 From: (spam-protected) (Bernd Petrovitsch) Date: Wed, 25 Apr 2007 22:23:11 +0000 Subject: [Olsr-cvs] olsrd-current/src/win32 log.c,1.4,1.5 Message-ID: Update of /cvsroot/olsrd/olsrd-current/src/win32 In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv9590/src/win32 Modified Files: log.c Log Message: * killed warnings Index: log.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/win32/log.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** log.c 21 Nov 2004 01:21:10 -0000 1.4 --- log.c 25 Apr 2007 22:23:09 -0000 1.5 *************** *** 42,50 **** #include "../log.h" ! void olsr_openlog(const char *Id) { } ! void olsr_syslog(int Level, char *Format, ...) { } --- 42,50 ---- #include "../log.h" ! void olsr_openlog(const char *Id __attribute__((unused))) { } ! void olsr_syslog(int Level __attribute__((unused)), char *Format __attribute__((unused)), ...) { } From (spam-protected) Thu Apr 26 00:24:11 2007 From: (spam-protected) (Bernd Petrovitsch) Date: Wed, 25 Apr 2007 22:24:11 +0000 Subject: [Olsr-cvs] olsrd-current/src/win32 net.c,1.21,1.22 Message-ID: Update of /cvsroot/olsrd/olsrd-current/src/win32 In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv9935/src/win32 Modified Files: net.c Log Message: * killed warnings Index: net.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/win32/net.c,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** net.c 25 Apr 2007 22:08:18 -0000 1.21 --- net.c 25 Apr 2007 22:24:09 -0000 1.22 *************** *** 98,102 **** } ! int getsocket(struct sockaddr *Addr, int BuffSize, char *Int) { int Sock; --- 98,102 ---- } ! int getsocket(struct sockaddr *Addr, int BuffSize, char *Int __attribute__((unused))) { int Sock; *************** *** 149,153 **** } ! int getsocket6(struct sockaddr_in6 *Addr, int BuffSize, char *Int) { int Sock; --- 149,153 ---- } ! int getsocket6(struct sockaddr_in6 *Addr, int BuffSize, char *Int __attribute__((unused))) { int Sock; *************** *** 422,426 **** void *buf, size_t len, ! int flags, struct sockaddr *from, socklen_t *fromlen) --- 422,426 ---- void *buf, size_t len, ! int flags __attribute__((unused)), struct sockaddr *from, socklen_t *fromlen) From (spam-protected) Fri Apr 27 13:32:29 2007 From: (spam-protected) (Bernd Petrovitsch) Date: Fri, 27 Apr 2007 11:32:29 +0000 Subject: [Olsr-cvs] olsrd-current/src/cfgparser Makefile,1.24,1.25 Message-ID: Update of /cvsroot/olsrd/olsrd-current/src/cfgparser In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv29571/src/cfgparser Modified Files: Makefile Log Message: * fixed up wrong reg-exp Index: Makefile =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/cfgparser/Makefile,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** Makefile 25 Apr 2007 22:08:17 -0000 1.24 --- Makefile 27 Apr 2007 11:32:27 -0000 1.25 *************** *** 95,99 **** -e '/^static/s/yy_get_previous_state[\(][\)]/yy_get_previous_state(void)/' \ -e '/^static/s/input[\(][\)]/input(void)/' \ ! -e '/^static *void *yy_fatal_error/s/^\(.*)\)\();\)$$/\1 __attribute__((noreturn)) \2/' \ < oscan.c-tmp >oscan.c $(RM) oscan.c-tmp --- 95,99 ---- -e '/^static/s/yy_get_previous_state[\(][\)]/yy_get_previous_state(void)/' \ -e '/^static/s/input[\(][\)]/input(void)/' \ ! -e '/^static *void *yy_fatal_error/s/^\(.*)\);$$/\1 __attribute__((noreturn));/' \ < oscan.c-tmp >oscan.c $(RM) oscan.c-tmp From (spam-protected) Fri Apr 27 13:41:28 2007 From: (spam-protected) (Bernd Petrovitsch) Date: Fri, 27 Apr 2007 11:41:28 +0000 Subject: [Olsr-cvs] olsrd-current/make Makefile.linux,1.10,1.11 Message-ID: Update of /cvsroot/olsrd/olsrd-current/make In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv739/make Modified Files: Makefile.linux Log Message: * alpha also always wants -fPIC Index: Makefile.linux =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/make/Makefile.linux,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** Makefile.linux 10 Feb 2007 19:59:51 -0000 1.10 --- Makefile.linux 27 Apr 2007 11:41:25 -0000 1.11 *************** *** 23,26 **** --- 23,29 ---- GENERATE_PIC = true endif + ifeq ($(ARCH),alpha) + GENERATE_PIC = true + endif ifdef GENERATE_PIC From (spam-protected) Fri Apr 27 13:45:33 2007 From: (spam-protected) (Bernd Petrovitsch) Date: Fri, 27 Apr 2007 11:45:33 +0000 Subject: [Olsr-cvs] olsrd-current Makefile.inc,1.11,1.12 Message-ID: Update of /cvsroot/olsrd/olsrd-current In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv2341 Modified Files: Makefile.inc Log Message: * make it compile on Debian/Sarge with a gcc-3.3.5 Index: Makefile.inc =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/Makefile.inc,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** Makefile.inc 20 Apr 2007 14:05:41 -0000 1.11 --- Makefile.inc 27 Apr 2007 11:45:31 -0000 1.12 *************** *** 19,26 **** --- 19,33 ---- INCLUDES = -Isrc -I$(TOPDIR)/src + GCC_VERSION := $(shell v=$$($(CC) -dumpversion); echo $${v//./ }) + # add gcc warnings and optimizations if CFLAGS not set ifndef CFLAGS CFLAGS += -Wall + # gcc-3.3.5 on Debian sarge doesn't know the following warnings + ifneq ("$(GCC_VERSION)","3 3 5") CFLAGS += -Wextra + CFLAGS += -Wold-style-definition + CFLAGS += -Wdeclaration-after-statement + endif CFLAGS += -Wmissing-prototypes CFLAGS += -Wstrict-prototypes *************** *** 28,32 **** CFLAGS += -Wsign-compare CFLAGS += -Waggregate-return - CFLAGS += -Wold-style-definition CFLAGS += -Wmissing-noreturn CFLAGS += -Wmissing-format-attribute --- 35,38 ---- From (spam-protected) Sat Apr 28 22:48:59 2007 From: (spam-protected) (Bernd Petrovitsch) Date: Sat, 28 Apr 2007 20:48:59 +0000 Subject: [Olsr-cvs] olsrd-current/lib/pgraph/src olsrd_pgraph.c,1.4,1.5 Message-ID: Update of /cvsroot/olsrd/olsrd-current/lib/pgraph/src In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv6380/lib/pgraph/src Modified Files: olsrd_pgraph.c Log Message: * declare locally only used variables static Index: olsrd_pgraph.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/lib/pgraph/src/olsrd_pgraph.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** olsrd_pgraph.c 20 Apr 2007 13:46:02 -0000 1.4 --- olsrd_pgraph.c 28 Apr 2007 20:48:57 -0000 1.5 *************** *** 57,64 **** #endif ! int ipc_socket; ! int ipc_open; ! int ipc_connection; ! int ipc_socket_up; static void --- 57,64 ---- #endif ! static int ipc_socket; ! static int ipc_open; ! static int ipc_connection; ! static int ipc_socket_up; static void From (spam-protected) Sat Apr 28 22:51:07 2007 From: (spam-protected) (Bernd Petrovitsch) Date: Sat, 28 Apr 2007 20:51:07 +0000 Subject: [Olsr-cvs] olsrd-current/lib/httpinfo/src olsrd_httpinfo.c, 1.63, 1.64 Message-ID: Update of /cvsroot/olsrd/olsrd-current/lib/httpinfo/src In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv7469/lib/httpinfo/src Modified Files: olsrd_httpinfo.c Log Message: * God knows what's in that string Index: olsrd_httpinfo.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/lib/httpinfo/src/olsrd_httpinfo.c,v retrieving revision 1.63 retrieving revision 1.64 diff -C2 -d -r1.63 -r1.64 *** olsrd_httpinfo.c 20 Apr 2007 14:06:18 -0000 1.63 --- olsrd_httpinfo.c 28 Apr 2007 20:51:05 -0000 1.64 *************** *** 692,696 **** size += frame_body_cb(&buf[size], bufsize-size); else ! size += snprintf(&buf[size], bufsize-size, http_frame[i]); i++; --- 692,696 ---- size += frame_body_cb(&buf[size], bufsize-size); else ! size += snprintf(&buf[size], bufsize-size, "%s", http_frame[i]); i++; From (spam-protected) Sat Apr 28 22:46:34 2007 From: (spam-protected) (Bernd Petrovitsch) Date: Sat, 28 Apr 2007 20:46:34 +0000 Subject: [Olsr-cvs] olsrd-current/src/cfgparser olsrd_conf.h, 1.12, 1.13 olsrd_conf.c, 1.52, 1.53 Message-ID: Update of /cvsroot/olsrd/olsrd-current/src/cfgparser In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv5547/src/cfgparser Modified Files: olsrd_conf.h olsrd_conf.c Log Message: * avoid as much code and linker information as possible Index: olsrd_conf.h =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/cfgparser/olsrd_conf.h,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** olsrd_conf.h 30 Nov 2004 16:52:16 -0000 1.12 --- olsrd_conf.h 28 Apr 2007 20:46:32 -0000 1.13 *************** *** 65,70 **** --- 65,74 ---- set_default_cnf(struct olsrd_config *); + #if defined WIN32_STDIO_HACK void win32_stdio_hack(unsigned int); + #else + #define win32_stdio_hack(handle) do { } while(0) + #endif #endif Index: olsrd_conf.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/cfgparser/olsrd_conf.c,v retrieving revision 1.52 retrieving revision 1.53 diff -C2 -d -r1.52 -r1.53 *** olsrd_conf.c 20 Apr 2007 13:46:05 -0000 1.52 --- olsrd_conf.c 28 Apr 2007 20:46:32 -0000 1.53 *************** *** 732,736 **** setbuf(stderr, NULL); } - #else - void win32_stdio_hack(unsigned int handle __attribute__((unused))) {} #endif --- 732,734 ---- From (spam-protected) Sat Apr 28 22:45:08 2007 From: (spam-protected) (Bernd Petrovitsch) Date: Sat, 28 Apr 2007 20:45:08 +0000 Subject: [Olsr-cvs] olsrd-current/src ipc_frontend.c, 1.30, 1.31 defs.h, 1.58, 1.59 Message-ID: Update of /cvsroot/olsrd/olsrd-current/src In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv4865/src Modified Files: ipc_frontend.c defs.h Log Message: * commeneted an unused functi[Don completel out Index: defs.h =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/defs.h,v retrieving revision 1.58 retrieving revision 1.59 diff -C2 -d -r1.58 -r1.59 *** defs.h 25 Apr 2007 22:08:07 -0000 1.58 --- defs.h 28 Apr 2007 20:45:06 -0000 1.59 *************** *** 142,147 **** --- 142,149 ---- ipc_init(void); + #if 0 int ipc_input(int); + #endif int Index: ipc_frontend.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/ipc_frontend.c,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** ipc_frontend.c 25 Apr 2007 22:08:08 -0000 1.30 --- ipc_frontend.c 28 Apr 2007 20:45:06 -0000 1.31 *************** *** 203,206 **** --- 203,207 ---- } + #if 0 /** *Read input from the IPC socket. Not in use. *************** *** 213,217 **** ipc_input(int sock __attribute__((unused))) { - /* union { --- 214,217 ---- *************** *** 226,233 **** exit(1); } - */ return 1; } ! /** --- 226,232 ---- exit(1); } return 1; } ! #endif /** From (spam-protected) Sat Apr 28 21:58:51 2007 From: (spam-protected) (Bernd Petrovitsch) Date: Sat, 28 Apr 2007 19:58:51 +0000 Subject: [Olsr-cvs] olsrd-current/lib/txtinfo/src olsrd_txtinfo.c,1.4,1.5 Message-ID: Update of /cvsroot/olsrd/olsrd-current/lib/txtinfo/src In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv19064/lib/txtinfo/src Modified Files: olsrd_txtinfo.c Log Message: * do not mix declarations and code Index: olsrd_txtinfo.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/lib/txtinfo/src/olsrd_txtinfo.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** olsrd_txtinfo.c 22 Apr 2007 19:54:31 -0000 1.4 --- olsrd_txtinfo.c 28 Apr 2007 19:58:49 -0000 1.5 *************** *** 243,246 **** --- 243,250 ---- else { + fd_set rfds; + struct timeval tv = {0,0}; + int neighonly = 0; + addr = inet_ntoa(pin.sin_addr); if(ntohl(pin.sin_addr.s_addr) != ntohl(ipc_accept_ip.s_addr)) *************** *** 258,266 **** /* purge read buffer to prevent blocking on linux*/ - fd_set rfds; FD_ZERO(&rfds); FD_SET(ipc_connection, &rfds); - struct timeval tv = {0,0}; - int neighonly = 0; if(select(ipc_connection+1, &rfds, NULL, NULL, &tv)) { char requ[128]; --- 262,267 ---- *************** *** 431,434 **** --- 432,437 ---- struct hna_entry *tmp_hna; struct hna_net *tmp_net; + struct hna4_entry *hna4; + struct hna6_entry *hna6; size = 0; *************** *** 437,441 **** /* Announced HNA entries */ - struct hna4_entry *hna4; for(hna4 = olsr_cnf->hna4_entries; hna4; hna4 = hna4->next) { --- 440,443 ---- *************** *** 445,449 **** olsr_ip_to_string(&olsr_cnf->main_addr)); } - struct hna6_entry *hna6; for(hna6 = olsr_cnf->hna6_entries; hna6; hna6 = hna6->next) { --- 447,450 ---- From (spam-protected) Sat Apr 28 21:58:51 2007 From: (spam-protected) (Bernd Petrovitsch) Date: Sat, 28 Apr 2007 19:58:51 +0000 Subject: [Olsr-cvs] olsrd-current/lib/nameservice/src nameservice.c, 1.22, 1.23 Message-ID: Update of /cvsroot/olsrd/olsrd-current/lib/nameservice/src In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv19064/lib/nameservice/src Modified Files: nameservice.c Log Message: * do not mix declarations and code Index: nameservice.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/lib/nameservice/src/nameservice.c,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** nameservice.c 25 Apr 2007 22:08:06 -0000 1.22 --- nameservice.c 28 Apr 2007 19:58:49 -0000 1.23 *************** *** 262,273 **** struct name_entry *name; union olsr_ip_addr ipz; - - memset(&ipz, 0, sizeof(ipz)); - int ret; //regex string for validating the hostnames char *regex_name = "^[[:alnum:]_.-]+$"; //regex string for the service line char *regex_service = olsr_malloc(256*sizeof(char) + strlen(my_suffix), "new *char from name_init for regex_service"); //compile the regex from the string --- 262,272 ---- struct name_entry *name; union olsr_ip_addr ipz; int ret; + //regex string for validating the hostnames char *regex_name = "^[[:alnum:]_.-]+$"; //regex string for the service line char *regex_service = olsr_malloc(256*sizeof(char) + strlen(my_suffix), "new *char from name_init for regex_service"); + memset(&ipz, 0, sizeof(ipz)); //compile the regex from the string *************** *** 678,684 **** struct name_entry *already_saved_name_entries; char *name = (char*)from_packet + sizeof(struct name); - olsr_printf(4, "\nNAME PLUGIN: decapsulating received name, service or forwarder \n"); int type_of_from_packet = ntohs(from_packet->type); unsigned int len_of_name = ntohs(from_packet->len); // don't insert the received entry again, if it has already been inserted in the hash table. --- 677,683 ---- struct name_entry *already_saved_name_entries; char *name = (char*)from_packet + sizeof(struct name); int type_of_from_packet = ntohs(from_packet->type); unsigned int len_of_name = ntohs(from_packet->len); + olsr_printf(4, "\nNAME PLUGIN: decapsulating received name, service or forwarder \n"); // don't insert the received entry again, if it has already been inserted in the hash table. From (spam-protected) Sat Apr 28 21:51:18 2007 From: (spam-protected) (Bernd Petrovitsch) Date: Sat, 28 Apr 2007 19:51:18 +0000 Subject: [Olsr-cvs] olsrd-current/src/bsd net.c,1.33,1.34 Message-ID: Update of /cvsroot/olsrd/olsrd-current/src/bsd In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv15972/src/bsd Modified Files: net.c Log Message: * added include because of bug report of Patrick McCarty Index: net.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/bsd/net.c,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** net.c 25 Apr 2007 22:08:17 -0000 1.33 --- net.c 28 Apr 2007 19:51:16 -0000 1.34 *************** *** 59,62 **** --- 59,63 ---- #include #include + #include #endif From (spam-protected) Thu Apr 26 00:08:19 2007 From: (spam-protected) (Bernd Petrovitsch) Date: Wed, 25 Apr 2007 22:08:19 +0000 Subject: [Olsr-cvs] olsrd-current/src build_msg.c, 1.35, 1.36 defs.h, 1.57, 1.58 duplicate_set.c, 1.14, 1.15 hna_set.c, 1.18, 1.19 hysteresis.c, 1.19, 1.20 interfaces.c, 1.30, 1.31 ipc_frontend.c, 1.29, 1.30 link_set.c, 1.67, 1.68 lq_route.c, 1.45, 1.46 main.c, 1.94, 1.95 mid_set.c, 1.19, 1.20 mpr.c, 1.16, 1.17 mpr_selector_set.c, 1.16, 1.17 neighbor_table.c, 1.31, 1.32 net_olsr.c, 1.21, 1.22 net_olsr.h, 1.8, 1.9 olsr.c, 1.53, 1.54 olsr_types.h, 1.6, 1.7 packet.c, 1.21, 1.22 parser.c, 1.33, 1.34 plugin_loader.c, 1.24, 1.25 process_package.c, 1.39, 1.40 process_routes.c, 1.31, 1.32 rebuild_packet.c, 1.20, 1.21 routing_table.c, 1.26, 1.27 scheduler.c, 1.38, 1.39 socket_parser.c, 1.24, 1.25 tc_set.c, 1.25, 1.26 two_hop_neighbor_table.c, 1.17, 1.18 Message-ID: Update of /cvsroot/olsrd/olsrd-current/src In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv2640/src Modified Files: build_msg.c defs.h duplicate_set.c hna_set.c hysteresis.c interfaces.c ipc_frontend.c link_set.c lq_route.c main.c mid_set.c mpr.c mpr_selector_set.c neighbor_table.c net_olsr.c net_olsr.h olsr.c olsr_types.h packet.c parser.c plugin_loader.c process_package.c process_routes.c rebuild_packet.c routing_table.c scheduler.c socket_parser.c tc_set.c two_hop_neighbor_table.c Log Message: * OLSR_PRINTF() is now a real C expression * removed superflous type-casts Index: rebuild_packet.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/rebuild_packet.c,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** rebuild_packet.c 22 Apr 2007 20:25:48 -0000 1.20 --- rebuild_packet.c 25 Apr 2007 22:08:13 -0000 1.21 *************** *** 231,243 **** if(olsr_cnf->debug_level > 1) { ! OLSR_PRINTF(3, "Alias list for %s: ", ip_to_string(&mmsg->mid_origaddr.v4)) ! OLSR_PRINTF(3, "%s", ip_to_string(&mmsg->addr.v4)) alias_tmp = mmsg->mid_addr; while(alias_tmp) { ! OLSR_PRINTF(3, " - %s", ip_to_string(&alias_tmp->alias_addr.v4)) alias_tmp = alias_tmp->next; } ! OLSR_PRINTF(3, "\n") } } --- 231,243 ---- if(olsr_cnf->debug_level > 1) { ! OLSR_PRINTF(3, "Alias list for %s: ", ip_to_string(&mmsg->mid_origaddr.v4)); ! OLSR_PRINTF(3, "%s", ip_to_string(&mmsg->addr.v4)); alias_tmp = mmsg->mid_addr; while(alias_tmp) { ! OLSR_PRINTF(3, " - %s", ip_to_string(&alias_tmp->alias_addr.v4)); alias_tmp = alias_tmp->next; } ! OLSR_PRINTF(3, "\n"); } } *************** *** 283,296 **** if(olsr_cnf->debug_level > 1) { ! OLSR_PRINTF(3, "Alias list for %s", ip6_to_string(&mmsg->mid_origaddr.v6)) ! OLSR_PRINTF(3, "%s", ip6_to_string(&mmsg->addr.v6)) alias_tmp = mmsg->mid_addr; while(alias_tmp) { ! OLSR_PRINTF(3, " - %s", ip6_to_string(&alias_tmp->alias_addr.v6)) alias_tmp = alias_tmp->next; } ! OLSR_PRINTF(3, "\n") } } --- 283,296 ---- if(olsr_cnf->debug_level > 1) { ! OLSR_PRINTF(3, "Alias list for %s", ip6_to_string(&mmsg->mid_origaddr.v6)); ! OLSR_PRINTF(3, "%s", ip6_to_string(&mmsg->addr.v6)); alias_tmp = mmsg->mid_addr; while(alias_tmp) { ! OLSR_PRINTF(3, " - %s", ip6_to_string(&alias_tmp->alias_addr.v6)); alias_tmp = alias_tmp->next; } ! OLSR_PRINTF(3, "\n"); } } *************** *** 382,386 **** hmsg->willingness = m->v4.message.hello.willingness; ! OLSR_PRINTF(3, "Got HELLO vtime: %f htime: %f\n", hmsg->vtime, hmsg->htime) for (hinf = m->v4.message.hello.hell_info; --- 382,386 ---- hmsg->willingness = m->v4.message.hello.willingness; ! OLSR_PRINTF(3, "Got HELLO vtime: %f htime: %f\n", hmsg->vtime, hmsg->htime); for (hinf = m->v4.message.hello.hell_info; *************** *** 426,430 **** hmsg->willingness = m->v6.message.hello.willingness; ! OLSR_PRINTF(3, "Got HELLO vtime: %f htime: %f\n", hmsg->vtime, hmsg->htime) --- 426,430 ---- hmsg->willingness = m->v6.message.hello.willingness; ! OLSR_PRINTF(3, "Got HELLO vtime: %f htime: %f\n", hmsg->vtime, hmsg->htime); *************** *** 499,503 **** tmsg->vtime = ME_TO_DOUBLE(m->v4.olsr_vtime); ! OLSR_PRINTF(3, "Got TC vtime: %f\n", tmsg->vtime) COPY_IP(&tmsg->originator, &m->v4.originator); --- 499,503 ---- tmsg->vtime = ME_TO_DOUBLE(m->v4.olsr_vtime); ! OLSR_PRINTF(3, "Got TC vtime: %f\n", tmsg->vtime); COPY_IP(&tmsg->originator, &m->v4.originator); *************** *** 541,545 **** tmsg->vtime = ME_TO_DOUBLE(m->v6.olsr_vtime); ! OLSR_PRINTF(3, "Got TC vtime: %f\n", tmsg->vtime) COPY_IP(&tmsg->originator, &m->v6.originator); --- 541,545 ---- tmsg->vtime = ME_TO_DOUBLE(m->v6.olsr_vtime); ! OLSR_PRINTF(3, "Got TC vtime: %f\n", tmsg->vtime); COPY_IP(&tmsg->originator, &m->v6.originator); Index: hna_set.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/hna_set.c,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** hna_set.c 20 Apr 2007 13:46:04 -0000 1.18 --- hna_set.c 25 Apr 2007 22:08:08 -0000 1.19 *************** *** 129,133 **** olsr_u32_t hash; ! //OLSR_PRINTF(5, "TC: lookup entry\n") hash = olsr_hashing(gw); --- 129,133 ---- olsr_u32_t hash; ! //OLSR_PRINTF(5, "TC: lookup entry\n"); hash = olsr_hashing(gw); *************** *** 328,337 **** nowtm->tm_min, nowtm->tm_sec, ! (int)now.tv_usec/10000) if(olsr_cnf->ip_version == AF_INET) ! OLSR_PRINTF(1, "IP net netmask GW IP\n") else ! OLSR_PRINTF(1, "IP net/prefixlen GW IP\n") for(index=0;indextm_min, nowtm->tm_sec, ! (int)now.tv_usec/10000); if(olsr_cnf->ip_version == AF_INET) ! OLSR_PRINTF(1, "IP net netmask GW IP\n"); else ! OLSR_PRINTF(1, "IP net/prefixlen GW IP\n"); for(index=0;indexip_version == AF_INET) { ! OLSR_PRINTF(1, "%-15s ", olsr_ip_to_string(&tmp_net->A_network_addr)) ! OLSR_PRINTF(1, "%-15s ", olsr_ip_to_string((union olsr_ip_addr *)&tmp_net->A_netmask.v4)) ! OLSR_PRINTF(1, "%-15s\n", olsr_ip_to_string(&tmp_hna->A_gateway_addr)) } else { ! OLSR_PRINTF(1, "%-27s/%d", olsr_ip_to_string(&tmp_net->A_network_addr), tmp_net->A_netmask.v6) ! OLSR_PRINTF(1, "%s\n", olsr_ip_to_string(&tmp_hna->A_gateway_addr)) } --- 348,359 ---- if(olsr_cnf->ip_version == AF_INET) { ! OLSR_PRINTF(1, "%-15s ", olsr_ip_to_string(&tmp_net->A_network_addr)); ! OLSR_PRINTF(1, "%-15s ", olsr_ip_to_string((union olsr_ip_addr *)&tmp_net->A_netmask.v4)); ! OLSR_PRINTF(1, "%-15s\n", olsr_ip_to_string(&tmp_hna->A_gateway_addr)); } else { ! OLSR_PRINTF(1, "%-27s/%d", olsr_ip_to_string(&tmp_net->A_network_addr), tmp_net->A_netmask.v6); ! OLSR_PRINTF(1, "%s\n", olsr_ip_to_string(&tmp_hna->A_gateway_addr)); } Index: two_hop_neighbor_table.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/two_hop_neighbor_table.c,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** two_hop_neighbor_table.c 20 Apr 2007 13:46:04 -0000 1.17 --- two_hop_neighbor_table.c 25 Apr 2007 22:08:17 -0000 1.18 *************** *** 251,257 **** nowtm->tm_min, nowtm->tm_sec, ! (int)now.tv_usec) ! OLSR_PRINTF(1, "IP addr (2-hop) IP addr (1-hop) TLQ\n") for (i = 0; i < HASHSIZE; i++) --- 251,257 ---- nowtm->tm_min, nowtm->tm_sec, ! (int)now.tv_usec); ! OLSR_PRINTF(1, "IP addr (2-hop) IP addr (1-hop) TLQ\n"); for (i = 0; i < HASHSIZE; i++) *************** *** 273,282 **** { OLSR_PRINTF(1, "%-15s ", ! olsr_ip_to_string(&neigh2->neighbor_2_addr)) first = OLSR_FALSE; } else ! OLSR_PRINTF(1, " ") total_lq = entry->path_link_quality; --- 273,282 ---- { OLSR_PRINTF(1, "%-15s ", ! olsr_ip_to_string(&neigh2->neighbor_2_addr)); first = OLSR_FALSE; } else ! OLSR_PRINTF(1, " "); total_lq = entry->path_link_quality; *************** *** 284,288 **** OLSR_PRINTF(1, "%-15s %5.3f\n", olsr_ip_to_string(&neigh->neighbor_main_addr), ! total_lq) } } --- 284,288 ---- OLSR_PRINTF(1, "%-15s %5.3f\n", olsr_ip_to_string(&neigh->neighbor_main_addr), ! total_lq); } } Index: link_set.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/link_set.c,v retrieving revision 1.67 retrieving revision 1.68 diff -C2 -d -r1.67 -r1.68 *** link_set.c 20 Apr 2007 13:46:04 -0000 1.67 --- link_set.c 25 Apr 2007 22:08:09 -0000 1.68 *************** *** 146,150 **** { #ifdef DEBUG ! OLSR_PRINTF(3, "HYST[%s]: Setting to HIDE\n", olsr_ip_to_string(&entry->neighbor_iface_addr)) #endif return HIDE_LINK; --- 146,150 ---- { #ifdef DEBUG ! OLSR_PRINTF(3, "HYST[%s]: Setting to HIDE\n", olsr_ip_to_string(&entry->neighbor_iface_addr)); #endif return HIDE_LINK; *************** *** 471,475 **** #ifdef DEBUG ! OLSR_PRINTF(1, "Adding %s=>%s to link set\n", olsr_ip_to_string(local), olsr_ip_to_string(remote)) #endif --- 471,475 ---- #ifdef DEBUG ! OLSR_PRINTF(1, "Adding %s=>%s to link set\n", olsr_ip_to_string(local), olsr_ip_to_string(remote)); #endif *************** *** 562,566 **** neighbor = olsr_insert_neighbor_table(remote_main); #ifdef DEBUG ! OLSR_PRINTF(3, "ADDING NEW NEIGHBOR ENTRY %s FROM LINK SET\n", olsr_ip_to_string(remote_main)) #endif } --- 562,566 ---- neighbor = olsr_insert_neighbor_table(remote_main); #ifdef DEBUG ! OLSR_PRINTF(3, "ADDING NEW NEIGHBOR ENTRY %s FROM LINK SET\n", olsr_ip_to_string(remote_main)); #endif } *************** *** 588,597 **** * enough in most cases. 10 seconds */ /* Erik Tromp - commented out. It is not RFC-compliant. Also, MID aliases * that are not explicitly declared by a node will be removed as soon as * the olsr_prune_aliases(...) function is called. * ! * OLSR_PRINTF(1, "Adding MID alias main %s ", olsr_ip_to_string(remote_main)) ! * OLSR_PRINTF(1, "-> %s based on HELLO\n\n", olsr_ip_to_string(remote)) * insert_mid_alias(remote_main, remote, MID_ALIAS_HACK_VTIME); */ --- 588,598 ---- * enough in most cases. 10 seconds */ + /* Erik Tromp - commented out. It is not RFC-compliant. Also, MID aliases * that are not explicitly declared by a node will be removed as soon as * the olsr_prune_aliases(...) function is called. * ! * OLSR_PRINTF(1, "Adding MID alias main %s ", olsr_ip_to_string(remote_main)); ! * OLSR_PRINTF(1, "-> %s based on HELLO\n\n", olsr_ip_to_string(remote)); * insert_mid_alias(remote_main, remote, MID_ALIAS_HACK_VTIME); */ *************** *** 911,915 **** { tmp_link_set->L_link_quality = olsr_hyst_calc_instability(tmp_link_set->L_link_quality); ! OLSR_PRINTF(1, "HYST[%s] HELLO timeout %0.3f\n", olsr_ip_to_string(&tmp_link_set->neighbor_iface_addr), tmp_link_set->L_link_quality) /* Update hello_timeout - NO SLACK THIS TIME */ tmp_link_set->hello_timeout = GET_TIMESTAMP(tmp_link_set->last_htime*1000); --- 912,916 ---- { tmp_link_set->L_link_quality = olsr_hyst_calc_instability(tmp_link_set->L_link_quality); ! OLSR_PRINTF(1, "HYST[%s] HELLO timeout %0.3f\n", olsr_ip_to_string(&tmp_link_set->neighbor_iface_addr), tmp_link_set->L_link_quality); /* Update hello_timeout - NO SLACK THIS TIME */ tmp_link_set->hello_timeout = GET_TIMESTAMP(tmp_link_set->last_htime*1000); *************** *** 943,951 **** nowtm->tm_min, nowtm->tm_sec, ! (int)now.tv_usec/10000) if (olsr_cnf->ip_version == AF_INET) { ! OLSR_PRINTF(1, "IP address hyst LQ lost total NLQ ETX\n") fstr = "%-15s %5.3f %5.3f %-3d %-3d %5.3f %.2f\n"; } --- 944,952 ---- nowtm->tm_min, nowtm->tm_sec, ! (int)now.tv_usec/10000); if (olsr_cnf->ip_version == AF_INET) { ! OLSR_PRINTF(1, "IP address hyst LQ lost total NLQ ETX\n"); fstr = "%-15s %5.3f %5.3f %-3d %-3d %5.3f %.2f\n"; } *************** *** 953,957 **** else { ! OLSR_PRINTF(1, "IP address hyst LQ lost total NLQ ETX\n") fstr = "%-39s %5.3f %5.3f %-3d %-3d %5.3f %.2f\n"; } --- 954,958 ---- else { ! OLSR_PRINTF(1, "IP address hyst LQ lost total NLQ ETX\n"); fstr = "%-39s %5.3f %5.3f %-3d %-3d %5.3f %.2f\n"; } *************** *** 971,975 **** walker->L_link_quality, walker->loss_link_quality, walker->lost_packets, walker->total_packets, ! walker->neigh_link_quality, etx) } } --- 972,976 ---- walker->L_link_quality, walker->loss_link_quality, walker->lost_packets, walker->total_packets, ! walker->neigh_link_quality, etx); } } *************** *** 1060,1064 **** else ! OLSR_PRINTF(3, "Skipping Dijkstra (1)\n") // create a new ANSN --- 1061,1065 ---- else ! OLSR_PRINTF(3, "Skipping Dijkstra (1)\n"); // create a new ANSN Index: process_routes.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/process_routes.c,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** process_routes.c 20 Apr 2007 13:46:04 -0000 1.31 --- process_routes.c 25 Apr 2007 22:08:13 -0000 1.32 *************** *** 318,328 **** struct destination_n *tmp; ! OLSR_PRINTF(1, "Deleting all routes...\n") delete_kernel_list = olsr_build_update_list(hna_routes, old_hna); ! OLSR_PRINTF(1, "HNA list:\n") for(tmp = delete_kernel_list;tmp;tmp = tmp->next) { union olsr_ip_addr *tmp_addr = &tmp->destination->rt_dst; ! OLSR_PRINTF(1, "Dest: %s\n", olsr_ip_to_string(tmp_addr)) } --- 318,330 ---- struct destination_n *tmp; ! OLSR_PRINTF(1, "Deleting all routes...\n"); ! delete_kernel_list = olsr_build_update_list(hna_routes, old_hna); ! ! OLSR_PRINTF(1, "HNA list:\n"); for(tmp = delete_kernel_list;tmp;tmp = tmp->next) { union olsr_ip_addr *tmp_addr = &tmp->destination->rt_dst; ! OLSR_PRINTF(1, "Dest: %s\n", olsr_ip_to_string(tmp_addr)); } *************** *** 331,339 **** delete_kernel_list = olsr_build_update_list(routingtable,old_routes); ! OLSR_PRINTF(1, "Route list:\n") for(tmp = delete_kernel_list;tmp;tmp = tmp->next) { union olsr_ip_addr *tmp_addr = &tmp->destination->rt_dst; ! OLSR_PRINTF(1, "Dest: %s\n", olsr_ip_to_string(tmp_addr)) } olsr_delete_routes_from_kernel(delete_kernel_list); --- 333,341 ---- delete_kernel_list = olsr_build_update_list(routingtable,old_routes); ! OLSR_PRINTF(1, "Route list:\n"); for(tmp = delete_kernel_list;tmp;tmp = tmp->next) { union olsr_ip_addr *tmp_addr = &tmp->destination->rt_dst; ! OLSR_PRINTF(1, "Dest: %s\n", olsr_ip_to_string(tmp_addr)); } olsr_delete_routes_from_kernel(delete_kernel_list); *************** *** 354,358 **** struct destination_n *add_kernel_list; ! OLSR_PRINTF(3, "Updating kernel routes...\n") delete_kernel_list = olsr_build_update_list(old_routes, routingtable); add_kernel_list = olsr_build_update_list(routingtable, old_routes); --- 356,360 ---- struct destination_n *add_kernel_list; ! OLSR_PRINTF(3, "Updating kernel routes...\n"); delete_kernel_list = olsr_build_update_list(old_routes, routingtable); add_kernel_list = olsr_build_update_list(routingtable, old_routes); *************** *** 376,380 **** struct destination_n *add_kernel_list; ! OLSR_PRINTF(3, "Updating kernel HNA routes...\n") delete_kernel_list = olsr_build_update_list(old_hna, hna_routes); --- 378,382 ---- struct destination_n *add_kernel_list; ! OLSR_PRINTF(3, "Updating kernel HNA routes...\n"); delete_kernel_list = olsr_build_update_list(old_hna, hna_routes); *************** *** 449,453 **** #ifdef DEBUG OLSR_PRINTF(3, "%s highest metric %d\n", ! __func__, metric_counter) #endif --- 451,455 ---- #ifdef DEBUG OLSR_PRINTF(3, "%s highest metric %d\n", ! __func__, metric_counter); #endif *************** *** 479,483 **** OLSR_PRINTF(3, "Deleting route to %s hopcount %d\n", olsr_ip_to_string(&destination_ptr->destination->rt_dst), ! destination_ptr->destination->rt_metric) #endif if(!olsr_cnf->host_emul) --- 481,485 ---- OLSR_PRINTF(3, "Deleting route to %s hopcount %d\n", olsr_ip_to_string(&destination_ptr->destination->rt_dst), ! destination_ptr->destination->rt_metric); #endif if(!olsr_cnf->host_emul) *************** *** 490,495 **** if(error < 0) { ! OLSR_PRINTF(1, "Delete route(%s):%s\n", olsr_ip_to_string(&destination_ptr->destination->rt_dst), strerror(errno)) ! olsr_syslog(OLSR_LOG_ERR, "Delete route:%m"); } } --- 492,498 ---- if(error < 0) { ! const char * const err_msg = strerror(errno); ! OLSR_PRINTF(1, "Delete route(%s):%s\n", olsr_ip_to_string(&destination_ptr->destination->rt_dst), err_msg); ! olsr_syslog(OLSR_LOG_ERR, "Delete route:%s", err_msg); } } *************** *** 564,568 **** OLSR_PRINTF(3, "Adding route to %s hopcount %d\n", olsr_ip_to_string(&destination_kernel->destination->rt_dst), ! destination_kernel->destination->rt_metric) #endif --- 567,571 ---- OLSR_PRINTF(3, "Adding route to %s hopcount %d\n", olsr_ip_to_string(&destination_kernel->destination->rt_dst), ! destination_kernel->destination->rt_metric); #endif *************** *** 576,581 **** if(error < 0) { ! OLSR_PRINTF(1, "Add route(%s): %s\n", olsr_ip_to_string(&destination_kernel->destination->rt_dst), strerror(errno)) ! olsr_syslog(OLSR_LOG_ERR, "Add route:%m"); } } --- 579,585 ---- if(error < 0) { ! const char * const err_msg = strerror(errno); ! OLSR_PRINTF(1, "Add route(%s): %s\n", olsr_ip_to_string(&destination_kernel->destination->rt_dst), err_msg); ! olsr_syslog(OLSR_LOG_ERR, "Add route:%s", err_msg); } } Index: neighbor_table.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/neighbor_table.c,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** neighbor_table.c 20 Apr 2007 13:46:04 -0000 1.31 --- neighbor_table.c 25 Apr 2007 22:08:09 -0000 1.32 *************** *** 468,481 **** nowtm->tm_min, nowtm->tm_sec, ! (int)now.tv_usec/10000) if (olsr_cnf->ip_version == AF_INET) { ! OLSR_PRINTF(1, "IP address LQ NLQ SYM MPR MPRS will\n") fstr = "%-15s %5.3f %5.3f %s %s %s %d\n"; } else { ! OLSR_PRINTF(1, "IP address LQ NLQ SYM MPR MPRS will\n") fstr = "%-39s %5.3f %5.3f %s %s %s %d\n"; } --- 468,481 ---- nowtm->tm_min, nowtm->tm_sec, ! (int)now.tv_usec/10000); if (olsr_cnf->ip_version == AF_INET) { ! OLSR_PRINTF(1, "IP address LQ NLQ SYM MPR MPRS will\n"); fstr = "%-15s %5.3f %5.3f %s %s %s %d\n"; } else { ! OLSR_PRINTF(1, "IP address LQ NLQ SYM MPR MPRS will\n"); fstr = "%-39s %5.3f %5.3f %s %s %s %d\n"; } *************** *** 497,501 **** neigh->is_mpr ? "YES " : "NO ", olsr_lookup_mprs_set(&neigh->neighbor_main_addr) == NULL ? "NO " : "YES ", ! neigh->willingness) } } --- 497,501 ---- neigh->is_mpr ? "YES " : "NO ", olsr_lookup_mprs_set(&neigh->neighbor_main_addr) == NULL ? "NO " : "YES ", ! neigh->willingness); } } Index: interfaces.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/interfaces.c,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** interfaces.c 20 Apr 2007 13:46:04 -0000 1.30 --- interfaces.c 25 Apr 2007 22:08:08 -0000 1.31 *************** *** 102,106 **** } ! OLSR_PRINTF(1, "\n ---- Interface configuration ---- \n\n") /* Run trough all interfaces immedeatly */ for(tmp_if = olsr_cnf->interfaces; tmp_if != NULL; tmp_if = tmp_if->next) --- 102,106 ---- } ! OLSR_PRINTF(1, "\n ---- Interface configuration ---- \n\n"); /* Run trough all interfaces immedeatly */ for(tmp_if = olsr_cnf->interfaces; tmp_if != NULL; tmp_if = tmp_if->next) Index: olsr_types.h =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/olsr_types.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** olsr_types.h 20 Apr 2007 13:46:04 -0000 1.6 --- olsr_types.h 25 Apr 2007 22:08:09 -0000 1.7 *************** *** 51,59 **** #include ! typedef enum ! { OLSR_FALSE = 0, OLSR_TRUE ! }olsr_bool; #if defined linux || defined __MacOSX__ --- 51,58 ---- #include ! typedef enum { OLSR_FALSE = 0, OLSR_TRUE ! } olsr_bool; #if defined linux || defined __MacOSX__ Index: socket_parser.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/socket_parser.c,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** socket_parser.c 20 Apr 2007 13:46:04 -0000 1.24 --- socket_parser.c 25 Apr 2007 22:08:17 -0000 1.25 *************** *** 82,86 **** return; } ! OLSR_PRINTF(2, "Adding OLSR socket entry %d\n", fd) new_entry = olsr_malloc(sizeof(struct olsr_socket_entry), "Socket entry"); --- 82,86 ---- return; } ! OLSR_PRINTF(2, "Adding OLSR socket entry %d\n", fd); new_entry = olsr_malloc(sizeof(struct olsr_socket_entry), "Socket entry"); *************** *** 115,119 **** return 0; } ! OLSR_PRINTF(1, "Removing OLSR socket entry %d\n", fd) entry = olsr_socket_entries; --- 115,119 ---- return 0; } ! OLSR_PRINTF(1, "Removing OLSR socket entry %d\n", fd); entry = olsr_socket_entries; *************** *** 186,194 **** if (n < 0) { ! if(errno == EINTR) ! return; ! ! olsr_syslog(OLSR_LOG_ERR, "select: %m"); ! OLSR_PRINTF(1, "Error select: %s", strerror(errno)) return; } --- 186,194 ---- if (n < 0) { ! if(errno != EINTR) { ! const char * const err_msg = strerror(errno); ! olsr_syslog(OLSR_LOG_ERR, "select: %s", err_msg); ! OLSR_PRINTF(1, "Error select: %s", err_msg); ! } return; } Index: duplicate_set.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/duplicate_set.c,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** duplicate_set.c 20 Apr 2007 13:46:04 -0000 1.14 --- duplicate_set.c 25 Apr 2007 22:08:07 -0000 1.15 *************** *** 62,66 **** int i; ! OLSR_PRINTF(3, "Initializing duplicatetable - hashsize %d\n", HASHSIZE) /* Since the holdingtime is rather large for duplicate --- 62,66 ---- int i; ! OLSR_PRINTF(3, "Initializing duplicatetable - hashsize %d\n", HASHSIZE); /* Since the holdingtime is rather large for duplicate *************** *** 243,247 **** OLSR_PRINTF(5, "DUP TIMEOUT[%s] s: %d\n", olsr_ip_to_string(&tmp_dup_table->addr), ! tmp_dup_table->seqno) #endif tmp_dup_table = tmp_dup_table->next; --- 243,247 ---- OLSR_PRINTF(5, "DUP TIMEOUT[%s] s: %d\n", olsr_ip_to_string(&tmp_dup_table->addr), ! tmp_dup_table->seqno); #endif tmp_dup_table = tmp_dup_table->next; *************** *** 333,337 **** #ifdef DEBUG ! OLSR_PRINTF(3, "Setting DUP %s/%d forwarded\n", olsr_ip_to_string(&tmp_dup_table->addr), seqno) #endif --- 333,337 ---- #ifdef DEBUG ! OLSR_PRINTF(3, "Setting DUP %s/%d forwarded\n", olsr_ip_to_string(&tmp_dup_table->addr), seqno); #endif Index: plugin_loader.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/plugin_loader.c,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** plugin_loader.c 20 Apr 2007 13:46:04 -0000 1.24 --- plugin_loader.c 25 Apr 2007 22:08:13 -0000 1.25 *************** *** 65,73 **** struct plugin_entry *entry = olsr_cnf->plugins; int loaded = 0; ! OLSR_PRINTF(1, "Loading plugins...\n\n") while(entry) { if(olsr_load_dl(entry->name, entry->params) < 0) ! OLSR_PRINTF(1, "-- PLUGIN LOADING FAILED! --\n\n") else loaded++; --- 65,73 ---- struct plugin_entry *entry = olsr_cnf->plugins; int loaded = 0; ! OLSR_PRINTF(1, "Loading plugins...\n\n"); while(entry) { if(olsr_load_dl(entry->name, entry->params) < 0) ! OLSR_PRINTF(1, "-- PLUGIN LOADING FAILED! --\n\n"); else loaded++; *************** *** 94,116 **** int *interface_version; ! OLSR_PRINTF(1, "---------- Plugin loader ----------\nLibrary: %s\n", libname) if((new_entry.dlhandle = dlopen(libname, RTLD_NOW)) == NULL) { ! OLSR_PRINTF(1, "DL loading failed: \"%s\"!\n", dlerror()) return -1; } /* Fetch the interface version function, 3 different ways */ ! OLSR_PRINTF(1, "Checking plugin interface version... ") if((get_interface_version = dlsym(new_entry.dlhandle, "olsrd_plugin_interface_version")) == NULL) { ! OLSR_PRINTF(1, "trying v2 detection... ") if((get_interface_version = dlsym(new_entry.dlhandle, "get_plugin_interface_version")) == NULL) { ! OLSR_PRINTF(1, "trying v1 detection... ") if((interface_version = dlsym(new_entry.dlhandle, "plugin_interface_version")) == NULL) { ! OLSR_PRINTF(1, "FAILED: \"%s\"\n", dlerror()) dlclose(new_entry.dlhandle); return -1; --- 94,116 ---- int *interface_version; ! OLSR_PRINTF(1, "---------- Plugin loader ----------\nLibrary: %s\n", libname); if((new_entry.dlhandle = dlopen(libname, RTLD_NOW)) == NULL) { ! OLSR_PRINTF(1, "DL loading failed: \"%s\"!\n", dlerror()); return -1; } /* Fetch the interface version function, 3 different ways */ ! OLSR_PRINTF(1, "Checking plugin interface version... "); if((get_interface_version = dlsym(new_entry.dlhandle, "olsrd_plugin_interface_version")) == NULL) { ! OLSR_PRINTF(1, "trying v2 detection... "); if((get_interface_version = dlsym(new_entry.dlhandle, "get_plugin_interface_version")) == NULL) { ! OLSR_PRINTF(1, "trying v1 detection... "); if((interface_version = dlsym(new_entry.dlhandle, "plugin_interface_version")) == NULL) { ! OLSR_PRINTF(1, "FAILED: \"%s\"\n", dlerror()); dlclose(new_entry.dlhandle); return -1; *************** *** 130,134 **** new_entry.plugin_interface_version = get_interface_version(); } ! OLSR_PRINTF(1, " %d - OK\n", new_entry.plugin_interface_version) if ( new_entry.plugin_interface_version < 4 ) --- 130,134 ---- new_entry.plugin_interface_version = get_interface_version(); } ! OLSR_PRINTF(1, " %d - OK\n", new_entry.plugin_interface_version); if ( new_entry.plugin_interface_version < 4 ) *************** *** 136,140 **** /* old plugin interface */ ! OLSR_PRINTF(1, "\nWARNING: YOU ARE USING AN OLD DEPRECATED PLUGIN INTERFACE! DETECTED VERSION %d CURRENT VERSION %d\nPLEASE UPGRADE YOUR PLUGIN!\nWILL CONTINUE IN 5 SECONDS...\n\n", new_entry.plugin_interface_version, OLSRD_PLUGIN_INTERFACE_VERSION) sleep(5); --- 136,140 ---- /* old plugin interface */ ! OLSR_PRINTF(1, "\nWARNING: YOU ARE USING AN OLD DEPRECATED PLUGIN INTERFACE! DETECTED VERSION %d CURRENT VERSION %d\nPLEASE UPGRADE YOUR PLUGIN!\nWILL CONTINUE IN 5 SECONDS...\n\n", new_entry.plugin_interface_version, OLSRD_PLUGIN_INTERFACE_VERSION); sleep(5); *************** *** 148,160 **** if ( new_entry.plugin_interface_version != OLSRD_PLUGIN_INTERFACE_VERSION ) { ! OLSR_PRINTF(1, "\n\nWARNING: VERSION MISSMATCH! DETECTED %d CURRENT VERSION %d\nTHIS CAN CAUSE UNEXPECTED BEHAVIOUR AND CRASHES!\nWILL CONTINUE IN 5 SECONDS...\n\n", get_interface_version(), OLSRD_PLUGIN_INTERFACE_VERSION) sleep(5); } /* Fetch the init function */ ! OLSR_PRINTF(1, "Trying to fetch plugin init function... ") if((new_entry.plugin_init = dlsym(new_entry.dlhandle, "olsrd_plugin_init")) == NULL) { ! OLSR_PRINTF(1, "FAILED: \"%s\"\n", dlerror()) dlclose(new_entry.dlhandle); return -1; --- 148,160 ---- if ( new_entry.plugin_interface_version != OLSRD_PLUGIN_INTERFACE_VERSION ) { ! OLSR_PRINTF(1, "\n\nWARNING: VERSION MISSMATCH! DETECTED %d CURRENT VERSION %d\nTHIS CAN CAUSE UNEXPECTED BEHAVIOUR AND CRASHES!\nWILL CONTINUE IN 5 SECONDS...\n\n", get_interface_version(), OLSRD_PLUGIN_INTERFACE_VERSION); sleep(5); } /* Fetch the init function */ ! OLSR_PRINTF(1, "Trying to fetch plugin init function... "); if((new_entry.plugin_init = dlsym(new_entry.dlhandle, "olsrd_plugin_init")) == NULL) { ! OLSR_PRINTF(1, "FAILED: \"%s\"\n", dlerror()); dlclose(new_entry.dlhandle); return -1; *************** *** 162,175 **** else { ! OLSR_PRINTF(1, "OK\n") } } /* Fetch the parameter function */ ! OLSR_PRINTF(1, "Trying to fetch param function... ") if((new_entry.register_param = dlsym(new_entry.dlhandle, "olsrd_plugin_register_param")) == NULL) ! OLSR_PRINTF(1, "FAILED: \"%s\"\n", dlerror()) else ! OLSR_PRINTF(1, "OK\n") entry = olsr_malloc(sizeof(struct olsr_plugin), "Plugin entry"); --- 162,175 ---- else { ! OLSR_PRINTF(1, "OK\n"); } } /* Fetch the parameter function */ ! OLSR_PRINTF(1, "Trying to fetch param function... "); if((new_entry.register_param = dlsym(new_entry.dlhandle, "olsrd_plugin_register_param")) == NULL) ! OLSR_PRINTF(1, "FAILED: \"%s\"\n", dlerror()); else ! OLSR_PRINTF(1, "OK\n"); entry = olsr_malloc(sizeof(struct olsr_plugin), "Plugin entry"); *************** *** 184,188 **** olsr_plugins = entry; ! OLSR_PRINTF(1, "---------- LIBRARY LOADED ----------\n\n") return 0; --- 184,188 ---- olsr_plugins = entry; ! OLSR_PRINTF(1, "---------- LIBRARY LOADED ----------\n\n"); return 0; *************** *** 206,214 **** { struct plugin_param *params; ! OLSR_PRINTF(1, "Sending parameters...\n") for(params = entry->params;params;params = params->next) { int retval = entry->register_param(params->key, params->value); ! OLSR_PRINTF(1, "\"%s\"/\"%s\"... ", params->key, params->value) if(retval < 0) { --- 206,214 ---- { struct plugin_param *params; ! OLSR_PRINTF(1, "Sending parameters...\n"); for(params = entry->params;params;params = params->next) { int retval = entry->register_param(params->key, params->value); ! OLSR_PRINTF(1, "\"%s\"/\"%s\"... ", params->key, params->value); if(retval < 0) { *************** *** 216,224 **** exit(EXIT_FAILURE); } ! OLSR_PRINTF(1, "%s\n", retval == 0 ? "FAILED" : "OK") } } ! OLSR_PRINTF(1, "Running plugin_init function...\n") entry->plugin_init(); } --- 216,224 ---- exit(EXIT_FAILURE); } ! OLSR_PRINTF(1, "%s\n", retval == 0 ? "FAILED" : "OK"); } } ! OLSR_PRINTF(1, "Running plugin_init function...\n"); entry->plugin_init(); } *************** *** 233,237 **** struct olsr_plugin *entry; ! OLSR_PRINTF(1, "Closing plugins...\n") for(entry = olsr_plugins; entry != NULL; entry = entry->next) dlclose(entry->dlhandle); --- 233,237 ---- struct olsr_plugin *entry; ! OLSR_PRINTF(1, "Closing plugins...\n"); for(entry = olsr_plugins; entry != NULL; entry = entry->next) dlclose(entry->dlhandle); Index: lq_route.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/lq_route.c,v retrieving revision 1.45 retrieving revision 1.46 diff -C2 -d -r1.45 -r1.46 *** lq_route.c 29 Mar 2007 00:05:50 -0000 1.45 --- lq_route.c 25 Apr 2007 22:08:09 -0000 1.46 *************** *** 595,599 **** nowtm->tm_min, nowtm->tm_sec, ! (int)now.tv_usec/10000) for (node = list_get_next(node); node != NULL; node = list_get_next(node)) --- 595,599 ---- nowtm->tm_min, nowtm->tm_sec, ! (int)now.tv_usec/10000); for (node = list_get_next(node); node != NULL; node = list_get_next(node)) *************** *** 610,614 **** { OLSR_PRINTF(2, "%s:%s <- ", olsr_ip_to_string(&walker->addr), ! etx_to_string(walker->path_etx)) hops++; } --- 610,614 ---- { OLSR_PRINTF(2, "%s:%s <- ", olsr_ip_to_string(&walker->addr), ! etx_to_string(walker->path_etx)); hops++; } *************** *** 619,623 **** { OLSR_PRINTF(2, "%s:%s (one-hop)\n", olsr_ip_to_string(&walker->addr), ! etx_to_string(walker->path_etx)) // node reachable => add to the set of unprocessed nodes --- 619,623 ---- { OLSR_PRINTF(2, "%s:%s (one-hop)\n", olsr_ip_to_string(&walker->addr), ! etx_to_string(walker->path_etx)); // node reachable => add to the set of unprocessed nodes *************** *** 629,633 **** else { ! OLSR_PRINTF(2, "%s FAILED\n", olsr_ip_to_string(&vert->addr)) continue; } --- 629,633 ---- else { ! OLSR_PRINTF(2, "%s FAILED\n", olsr_ip_to_string(&vert->addr)); continue; } Index: net_olsr.h =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/net_olsr.h,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** net_olsr.h 20 Apr 2007 13:46:04 -0000 1.8 --- net_olsr.h 25 Apr 2007 22:08:09 -0000 1.9 *************** *** 65,69 **** int ! net_outbuffer_bytes_left(struct interface *); olsr_u16_t --- 65,69 ---- int ! net_outbuffer_bytes_left(const struct interface *); olsr_u16_t *************** *** 74,84 **** int ! net_outbuffer_push(struct interface *, olsr_u8_t *, olsr_u16_t); int ! net_outbuffer_push_reserved(struct interface *, olsr_u8_t *, olsr_u16_t); int ! net_output(struct interface*); int --- 74,84 ---- int ! net_outbuffer_push(struct interface *, const void *, const olsr_u16_t); int ! net_outbuffer_push_reserved(struct interface *, const void *, const olsr_u16_t); int ! net_output(struct interface *); int Index: defs.h =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/defs.h,v retrieving revision 1.57 retrieving revision 1.58 diff -C2 -d -r1.57 -r1.58 *** defs.h 20 Apr 2007 13:46:04 -0000 1.57 --- defs.h 25 Apr 2007 22:08:07 -0000 1.58 *************** *** 60,69 **** #include "olsr_cfg.h" ! #define SOFTWARE_VERSION "olsr.org - " VERSION ! #define OLSRD_VERSION_DATE " *** " SOFTWARE_VERSION " (" __DATE__ ") ***\n" #ifndef OLSRD_GLOBAL_CONF_FILE ! #define OLSRD_CONF_FILE_NAME "olsrd.conf" ! #define OLSRD_GLOBAL_CONF_FILE "/etc/" OLSRD_CONF_FILE_NAME #endif --- 60,69 ---- #include "olsr_cfg.h" ! #define SOFTWARE_VERSION "olsr.org - " VERSION ! #define OLSRD_VERSION_DATE " *** " SOFTWARE_VERSION " (" __DATE__ ") ***\n" #ifndef OLSRD_GLOBAL_CONF_FILE ! #define OLSRD_CONF_FILE_NAME "olsrd.conf" ! #define OLSRD_GLOBAL_CONF_FILE "/etc/" OLSRD_CONF_FILE_NAME #endif *************** *** 72,81 **** #define UDP_IPV6_HDRSIZE 62 ! #define MIN_PACKET_SIZE(ver) (int)(sizeof(olsr_u8_t) * ((ver == AF_INET) ? 4 : 7)) /* Debug helper macro */ #ifdef DEBUG ! #define olsr_debug(lvl,format,args...) do { \ ! OLSR_PRINTF(lvl, "%s (%s:%d): ", __func__, __FILE__, __LINE__); \ ! OLSR_PRINTF(lvl, format, ##args); \ } while (0) #endif --- 72,81 ---- #define UDP_IPV6_HDRSIZE 62 ! #define MIN_PACKET_SIZE(ver) ((int)(sizeof(olsr_u8_t) * (((ver) == AF_INET) ? 4 : 7))) /* Debug helper macro */ #ifdef DEBUG ! #define olsr_debug(lvl, format, args...) do { \ ! OLSR_PRINTF(lvl, "%s (%s:%d): ", __func__, __FILE__, __LINE__); \ ! OLSR_PRINTF(lvl, (format), ##args); \ } while (0) #endif *************** *** 84,107 **** #ifdef NODEBUG ! #define OLSR_PRINTF(lvl, format, args...) \ ! { } #else ! #define OLSR_PRINTF(lvl, format, args...) \ ! { \ ! if((olsr_cnf->debug_level >= lvl) && debug_handle) \ ! fprintf(debug_handle, format, ##args); \ ! } #endif /* Provides a timestamp s1 milliseconds in the future according to system ticks returned by times(2) */ ! #define GET_TIMESTAMP(s1) \ ! (now_times + ((s1) / olsr_cnf->system_tick_divider)) ! #define TIMED_OUT(s1) \ ! ((int)((s1) - now_times) < 0) ! #define ARRAYSIZE(x) (sizeof(x)/sizeof(*(x))) /* --- 84,103 ---- #ifdef NODEBUG ! #define OLSR_PRINTF(lvl, format, args...) do { } while(0) #else ! #define OLSR_PRINTF(lvl, format, args...) do { \ ! if((olsr_cnf->debug_level >= (lvl)) && debug_handle) \ ! fprintf(debug_handle, (format), ##args); \ ! } while (0) #endif /* Provides a timestamp s1 milliseconds in the future according to system ticks returned by times(2) */ ! #define GET_TIMESTAMP(s1) (now_times + ((s1) / olsr_cnf->system_tick_divider)) ! #define TIMED_OUT(s1) ((int)((s1) - now_times) < 0) ! #define ARRAYSIZE(x) (sizeof(x)/sizeof(*(x))) /* *************** *** 111,126 **** /* First "argument" is NOT a pointer! */ ! #define QUEUE_ELEM(pre, new) \ ! pre.next->prev = new; \ ! new->next = pre.next; \ ! new->prev = ⪯ \ ! pre.next = new ! #define DEQUEUE_ELEM(elem) \ ! elem->prev->next = elem->next; \ ! elem->next->prev = elem->prev ! #define CLOSE(fd) do { close(fd); (fd) = -1;} while (0) /* --- 107,124 ---- /* First "argument" is NOT a pointer! */ ! #define QUEUE_ELEM(pre, new) do { \ ! pre.next->prev = new; \ ! new->next = pre.next; \ ! new->prev = ⪯ \ ! pre.next = new; \ ! } while (0) ! #define DEQUEUE_ELEM(elem) do { \ ! elem->prev->next = elem->next; \ ! elem->next->prev = elem->prev; \ ! } while (0) ! #define CLOSE(fd) do { close(fd); (fd) = -1; } while (0) /* Index: packet.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/packet.c,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** packet.c 7 Jan 2006 08:16:20 -0000 1.21 --- packet.c 25 Apr 2007 22:08:09 -0000 1.22 *************** *** 95,99 **** #ifdef DEBUG ! OLSR_PRINTF(3, "\tBuilding HELLO on interface %d\n", outif->if_nr) #endif --- 95,99 ---- #ifdef DEBUG ! OLSR_PRINTF(3, "\tBuilding HELLO on interface %d\n", outif->if_nr); #endif *************** *** 107,111 **** message->willingness = olsr_cnf->willingness; #ifdef DEBUG ! OLSR_PRINTF(3, "Willingness: %d\n", olsr_cnf->willingness) #endif --- 107,111 ---- message->willingness = olsr_cnf->willingness; #ifdef DEBUG ! OLSR_PRINTF(3, "Willingness: %d\n", olsr_cnf->willingness); #endif *************** *** 116,120 **** #ifdef DEBUG ! OLSR_PRINTF(5, "On link:\n") #endif --- 116,120 ---- #ifdef DEBUG ! OLSR_PRINTF(5, "On link:\n"); #endif *************** *** 194,199 **** COPY_IP(&message_neighbor->main_address, &links->neighbor->neighbor_main_addr); #ifdef DEBUG ! OLSR_PRINTF(5, "Added: %s - ", olsr_ip_to_string(&message_neighbor->address)) ! OLSR_PRINTF(5, " status %d\n", message_neighbor->status) #endif message_neighbor->next=message->neighbors; --- 194,199 ---- COPY_IP(&message_neighbor->main_address, &links->neighbor->neighbor_main_addr); #ifdef DEBUG ! OLSR_PRINTF(5, "Added: %s - ", olsr_ip_to_string(&message_neighbor->address)); ! OLSR_PRINTF(5, " status %d\n", message_neighbor->status); #endif message_neighbor->next=message->neighbors; *************** *** 208,212 **** #ifdef DEBUG ! OLSR_PRINTF(5, "Not on link:\n") #endif --- 208,212 ---- #ifdef DEBUG ! OLSR_PRINTF(5, "Not on link:\n"); #endif *************** *** 292,297 **** COPY_IP(&message_neighbor->main_address, &neighbor->neighbor_main_addr); #ifdef DEBUG ! OLSR_PRINTF(5, "Added: %s - ", olsr_ip_to_string(&message_neighbor->address)) ! OLSR_PRINTF(5, " status %d\n", message_neighbor->status) #endif message_neighbor->next=message->neighbors; --- 292,297 ---- COPY_IP(&message_neighbor->main_address, &neighbor->neighbor_main_addr); #ifdef DEBUG ! OLSR_PRINTF(5, "Added: %s - ", olsr_ip_to_string(&message_neighbor->address)); ! OLSR_PRINTF(5, " status %d\n", message_neighbor->status); #endif message_neighbor->next=message->neighbors; *************** *** 429,433 **** { /* Send empty TC */ ! OLSR_PRINTF(3, "No more MPR selectors - will send empty TCs\n") set_empty_tc_timer(GET_TIMESTAMP((olsr_cnf->max_tc_vtime*3)*1000)); --- 429,433 ---- { /* Send empty TC */ ! OLSR_PRINTF(3, "No more MPR selectors - will send empty TCs\n"); set_empty_tc_timer(GET_TIMESTAMP((olsr_cnf->max_tc_vtime*3)*1000)); Index: process_package.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/process_package.c,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -d -r1.39 -r1.40 *** process_package.c 20 Apr 2007 13:46:04 -0000 1.39 --- process_package.c 25 Apr 2007 22:08:13 -0000 1.40 *************** *** 135,139 **** else ! OLSR_PRINTF(3, "Skipping Dijkstra (2)\n") // create a new ANSN --- 135,139 ---- else ! OLSR_PRINTF(3, "Skipping Dijkstra (2)\n"); // create a new ANSN *************** *** 171,175 **** olsr_ip_to_string(&neighbor->neighbor_main_addr), neighbor->willingness, ! message->willingness) /* *If willingness changed - recalculate --- 171,175 ---- olsr_ip_to_string(&neighbor->neighbor_main_addr), neighbor->willingness, ! message->willingness); /* *If willingness changed - recalculate *************** *** 230,234 **** OLSR_PRINTF(3, "Processing TC from %s\n", ! olsr_ip_to_string(&message->originator)) /* --- 230,234 ---- OLSR_PRINTF(3, "Processing TC from %s\n", ! olsr_ip_to_string(&message->originator)); /* *************** *** 241,245 **** { OLSR_PRINTF(2, "Received TC from NON SYM neighbor %s\n", ! olsr_ip_to_string(from_addr)) olsr_free_tc_packet(message); return; --- 241,245 ---- { OLSR_PRINTF(2, "Received TC from NON SYM neighbor %s\n", ! olsr_ip_to_string(from_addr)); olsr_free_tc_packet(message); return; *************** *** 249,261 **** { mpr = message->multipoint_relay_selector_address; ! OLSR_PRINTF(3, "mpr_selector_list:[") while(mpr!=NULL) { ! OLSR_PRINTF(3, "%s:", olsr_ip_to_string(&mpr->address)) mpr=mpr->next; } ! OLSR_PRINTF(3, "]\n") } --- 249,261 ---- { mpr = message->multipoint_relay_selector_address; ! OLSR_PRINTF(3, "mpr_selector_list:["); while(mpr!=NULL) { ! OLSR_PRINTF(3, "%s:", olsr_ip_to_string(&mpr->address)); mpr=mpr->next; } ! OLSR_PRINTF(3, "]\n"); } *************** *** 295,299 **** { OLSR_PRINTF(3, "Dropping empty TC from %s\n", ! olsr_ip_to_string(&message->originator)) } } --- 295,299 ---- { OLSR_PRINTF(3, "Dropping empty TC from %s\n", ! olsr_ip_to_string(&message->originator)); } } *************** *** 373,377 **** #ifdef DEBUG ! OLSR_PRINTF(5, "Processing MID from %s...\n", olsr_ip_to_string(&message.mid_origaddr)) #endif tmp_adr = message.mid_addr; --- 373,377 ---- #ifdef DEBUG ! OLSR_PRINTF(5, "Processing MID from %s...\n", olsr_ip_to_string(&message.mid_origaddr)); #endif tmp_adr = message.mid_addr; *************** *** 385,389 **** if(check_neighbor_link(from_addr) != SYM_LINK) { ! OLSR_PRINTF(2, "Received MID from NON SYM neighbor %s\n", olsr_ip_to_string(from_addr)) olsr_free_mid_packet(&message); return; --- 385,389 ---- if(check_neighbor_link(from_addr) != SYM_LINK) { ! OLSR_PRINTF(2, "Received MID from NON SYM neighbor %s\n", olsr_ip_to_string(from_addr)); olsr_free_mid_packet(&message); return; *************** *** 397,402 **** if(!mid_lookup_main_addr(&tmp_adr->alias_addr)) { ! OLSR_PRINTF(1, "MID new: (%s, ", olsr_ip_to_string(&message.mid_origaddr)) ! OLSR_PRINTF(1, "%s)\n", olsr_ip_to_string(&tmp_adr->alias_addr)) insert_mid_alias(&message.mid_origaddr, &tmp_adr->alias_addr, (float)message.vtime); } --- 397,402 ---- if(!mid_lookup_main_addr(&tmp_adr->alias_addr)) { ! OLSR_PRINTF(1, "MID new: (%s, ", olsr_ip_to_string(&message.mid_origaddr)); ! OLSR_PRINTF(1, "%s)\n", olsr_ip_to_string(&tmp_adr->alias_addr)); insert_mid_alias(&message.mid_origaddr, &tmp_adr->alias_addr, (float)message.vtime); } *************** *** 439,443 **** #ifdef DEBUG ! OLSR_PRINTF(5, "Processing HNA\n") #endif --- 439,443 ---- #ifdef DEBUG ! OLSR_PRINTF(5, "Processing HNA\n"); #endif *************** *** 465,469 **** if(check_neighbor_link(from_addr) != SYM_LINK) { ! OLSR_PRINTF(2, "Received HNA from NON SYM neighbor %s\n", olsr_ip_to_string(from_addr)) olsr_free_hna_packet(&message); return; --- 465,469 ---- if(check_neighbor_link(from_addr) != SYM_LINK) { ! OLSR_PRINTF(2, "Received HNA from NON SYM neighbor %s\n", olsr_ip_to_string(from_addr)); olsr_free_hna_packet(&message); return; *************** *** 539,543 **** olsr_lookup_my_neighbors(neighbor, &message_neighbors->address); #ifdef DEBUG ! OLSR_PRINTF(7, "\tProcessing %s\n", olsr_ip_to_string(&message_neighbors->address)) #endif if (two_hop_neighbor_yet != NULL) --- 539,543 ---- olsr_lookup_my_neighbors(neighbor, &message_neighbors->address); #ifdef DEBUG ! OLSR_PRINTF(7, "\tProcessing %s\n", olsr_ip_to_string(&message_neighbors->address)); #endif if (two_hop_neighbor_yet != NULL) *************** *** 581,585 **** OLSR_PRINTF(5, "Adding 2 hop neighbor %s\n\n", ! olsr_ip_to_string(&message_neighbors->address)) #endif changes_neighborhood = OLSR_TRUE; --- 581,585 ---- OLSR_PRINTF(5, "Adding 2 hop neighbor %s\n\n", ! olsr_ip_to_string(&message_neighbors->address)); #endif changes_neighborhood = OLSR_TRUE; *************** *** 772,776 **** else ! OLSR_PRINTF(3, "Skipping Dijkstra (3)\n") } } --- 772,776 ---- else ! OLSR_PRINTF(3, "Skipping Dijkstra (3)\n"); } } Index: mid_set.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/mid_set.c,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** mid_set.c 20 Apr 2007 14:23:41 -0000 1.19 --- mid_set.c 25 Apr 2007 22:08:09 -0000 1.20 *************** *** 65,69 **** int index; ! OLSR_PRINTF(5, "MID: init\n") /* Since the holdingtime is assumed to be rather large for --- 65,69 ---- int index; ! OLSR_PRINTF(5, "MID: init\n"); /* Since the holdingtime is assumed to be rather large for *************** *** 168,173 **** if((tmp_2_neighbor = olsr_lookup_two_hop_neighbor_table_mid(&tmp_adr->alias)) != NULL) { ! OLSR_PRINTF(1, "Deleting 2 hop node from MID: %s to ", olsr_ip_to_string(&tmp_adr->alias)) ! OLSR_PRINTF(1, "%s\n", olsr_ip_to_string(m_addr)) olsr_delete_two_hop_neighbor_table(tmp_2_neighbor); --- 168,173 ---- if((tmp_2_neighbor = olsr_lookup_two_hop_neighbor_table_mid(&tmp_adr->alias)) != NULL) { ! OLSR_PRINTF(1, "Deleting 2 hop node from MID: %s to ", olsr_ip_to_string(&tmp_adr->alias)); ! OLSR_PRINTF(1, "%s\n", olsr_ip_to_string(m_addr)); olsr_delete_two_hop_neighbor_table(tmp_2_neighbor); *************** *** 181,186 **** { ! OLSR_PRINTF(1, "[MID]Deleting bogus neighbor entry %s real ", olsr_ip_to_string(&tmp_adr->alias)) ! OLSR_PRINTF(1, "%s\n", olsr_ip_to_string(m_addr)) replace_neighbor_link_set(tmp_neigh, real_neigh); --- 181,186 ---- { ! OLSR_PRINTF(1, "[MID]Deleting bogus neighbor entry %s real ", olsr_ip_to_string(&tmp_adr->alias)); ! OLSR_PRINTF(1, "%s\n", olsr_ip_to_string(m_addr)); replace_neighbor_link_set(tmp_neigh, real_neigh); *************** *** 222,227 **** adr = olsr_malloc(sizeof(struct mid_address), "Insert MID alias"); ! OLSR_PRINTF(1, "Inserting alias %s for ", olsr_ip_to_string(alias)) ! OLSR_PRINTF(1, "%s\n", olsr_ip_to_string(main_add)) COPY_IP(&adr->alias, alias); --- 222,227 ---- adr = olsr_malloc(sizeof(struct mid_address), "Insert MID alias"); ! OLSR_PRINTF(1, "Inserting alias %s for ", olsr_ip_to_string(alias)); ! OLSR_PRINTF(1, "%s\n", olsr_ip_to_string(main_add)); COPY_IP(&adr->alias, alias); *************** *** 303,307 **** olsr_u32_t hash; ! //OLSR_PRINTF(1, "MID: lookup entry...") hash = olsr_hashing(adr); --- 303,307 ---- olsr_u32_t hash; ! //OLSR_PRINTF(1, "MID: lookup entry..."); hash = olsr_hashing(adr); *************** *** 349,353 **** olsr_u32_t hash; ! OLSR_PRINTF(3, "MID: update %s\n", olsr_ip_to_string(adr)) hash = olsr_hashing(adr); --- 349,353 ---- olsr_u32_t hash; ! OLSR_PRINTF(3, "MID: update %s\n", olsr_ip_to_string(adr)); hash = olsr_hashing(adr); *************** *** 423,428 **** { /* Current alias not found in list of declared aliases: free current alias */ ! OLSR_PRINTF(1, "MID remove: (%s, ", olsr_ip_to_string(&entry->main_addr)) ! OLSR_PRINTF(1, "%s)\n", olsr_ip_to_string(¤t_alias->alias)) /* Update linked list as seen by 'entry' */ --- 423,428 ---- { /* Current alias not found in list of declared aliases: free current alias */ ! OLSR_PRINTF(1, "MID remove: (%s, ", olsr_ip_to_string(&entry->main_addr)); ! OLSR_PRINTF(1, "%s)\n", olsr_ip_to_string(¤t_alias->alias)); /* Update linked list as seen by 'entry' */ *************** *** 479,484 **** tmp_list = tmp_list->next; #ifdef DEBUG ! OLSR_PRINTF(1, "MID info for %s timed out.. deleting it\n", ! olsr_ip_to_string(&entry_to_delete->main_addr)) #endif /*Delete it*/ --- 479,484 ---- tmp_list = tmp_list->next; #ifdef DEBUG ! OLSR_PRINTF(1, "MID info for %s timed out.. deleting it\n", ! olsr_ip_to_string(&entry_to_delete->main_addr)); #endif /*Delete it*/ *************** *** 532,536 **** int index; ! OLSR_PRINTF(1, "mid set: %02d:%02d:%02d.%06lu\n",nowtm->tm_hour, nowtm->tm_min, nowtm->tm_sec, now.tv_usec) for(index=0;indextm_hour, nowtm->tm_min, nowtm->tm_sec, now.tv_usec); for(index=0;indexmain_addr)) for(tmp_addr = tmp_list->aliases;tmp_addr;tmp_addr = tmp_addr->next_alias) { ! OLSR_PRINTF(1, " %s ", olsr_ip_to_string(&tmp_addr->alias)) } ! OLSR_PRINTF(1, "\n") } } --- 542,551 ---- struct mid_address *tmp_addr; ! OLSR_PRINTF(1, "%s: ", olsr_ip_to_string(&tmp_list->main_addr)); for(tmp_addr = tmp_list->aliases;tmp_addr;tmp_addr = tmp_addr->next_alias) { ! OLSR_PRINTF(1, " %s ", olsr_ip_to_string(&tmp_addr->alias)); } ! OLSR_PRINTF(1, "\n"); } } Index: hysteresis.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/hysteresis.c,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** hysteresis.c 20 Apr 2007 14:23:41 -0000 1.19 --- hysteresis.c 25 Apr 2007 22:08:08 -0000 1.20 *************** *** 79,83 **** { OLSR_PRINTF(1, "HYST[%s] link set to NOT pending!\n", ! olsr_ip_to_string(&entry->neighbor_iface_addr)) changes_neighborhood = OLSR_TRUE; } --- 79,83 ---- { OLSR_PRINTF(1, "HYST[%s] link set to NOT pending!\n", ! olsr_ip_to_string(&entry->neighbor_iface_addr)); changes_neighborhood = OLSR_TRUE; } *************** *** 100,104 **** { OLSR_PRINTF(1, "HYST[%s] link set to pending!\n", ! olsr_ip_to_string(&entry->neighbor_iface_addr)) changes_neighborhood = OLSR_TRUE; } --- 100,104 ---- { OLSR_PRINTF(1, "HYST[%s] link set to pending!\n", ! olsr_ip_to_string(&entry->neighbor_iface_addr)); changes_neighborhood = OLSR_TRUE; } *************** *** 149,153 **** { #ifdef DEBUG ! OLSR_PRINTF(3, "HYST[%s]: HELLO update vtime %f\n", olsr_ip_to_string(&entry->neighbor_iface_addr), htime*1.5) #endif /* hello timeout = current time + hint time */ --- 149,153 ---- { #ifdef DEBUG ! OLSR_PRINTF(3, "HYST[%s]: HELLO update vtime %f\n", olsr_ip_to_string(&entry->neighbor_iface_addr), htime*1.5); #endif /* hello timeout = current time + hint time */ *************** *** 174,178 **** link->L_link_quality = olsr_hyst_calc_stability(link->L_link_quality); #ifdef DEBUG ! OLSR_PRINTF(3, "HYST[%s]: %0.3f\n", olsr_ip_to_string(remote), link->L_link_quality) #endif --- 174,178 ---- link->L_link_quality = olsr_hyst_calc_stability(link->L_link_quality); #ifdef DEBUG ! OLSR_PRINTF(3, "HYST[%s]: %0.3f\n", olsr_ip_to_string(remote), link->L_link_quality); #endif *************** *** 191,195 **** #ifdef DEBUG OLSR_PRINTF(5, "HYST[%s] PACKET LOSS! %0.3f\n", ! olsr_ip_to_string(remote), link->L_link_quality) #endif if(link->L_link_quality < olsr_cnf->hysteresis_param.thr_low) --- 191,195 ---- #ifdef DEBUG OLSR_PRINTF(5, "HYST[%s] PACKET LOSS! %0.3f\n", ! olsr_ip_to_string(remote), link->L_link_quality); #endif if(link->L_link_quality < olsr_cnf->hysteresis_param.thr_low) Index: net_olsr.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/net_olsr.c,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** net_olsr.c 20 Apr 2007 13:46:04 -0000 1.21 --- net_olsr.c 25 Apr 2007 22:08:09 -0000 1.22 *************** *** 250,254 **** */ int ! net_outbuffer_push(struct interface *ifp, olsr_u8_t *data, olsr_u16_t size) { if((ifp->netbuf.pending + size) > ifp->netbuf.maxsize) --- 250,254 ---- */ int ! net_outbuffer_push(struct interface *ifp, const void *data, const olsr_u16_t size) { if((ifp->netbuf.pending + size) > ifp->netbuf.maxsize) *************** *** 274,278 **** */ int ! net_outbuffer_push_reserved(struct interface *ifp, olsr_u8_t *data, olsr_u16_t size) { if((ifp->netbuf.pending + size) > (ifp->netbuf.maxsize + ifp->netbuf.reserved)) --- 274,278 ---- */ int ! net_outbuffer_push_reserved(struct interface *ifp, const void *data, const olsr_u16_t size) { if((ifp->netbuf.pending + size) > (ifp->netbuf.maxsize + ifp->netbuf.reserved)) *************** *** 294,298 **** */ int ! net_outbuffer_bytes_left(struct interface *ifp) { return ifp->netbuf.maxsize - ifp->netbuf.pending; --- 294,298 ---- */ int ! net_outbuffer_bytes_left(const struct interface *ifp) { return ifp->netbuf.maxsize - ifp->netbuf.pending; *************** *** 506,510 **** #ifdef DEBUG ! OLSR_PRINTF(3, "Prefix %d = Netmask: %s\n", prefix, olsr_ip_to_string(adr)) #endif --- 506,510 ---- #ifdef DEBUG ! OLSR_PRINTF(3, "Prefix %d = Netmask: %s\n", prefix, olsr_ip_to_string(adr)); #endif *************** *** 545,549 **** #ifdef DEBUG ! OLSR_PRINTF(3, "Netmask: %s = Prefix %d\n", olsr_ip_to_string(adr), prefix) #endif --- 545,549 ---- #ifdef DEBUG ! OLSR_PRINTF(3, "Netmask: %s = Prefix %d\n", olsr_ip_to_string(adr), prefix); #endif *************** *** 650,654 **** deny_entries = new_entry; ! OLSR_PRINTF(1, "Added %s to IP deny set\n", olsr_ip_to_string(&new_entry->addr)) return; } --- 650,654 ---- deny_entries = new_entry; ! OLSR_PRINTF(1, "Added %s to IP deny set\n", olsr_ip_to_string(&new_entry->addr)); return; } *************** *** 673,677 **** { OLSR_PRINTF(1, "Validation of address %s failed!\n", ! olsr_ip_to_string(adr)) return OLSR_FALSE; } --- 673,677 ---- { OLSR_PRINTF(1, "Validation of address %s failed!\n", ! olsr_ip_to_string(adr)); return OLSR_FALSE; } Index: build_msg.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/build_msg.c,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -d -r1.35 -r1.36 *** build_msg.c 22 Apr 2007 20:25:48 -0000 1.35 --- build_msg.c 25 Apr 2007 22:08:07 -0000 1.36 *************** *** 137,141 **** { #ifdef DEBUG ! OLSR_PRINTF(BMSG_DBGLVL, "Building HELLO on %s\n-------------------\n", ifp->int_name) #endif --- 137,141 ---- { #ifdef DEBUG ! OLSR_PRINTF(BMSG_DBGLVL, "Building HELLO on %s\n-------------------\n", ifp->int_name); #endif *************** *** 168,172 **** { #ifdef DEBUG ! OLSR_PRINTF(BMSG_DBGLVL, "Building TC on %s\n-------------------\n", ifp->int_name) #endif --- 168,172 ---- { #ifdef DEBUG ! OLSR_PRINTF(BMSG_DBGLVL, "Building TC on %s\n-------------------\n", ifp->int_name); #endif *************** *** 194,198 **** { #ifdef DEBUG ! OLSR_PRINTF(BMSG_DBGLVL, "Building MID on %s\n-------------------\n", ifp->int_name) #endif --- 194,198 ---- { #ifdef DEBUG ! OLSR_PRINTF(BMSG_DBGLVL, "Building MID on %s\n-------------------\n", ifp->int_name); #endif *************** *** 219,223 **** { #ifdef DEBUG ! OLSR_PRINTF(BMSG_DBGLVL, "Building HNA on %s\n-------------------\n", ifp->int_name) #endif --- 219,223 ---- { #ifdef DEBUG ! OLSR_PRINTF(BMSG_DBGLVL, "Building HNA on %s\n-------------------\n", ifp->int_name); #endif *************** *** 242,246 **** if(msgsize > buffsize) { ! OLSR_PRINTF(1, "%s build, outputbuffer to small(%d/%d)!\n", type, msgsize, buffsize) olsr_syslog(OLSR_LOG_ERR, "%s build, outputbuffer to small(%d/%d)!\n", type, msgsize, buffsize); olsr_exit(__func__, EXIT_FAILURE); --- 242,246 ---- if(msgsize > buffsize) { ! OLSR_PRINTF(1, "%s build, outputbuffer to small(%d/%d)!\n", type, msgsize, buffsize); olsr_syslog(OLSR_LOG_ERR, "%s build, outputbuffer to small(%d/%d)!\n", type, msgsize, buffsize); olsr_exit(__func__, EXIT_FAILURE); *************** *** 335,340 **** #ifdef DEBUG ! OLSR_PRINTF(BMSG_DBGLVL, "\t%s - ", olsr_ip_to_string(&nb->address)) ! OLSR_PRINTF(BMSG_DBGLVL, "L:%d N:%d\n", j, i) #endif /* --- 335,340 ---- #ifdef DEBUG ! OLSR_PRINTF(BMSG_DBGLVL, "\t%s - ", olsr_ip_to_string(&nb->address)); ! OLSR_PRINTF(BMSG_DBGLVL, "L:%d N:%d\n", j, i); #endif /* *************** *** 355,359 **** { #ifdef DEBUG ! OLSR_PRINTF(BMSG_DBGLVL, "Sending partial(size: %d, buff left:%d)\n", curr_size, remainsize) #endif /* Complete the headers */ --- 355,359 ---- { #ifdef DEBUG ! OLSR_PRINTF(BMSG_DBGLVL, "Sending partial(size: %d, buff left:%d)\n", curr_size, remainsize); #endif /* Complete the headers */ *************** *** 499,504 **** #ifdef DEBUG ! OLSR_PRINTF(BMSG_DBGLVL, "\t%s - ", olsr_ip_to_string(&nb->address)) ! OLSR_PRINTF(BMSG_DBGLVL, "L:%d N:%d\n", j, i) #endif --- 499,504 ---- #ifdef DEBUG ! OLSR_PRINTF(BMSG_DBGLVL, "\t%s - ", olsr_ip_to_string(&nb->address)); ! OLSR_PRINTF(BMSG_DBGLVL, "L:%d N:%d\n", j, i); #endif *************** *** 521,525 **** { #ifdef DEBUG ! OLSR_PRINTF(BMSG_DBGLVL, "Sending partial(size: %d, buff left:%d)\n", curr_size, remainsize) #endif /* Complete the headers */ --- 521,525 ---- { #ifdef DEBUG ! OLSR_PRINTF(BMSG_DBGLVL, "Sending partial(size: %d, buff left:%d)\n", curr_size, remainsize); #endif /* Complete the headers */ *************** *** 652,656 **** { #ifdef DEBUG ! OLSR_PRINTF(BMSG_DBGLVL, "Sending partial(size: %d, buff left:%d)\n", curr_size, remainsize) #endif --- 652,656 ---- { #ifdef DEBUG ! OLSR_PRINTF(BMSG_DBGLVL, "Sending partial(size: %d, buff left:%d)\n", curr_size, remainsize); #endif *************** *** 675,679 **** #ifdef DEBUG OLSR_PRINTF(BMSG_DBGLVL, "\t%s\n", ! olsr_ip_to_string(&mprs->address)) #endif COPY_IP(&mprsaddr->addr, &mprs->address); --- 675,679 ---- #ifdef DEBUG OLSR_PRINTF(BMSG_DBGLVL, "\t%s\n", ! olsr_ip_to_string(&mprs->address)); #endif COPY_IP(&mprsaddr->addr, &mprs->address); *************** *** 697,701 **** { if(!TIMED_OUT(send_empty_tc)) ! OLSR_PRINTF(1, "TC: Sending empty package - (%d/%d/%d/%d)\n", partial_sent, (int)send_empty_tc, (int)now_times, (int)((send_empty_tc) - now_times)) m->v4.olsr_msgsize = htons(curr_size); --- 697,701 ---- { if(!TIMED_OUT(send_empty_tc)) ! OLSR_PRINTF(1, "TC: Sending empty package - (%d/%d/%d/%d)\n", partial_sent, (int)send_empty_tc, (int)now_times, (int)((send_empty_tc) - now_times)); m->v4.olsr_msgsize = htons(curr_size); *************** *** 777,781 **** { #ifdef DEBUG ! OLSR_PRINTF(BMSG_DBGLVL, "Sending partial(size: %d, buff left:%d)\n", curr_size, remainsize) #endif m->v6.olsr_msgsize = htons(curr_size); --- 777,781 ---- { #ifdef DEBUG ! OLSR_PRINTF(BMSG_DBGLVL, "Sending partial(size: %d, buff left:%d)\n", curr_size, remainsize); #endif m->v6.olsr_msgsize = htons(curr_size); *************** *** 796,800 **** #ifdef DEBUG OLSR_PRINTF(BMSG_DBGLVL, "\t%s\n", ! olsr_ip_to_string(&mprs->address)) #endif COPY_IP(&mprsaddr6->addr, &mprs->address); --- 796,800 ---- #ifdef DEBUG OLSR_PRINTF(BMSG_DBGLVL, "\t%s\n", ! olsr_ip_to_string(&mprs->address)); #endif COPY_IP(&mprsaddr6->addr, &mprs->address); *************** *** 816,820 **** if((!partial_sent) && (!TIMED_OUT(send_empty_tc))) { ! OLSR_PRINTF(1, "TC: Sending empty package\n") m->v6.olsr_msgsize = htons(curr_size); --- 816,820 ---- if((!partial_sent) && (!TIMED_OUT(send_empty_tc))) { ! OLSR_PRINTF(1, "TC: Sending empty package\n"); m->v6.olsr_msgsize = htons(curr_size); *************** *** 890,894 **** { #ifdef DEBUG ! OLSR_PRINTF(BMSG_DBGLVL, "Sending partial(size: %d, buff left:%d)\n", curr_size, remainsize) #endif /* set size */ --- 890,894 ---- { #ifdef DEBUG ! OLSR_PRINTF(BMSG_DBGLVL, "Sending partial(size: %d, buff left:%d)\n", curr_size, remainsize); #endif /* set size */ *************** *** 907,911 **** OLSR_PRINTF(BMSG_DBGLVL, "\t%s(%s)\n", olsr_ip_to_string(&ifs->ip_addr), ! ifs->int_name) #endif --- 907,911 ---- OLSR_PRINTF(BMSG_DBGLVL, "\t%s(%s)\n", olsr_ip_to_string(&ifs->ip_addr), ! ifs->int_name); #endif *************** *** 989,993 **** { #ifdef DEBUG ! OLSR_PRINTF(BMSG_DBGLVL, "Sending partial(size: %d, buff left:%d)\n", curr_size, remainsize) #endif /* set size */ --- 989,993 ---- { #ifdef DEBUG ! OLSR_PRINTF(BMSG_DBGLVL, "Sending partial(size: %d, buff left:%d)\n", curr_size, remainsize); #endif /* set size */ *************** *** 1006,1010 **** OLSR_PRINTF(BMSG_DBGLVL, "\t%s(%s)\n", olsr_ip_to_string(&ifs->ip_addr), ! ifs->int_name) #endif --- 1006,1010 ---- OLSR_PRINTF(BMSG_DBGLVL, "\t%s(%s)\n", olsr_ip_to_string(&ifs->ip_addr), ! ifs->int_name); #endif *************** *** 1080,1084 **** { #ifdef DEBUG ! OLSR_PRINTF(BMSG_DBGLVL, "Sending partial(size: %d, buff left:%d)\n", curr_size, remainsize) #endif m->v4.seqno = htons(get_msg_seqno()); --- 1080,1084 ---- { #ifdef DEBUG ! OLSR_PRINTF(BMSG_DBGLVL, "Sending partial(size: %d, buff left:%d)\n", curr_size, remainsize); #endif m->v4.seqno = htons(get_msg_seqno()); *************** *** 1095,1099 **** OLSR_PRINTF(BMSG_DBGLVL, "\tNet: %s/%s\n", olsr_ip_to_string(&h->net), ! olsr_ip_to_string(&h->netmask)) #endif COPY_IP(&pair->addr, &h->net); --- 1095,1099 ---- OLSR_PRINTF(BMSG_DBGLVL, "\tNet: %s/%s\n", olsr_ip_to_string(&h->net), ! olsr_ip_to_string(&h->netmask)); #endif COPY_IP(&pair->addr, &h->net); *************** *** 1170,1174 **** { #ifdef DEBUG ! OLSR_PRINTF(BMSG_DBGLVL, "Sending partial(size: %d, buff left:%d)\n", curr_size, remainsize) #endif m->v6.seqno = htons(get_msg_seqno()); --- 1170,1174 ---- { #ifdef DEBUG ! OLSR_PRINTF(BMSG_DBGLVL, "Sending partial(size: %d, buff left:%d)\n", curr_size, remainsize); #endif m->v6.seqno = htons(get_msg_seqno()); *************** *** 1185,1189 **** OLSR_PRINTF(BMSG_DBGLVL, "\tNet: %s/%d\n", olsr_ip_to_string(&h->net), ! h->prefix_len) #endif COPY_IP(&pair6->addr, &h->net); --- 1185,1189 ---- OLSR_PRINTF(BMSG_DBGLVL, "\tNet: %s/%d\n", olsr_ip_to_string(&h->net), ! h->prefix_len); #endif COPY_IP(&pair6->addr, &h->net); Index: routing_table.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/routing_table.c,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** routing_table.c 20 Apr 2007 13:46:04 -0000 1.26 --- routing_table.c 25 Apr 2007 22:08:14 -0000 1.27 *************** *** 253,257 **** #ifdef DEBUG ! OLSR_PRINTF(7, "FILL ROUTING TABLE WITH NEIGHBORS\n") #endif --- 253,257 ---- #ifdef DEBUG ! OLSR_PRINTF(7, "FILL ROUTING TABLE WITH NEIGHBORS\n"); #endif *************** *** 279,283 **** struct link_entry *link = get_best_link_to_neighbor(&addrs2->alias); #ifdef DEBUG ! OLSR_PRINTF(7, "(ROUTE)Adding neighbor %s\n", olsr_ip_to_string(&addrs.alias)) #endif if(link) --- 279,283 ---- struct link_entry *link = get_best_link_to_neighbor(&addrs2->alias); #ifdef DEBUG ! OLSR_PRINTF(7, "(ROUTE)Adding neighbor %s\n", olsr_ip_to_string(&addrs.alias)); #endif if(link) *************** *** 370,374 **** { #ifdef DEBUG ! OLSR_PRINTF(7, "2hop: %s already added\n", olsr_ip_to_string(n2_addr)) #endif continue; --- 370,374 ---- { #ifdef DEBUG ! OLSR_PRINTF(7, "2hop: %s already added\n", olsr_ip_to_string(n2_addr)); #endif continue; *************** *** 378,382 **** { OLSR_PRINTF(1, "Two hop neighbor %s not added - no one hop neighbors.\n", ! olsr_ip_to_string(n2_addr)) continue; } --- 378,382 ---- { OLSR_PRINTF(1, "Two hop neighbor %s not added - no one hop neighbors.\n", ! olsr_ip_to_string(n2_addr)); continue; } *************** *** 389,393 **** struct link_entry *link = get_best_link_to_neighbor(&neighbor->neighbor_main_addr); #ifdef DEBUG ! OLSR_PRINTF(7, "(ROUTE)Adding neighbor %s\n", olsr_ip_to_string(&addrsp->alias)) #endif if(link) --- 389,393 ---- struct link_entry *link = get_best_link_to_neighbor(&neighbor->neighbor_main_addr); #ifdef DEBUG ! OLSR_PRINTF(7, "(ROUTE)Adding neighbor %s\n", olsr_ip_to_string(&addrsp->alias)); #endif if(link) *************** *** 479,484 **** /* PRINT OUT: Last Hop to Final Destination */ /* The function ip_to_string has to be seperately */ ! OLSR_PRINTF(3, "%s -> ", olsr_ip_to_string(&list_destination_n->destination->rt_dst)) ! OLSR_PRINTF(3, "%s\n", olsr_ip_to_string(&tmp_addrsp->alias)) destination_n_1 = olsr_malloc(sizeof(struct destination_n), --- 479,484 ---- /* PRINT OUT: Last Hop to Final Destination */ /* The function ip_to_string has to be seperately */ ! OLSR_PRINTF(3, "%s -> ", olsr_ip_to_string(&list_destination_n->destination->rt_dst)); ! OLSR_PRINTF(3, "%s\n", olsr_ip_to_string(&tmp_addrsp->alias)); destination_n_1 = olsr_malloc(sizeof(struct destination_n), *************** *** 631,635 **** #ifdef DEBUG ! OLSR_PRINTF(3, "Calculating HNA routes\n") #endif --- 631,635 ---- #ifdef DEBUG ! OLSR_PRINTF(3, "Calculating HNA routes\n"); #endif *************** *** 717,721 **** if(olsr_cnf->debug_level > 2) { ! OLSR_PRINTF(3, "HNA table:\n") olsr_print_routing_table(hna_routes); } --- 717,721 ---- if(olsr_cnf->debug_level > 2) { ! OLSR_PRINTF(3, "HNA table:\n"); olsr_print_routing_table(hna_routes); } Index: ipc_frontend.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/ipc_frontend.c,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** ipc_frontend.c 20 Apr 2007 13:46:04 -0000 1.29 --- ipc_frontend.c 25 Apr 2007 22:08:08 -0000 1.30 *************** *** 115,119 **** { perror("IPC bind"); ! OLSR_PRINTF(1, "Will retry in 10 seconds...\n") sleep(10); if(bind(ipc_sock, (struct sockaddr *) &sin, sizeof(sin)) == -1) --- 115,119 ---- { perror("IPC bind"); ! OLSR_PRINTF(1, "Will retry in 10 seconds...\n"); sleep(10); if(bind(ipc_sock, (struct sockaddr *) &sin, sizeof(sin)) == -1) *************** *** 122,126 **** olsr_exit("IPC bind", EXIT_FAILURE); } ! OLSR_PRINTF(1, "OK\n") } --- 122,126 ---- olsr_exit("IPC bind", EXIT_FAILURE); } ! OLSR_PRINTF(1, "OK\n"); } *************** *** 156,160 **** else { ! OLSR_PRINTF(1, "Front end connected\n") addr = inet_ntoa(pin.sin_addr); if(ipc_check_allowed_ip((union olsr_ip_addr *)&pin.sin_addr.s_addr)) --- 156,160 ---- else { ! OLSR_PRINTF(1, "Front end connected\n"); addr = inet_ntoa(pin.sin_addr); if(ipc_check_allowed_ip((union olsr_ip_addr *)&pin.sin_addr.s_addr)) *************** *** 163,171 **** ipc_send_net_info(ipc_conn); ipc_send_all_routes(ipc_conn); ! OLSR_PRINTF(1, "Connection from %s\n",addr) } else { ! OLSR_PRINTF(1, "Front end-connection from foregin host(%s) not allowed!\n", addr) olsr_syslog(OLSR_LOG_ERR, "OLSR: Front end-connection from foregin host(%s) not allowed!\n", addr); CLOSE(ipc_conn); --- 163,171 ---- ipc_send_net_info(ipc_conn); ipc_send_all_routes(ipc_conn); ! OLSR_PRINTF(1, "Connection from %s\n",addr); } else { ! OLSR_PRINTF(1, "Front end-connection from foregin host(%s) not allowed!\n", addr); olsr_syslog(OLSR_LOG_ERR, "OLSR: Front end-connection from foregin host(%s) not allowed!\n", addr); CLOSE(ipc_conn); *************** *** 253,264 **** if (send(ipc_conn, (void *)msg, size, MSG_NOSIGNAL) < 0) { ! OLSR_PRINTF(1, "(OUTPUT)IPC connection lost!\n") CLOSE(ipc_conn); //olsr_cnf->open_ipc = 0; ipc_active = OLSR_FALSE; - return; } - - return; } --- 253,261 ---- if (send(ipc_conn, (void *)msg, size, MSG_NOSIGNAL) < 0) { ! OLSR_PRINTF(1, "(OUTPUT)IPC connection lost!\n"); CLOSE(ipc_conn); //olsr_cnf->open_ipc = 0; ipc_active = OLSR_FALSE; } } *************** *** 321,326 **** if (send(ipc_conn, tmp, IPC_PACK_SIZE, MSG_NOSIGNAL) < 0) // MSG_NOSIGNAL to avoid sigpipe { ! OLSR_PRINTF(1, "(RT_ENTRY)IPC connection lost!\n") CLOSE(ipc_conn); //olsr_cnf->open_ipc = 0; ipc_active = OLSR_FALSE; --- 318,324 ---- if (send(ipc_conn, tmp, IPC_PACK_SIZE, MSG_NOSIGNAL) < 0) // MSG_NOSIGNAL to avoid sigpipe { ! OLSR_PRINTF(1, "(RT_ENTRY)IPC connection lost!\n"); CLOSE(ipc_conn); + //olsr_cnf->open_ipc = 0; ipc_active = OLSR_FALSE; *************** *** 383,387 **** if (send(fd, tmp, IPC_PACK_SIZE, MSG_NOSIGNAL) < 0) // MSG_NOSIGNAL to avoid sigpipe { ! OLSR_PRINTF(1, "(RT_ENTRY)IPC connection lost!\n") CLOSE(ipc_conn); //olsr_cnf->open_ipc = 0; --- 381,385 ---- if (send(fd, tmp, IPC_PACK_SIZE, MSG_NOSIGNAL) < 0) // MSG_NOSIGNAL to avoid sigpipe { ! OLSR_PRINTF(1, "(RT_ENTRY)IPC connection lost!\n"); CLOSE(ipc_conn); //olsr_cnf->open_ipc = 0; *************** *** 428,432 **** if (send(ipc_conn, tmp, IPC_PACK_SIZE, MSG_NOSIGNAL) < 0) // MSG_NOSIGNAL to avoid sigpipe { ! OLSR_PRINTF(1, "(RT_ENTRY)IPC connection lost!\n") CLOSE(ipc_conn); //olsr_cnf->open_ipc = 0; --- 426,430 ---- if (send(ipc_conn, tmp, IPC_PACK_SIZE, MSG_NOSIGNAL) < 0) // MSG_NOSIGNAL to avoid sigpipe { ! OLSR_PRINTF(1, "(RT_ENTRY)IPC connection lost!\n"); CLOSE(ipc_conn); //olsr_cnf->open_ipc = 0; *************** *** 463,467 **** msg = (char *)net_msg; ! OLSR_PRINTF(1, "Sending net-info to front end...\n") memset(net_msg, 0, sizeof(struct ipc_net_msg)); --- 461,465 ---- msg = (char *)net_msg; ! OLSR_PRINTF(1, "Sending net-info to front end...\n"); memset(net_msg, 0, sizeof(struct ipc_net_msg)); *************** *** 531,535 **** if (send(fd, (char *)net_msg, sizeof(struct ipc_net_msg), MSG_NOSIGNAL) < 0) { ! OLSR_PRINTF(1, "(NETINFO)IPC connection lost!\n") CLOSE(ipc_conn); //olsr_cnf->open_ipc = 0; --- 529,533 ---- if (send(fd, (char *)net_msg, sizeof(struct ipc_net_msg), MSG_NOSIGNAL) < 0) { ! OLSR_PRINTF(1, "(NETINFO)IPC connection lost!\n"); CLOSE(ipc_conn); //olsr_cnf->open_ipc = 0; *************** *** 546,550 **** shutdown_ipc(void) { ! OLSR_PRINTF(1, "Shutting down IPC...\n") CLOSE(ipc_sock); CLOSE(ipc_conn); --- 544,548 ---- shutdown_ipc(void) { ! OLSR_PRINTF(1, "Shutting down IPC...\n"); CLOSE(ipc_sock); CLOSE(ipc_conn); Index: main.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/main.c,v retrieving revision 1.94 retrieving revision 1.95 diff -C2 -d -r1.94 -r1.95 *** main.c 20 Apr 2007 13:46:04 -0000 1.94 --- main.c 25 Apr 2007 22:08:09 -0000 1.95 *************** *** 302,306 **** if(apm_init() < 0) { ! OLSR_PRINTF(1, "Could not read APM info - setting default willingness(%d)\n", WILL_DEFAULT) olsr_syslog(OLSR_LOG_ERR, "Could not read APM info - setting default willingness(%d)\n", WILL_DEFAULT); --- 302,306 ---- if(apm_init() < 0) { ! OLSR_PRINTF(1, "Could not read APM info - setting default willingness(%d)\n", WILL_DEFAULT); olsr_syslog(OLSR_LOG_ERR, "Could not read APM info - setting default willingness(%d)\n", WILL_DEFAULT); *************** *** 313,317 **** olsr_cnf->willingness = olsr_calculate_willingness(); ! OLSR_PRINTF(1, "Willingness set to %d - next update in %.1f secs\n", olsr_cnf->willingness, olsr_cnf->will_int) } } --- 313,317 ---- olsr_cnf->willingness = olsr_calculate_willingness(); ! OLSR_PRINTF(1, "Willingness set to %d - next update in %.1f secs\n", olsr_cnf->willingness, olsr_cnf->will_int); } } *************** *** 320,329 **** 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); } --- 320,329 ---- 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); } *************** *** 381,385 **** olsr_load_plugins(); ! OLSR_PRINTF(1, "Main address: %s\n\n", olsr_ip_to_string(&olsr_cnf->main_addr)) /* Start syslog entry */ --- 381,385 ---- olsr_load_plugins(); ! OLSR_PRINTF(1, "Main address: %s\n\n", olsr_ip_to_string(&olsr_cnf->main_addr)); /* Start syslog entry */ *************** *** 470,474 **** olsr_delete_all_kernel_routes(); ! OLSR_PRINTF(1, "Closing sockets...\n") /* front-end IPC socket */ --- 470,474 ---- olsr_delete_all_kernel_routes(); ! OLSR_PRINTF(1, "Closing sockets...\n"); /* front-end IPC socket */ *************** *** 496,500 **** 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); --- 496,500 ---- 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); Index: olsr.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/olsr.c,v retrieving revision 1.53 retrieving revision 1.54 diff -C2 -d -r1.53 -r1.54 *** olsr.c 22 Apr 2007 21:50:18 -0000 1.53 --- olsr.c 25 Apr 2007 22:08:09 -0000 1.54 *************** *** 111,115 **** struct pcf *new_pcf; ! OLSR_PRINTF(1, "Registering pcf function\n") new_pcf = olsr_malloc(sizeof(struct pcf), "New PCF"); --- 111,115 ---- struct pcf *new_pcf; ! OLSR_PRINTF(1, "Registering pcf function\n"); new_pcf = olsr_malloc(sizeof(struct pcf), "New PCF"); *************** *** 136,144 **** #ifdef DEBUG if(changes_neighborhood) ! OLSR_PRINTF(3, "CHANGES IN NEIGHBORHOOD\n") if(changes_topology) ! OLSR_PRINTF(3, "CHANGES IN TOPOLOGY\n") if(changes_hna) ! OLSR_PRINTF(3, "CHANGES IN HNA\n") #endif --- 136,144 ---- #ifdef DEBUG if(changes_neighborhood) ! OLSR_PRINTF(3, "CHANGES IN NEIGHBORHOOD\n"); if(changes_topology) ! OLSR_PRINTF(3, "CHANGES IN TOPOLOGY\n"); if(changes_hna) ! OLSR_PRINTF(3, "CHANGES IN HNA\n"); #endif *************** *** 318,322 **** { #ifdef DEBUG ! OLSR_PRINTF(3, "Message already forwarded!\n") #endif return 0; --- 318,322 ---- { #ifdef DEBUG ! OLSR_PRINTF(3, "Message already forwarded!\n"); #endif return 0; *************** *** 343,347 **** { #ifdef DEBUG ! OLSR_PRINTF(5, "Forward - sender %s not MPR selector\n", olsr_ip_to_string(src)) #endif return 0; --- 343,347 ---- { #ifdef DEBUG ! OLSR_PRINTF(5, "Forward - sender %s not MPR selector\n", olsr_ip_to_string(src)); #endif return 0; *************** *** 376,380 **** * Check if message is to big to be piggybacked */ ! if(net_outbuffer_push(ifn, (olsr_u8_t *)m, msgsize) != msgsize) { /* Send */ --- 376,380 ---- * Check if message is to big to be piggybacked */ ! if(net_outbuffer_push(ifn, m, msgsize) != msgsize) { /* Send */ *************** *** 383,389 **** set_buffer_timer(ifn); ! if(net_outbuffer_push(ifn, (olsr_u8_t *)m, msgsize) != msgsize) { ! OLSR_PRINTF(1, "Received message to big to be forwarded in %s(%d bytes)!", ifn->int_name, msgsize) olsr_syslog(OLSR_LOG_ERR, "Received message to big to be forwarded on %s(%d bytes)!", ifn->int_name, msgsize); } --- 383,389 ---- set_buffer_timer(ifn); ! if(net_outbuffer_push(ifn, m, msgsize) != msgsize) { ! OLSR_PRINTF(1, "Received message to big to be forwarded in %s(%d bytes)!", ifn->int_name, msgsize); olsr_syslog(OLSR_LOG_ERR, "Received message to big to be forwarded on %s(%d bytes)!", ifn->int_name, msgsize); } *************** *** 395,401 **** set_buffer_timer(ifn); ! if(net_outbuffer_push(ifn, (olsr_u8_t *)m, msgsize) != msgsize) { ! OLSR_PRINTF(1, "Received message to big to be forwarded in %s(%d bytes)!", ifn->int_name, msgsize) olsr_syslog(OLSR_LOG_ERR, "Received message to big to be forwarded on %s(%d bytes)!", ifn->int_name, msgsize); } --- 395,401 ---- set_buffer_timer(ifn); ! if(net_outbuffer_push(ifn, m, msgsize) != msgsize) { ! OLSR_PRINTF(1, "Received message to big to be forwarded in %s(%d bytes)!", ifn->int_name, msgsize); olsr_syslog(OLSR_LOG_ERR, "Received message to big to be forwarded on %s(%d bytes)!", ifn->int_name, msgsize); } *************** *** 436,440 **** if(tmp_will != olsr_cnf->willingness) { ! OLSR_PRINTF(1, "Local willingness updated: old %d new %d\n", tmp_will, olsr_cnf->willingness) } } --- 436,440 ---- if(tmp_will != olsr_cnf->willingness) { ! OLSR_PRINTF(1, "Local willingness updated: old %d new %d\n", tmp_will, olsr_cnf->willingness); } } *************** *** 562,566 **** olsr_exit(const char *msg, int val) { ! OLSR_PRINTF(1, "OLSR EXIT: %s\n", msg) olsr_syslog(OLSR_LOG_ERR, "olsrd exit: %s\n", msg); fflush(stdout); --- 562,566 ---- olsr_exit(const char *msg, int val) { ! OLSR_PRINTF(1, "OLSR EXIT: %s\n", msg); olsr_syslog(OLSR_LOG_ERR, "olsrd exit: %s\n", msg); fflush(stdout); *************** *** 587,593 **** if((ptr = malloc(size)) == 0) { ! OLSR_PRINTF(1, "OUT OF MEMORY: %s\n", strerror(errno)) ! olsr_syslog(OLSR_LOG_ERR, "olsrd: out of memory!: %m\n"); ! olsr_exit((char *)id, EXIT_FAILURE); } return ptr; --- 587,594 ---- if((ptr = malloc(size)) == 0) { ! const char * const err_msg = strerror(errno); ! OLSR_PRINTF(1, "OUT OF MEMORY: %s\n", err_msg); ! olsr_syslog(OLSR_LOG_ERR, "olsrd: out of memory!: %s\n", err_msg); ! olsr_exit(id, EXIT_FAILURE); } return ptr; Index: mpr.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/mpr.c,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** mpr.c 20 Apr 2007 13:46:04 -0000 1.16 --- mpr.c 25 Apr 2007 22:08:09 -0000 1.17 *************** *** 122,126 **** { ! //OLSR_PRINTF(1, "(1)Skipping 2h neighbor %s - already 1hop\n", olsr_ip_to_string(&two_hop_neighbor->neighbor_2_addr)) continue; --- 122,126 ---- { ! //OLSR_PRINTF(1, "(1)Skipping 2h neighbor %s - already 1hop\n", olsr_ip_to_string(&two_hop_neighbor->neighbor_2_addr)); continue; *************** *** 134,138 **** two_hop_list_tmp = olsr_malloc(sizeof(struct neighbor_2_list_entry), "MPR two hop list"); ! //OLSR_PRINTF(1, "ONE LINK ADDING %s\n", olsr_ip_to_string(&two_hop_neighbor->neighbor_2_addr)) /* Only queue one way here */ --- 134,138 ---- two_hop_list_tmp = olsr_malloc(sizeof(struct neighbor_2_list_entry), "MPR two hop list"); ! //OLSR_PRINTF(1, "ONE LINK ADDING %s\n", olsr_ip_to_string(&two_hop_neighbor->neighbor_2_addr)); /* Only queue one way here */ *************** *** 171,175 **** count = *two_hop_covered_count; ! OLSR_PRINTF(1, "Setting %s as MPR\n", olsr_ip_to_string(&one_hop_neighbor->neighbor_main_addr)) //printf("PRE COUNT: %d\n\n", count); --- 171,175 ---- count = *two_hop_covered_count; ! OLSR_PRINTF(1, "Setting %s as MPR\n", olsr_ip_to_string(&one_hop_neighbor->neighbor_main_addr)); //printf("PRE COUNT: %d\n\n", count); *************** *** 185,189 **** if((dup_neighbor != NULL) && (dup_neighbor->status == SYM)) { ! //OLSR_PRINTF(7, "(2)Skipping 2h neighbor %s - already 1hop\n", olsr_ip_to_string(&second_hop_entries->neighbor_2->neighbor_2_addr)) continue; } --- 185,189 ---- if((dup_neighbor != NULL) && (dup_neighbor->status == SYM)) { ! //OLSR_PRINTF(7, "(2)Skipping 2h neighbor %s - already 1hop\n", olsr_ip_to_string(&second_hop_entries->neighbor_2->neighbor_2_addr)); continue; } *************** *** 198,202 **** the_one_hop_list = second_hop_entries->neighbor_2->neighbor_2_nblist.next; ! //OLSR_PRINTF(1, "[%s](%x) has coverage %d\n", olsr_ip_to_string(&second_hop_entries->neighbor_2->neighbor_2_addr), second_hop_entries->neighbor_2, second_hop_entries->neighbor_2->mpr_covered_count) if(second_hop_entries->neighbor_2->mpr_covered_count >= olsr_cnf->mpr_coverage) --- 198,202 ---- the_one_hop_list = second_hop_entries->neighbor_2->neighbor_2_nblist.next; ! //OLSR_PRINTF(1, "[%s](%x) has coverage %d\n", olsr_ip_to_string(&second_hop_entries->neighbor_2->neighbor_2_addr), second_hop_entries->neighbor_2, second_hop_entries->neighbor_2->mpr_covered_count); if(second_hop_entries->neighbor_2->mpr_covered_count >= olsr_cnf->mpr_coverage) *************** *** 415,419 **** } ! OLSR_PRINTF(3, "Two hop neighbors: %d\n", sum) return sum; } --- 415,419 ---- } ! OLSR_PRINTF(3, "Two hop neighbors: %d\n", sum); return sum; } *************** *** 445,454 **** olsr_chosen_mpr(a_neighbor, &count); ! OLSR_PRINTF(3, "Adding WILL_ALWAYS: %s\n", olsr_ip_to_string(&a_neighbor->neighbor_main_addr)) } } ! //OLSR_PRINTF(1, "Count: %d\n", count) return count; } --- 445,454 ---- olsr_chosen_mpr(a_neighbor, &count); ! OLSR_PRINTF(3, "Adding WILL_ALWAYS: %s\n", olsr_ip_to_string(&a_neighbor->neighbor_main_addr)); } } ! //OLSR_PRINTF(1, "Count: %d\n", count); return count; } *************** *** 465,469 **** int i; ! OLSR_PRINTF(3, "\n**RECALCULATING MPR**\n\n") olsr_clear_mprs(); --- 465,469 ---- int i; ! OLSR_PRINTF(3, "\n**RECALCULATING MPR**\n\n"); olsr_clear_mprs(); *************** *** 523,527 **** if(olsr_check_mpr_changes()) { ! OLSR_PRINTF(3, "CHANGES IN MPR SET\n") if(olsr_cnf->tc_redundancy > 0) signal_link_changes(OLSR_TRUE); --- 523,527 ---- if(olsr_check_mpr_changes()) { ! OLSR_PRINTF(3, "CHANGES IN MPR SET\n"); if(olsr_cnf->tc_redundancy > 0) signal_link_changes(OLSR_TRUE); *************** *** 584,588 **** if(remove) { ! OLSR_PRINTF(3, "MPR OPTIMIZE: removiong mpr %s\n\n", olsr_ip_to_string(&a_neighbor->neighbor_main_addr)) a_neighbor->is_mpr = OLSR_FALSE; } --- 584,588 ---- if(remove) { ! OLSR_PRINTF(3, "MPR OPTIMIZE: removiong mpr %s\n\n", olsr_ip_to_string(&a_neighbor->neighbor_main_addr)); a_neighbor->is_mpr = OLSR_FALSE; } *************** *** 600,604 **** int index; ! OLSR_PRINTF(1, "MPR SET: ") for(index=0;indexis_mpr) ! OLSR_PRINTF(1, "[%s] ", olsr_ip_to_string(&a_neighbor->neighbor_main_addr)) } } ! OLSR_PRINTF(1, "\n") } --- 613,619 ---- */ if(a_neighbor->is_mpr) ! OLSR_PRINTF(1, "[%s] ", olsr_ip_to_string(&a_neighbor->neighbor_main_addr)); } } ! OLSR_PRINTF(1, "\n"); } Index: tc_set.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/tc_set.c,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** tc_set.c 20 Apr 2007 13:46:04 -0000 1.25 --- tc_set.c 25 Apr 2007 22:08:17 -0000 1.26 *************** *** 59,64 **** { int index; ! ! OLSR_PRINTF(5, "TC: init topo\n") olsr_register_timeout_function(&olsr_time_out_tc_set); --- 59,63 ---- { int index; ! OLSR_PRINTF(5, "TC: init topo\n"); olsr_register_timeout_function(&olsr_time_out_tc_set); *************** *** 87,91 **** { ! //OLSR_PRINTF(1, "TC: del entry if empty\n") if(entry->destinations.next == &entry->destinations) --- 86,90 ---- { ! //OLSR_PRINTF(1, "TC: del entry if empty\n"); if(entry->destinations.next == &entry->destinations) *************** *** 95,99 **** //entry->prev->next = entry->next; //entry->next->prev = entry->prev; ! OLSR_PRINTF(1, "TC-SET: Deleting empty entry %s ->\n", olsr_ip_to_string(&entry->T_last_addr)) free(entry); return 1; --- 94,98 ---- //entry->prev->next = entry->next; //entry->next->prev = entry->prev; ! OLSR_PRINTF(1, "TC-SET: Deleting empty entry %s ->\n", olsr_ip_to_string(&entry->T_last_addr)); free(entry); return 1; *************** *** 119,123 **** olsr_u32_t hash; ! //OLSR_PRINTF(1, "TC: lookup entry\n") hash = olsr_hashing(adr); --- 118,122 ---- olsr_u32_t hash; ! //OLSR_PRINTF(1, "TC: lookup entry\n"); hash = olsr_hashing(adr); *************** *** 150,154 **** olsr_u32_t hash; ! OLSR_PRINTF(1, "TC: adding entry %s\n", olsr_ip_to_string(adr)) hash = olsr_hashing(adr); --- 149,153 ---- olsr_u32_t hash; ! OLSR_PRINTF(1, "TC: adding entry %s\n", olsr_ip_to_string(adr)); hash = olsr_hashing(adr); *************** *** 190,194 **** int retval; ! //OLSR_PRINTF(5, "TC: deleting MPRS\n") tmp_dsts = entry->destinations.next; --- 189,193 ---- int retval; ! //OLSR_PRINTF(5, "TC: deleting MPRS\n"); tmp_dsts = entry->destinations.next; *************** *** 236,240 **** int retval; ! //OLSR_PRINTF(1, "TC: update MPRS\n") retval = 0; --- 235,239 ---- int retval; ! //OLSR_PRINTF(1, "TC: update MPRS\n"); retval = 0; *************** *** 306,310 **** else ! OLSR_PRINTF(3, "Skipping Dijkstra (4)\n") } --- 305,309 ---- else ! OLSR_PRINTF(3, "Skipping Dijkstra (4)\n"); } *************** *** 327,331 **** else ! OLSR_PRINTF(3, "Skipping Dijkstra (5)\n") } } --- 326,330 ---- else ! OLSR_PRINTF(3, "Skipping Dijkstra (5)\n"); } } *************** *** 353,357 **** struct topo_dst *dsts; ! //OLSR_PRINTF(1, "TC: lookup dst\n") for(dsts = entry->destinations.next; --- 352,356 ---- struct topo_dst *dsts; ! //OLSR_PRINTF(1, "TC: lookup dst\n"); for(dsts = entry->destinations.next; *************** *** 432,445 **** nowtm->tm_min, nowtm->tm_sec, ! (int)now.tv_usec / 10000) if (olsr_cnf->ip_version == AF_INET) { ! OLSR_PRINTF(1, "Source IP addr Dest IP addr LQ ILQ ETX\n") fstr = "%-15s %-15s %5.3f %5.3f %.2f\n"; } else { ! OLSR_PRINTF(1, "Source IP addr Dest IP addr LQ ILQ ETX\n") fstr = "%-30s%-30s %5.3f %5.3f %.2f\n"; } --- 431,444 ---- nowtm->tm_min, nowtm->tm_sec, ! (int)now.tv_usec / 10000); if (olsr_cnf->ip_version == AF_INET) { ! OLSR_PRINTF(1, "Source IP addr Dest IP addr LQ ILQ ETX\n"); fstr = "%-15s %-15s %5.3f %5.3f %.2f\n"; } else { ! OLSR_PRINTF(1, "Source IP addr Dest IP addr LQ ILQ ETX\n"); fstr = "%-30s%-30s %5.3f %5.3f %.2f\n"; } *************** *** 462,466 **** olsr_ip_to_string(&dst_entry->T_dest_addr), dst_entry->link_quality, dst_entry->inverse_link_quality, ! etx) } } --- 461,465 ---- olsr_ip_to_string(&dst_entry->T_dest_addr), dst_entry->link_quality, dst_entry->inverse_link_quality, ! etx); } } Index: mpr_selector_set.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/mpr_selector_set.c,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** mpr_selector_set.c 20 Apr 2007 13:46:04 -0000 1.16 --- mpr_selector_set.c 25 Apr 2007 22:08:09 -0000 1.17 *************** *** 58,62 **** olsr_init_mprs_set(void) { ! OLSR_PRINTF(5, "MPRS: Init\n") /* Initial values */ ansn = 0; --- 58,62 ---- olsr_init_mprs_set(void) { ! OLSR_PRINTF(5, "MPRS: Init\n"); /* Initial values */ ansn = 0; *************** *** 106,110 **** struct mpr_selector *new_entry; ! OLSR_PRINTF(1, "MPRS: adding %s\n", olsr_ip_to_string(addr)) new_entry = olsr_malloc(sizeof(struct mpr_selector), "Add MPR selector"); --- 106,110 ---- struct mpr_selector *new_entry; ! OLSR_PRINTF(1, "MPRS: adding %s\n", olsr_ip_to_string(addr)); new_entry = olsr_malloc(sizeof(struct mpr_selector), "Add MPR selector"); *************** *** 143,147 **** if(addr == NULL) return NULL; ! //OLSR_PRINTF(1, "MPRS: Lookup....") mprs = mprs_list.next; --- 143,147 ---- if(addr == NULL) return NULL; ! //OLSR_PRINTF(1, "MPRS: Lookup...."); mprs = mprs_list.next; *************** *** 152,156 **** if(COMP_IP(&mprs->MS_main_addr, addr)) { ! //OLSR_PRINTF(1, "MATCH\n") return mprs; } --- 152,156 ---- if(COMP_IP(&mprs->MS_main_addr, addr)) { ! //OLSR_PRINTF(1, "MATCH\n"); return mprs; } *************** *** 158,162 **** } ! //OLSR_PRINTF(1, "NO MACH\n") return NULL; } --- 158,162 ---- } ! //OLSR_PRINTF(1, "NO MACH\n"); return NULL; } *************** *** 178,182 **** int retval; ! OLSR_PRINTF(5, "MPRS: Update %s\n", olsr_ip_to_string(addr)) retval = 0; --- 178,182 ---- int retval; ! OLSR_PRINTF(5, "MPRS: Update %s\n", olsr_ip_to_string(addr)); retval = 0; *************** *** 213,217 **** mprs = mprs->next; ! OLSR_PRINTF(1, "MPRS: Timing out %s\n", olsr_ip_to_string(&mprs_to_delete->MS_main_addr)) DEQUEUE_ELEM(mprs_to_delete); --- 213,217 ---- mprs = mprs->next; ! OLSR_PRINTF(1, "MPRS: Timing out %s\n", olsr_ip_to_string(&mprs_to_delete->MS_main_addr)); DEQUEUE_ELEM(mprs_to_delete); *************** *** 233,242 **** { struct mpr_selector *mprs; ! OLSR_PRINTF(1, "MPR SELECTORS: ") for(mprs = mprs_list.next; mprs != &mprs_list; mprs = mprs->next) { ! OLSR_PRINTF(1, "%s ", olsr_ip_to_string(&mprs->MS_main_addr)) } ! OLSR_PRINTF(1, "\n") } --- 233,242 ---- { struct mpr_selector *mprs; ! OLSR_PRINTF(1, "MPR SELECTORS: "); for(mprs = mprs_list.next; mprs != &mprs_list; mprs = mprs->next) { ! OLSR_PRINTF(1, "%s ", olsr_ip_to_string(&mprs->MS_main_addr)); } ! OLSR_PRINTF(1, "\n"); } Index: parser.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/parser.c,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** parser.c 20 Apr 2007 13:46:04 -0000 1.33 --- parser.c 25 Apr 2007 22:08:10 -0000 1.34 *************** *** 90,94 **** olsr_init_parser(void) { ! OLSR_PRINTF(3, "Initializing parser...\n") /* Initialize the packet functions */ --- 90,94 ---- olsr_init_parser(void) { ! OLSR_PRINTF(3, "Initializing parser...\n"); /* Initialize the packet functions */ *************** *** 102,106 **** struct parse_function_entry *new_entry; ! OLSR_PRINTF(3, "Parser: registering event for type %d\n", type) --- 102,106 ---- struct parse_function_entry *new_entry; ! OLSR_PRINTF(3, "Parser: registering event for type %d\n", type); *************** *** 115,119 **** parse_functions = new_entry; ! OLSR_PRINTF(3, "Register parse function: Added function for type %d\n", type) } --- 115,119 ---- parse_functions = new_entry; ! OLSR_PRINTF(3, "Register parse function: Added function for type %d\n", type); } *************** *** 182,186 **** if (ntohs(olsr->olsr_packlen) != size) { ! OLSR_PRINTF(1, "Size error detected in received packet.\nRecieved %d, in packet %d\n", size, ntohs(olsr->olsr_packlen)) olsr_syslog(OLSR_LOG_ERR, " packet length error in packet received from %s!", --- 182,186 ---- if (ntohs(olsr->olsr_packlen) != size) { ! OLSR_PRINTF(1, "Size error detected in received packet.\nRecieved %d, in packet %d\n", size, ntohs(olsr->olsr_packlen)); olsr_syslog(OLSR_LOG_ERR, " packet length error in packet received from %s!", *************** *** 246,250 **** { OLSR_PRINTF(1, "packet length error in packet received from %s!", ! olsr_ip_to_string(from_addr)) olsr_syslog(OLSR_LOG_ERR, " packet length error in packet received from %s!", --- 246,250 ---- { OLSR_PRINTF(1, "packet length error in packet received from %s!", ! olsr_ip_to_string(from_addr)); olsr_syslog(OLSR_LOG_ERR, " packet length error in packet received from %s!", *************** *** 262,266 **** OLSR_PRINTF(2, "Dropping packet type %d from neigh %s with TTL 0\n", m->v4.olsr_msgtype, ! olsr_ip_to_string(from_addr)) continue; } --- 262,266 ---- OLSR_PRINTF(2, "Dropping packet type %d from neigh %s with TTL 0\n", m->v4.olsr_msgtype, ! olsr_ip_to_string(from_addr)); continue; } *************** *** 273,277 **** OLSR_PRINTF(2, "Dropping packet type %d from %s with TTL 0\n", m->v4.olsr_msgtype, ! olsr_ip_to_string(from_addr)) continue; } --- 273,277 ---- OLSR_PRINTF(2, "Dropping packet type %d from %s with TTL 0\n", m->v4.olsr_msgtype, ! olsr_ip_to_string(from_addr)); continue; } *************** *** 290,294 **** { #ifdef DEBUG ! OLSR_PRINTF(3, "Not processing message originating from us!\n") #endif continue; --- 290,294 ---- { #ifdef DEBUG ! OLSR_PRINTF(3, "Not processing message originating from us!\n"); #endif continue; *************** *** 324,328 **** m->v4.olsr_msgtype, size, ! olsr_ip_to_string(&unkpacket.originator)) /* Forward message */ --- 324,328 ---- m->v4.olsr_msgtype, size, ! olsr_ip_to_string(&unkpacket.originator)); /* Forward message */ *************** *** 370,374 **** if (32 < ++cpu_overload_exit) { ! OLSR_PRINTF(1, "CPU overload detected, ending olsr_input() loop\n") break; } --- 370,374 ---- if (32 < ++cpu_overload_exit) { ! OLSR_PRINTF(1, "CPU overload detected, ending olsr_input() loop\n"); break; } *************** *** 387,391 **** if (cc < 0 && errno != EWOULDBLOCK) { ! OLSR_PRINTF(1, "error recvfrom: %s", strerror(errno)) olsr_syslog(OLSR_LOG_ERR, "error recvfrom: %m"); } --- 387,391 ---- if (cc < 0 && errno != EWOULDBLOCK) { ! OLSR_PRINTF(1, "error recvfrom: %s", strerror(errno)); olsr_syslog(OLSR_LOG_ERR, "error recvfrom: %m"); } *************** *** 406,410 **** #ifdef DEBUG ! OLSR_PRINTF(5, "Recieved a packet from %s\n", olsr_ip_to_string((union olsr_ip_addr *)&((struct sockaddr_in *)&from)->sin_addr.s_addr)) #endif --- 406,410 ---- #ifdef DEBUG ! OLSR_PRINTF(5, "Recieved a packet from %s\n", olsr_ip_to_string((union olsr_ip_addr *)&((struct sockaddr_in *)&from)->sin_addr.s_addr)); #endif *************** *** 422,426 **** OLSR_PRINTF(1, "Could not find input interface for message from %s size %d\n", olsr_ip_to_string(&from_addr), ! cc) olsr_syslog(OLSR_LOG_ERR, "Could not find input interface for message from %s size %d\n", olsr_ip_to_string(&from_addr), --- 422,426 ---- OLSR_PRINTF(1, "Could not find input interface for message from %s size %d\n", olsr_ip_to_string(&from_addr), ! cc); olsr_syslog(OLSR_LOG_ERR, "Could not find input interface for message from %s size %d\n", olsr_ip_to_string(&from_addr), *************** *** 503,508 **** if (cc < 0 && errno != EWOULDBLOCK) { ! OLSR_PRINTF(1, "error recvfrom: %s", strerror(errno)) ! olsr_syslog(OLSR_LOG_ERR, "error recvfrom: %m"); } return; --- 503,509 ---- if (cc < 0 && errno != EWOULDBLOCK) { ! const char * const err_msg = strerror(errno); ! OLSR_PRINTF(1, "error recvfrom: %s", err_msg); ! olsr_syslog(OLSR_LOG_ERR, "error recvfrom: %s", err_msg); } return; *************** *** 519,526 **** OLSR_PRINTF(1, "Could not find input interface for message from %s size %d\n", olsr_ip_to_string(&from_addr), ! cc) ! olsr_syslog(OLSR_LOG_ERR, "Could not find input interface for message from %s size %d\n", ! olsr_ip_to_string(&from_addr), ! cc); return; } --- 520,527 ---- OLSR_PRINTF(1, "Could not find input interface for message from %s size %d\n", olsr_ip_to_string(&from_addr), ! cc); ! olsr_syslog(OLSR_LOG_ERR, "Could not find input interface for message from %s size %d\n", ! olsr_ip_to_string(&from_addr), ! cc); return; } Index: scheduler.c =================================================================== RCS file: /cvsroot/olsrd/olsrd-current/src/scheduler.c,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -d -r1.38 -r1.39 *** scheduler.c 20 Apr 2007 13:46:04 -0000 1.38 --- scheduler.c 25 Apr 2007 22:08:16 -0000 1.39 *************** *** 133,138 **** interval.tv_usec = interval_usec % 1000000; ! OLSR_PRINTF(1, "Scheduler started - polling every %0.2f seconds\n", pollrate) ! OLSR_PRINTF(3, "Max jitter is %f\n\n", olsr_cnf->max_jitter) /* Main scheduler event loop */ --- 133,138 ---- interval.tv_usec = interval_usec % 1000000; ! OLSR_PRINTF(1, "Scheduler started - polling every %0.2f seconds\n", pollrate); ! OLSR_PRINTF(3, "Max jitter is %f\n\n", olsr_cnf->max_jitter); /* Main scheduler event loop */ *************** *** 170,174 **** if(link_changes) { ! OLSR_PRINTF(3, "ANSN UPDATED %d\n\n", get_local_ansn()) increase_local_ansn(); link_changes = OLSR_FALSE; --- 170,174 ---- if(link_changes) { ! OLSR_PRINTF(3, "ANSN UPDATED %d\n\n", get_local_ansn()); increase_local_ansn(); link_changes = OLSR_FALSE; *************** *** 201,205 **** *(entry->trigger) = 0; ! //OLSR_PRINTF(3, "Since_last jitter: %0.2f\n", entry->since_last) } --- 201,205 ---- *(entry->trigger) = 0; ! //OLSR_PRINTF(3, "Since_last jitter: %0.2f\n", entry->since_last); } *************** *** 278,282 **** struct event_entry *new_entry; ! OLSR_PRINTF(3, "Scheduler event registered int: %0.2f\n", interval) /* check that this entry is not added already */ --- 278,282 ---- struct event_entry *new_entry; ! OLSR_PRINTF(3, "Scheduler event registered int: %0.2f\n", interval); /* check that this entry is not added already */
Destination IPLast Hop IPLQILQETX
%s%s%0.2f%0.2f%0.2f
%0.2f%0.2f%0.2f
%s%s%s
%s
%s
Hysteresis disabled
LQ disabled
Hysteresis disabled
LQ disabled