[Olsr-cvs] olsrd-current/src/win32 kernel_routes.c,1.24,1.25

Bernd Petrovitsch (spam-protected)
Mon Nov 12 00:10:25 CET 2007


Update of /cvsroot/olsrd/olsrd-current/src/win32
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv10534/src/win32

Modified Files:
	kernel_routes.c 
Log Message:
* const'ified olsr_ioctl_{add,del}_route{,6}()
  There are probably a few "const" missing for win32 and BSD.
* const'ified moer parameters in many more functions in the .h and
  .c files
* init-functions with constant or ignored return values are "void"
* created a typedef fro the callback in "struct export_route_entry"
  and using it!
* moved the initilaization of the {add,chg,del}_kernel_list variables
  into process_routes.c. So they are now "static" there.
* olsr_export_{add,del}_route{,6} are now static in process_routes.c
  since they are not used elsewhere.
* olsr_addroute_add_function() and olsr_deldroute_add_function() were
  almost identical - made one function out of it.
  Same for olsr_addroute_del_function() and olsr_deldroute_del_function().
* factored out common code
* fixed the sort order in avl_comp_ipv4_prefix(): We compare now the IPv4
  values in host byte order (and not network byte order). So the route
  list in the e.g. httpinfo plugin is now nicely sorted.


Index: kernel_routes.c
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/src/win32/kernel_routes.c,v
retrieving revision 1.24
retrieving revision 1.25
diff -C2 -d -r1.24 -r1.25
*** kernel_routes.c	8 Nov 2007 23:23:13 -0000	1.24
--- kernel_routes.c	11 Nov 2007 23:10:22 -0000	1.25
***************
*** 61,65 ****
   *@return negative on error
   */
! int olsr_ioctl_add_route(struct rt_entry *rt)
  {
    MIB_IPFORWARDROW Row;
--- 61,65 ----
   *@return negative on error
   */
! int olsr_ioctl_add_route(const struct rt_entry *rt)
  {
    MIB_IPFORWARDROW Row;
***************
*** 128,132 ****
  // XXX - to be implemented
  
! int olsr_ioctl_add_route6(struct rt_entry *rt __attribute__((unused)))
  {
    return 0;
--- 128,132 ----
  // XXX - to be implemented
  
! int olsr_ioctl_add_route6(const struct rt_entry *rt __attribute__((unused)))
  {
    return 0;
***************
*** 140,144 ****
   *@return negative on error
   */
! int olsr_ioctl_del_route(struct rt_entry *rt)
  {
    MIB_IPFORWARDROW Row;
--- 140,144 ----
   *@return negative on error
   */
! int olsr_ioctl_del_route(const struct rt_entry *rt)
  {
    MIB_IPFORWARDROW Row;
***************
*** 195,199 ****
  // XXX - to be implemented
  
! int olsr_ioctl_del_route6(struct rt_entry *rt __attribute__((unused)))
  {
    return 0;
--- 195,199 ----
  // XXX - to be implemented
  
! int olsr_ioctl_del_route6(const struct rt_entry *rt __attribute__((unused)))
  {
    return 0;





More information about the Olsr-cvs mailing list