include/wipal/wifi/frame/mgt.hh

00001 /*
00002  * WiPal - A library and a set of tools to manipulate wireless traces.
00003  * Copyright (C) 2007  Universite Pierre et Marie Curie - Paris 6
00004  *
00005  * This program is free software; you can redistribute it and/or modify
00006  * it under the terms of the GNU General Public License as published by
00007  * the Free Software Foundation; either version 2 of the License, or
00008  * (at your option) any later version.
00009  *
00010  * This program is distributed in the hope that it will be useful,
00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  * GNU General Public License for more details.
00014  *
00015  * You should have received a copy of the GNU General Public License
00016  * along with this program; if not, write to the Free Software
00017  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
00018  * MA  02110-1301  USA
00019  *
00020  * Author: Thomas Claveirole <thomas.claveirole@lip6.fr>
00021  */
00022 #ifndef WIFI_FRAME_MGT_HH_
00023 # define WIFI_FRAME_MGT_HH_
00024 
00025 extern "C"
00026 {
00027 # include <inttypes.h>
00028 }
00029 
00030 # include <wipal/wifi/addr.hh>
00031 
00032 namespace wifi
00033 {
00034 
00035   namespace frame
00036   {
00037 
00039     namespace mgt
00040     {
00041 
00043       namespace subtype
00044       {
00045 
00047         enum frame_subtype
00048           {
00049             assoc_req           = 0,  
00050             assoc_resp          = 1,  
00051             reassoc_req         = 2,  
00052             reassoc_resp        = 3,  
00053             probe_req           = 4,  
00054             probe_resp          = 5,  
00055             beacon              = 8,  
00056             atim                = 9,  
00057             disassoc            = 10, 
00058             auth                = 11, 
00059             deauth              = 12  
00060           };
00061 
00062       } // End of namespace wifi::frame::mgt::subtype.
00063 
00065       struct header
00066       {
00068         enum addr_index
00069           {
00070             da          = 0,    
00071             sa          = 1,    
00072             bssid       = 2     
00073           };
00074 
00076         static const char*      addr_names[3];
00077 
00078         uint16_t                frame_ctl; 
00079         uint16_t                duration;  
00080         addr                    addrs[3];  
00081         uint16_t                seq_ctl;   
00082         uint8_t                 body[];    
00083       };
00084 
00085     } // End of namespace wifi::frame::mgt.
00086 
00087   } // End of namespace wifi::frame.
00088 
00089 } // End of namespace wifi.
00090 
00091 #endif // ! WIFI_FRAME_MGT_HH_

Generated on Wed Jan 16 16:15:14 2008 for wipal by  doxygen 1.5.4