[Olsr-cvs] olsrd-current/src net_olsr.c, 1.14, 1.15 net_olsr.h, 1.3, 1.4

Bernd Petrovitsch (spam-protected)
Wed Nov 15 21:58:53 CET 2006


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

Modified Files:
	net_olsr.c net_olsr.h 
Log Message:
Cleanup:
* added "void" to function definitions if they have no parameter
* made locally used only "netbufs" array "static".
* moved locally only struct definitions into the .c file
* added "const" to constant arrays
* fixed typos


Index: net_olsr.c
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/src/net_olsr.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** net_olsr.c	2 Oct 2006 08:37:17 -0000	1.14
--- net_olsr.c	15 Nov 2006 20:58:51 -0000	1.15
***************
*** 53,56 ****
--- 53,57 ----
  #endif
  
+ 
  extern olsr_bool lq_tc_pending;
  
***************
*** 65,68 ****
--- 66,88 ----
  
  
+ struct deny_address_entry
+ {
+   union olsr_ip_addr        addr;
+   struct deny_address_entry *next;
+ };
+ 
+ 
+ /* Output buffer structure */
+ 
+ struct olsr_netbuf
+ {
+   char *buff;     /* Pointer to the allocated buffer */
+   int if_index;
+   int bufsize;    /* Size of the buffer */
+   int maxsize;    /* Max bytes of payload that can be added to the buffer */
+   int pending;    /* How much data is currently pending in the buffer */
+   int reserved;   /* Plugins can reserve space in buffers */
+ };
+ 
  /* Packet transform functions */
  
***************
*** 75,79 ****
  static struct ptf *ptf_list;
  
! struct olsr_netbuf *netbufs[MAX_IFS];
  
  static char ipv6_buf[100]; /* for address coversion */
--- 95,99 ----
  static struct ptf *ptf_list;
  
! static struct olsr_netbuf *netbufs[MAX_IFS];
  
  static char ipv6_buf[100]; /* for address coversion */
***************
*** 81,85 ****
  static struct deny_address_entry *deny_entries;
  
! static char *deny_ipv4_defaults[] =
    {
      "0.0.0.0",
--- 101,105 ----
  static struct deny_address_entry *deny_entries;
  
! static const char * const deny_ipv4_defaults[] =
    {
      "0.0.0.0",
***************
*** 89,93 ****
    };
  
! static char *deny_ipv6_defaults[] =
    {
      "0::0",
--- 109,113 ----
    };
  
! static const char * const deny_ipv6_defaults[] =
    {
      "0::0",
***************
*** 103,107 ****
  
  char *
! get_libnet_errbuf()
  {
    return errbuf;
--- 123,127 ----
  
  char *
! get_libnet_errbuf(void)
  {
    return errbuf;
***************
*** 117,121 ****
  
  void
! init_net()
  {
    union olsr_ip_addr addr;
--- 137,141 ----
  
  void
! init_net(void)
  {
    union olsr_ip_addr addr;
***************
*** 684,688 ****
    /*
     *if the -dispout option was given
!    *we print the contetnt of the packets
     */
    if(disp_pack_out)
--- 704,708 ----
    /*
     *if the -dispout option was given
!    *we print the content of the packets
     */
    if(disp_pack_out)

Index: net_olsr.h
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/src/net_olsr.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** net_olsr.h	7 Jan 2006 08:16:20 -0000	1.3
--- net_olsr.h	15 Nov 2006 20:58:51 -0000	1.4
***************
*** 50,72 ****
  #include <net/if.h>
  
- struct deny_address_entry
- {
-   union olsr_ip_addr        addr;
-   struct deny_address_entry *next;
- };
- 
- 
- /* Output buffer structure */
- 
- struct olsr_netbuf
- {
-   char *buff;     /* Pointer to the allocated buffer */
-   int if_index;
-   int bufsize;    /* Size of the buffer */
-   int maxsize;    /* Max bytes of payload that can be added to the buffer */
-   int pending;    /* How much data is currently pending in the buffer */
-   int reserved;   /* Plugins can reserve space in buffers */
- };
- 
  #ifdef USE_LIBNET
  char *
--- 50,53 ----





More information about the Olsr-cvs mailing list