Changeset 684

Show
Ignore:
Timestamp:
10/27/06 21:41:00 (2 years ago)
Author:
common
Message:

nepenthes

  • module-peiros
    • fix module-peiros for freebsd, even if it does not work, no reason to break the whole compilation of everything else
Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • nepenthes/trunk/modules/module-peiros/TapInterface.cpp

    r663 r684  
    4747#include <sys/ioctl.h> 
    4848#include <fcntl.h> 
     49 
     50#if defined(__linux__) 
    4951#include <linux/if.h> 
    5052#include <linux/if_tun.h> 
     53#endif 
     54 
    5155#include <string.h> 
    5256#include <errno.h> 
     
    6064bool TapInterface::Init(uint32_t netmask) 
    6165{ 
     66#if defined(__linux_) 
    6267        logPF(); 
    6368    struct ifreq ifr; 
     
    111116    g_Nepenthes->getSocketMgr()->addPOLLSocket(this); 
    112117    return true; 
     118#else 
     119        logCrit("this module does not work on your operating system, use linux\n"); 
     120        return false; 
     121 
     122#endif 
     123     
    113124} 
    114125 
     
    174185bool TapInterface::addAddress(uint32_t address) 
    175186{ 
     187#if defined(__linux__) 
    176188        logPF(); 
    177189        int ctlsocket; 
     
    214226                 
    215227        return true; 
     228#else 
     229        return false;    
     230#endif   
    216231} 
    217232 
  • nepenthes/trunk/modules/module-peiros/TapInterface.hpp

    r617 r684  
    3939#include <string> 
    4040 
    41  
    42 #ifndef __linux__ 
    43 #error This only works on Linux. 
    44 #endif 
    4541 
    4642#ifndef __INCLUDE_TapInterface_hpp