[Olsr-cvs] olsrd-current/src/win32 ifnet.c,1.38,1.39
Bernd Petrovitsch
(spam-protected)
Thu Nov 8 23:47:45 CET 2007
- Previous message: [Olsr-cvs] olsrd-current/src build_msg.c, 1.37, 1.38 defs.h, 1.65, 1.66 duplicate_set.c, 1.18, 1.19 generate_msg.c, 1.25, 1.26 hna_set.c, 1.23, 1.24 hysteresis.c, 1.21, 1.22 interfaces.c, 1.35, 1.36 interfaces.h, 1.43, 1.44 ipc_frontend.c, 1.37, 1.38 ipc_frontend.h, 1.15, 1.16 link_set.c, 1.76, 1.77 local_hna_set.c, 1.15, 1.16 lq_avl.c, 1.13, 1.14 lq_avl.h, 1.11, 1.12 lq_packet.c, 1.28, 1.29 lq_route.c, 1.56, 1.57 main.c, 1.101, 1.102 mid_set.c, 1.22, 1.23 mid_set.h, 1.15, 1.16 mpr.c, 1.19, 1.20 mpr_selector_set.c, 1.19, 1.20 neighbor_table.c, 1.34, 1.35 net_olsr.c, 1.31, 1.32 net_olsr.h, 1.14, 1.15 olsr.c, 1.60, 1.61 olsr_protocol.h, 1.22, 1.23 olsr_types.h, 1.11, 1.12 packet.c, 1.25, 1.26 parser.c, 1.35, 1.36 parser.h, 1.11, 1.12 plugin_util.c, 1.7, 1.8 print_packet.c, 1.12, 1.13 process_package.c, 1.42, 1.43 process_package.h, 1.12, 1.13 process_routes.c, 1.37, 1.38 rebuild_packet.c, 1.22, 1.23 rebuild_packet.h, 1.8, 1.9 routing_table.c, 1.32, 1.33 routing_table.h, 1.23, 1.24 scheduler.c, 1.43, 1.44 tc_set.c, 1.35, 1.36 tc_set.h, 1.21, 1.22 two_hop_neighbor_table.c, 1.19, 1.20 two_hop_neighbor_table.h, 1.14, 1.15
- Next message: [Olsr-cvs] olsrd-current/src/unix ifnet.c,1.52,1.53
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/olsrd/olsrd-current/src/win32
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv28726/src/win32
Modified Files:
ifnet.c
Log Message:
Another fat commit:
The main target was:
- Fixed the misleading definition of "v4" in "struct olsr_ip_addr" fom
"olsr_u32_t" (in network-byteorder!) to "struct in_addr". Lots of
temporary variables to call inet_ntoa()/inet_ptoa() vanished .....
- declare "int_addr", "int_netmask" and "int_broadaddr" in "struct interface"
as "struct sockaddr_in" since it is that what we actually want there (and
it is similar to the IPv6 code).
To get that thoroughly via compiler errors, we get:
- We have now ip4_to_string(), ip6_to_string() and olsr_ip_to_string()
to print a "struct in_addr", "struct in6_addr" and "union olsr_ip_addr"
into a string buffer.
Alas, this also annoyed me since ages:
- cleanup: olsr_ip_to_string() and similar non-reentrant functions now must
get a target buffer. To ease that, there is the "struct ipaddr_str"
which is large enough for all of them (read: for an IPv6 address). This
also removes the cyclic buffer there.
All of these function return a "const char *" which can be directly used
for printf(3) and friends.
And some cleanups:
- const'ified more functions
- converted the source to UTF-8.
- "struct sig_msg" uses an olsr_u8_t for a byte array (and not "char")
- force the few inline function to always be inlined.
- #ifdef the body of the olsr_print_hna_set() and olsr_print_neighbor_table()
if nothing is done
- use "inline_avl_comp_ipv4()" in "avl_comp_ipv4()"
- clean up the routes on more signals. Basically we want to do this on all
signals which terminate the program.
- killed a superflous global buffer in src/main.c
This version was breing since weeks and running for severa day in Vienna's
FunkFeuer net without any noticably problem!
Please report anything that broke!
Index: ifnet.c
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/src/win32/ifnet.c,v
retrieving revision 1.38
retrieving revision 1.39
diff -C2 -d -r1.38 -r1.39
*** ifnet.c 13 May 2007 22:23:55 -0000 1.38
--- ifnet.c 8 Nov 2007 22:47:43 -0000 1.39
***************
*** 535,539 ****
}
! if(COMP_IP(&olsr_cnf->main_addr, &Int->ip_addr))
{
if(ifnet == NULL)
--- 535,539 ----
}
! if(ipequal(&olsr_cnf->main_addr, &Int->ip_addr))
{
if(ifnet == NULL)
***************
*** 631,635 ****
memset(&null_addr, 0, olsr_cnf->ipsize);
! if(COMP_IP(&null_addr, &olsr_cnf->main_addr))
{
COPY_IP(&olsr_cnf->main_addr, &iface->hemu_ip);
--- 631,635 ----
memset(&null_addr, 0, olsr_cnf->ipsize);
! if(ipequal(&null_addr, &olsr_cnf->main_addr))
{
COPY_IP(&olsr_cnf->main_addr, &iface->hemu_ip);
***************
*** 1035,1039 ****
memset(&NullAddr, 0, olsr_cnf->ipsize);
! if(COMP_IP(&NullAddr, &olsr_cnf->main_addr))
{
COPY_IP(&olsr_cnf->main_addr, &New->ip_addr);
--- 1035,1039 ----
memset(&NullAddr, 0, olsr_cnf->ipsize);
! if(ipequal(&NullAddr, &olsr_cnf->main_addr))
{
COPY_IP(&olsr_cnf->main_addr, &New->ip_addr);
- Previous message: [Olsr-cvs] olsrd-current/src build_msg.c, 1.37, 1.38 defs.h, 1.65, 1.66 duplicate_set.c, 1.18, 1.19 generate_msg.c, 1.25, 1.26 hna_set.c, 1.23, 1.24 hysteresis.c, 1.21, 1.22 interfaces.c, 1.35, 1.36 interfaces.h, 1.43, 1.44 ipc_frontend.c, 1.37, 1.38 ipc_frontend.h, 1.15, 1.16 link_set.c, 1.76, 1.77 local_hna_set.c, 1.15, 1.16 lq_avl.c, 1.13, 1.14 lq_avl.h, 1.11, 1.12 lq_packet.c, 1.28, 1.29 lq_route.c, 1.56, 1.57 main.c, 1.101, 1.102 mid_set.c, 1.22, 1.23 mid_set.h, 1.15, 1.16 mpr.c, 1.19, 1.20 mpr_selector_set.c, 1.19, 1.20 neighbor_table.c, 1.34, 1.35 net_olsr.c, 1.31, 1.32 net_olsr.h, 1.14, 1.15 olsr.c, 1.60, 1.61 olsr_protocol.h, 1.22, 1.23 olsr_types.h, 1.11, 1.12 packet.c, 1.25, 1.26 parser.c, 1.35, 1.36 parser.h, 1.11, 1.12 plugin_util.c, 1.7, 1.8 print_packet.c, 1.12, 1.13 process_package.c, 1.42, 1.43 process_package.h, 1.12, 1.13 process_routes.c, 1.37, 1.38 rebuild_packet.c, 1.22, 1.23 rebuild_packet.h, 1.8, 1.9 routing_table.c, 1.32, 1.33 routing_table.h, 1.23, 1.24 scheduler.c, 1.43, 1.44 tc_set.c, 1.35, 1.36 tc_set.h, 1.21, 1.22 two_hop_neighbor_table.c, 1.19, 1.20 two_hop_neighbor_table.h, 1.14, 1.15
- Next message: [Olsr-cvs] olsrd-current/src/unix ifnet.c,1.52,1.53
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Olsr-cvs
mailing list