00001 /* Linux Prism II Stumbler - Utility Scan for 802_11 networks under Linux 00002 * 00003 * File : functions.h 00004 * Project : WifiScanner (c) 2002 Hervé Schauer Consultants 00005 * Usage : This utility is written for use with IEEE 802.11 adapters based 00006 * on Intersil's PRISM II chipset (PCMCIA). 00007 * 00008 * Base code was from prismstumbler Jan Fernquist <Jan.B.Fernquist@telia.com> 00009 * and wlanctl from www.linux-wlan.com 00010 * 00011 * This program is free software; you can redistribute it and/or 00012 * modify it under the terms of the GNU General Public License 00013 * as published by the Free Software Foundation; either version 2 00014 * of the License, or (at your option) any later version. 00015 * 00016 * This program is distributed in the hope that it will be useful, 00017 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00018 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00019 * GNU General Public License for more details. 00020 * 00021 * You should have received a copy of the GNU General Public License 00022 * along with this program; if not, write to the Free Software 00023 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00024 * 00025 * $Id: functions.h,v 1.11 2005/02/23 11:36:53 poggij Exp $ 00026 */ 00027 00028 #ifndef __functions_h__ 00029 #define __functions_h__ 00030 00031 #include <wlan/p80211types.h> 00032 #include <wlan/p80211msg.h> 00033 #include <wlan/p80211meta.h> 00034 #include <wlan/p80211metamsg.h> 00035 #include <wlan/p80211metastruct.h> 00036 #include <wlan/p80211mgmt.h> 00037 00038 #define CHANNEL_MIN 1 00039 #define CHANNEL_MAX 14 00040 00041 #define HOP_MIN 1 00042 #define HOP_MAX 13 00043 00044 #define IFACE_WLAN_MIN 0 00045 #define IFACE_WLAN_MAX 4 00046 00047 int processPacket(unsigned char *packet, int len); 00048 void ParseCommandLine(int argc, char **argv, ConfigStruct * config); 00049 void ChannelToStr(char *strChannel, UINT8 Channel, UINT8 SChannel); 00050 char *safe_strncpy(char *dst, const char *src, int size); 00051 int safe_snprintf(char *s, int size, char *fmt, ...); 00052 void *memcpy_buff(void *dest, const void *src, size_t n); 00053 #endif