[Olsr-cvs] olsrd-current/src/linux link_layer.c,1.11,1.12

Bernd Petrovitsch (spam-protected)
Sat Feb 10 18:11:52 CET 2007


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

Modified Files:
	link_layer.c 
Log Message:
* this file is actually completely #if 0 ... #endif out. But I was looking for
  a declaration of ioctl_s and this delivers false positives.


Index: link_layer.c
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/src/linux/link_layer.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** link_layer.c	27 Feb 2005 10:43:38 -0000	1.11
--- link_layer.c	10 Feb 2007 17:11:49 -0000	1.12
***************
*** 81,88 ****
  #define	MAXICMPLEN	76
  
- extern size_t ipsize;
- 
- extern int ioctl_s;
- 
  float poll_int = 0.2;
  
--- 81,84 ----
***************
*** 132,136 ****
    strncpy(wrq.ifr_name, ifname, IFNAMSIZ);
  
!   if(ioctl(ioctl_s, SIOCSIWSPY, &wrq) < 0)
      {
        OLSR_PRINTF(1, "Could not clear spylist %s\n", strerror(errno))
--- 128,132 ----
    strncpy(wrq.ifr_name, ifname, IFNAMSIZ);
  
!   if(ioctl(olsr_cnf->ioctl_s, SIOCSIWSPY, &wrq) < 0)
      {
        OLSR_PRINTF(1, "Could not clear spylist %s\n", strerror(errno))
***************
*** 163,167 ****
    strncpy(wrq.ifr_name, interface, IFNAMSIZ);
  
!   if(ioctl(ioctl_s, SIOCGIWSPY, &wrq) < 0)
      {
        OLSR_PRINTF(1, "Could not get old spylist %s\n", strerror(errno))
--- 159,163 ----
    strncpy(wrq.ifr_name, interface, IFNAMSIZ);
  
!   if(ioctl(olsr_cnf->ioctl_s, SIOCGIWSPY, &wrq) < 0)
      {
        OLSR_PRINTF(1, "Could not get old spylist %s\n", strerror(errno))
***************
*** 196,200 ****
    strncpy(wrq.ifr_name, interface, IFNAMSIZ);
    
!   if(ioctl(ioctl_s, SIOCSIWSPY, &wrq) < 0)
      {
        OLSR_PRINTF(1, "Could not clear spylist %s\n", strerror(errno))
--- 192,196 ----
    strncpy(wrq.ifr_name, interface, IFNAMSIZ);
    
!   if(ioctl(olsr_cnf->ioctl_s, SIOCSIWSPY, &wrq) < 0)
      {
        OLSR_PRINTF(1, "Could not clear spylist %s\n", strerror(errno))
***************
*** 223,227 ****
    tmp_sockaddr.sin_port = 0;
  
!   memcpy(&tmp_sockaddr.sin_addr, ip, ipsize);
  
    /* Translate IP addresses to MAC addresses */
--- 219,223 ----
    tmp_sockaddr.sin_port = 0;
  
!   memcpy(&tmp_sockaddr.sin_addr, ip, olsr_cnf->ipsize);
  
    /* Translate IP addresses to MAC addresses */
***************
*** 232,236 ****
    strncpy(arp_query.arp_dev, interface, IFNAMSIZ);
    
!   if((ioctl(ioctl_s, SIOCGARP, &arp_query) < 0) ||
       !(arp_query.arp_flags & ATF_COM)) /* ATF_COM - hw addr valid */
      {
--- 228,232 ----
    strncpy(arp_query.arp_dev, interface, IFNAMSIZ);
    
!   if((ioctl(olsr_cnf->ioctl_s, SIOCGARP, &arp_query) < 0) ||
       !(arp_query.arp_flags & ATF_COM)) /* ATF_COM - hw addr valid */
      {
***************
*** 273,277 ****
  
    dst_in->sin_family = AF_INET;
!   memcpy(&dst_in->sin_addr, ip, ipsize);
  
    OLSR_PRINTF(1, "pinging %s\n\n", olsr_ip_to_string(ip))
--- 269,273 ----
  
    dst_in->sin_family = AF_INET;
!   memcpy(&dst_in->sin_addr, ip, olsr_cnf->ipsize);
  
    OLSR_PRINTF(1, "pinging %s\n\n", olsr_ip_to_string(ip))
***************
*** 340,344 ****
        
        /* Do the request */
!       if(ioctl(ioctl_s, SIOCGIWSPY, &wrq) < 0)
  	{
  	  OLSR_PRINTF(1, "%-8.16s  Interface doesn't support wireless statistic collection\n\n", iflist->int_name)
--- 336,340 ----
        
        /* Do the request */
!       if(ioctl(olsr_cnf->ioctl_s, SIOCGIWSPY, &wrq) < 0)
  	{
  	  OLSR_PRINTF(1, "%-8.16s  Interface doesn't support wireless statistic collection\n\n", iflist->int_name)
***************
*** 414,418 ****
    strncpy(wrq.ifr_name, ifname, IFNAMSIZ);
  
!   if(ioctl(ioctl_s, SIOCGIWRANGE, &wrq) < 0)
      {
        OLSR_PRINTF(1, "NO RANGE\n")
--- 410,414 ----
    strncpy(wrq.ifr_name, ifname, IFNAMSIZ);
  
!   if(ioctl(olsr_cnf->ioctl_s, SIOCGIWRANGE, &wrq) < 0)
      {
        OLSR_PRINTF(1, "NO RANGE\n")





More information about the Olsr-cvs mailing list