p80211meta.h

Go to the documentation of this file.
00001 /* src/include/wlan/p80211meta.h
00002 *
00003 * Macros, constants, types, and funcs for p80211 metadata
00004 *
00005 * Copyright (C) 1999 AbsoluteValue Systems, Inc.  All Rights Reserved.
00006 * --------------------------------------------------------------------
00007 *
00008 * linux-wlan
00009 *
00010 *   The contents of this file are subject to the Mozilla Public
00011 *   License Version 1.1 (the "License"); you may not use this file
00012 *   except in compliance with the License. You may obtain a copy of
00013 *   the License at http://www.mozilla.org/MPL/
00014 *
00015 *   Software distributed under the License is distributed on an "AS
00016 *   IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
00017 *   implied. See the License for the specific language governing
00018 *   rights and limitations under the License.
00019 *
00020 *   Alternatively, the contents of this file may be used under the
00021 *   terms of the GNU Public License version 2 (the "GPL"), in which
00022 *   case the provisions of the GPL are applicable instead of the
00023 *   above.  If you wish to allow the use of your version of this file
00024 *   only under the terms of the GPL and not to allow others to use
00025 *   your version of this file under the MPL, indicate your decision
00026 *   by deleting the provisions above and replace them with the notice
00027 *   and other provisions required by the GPL.  If you do not delete
00028 *   the provisions above, a recipient may use your version of this
00029 *   file under either the MPL or the GPL.
00030 *
00031 * --------------------------------------------------------------------
00032 *
00033 * Inquiries regarding the linux-wlan Open Source project can be
00034 * made directly to:
00035 *
00036 * AbsoluteValue Systems Inc.
00037 * info@linux-wlan.com
00038 * http://www.linux-wlan.com
00039 *
00040 * --------------------------------------------------------------------
00041 *
00042 * Portions of the development of this software were funded by 
00043 * Intersil Corporation as part of PRISM(R) chipset product development.
00044 *
00045 * --------------------------------------------------------------------
00046 *
00047 * This file declares some of the constants and types used in various
00048 * parts of the linux-wlan system.
00049 *
00050 * Notes: 
00051 *   - Constant values are always in HOST byte order.
00052 *
00053 * All functions and statics declared here are implemented in p80211types.c
00054 *   --------------------------------------------------------------------
00055 */
00056 
00057 #ifndef _P80211META_H
00058 #define _P80211META_H
00059 
00060 /*================================================================*/
00061 /* System Includes */
00062 
00063 /*================================================================*/
00064 /* Project Includes */
00065 
00066 #ifndef _WLAN_COMPAT_H
00067 #include <wlan/wlan_compat.h>
00068 #endif
00069 
00070 /*================================================================*/
00071 /* Constants */
00072 
00073 /*----------------------------------------------------------------*/
00074 /* */
00075 
00076 /*================================================================*/
00077 /* Macros */
00078 
00079 /*----------------------------------------------------------------*/
00080 /* The following macros are used to ensure consistent naming */
00081 /*  conventions for all the different metadata lists. */
00082 
00083 #define MKREQMETANAME(name)   p80211meta_ ## req ## _ ## name
00084 #define MKINDMETANAME(name)   p80211meta_ ## ind ## _ ## name
00085 #define MKMIBMETANAME(name)   p80211meta_ ## mib ## _ ## name
00086 #define MKGRPMETANAME(name)   p80211meta_ ## grp ## _ ## name
00087 
00088 #define MKREQMETASIZE(name)   p80211meta_ ## req ## _ ## name ## _ ## size
00089 #define MKINDMETASIZE(name)   p80211meta_ ## ind ## _ ## name ## _ ## size
00090 #define MKMIBMETASIZE(name)   p80211meta_ ## mib ## _ ## name ## _ ## size
00091 #define MKGRPMETASIZE(name)   p80211meta_ ## grp ## _ ## name ## _ ## size
00092 
00093 #define GETMETASIZE(aptr)   (**((UINT32**)(aptr)))
00094 
00095 /*----------------------------------------------------------------*/
00096 /* The following ifdef depends on the following defines: */
00097 /*  P80211_NOINCLUDESTRINGS - if defined, all metadata name fields */
00098 /*                               are empty strings */
00099 
00100 #ifdef P80211_NOINCLUDESTRINGS
00101   #define MKITEMNAME(s) ("")
00102 #else
00103   #define MKITEMNAME(s) (s)
00104 #endif
00105 
00106 /*================================================================*/
00107 /* Types */
00108 
00109 /*----------------------------------------------------------------*/
00110 /* The following structure types are used for the metadata */
00111 /* representation of category list metadata, group list metadata, */
00112 /* and data item metadata for both Mib and Messages. */
00113 
00114 typedef struct p80211meta
00115 {
00116   char      *name;    /* data item name */
00117   UINT32      did;    /* partial did */
00118   UINT32      flags;    /* set of various flag bits */
00119   UINT32      min;    /* min value of a BOUNDEDINT */
00120   UINT32      max;    /* max value of a BOUNDEDINT */
00121 
00122   UINT32      maxlen;   /* maxlen of a OCTETSTR or DISPLAYSTR */
00123   UINT32      minlen;   /* minlen of a OCTETSTR or DISPLAYSTR */
00124   p80211enum_t    *enumptr; /* ptr to the enum type for ENUMINT */
00125   p80211_totext_t   totextptr;  /* ptr to totext conversion function */
00126   p80211_fromtext_t fromtextptr;  /* ptr to totext conversion function */
00127   p80211_valid_t    validfunptr;  /* ptr to totext conversion function */
00128 } p80211meta_t;
00129 
00130 typedef struct grplistitem
00131 {
00132   char    *name;
00133   p80211meta_t  *itemlist;
00134 } grplistitem_t;
00135 
00136 typedef struct catlistitem
00137 {
00138   char    *name;
00139   grplistitem_t *grplist;
00140 } catlistitem_t;
00141 
00142 /*================================================================*/
00143 /* Extern Declarations */
00144 
00145 /*----------------------------------------------------------------*/
00146 /* */
00147 
00148 /*================================================================*/
00149 /* Function Declarations */
00150 
00151 /*----------------------------------------------------------------*/
00152 /* */
00153 UINT32 p80211_text2did(catlistitem_t *catlist, char *catname, char *grpname, char *itemname);
00154 UINT32 p80211_text2catdid(catlistitem_t *list, char *name );
00155 UINT32 p80211_text2grpdid(grplistitem_t *list, char *name );
00156 UINT32 p80211_text2itemdid(p80211meta_t *list, char *name );
00157 UINT32 p80211_isvalid_did( catlistitem_t *catlist, UINT32 did );
00158 UINT32 p80211_isvalid_catdid( catlistitem_t *catlist, UINT32 did );
00159 UINT32 p80211_isvalid_grpdid( catlistitem_t *catlist, UINT32 did );
00160 UINT32 p80211_isvalid_itemdid( catlistitem_t *catlist, UINT32 did );
00161 catlistitem_t *p80211_did2cat( catlistitem_t *catlist, UINT32 did );
00162 grplistitem_t *p80211_did2grp( catlistitem_t *catlist, UINT32 did );
00163 p80211meta_t *p80211_did2item( catlistitem_t *catlist, UINT32 did );
00164 UINT32 p80211item_maxdatalen( struct catlistitem *metalist, UINT32 did );
00165 UINT32 p80211_metaname2did(struct catlistitem *metalist, char *itemname);
00166 UINT32 p80211item_getoffset( struct catlistitem *metalist, UINT32 did );
00167 int p80211item_gettype(p80211meta_t *meta);
00168 
00169 #endif /* _P80211META_H */

Generated on Fri Jul 25 17:10:35 2008 for WifiScanner by  doxygen 1.5.5