/************************************************************************/ /* */ /* ***** ***** */ /* ***** ***** */ /* ***** ***** */ /* ***** ***** */ /* *************** *************** */ /* ***************** ***************** */ /* *************** *************** */ /* ***** ***** TheNetNode */ /* ***** ***** Portable */ /* ***** ***** Network */ /* ***** ***** Software */ /* */ /* File os/linux/kernelip.h (maintained by: DG9OBU) */ /* */ /* This file is part of "TheNetNode" - Software Package */ /* */ /* Copyright (C) 1998 - 2008 NORD> #include /* Die Version des Linux-Kernels */ /* Das tun-Interface und dessen Header gibt es erst seit 2.4.x im Kernel */ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0) #include #else #warning Kernel-Version is < 2.4.0, using internally defined values for tun-Interface ! #endif #include /* Notwendiges aus if_tun.h, da es aber bei 2.2.x-Style noch kein if_tun.h im Kerneltree gibt, sind die Sachen hier zusaetzlich mit drin. Wird das if_tun.h trotz des Kernel-Versionschecks nicht gefunden, dann das Include fuer if_tun.h einfach auskommentieren. Alles was eigentlich der Kernel schon definieren sollte pruefen wir, falls das #include fuer if_tun.h fehlt, dann definieren wir die Werte selbst. Eventuell ist fuer alte Kernel auch das TUN-Device anzupassen ! */ #ifndef IFF_TUN #define IFF_TUN 0x0001 #endif #ifndef IFF_TAP #define IFF_TAP 0x0002 #endif #ifndef IFF_NO_PI #define IFF_NO_PI 0x1000 #endif #ifndef TUNSETIFF #define TUNSETIFF (('T'<< 8) | 202) #endif /* unser bevorzugtes TUN-Device */ #define IFIP "/dev/net/tun" /* Data type definitions --------------------------------------- */ struct kip { BOOLEAN if_available; BOOLEAN if_active; int if_style; int if_fd; ipaddr kernel_ip; UBYTE maskbits; ULONG bytes_tx; ULONG bytes_rx; }; /* End of os/linux/kernelip.h */