[Olsr-cvs] olsrd-current/lib/quagga/src quagga.h, 1.5, 1.6 quagga.c, 1.10, 1.11

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


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

Modified Files:
	quagga.h quagga.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: quagga.h
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/lib/quagga/src/quagga.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** quagga.h	10 Oct 2007 21:24:54 -0000	1.5
--- quagga.h	11 Nov 2007 23:10:25 -0000	1.6
***************
*** 55,60 ****
  void zebra_cleanup (void);
  unsigned char zebra_send_command (unsigned char, unsigned char *, int );
! int zebra_add_v4_route (struct ipv4_route r);
! int zebra_delete_v4_route (struct ipv4_route r);
  void zebra_check (void*);
  int zebra_parse_packet (unsigned char*, ssize_t);
--- 55,60 ----
  void zebra_cleanup (void);
  unsigned char zebra_send_command (unsigned char, unsigned char *, int );
! int zebra_add_v4_route (const struct ipv4_route r);
! int zebra_delete_v4_route (const struct ipv4_route r);
  void zebra_check (void*);
  int zebra_parse_packet (unsigned char*, ssize_t);
***************
*** 64,69 ****
  int delete_hna4_route (struct ipv4_route);
  void *my_realloc (void *, size_t, const char *);
! int zebra_add_olsr_v4_route (struct rt_entry *);
! int zebra_del_olsr_v4_route (struct rt_entry *);
  void zebra_olsr_localpref (void);
  void zebra_olsr_distance (unsigned char);
--- 64,69 ----
  int delete_hna4_route (struct ipv4_route);
  void *my_realloc (void *, size_t, const char *);
! int zebra_add_olsr_v4_route (const struct rt_entry *);
! int zebra_del_olsr_v4_route (const struct rt_entry *);
  void zebra_olsr_localpref (void);
  void zebra_olsr_distance (unsigned char);

Index: quagga.c
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/lib/quagga/src/quagga.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** quagga.c	8 Nov 2007 22:47:40 -0000	1.10
--- quagga.c	11 Nov 2007 23:10:25 -0000	1.11
***************
*** 27,32 ****
  #include <netinet/in.h>
  #include <quagga/zebra.h>
- #include "quagga.h"
  
  #include "olsr.h"
  #include "log.h"
--- 27,32 ----
  #include <netinet/in.h>
  #include <quagga/zebra.h>
  
+ #include "quagga.h"
  #include "olsr.h"
  #include "log.h"
***************
*** 365,369 ****
  
  /* adds a route to zebra-daemon */
! int zebra_add_v4_route (struct ipv4_route r) {
    
    unsigned char *cmdopt;
--- 365,369 ----
  
  /* adds a route to zebra-daemon */
! int zebra_add_v4_route (const struct ipv4_route r) {
    
    unsigned char *cmdopt;
***************
*** 737,741 ****
  */
  
! int zebra_add_olsr_v4_route (struct rt_entry *r) {
    
    struct ipv4_route route;
--- 737,741 ----
  */
  
! int zebra_add_olsr_v4_route (const struct rt_entry *r) {
    
    struct ipv4_route route;
***************
*** 784,788 ****
  }
  
! int zebra_del_olsr_v4_route (struct rt_entry *r) {
    
    struct ipv4_route route;
--- 784,788 ----
  }
  
! int zebra_del_olsr_v4_route (const struct rt_entry *r) {
    
    struct ipv4_route route;





More information about the Olsr-cvs mailing list