[Olsr-cvs] olsrd-current/lib/quagga/src quagga.c, 1.4, 1.5 quagga.h, 1.3, 1.4

Bernd Petrovitsch (spam-protected)
Sat Aug 25 21:48:44 CEST 2007


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

Modified Files:
	quagga.c quagga.h 
Log Message:
* Patch from Sven-Ola Tuecke to convert more plugins to the new interface.


Index: quagga.h
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/lib/quagga/src/quagga.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** quagga.h	16 Aug 2007 19:07:28 -0000	1.3
--- quagga.h	25 Aug 2007 19:48:42 -0000	1.4
***************
*** 54,58 ****
  void init_zebra (void);
  void zebra_cleanup (void);
! char zebra_send_command (unsigned char, char *, int );
  int zebra_add_v4_route (struct ipv4_route r);
  int zebra_delete_v4_route (struct ipv4_route r);
--- 54,58 ----
  void init_zebra (void);
  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);

Index: quagga.c
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/lib/quagga/src/quagga.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** quagga.c	16 Aug 2007 19:07:28 -0000	1.4
--- quagga.c	25 Aug 2007 19:48:42 -0000	1.5
***************
*** 61,66 ****
  
  /* prototypes intern */
! static char *try_read (ssize_t *);
! static char* zebra_route_packet (struct ipv4_route r, ssize_t *);
  static int parse_interface_add (unsigned char *, size_t);
  static int parse_interface_delete (unsigned char *, size_t);
--- 61,66 ----
  
  /* prototypes intern */
! static unsigned char *try_read (ssize_t *);
! static unsigned char* zebra_route_packet (struct ipv4_route r, ssize_t *);
  static int parse_interface_add (unsigned char *, size_t);
  static int parse_interface_delete (unsigned char *, size_t);
***************
*** 242,246 ****
     the command defined in zebra.h, options is the packet-payload, 
     optlen the length, of the payload */
! char zebra_send_command (unsigned char command, char * options, int optlen) {
  
  #ifdef ZEBRA_HEADER_MARKER
--- 242,246 ----
     the command defined in zebra.h, options is the packet-payload, 
     optlen the length, of the payload */
! unsigned char zebra_send_command (unsigned char command, unsigned char * options, int optlen) {
  
  #ifdef ZEBRA_HEADER_MARKER
***************
*** 296,304 ****
  /* Creates a Route-Packet-Payload, needs address, netmask, nexthop, 
     distance, and a pointer of an size_t */
! static char* zebra_route_packet (struct ipv4_route r, ssize_t *optlen) {
  
    int count;
  
!   char *cmdopt, *t;
    *optlen = 4; // first: type, flags, message, prefixlen
    *optlen += r.prefixlen / 8 + (r.prefixlen % 8 ? 1 : 0); // + prefix
--- 296,304 ----
  /* Creates a Route-Packet-Payload, needs address, netmask, nexthop, 
     distance, and a pointer of an size_t */
! static unsigned char* zebra_route_packet (struct ipv4_route r, ssize_t *optlen) {
  
    int count;
  
!   unsigned char *cmdopt, *t;
    *optlen = 4; // first: type, flags, message, prefixlen
    *optlen += r.prefixlen / 8 + (r.prefixlen % 8 ? 1 : 0); // + prefix
***************
*** 364,368 ****
  int zebra_add_v4_route (struct ipv4_route r) {
    
!   char *cmdopt;
    ssize_t optlen;
    int retval;
--- 364,368 ----
  int zebra_add_v4_route (struct ipv4_route r) {
    
!   unsigned char *cmdopt;
    ssize_t optlen;
    int retval;
***************
*** 379,383 ****
  int zebra_delete_v4_route (struct ipv4_route r) {
    
!   char *cmdopt;
    ssize_t optlen;
    int retval;
--- 379,383 ----
  int zebra_delete_v4_route (struct ipv4_route r) {
    
!   unsigned char *cmdopt;
    ssize_t optlen;
    int retval;
***************
*** 395,399 ****
  /* Check wether there is data from zebra aviable */
  void zebra_check (void* foo) {
!   char *data, *f;
    ssize_t len, ret;
  
--- 395,399 ----
  /* Check wether there is data from zebra aviable */
  void zebra_check (void* foo) {
!   unsigned char *data, *f;
    ssize_t len, ret;
  
***************
*** 419,423 ****
  // tries to read a packet from zebra_socket
  // if there is something to read - make sure to read whole packages
! static char *try_read (ssize_t *len) {
    unsigned char *buf = NULL;
    ssize_t ret = 0, bsize = 0;
--- 419,423 ----
  // tries to read a packet from zebra_socket
  // if there is something to read - make sure to read whole packages
! static unsigned char *try_read (ssize_t *len) {
    unsigned char *buf = NULL;
    ssize_t ret = 0, bsize = 0;





More information about the Olsr-cvs mailing list