/* GKRELLMWireless | Copyright (C) 1999-2001 Sjoerd Simons | | Author: Sjoerd Simons sjoerd@gkrellm.luon.net | Latest versions might be found at: http://gkrellm.luon.net | | This program is free software which I release under the GNU General Public | License. You may redistribute and/or modify this program under the terms | of that license as published by the Free Software Foundation; either | version 2 of the License, or (at your option) any later version. | | This program is distributed in the hope that it will be useful, | but WITHOUT ANY WARRANTY; without even the implied warranty of | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | GNU General Public License for more details. | | To get a copy of the GNU General Puplic License, write to the | Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include #ifdef __FreeBSD__ #include #include #include #include #if __FreeBSD_version >= 600034 #include #include #include #endif #if __FreeBSD_version >= 470000 #include #else #include #endif #define ANCACHE #include #endif #ifdef __NetBSD__ #include #include #include #include #include #include #endif #define PLUGIN_CONFIG_KEYWORD "gkrellmwireless" #define WIRELESS_MAJOR_VERSION 2 #define WIRELESS_MINOR_VERSION 0 #define WIRELESS_EXTRA_VERSION ".2" /* flags for all the differenct stuff */ #define ACTIVE (1 << 0) /* this interface is alive now */ #define SHOW (1 << 1) /* show or don't show this interface */ #define SHOW_LINK (1 << 2) /* show link quality of this interface */ #define SHOW_LEVEL (1 << 3) /* show level of this interface */ #define SHOW_NOISE (1 << 4) /* show noise on this interface */ /* some maximums */ #define LINKQ_MAX 255 #define LEVEL_MAX 255 #define NOISE_MAX 255 typedef struct __wcard_t wcard_t; struct __wcard_t { wcard_t *next; gchar *ifname; gint flags; /* configuration flags */ gint cflags; GkrellmPanel *level_panel; GkrellmPanel *link_panel; GkrellmPanel *noise_panel; GkrellmDecal *level_text; GkrellmDecal *link_text; GkrellmDecal *noise_text; };