/* * wavemon - a wireless network monitoring aplication * * Copyright (c) 2001-2002 Jan Morgenstern * Copyright (c) 2009 Gerrit Renker * * wavemon is free software; you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free * Software Foundation; either version 2, or (at your option) any later * version. * * wavemon 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. * * You should have received a copy of the GNU General Public License along * with wavemon; see the file COPYING. If not, write to the Free Software * Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "llist.h" #define CFNAME ".wavemonrc" /* * Minimum screen dimensions. * The number of lines depends on the size requirements of scr_info(). The * number of columns comes from the menubar length (10 items of length 6 * plus the 'Fxx'). This value was also chosen since 24x80 is a very common * screen size, in particular allowing the use on the console. */ enum info_screen_geometry { WH_IFACE = 2, /* 'Interface' area at the top */ WH_LEVEL = 9, /* Level meters (signal/noise/SNR) */ WH_STATS = 3, /* WiFi statistics area */ WH_INFO_MIN = 6, /* WiFi information area */ WH_NET_MIN = 3, /* Network interface information area */ WH_NET_MAX = 5, /* Network interface information area */ WH_MENU = 1 /* Menu bar at the bottom */ }; #define WH_INFO_SCR_BASE (WH_IFACE + WH_LEVEL + WH_STATS + WH_MENU) #define WH_INFO_SCR_MIN (WH_INFO_SCR_BASE + WH_INFO_MIN + WH_NET_MIN) #define MIN_SCREEN_LINES WH_INFO_SCR_MIN #define MIN_SCREEN_COLS 80 /* * Screen layout constants. * * All windows extend over the whole screen width; the vertical number of * rows is reduced by one due to the menubar at the bottom of the screen. */ #define WAV_WIDTH (COLS) #define WAV_HEIGHT (LINES-1) /* * Maximum lengths/coordinates inside the bordered screen. * * The printable window area is constrained by the frame lines connecting * the corner points (0, 0), (0, COLS-1), (LINES-1, 0), (LINES-1, COLS-1). */ #define MAXXLEN (WAV_WIDTH - 2) #define MAXYLEN (WAV_HEIGHT - 2) /* Number of seconds to display a warning message outside ncurses mode */ #define WARN_DISPLAY_DELAY 3 /* * Symbolic names of actions to take when crossing thresholds. * These actions invoke the corresponding ncurses functions. */ enum threshold_action { TA_DISABLED, TA_BEEP, TA_FLASH, TA_BEEP_FLASH }; static inline void threshold_action(enum threshold_action action) { if (action & TA_FLASH) flash(); if (action & TA_BEEP) beep(); } /* * Global in-memory representation of current wavemon configuration state */ extern struct wavemon_conf { int if_idx; /* Index into interface list */ int stat_iv, info_iv; int sig_min, sig_max, noise_min, noise_max; int lthreshold, hthreshold; int slotsize, meter_decay; /* Boolean values */ int check_geometry, /* ensure window is large enough */ cisco_mac, /* Cisco-style MAC addresses */ random, /* random signals */ override_bounds; /* override autodetection */ /* Enumerated values */ int lthreshold_action, /* disabled|beep|flash|beep+flash */ hthreshold_action, /* disabled|beep|flash|beep+flash */ startup_scr; /* info|histogram|aplist */ } conf; /* * Initialisation & Configuration */ extern void getconf(int argc, char *argv[]); /* Configuration items to manipulate the current configuration */ struct conf_item { char *name, /* name for preferences screen */ *cfname; /* name for ~/.wavemonrc */ enum { /* type of parameter */ t_int, /* @v.i is interpreted as raw value */ t_list, /* @v.i is an index into @list */ t_sep, /* dummy, separator entry */ t_func /* void (*fp) (void) */ } type; union {
SET(CMAKE_SYSTEM "Linux-2.6.31-20-generic-pae")
SET(CMAKE_SYSTEM_NAME "Linux")
SET(CMAKE_SYSTEM_VERSION "2.6.31-20-generic-pae")
SET(CMAKE_SYSTEM_PROCESSOR "i686")

SET(CMAKE_HOST_SYSTEM "Linux-2.6.31-20-generic-pae")
SET(CMAKE_HOST_SYSTEM_NAME "Linux")
SET(CMAKE_HOST_SYSTEM_VERSION "2.6.31-20-generic-pae")
SET(CMAKE_HOST_SYSTEM_PROCESSOR "i686")

SET(CMAKE_CROSSCOMPILING "FALSE")

SET(CMAKE_SYSTEM_LOADED 1)