p80211types.h

Go to the documentation of this file.
00001 /* src/include/wlan/p80211types.h
00002 *
00003 * Macros, constants, types, and funcs for p80211 data types
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 _P80211TYPES_H
00058 #define _P80211TYPES_H
00059 
00060 /*================================================================*/
00061 /* System Includes */
00062 /*================================================================*/
00063 
00064 /*================================================================*/
00065 /* Project Includes */
00066 /*================================================================*/
00067 
00068 #ifndef _WLAN_COMPAT_H
00069 #include <wlan/wlan_compat.h>
00070 #endif
00071 
00072 /*================================================================*/
00073 /* Constants */
00074 /*================================================================*/
00075 
00076 /*----------------------------------------------------------------*/
00077 /* p80211 data type codes used for MIB items and message */
00078 /* arguments. The various metadata structures provide additional */
00079 /* information about these types. */
00080 
00081 #define P80211_TYPE_OCTETSTR    1 /* pascal array of bytes */
00082 #define P80211_TYPE_DISPLAYSTR    2 /* pascal array of bytes containing ascii */
00083 #define P80211_TYPE_INT     4 /* UINT32 min and max limited by 32 bits */
00084 #define P80211_TYPE_ENUMINT   5 /* UINT32 holding a numeric
00085                code that can be mapped
00086                to a textual name */
00087 #define P80211_TYPE_UNKDATA   6 /* Data item containing an
00088                unknown data type */
00089 #define P80211_TYPE_INTARRAY    7 /* Array of 32-bit integers. */
00090 #define P80211_TYPE_BITARRAY    8 /* Array of bits. */
00091 #define P80211_TYPE_MACARRAY    9 /* Array of MAC addresses. */
00092 
00093 /*----------------------------------------------------------------*/
00094 /* The following constants are indexes into the Mib Category List */
00095 /* and the Message Category List */
00096 
00097 /* Mib Category List */
00098 #define P80211_MIB_CAT_DOT11SMT   1
00099 #define P80211_MIB_CAT_DOT11MAC   2
00100 #define P80211_MIB_CAT_DOT11PHY   3
00101 
00102 #define P80211SEC_DOT11SMT    P80211_MIB_CAT_DOT11SMT
00103 #define P80211SEC_DOT11MAC    P80211_MIB_CAT_DOT11MAC
00104 #define P80211SEC_DOT11PHY    P80211_MIB_CAT_DOT11PHY
00105 
00106 /* Message Category List */
00107 #define P80211_MSG_CAT_DOT11REQ   1
00108 #define P80211_MSG_CAT_DOT11IND   2
00109 /* #define P80211_MSG_CAT_DOT11CFM    3 (doesn't exist at this time) */
00110 
00111 #define P80211SEC_DOT11REQ    P80211_MSG_CAT_DOT11REQ
00112 #define P80211SEC_DOT11IND    P80211_MSG_CAT_DOT11IND
00113 /* #define P80211SEC_DOT11CFM   P80211_MSG_CAT_DOT11CFM  (doesn't exist at this time */
00114 
00115 
00116 
00117 /*----------------------------------------------------------------*/
00118 /* p80211 DID field codes that represent access type and */
00119 /* is_table status. */
00120 
00121 #define P80211DID_ACCESS_READ   0x10000000
00122 #define P80211DID_ACCESS_WRITE    0x08000000
00123 #define P80211DID_WRITEONLY   0x00000001
00124 #define P80211DID_READONLY    0x00000002
00125 #define P80211DID_READWRITE   0x00000003
00126 #define P80211DID_ISTABLE_FALSE   0
00127 #define P80211DID_ISTABLE_TRUE    1
00128 
00129 /*----------------------------------------------------------------*/
00130 /* p80211 enumeration constants.  The value to text mappings for */
00131 /*  these is in p80211types.c.  These defines were generated */
00132 /*  from the mappings. */
00133 
00134 /* error codes for lookups */
00135 #define P80211ENUM_BAD        0xffffffffUL
00136 #define P80211ENUM_BADSTR     "P80211ENUM_BAD"
00137 
00138 #define P80211ENUM_truth_false      0
00139 #define P80211ENUM_truth_true     1
00140 #define P80211ENUM_ifstate_disable    0
00141 #define P80211ENUM_ifstate_fwload   1
00142 #define P80211ENUM_ifstate_enable   2
00143 #define P80211ENUM_powermgmt_active   1
00144 #define P80211ENUM_powermgmt_powersave    2
00145 #define P80211ENUM_bsstype_infrastructure 1
00146 #define P80211ENUM_bsstype_independent    2
00147 #define P80211ENUM_bsstype_any      3
00148 #define P80211ENUM_authalg_opensystem   1
00149 #define P80211ENUM_authalg_sharedkey    2
00150 #define P80211ENUM_phytype_fhss     1
00151 #define P80211ENUM_phytype_dsss     2
00152 #define P80211ENUM_phytype_irbaseband   3
00153 #define P80211ENUM_temptype_commercial    1
00154 #define P80211ENUM_temptype_industrial    2
00155 #define P80211ENUM_regdomain_fcc    16
00156 #define P80211ENUM_regdomain_doc    32
00157 #define P80211ENUM_regdomain_etsi   48
00158 #define P80211ENUM_regdomain_spain    49
00159 #define P80211ENUM_regdomain_france   50
00160 #define P80211ENUM_regdomain_mkk    64
00161 #define P80211ENUM_ccamode_edonly   1
00162 #define P80211ENUM_ccamode_csonly   2
00163 #define P80211ENUM_ccamode_edandcs    4
00164 #define P80211ENUM_ccamode_cswithtimer    8
00165 #define P80211ENUM_ccamode_hrcsanded    16
00166 #define P80211ENUM_diversity_fixedlist    1
00167 #define P80211ENUM_diversity_notsupported 2
00168 #define P80211ENUM_diversity_dynamic    3
00169 #define P80211ENUM_scantype_active    1
00170 #define P80211ENUM_scantype_passive   2
00171 #define P80211ENUM_scantype_both    3
00172 #define P80211ENUM_resultcode_success   1
00173 #define P80211ENUM_resultcode_invalid_parameters  2
00174 #define P80211ENUM_resultcode_not_supported 3
00175 #define P80211ENUM_resultcode_timeout   4
00176 #define P80211ENUM_resultcode_too_many_req  5
00177 #define P80211ENUM_resultcode_refused   6
00178 #define P80211ENUM_resultcode_bss_already 7
00179 #define P80211ENUM_resultcode_invalid_access  8
00180 #define P80211ENUM_resultcode_invalid_mibattribute  9
00181 #define P80211ENUM_resultcode_cant_set_readonly_mib 10
00182 #define P80211ENUM_resultcode_implementation_failure  11
00183 #define P80211ENUM_resultcode_cant_get_writeonly_mib  12
00184 #define P80211ENUM_reason_unspec_reason   1
00185 #define P80211ENUM_reason_auth_not_valid  2
00186 #define P80211ENUM_reason_deauth_lv_ss    3
00187 #define P80211ENUM_reason_inactivity    4
00188 #define P80211ENUM_reason_ap_overload   5
00189 #define P80211ENUM_reason_class23_err   6
00190 #define P80211ENUM_reason_class3_err    7
00191 #define P80211ENUM_reason_disas_lv_ss   8
00192 #define P80211ENUM_reason_asoc_not_auth   9
00193 #define P80211ENUM_status_successful    0
00194 #define P80211ENUM_status_unspec_failure  1
00195 #define P80211ENUM_status_unsup_cap   10
00196 #define P80211ENUM_status_reasoc_no_asoc  11
00197 #define P80211ENUM_status_fail_other    12
00198 #define P80211ENUM_status_unspt_alg   13
00199 #define P80211ENUM_status_auth_seq_fail   14
00200 #define P80211ENUM_status_chlng_fail    15
00201 #define P80211ENUM_status_auth_timeout    16
00202 #define P80211ENUM_status_ap_full   17
00203 #define P80211ENUM_status_unsup_rate    18
00204 #define P80211ENUM_status_unsup_shortpreamble 19
00205 #define P80211ENUM_status_unsup_pbcc    20
00206 #define P80211ENUM_status_unsup_agility   21
00207 #define P80211ENUM_msgitem_status_data_ok   0
00208 #define P80211ENUM_msgitem_status_no_value    1
00209 #define P80211ENUM_msgitem_status_invalid_itemname  2
00210 #define P80211ENUM_msgitem_status_invalid_itemdata  3
00211 #define P80211ENUM_msgitem_status_missing_itemdata  4
00212 #define P80211ENUM_msgitem_status_incomplete_itemdata 5
00213 #define P80211ENUM_msgitem_status_invalid_msg_did 6
00214 #define P80211ENUM_msgitem_status_invalid_mib_did 7
00215 #define P80211ENUM_msgitem_status_missing_conv_func 8
00216 #define P80211ENUM_msgitem_status_string_too_long 9
00217 #define P80211ENUM_msgitem_status_data_out_of_range 10
00218 #define P80211ENUM_msgitem_status_string_too_short  11
00219 #define P80211ENUM_msgitem_status_missing_valid_func  12
00220 #define P80211ENUM_msgitem_status_unknown   13
00221 #define P80211ENUM_msgitem_status_invalid_did   14
00222 #define P80211ENUM_msgitem_status_missing_print_func  15
00223 
00224 #define P80211ENUM_lnxroam_reason_unknown        0
00225 #define P80211ENUM_lnxroam_reason_beacon         1
00226 #define P80211ENUM_lnxroam_reason_signal         2
00227 #define P80211ENUM_lnxroam_reason_txretry        3
00228 #define P80211ENUM_lnxroam_reason_notjoined      4
00229 
00230 #define P80211ENUM_p2preamble_long               0
00231 #define P80211ENUM_p2preamble_short              2
00232 #define P80211ENUM_p2preamble_mixed              3
00233 
00234 /*----------------------------------------------------------------*/
00235 /* p80211 max length constants for the different pascal strings. */
00236 
00237 #define MAXLEN_PSTR6    (6) /* pascal array of 6 bytes */
00238 #define MAXLEN_PSTR14   (14)  /* pascal array of 14 bytes */
00239 #define MAXLEN_PSTR32   (32)  /* pascal array of 32 bytes */
00240 #define MAXLEN_PSTR255    (255) /* pascal array of 255 bytes */
00241 #define MAXLEN_MIBATTRIBUTE (392) /* maximum mibattribute */
00242           /* where the size of the DATA itself */
00243           /* is a DID-LEN-DATA triple */
00244           /* with a max size of 4+4+384 */
00245 
00246 #define P80211_SET_INT(item, value) do { \
00247   (item).data   = (value); \
00248   (item).status = P80211ENUM_msgitem_status_data_ok; \
00249   } while(0)
00250 /*----------------------------------------------------------------*/
00251 /* string constants */
00252 
00253 #define NOT_SET     "NOT_SET"
00254 #define NOT_SUPPORTED   "NOT_SUPPORTED"
00255 #define UNKNOWN_DATA    "UNKNOWN_DATA"
00256 
00257 
00258 /*--------------------------------------------------------------------*/
00259 /*  Metadata flags  */
00260 
00261 /* MSM: Do these belong in p80211meta.h? I'm not sure. */
00262 
00263 #define ISREQUIRED    (0x80000000UL)
00264 #define ISREQUEST   (0x40000000UL)
00265 #define ISCONFIRM   (0x20000000UL)
00266 
00267 
00268 /*================================================================*/
00269 /* Macros */
00270 
00271 /*--------------------------------------------------------------------*/
00272 /* The following macros are used to manipulate the 'flags' field in   */
00273 /*  the metadata.  These are only used when the metadata is for       */
00274 /*  command arguments to determine if the data item is required, and  */
00275 /*  whether the metadata item is for a request command, confirm       */
00276 /*  command or both.                                                  */
00277 /*--------------------------------------------------------------------*/
00278 /* MSM: Do these belong in p80211meta.h?  I'm not sure */
00279 
00280 #define P80211ITEM_SETFLAGS(q, r, c)  ( q | r | c )
00281 
00282 #define P80211ITEM_ISREQUIRED(flags)  (((UINT32)(flags & ISREQUIRED)) >> 31 )
00283 #define P80211ITEM_ISREQUEST(flags) (((UINT32)(flags & ISREQUEST)) >> 30 )
00284 #define P80211ITEM_ISCONFIRM(flags) (((UINT32)(flags & ISCONFIRM)) >> 29 )
00285 
00286 /*----------------------------------------------------------------*/
00287 /* The following macro creates a name for an enum */
00288 
00289 #define MKENUMNAME(name) p80211enum_ ## name
00290 
00291 /*----------------------------------------------------------------
00292 * The following constants and macros are used to construct and
00293 * deconstruct the Data ID codes.  The coding is as follows:
00294 *
00295 *     ...rwtnnnnnnnniiiiiiggggggssssss      s - Section
00296 *                                           g - Group
00297 *                                           i - Item
00298 *                                           n - Index
00299 *                                           t - Table flag
00300 *                                           w - Write flag
00301 *                                           r - Read flag
00302 *                                           . - Unused
00303 */
00304 
00305 #define P80211DID_INVALID   0xffffffffUL
00306 #define P80211DID_VALID     0x00000000UL
00307 
00308 #define P80211DID_LSB_SECTION   (0)
00309 #define P80211DID_LSB_GROUP   (6)
00310 #define P80211DID_LSB_ITEM    (12)
00311 #define P80211DID_LSB_INDEX   (18)
00312 #define P80211DID_LSB_ISTABLE   (26)
00313 #define P80211DID_LSB_ACCESS    (27)
00314 
00315 #define P80211DID_MASK_SECTION    (0x0000003fUL)
00316 #define P80211DID_MASK_GROUP    (0x0000003fUL)
00317 #define P80211DID_MASK_ITEM   (0x0000003fUL)
00318 #define P80211DID_MASK_INDEX    (0x000000ffUL)
00319 #define P80211DID_MASK_ISTABLE    (0x00000001UL)
00320 #define P80211DID_MASK_ACCESS     (0x00000003UL)
00321 
00322 
00323 #define P80211DID_MK(a,m,l) ((((UINT32)(a)) & (m)) << (l))
00324 
00325 #define P80211DID_MKSECTION(a)  P80211DID_MK(a, \
00326           P80211DID_MASK_SECTION, \
00327           P80211DID_LSB_SECTION )
00328 #define P80211DID_MKGROUP(a)  P80211DID_MK(a, \
00329           P80211DID_MASK_GROUP, \
00330           P80211DID_LSB_GROUP )
00331 #define P80211DID_MKITEM(a) P80211DID_MK(a, \
00332           P80211DID_MASK_ITEM, \
00333           P80211DID_LSB_ITEM )
00334 #define P80211DID_MKINDEX(a)  P80211DID_MK(a, \
00335           P80211DID_MASK_INDEX, \
00336           P80211DID_LSB_INDEX )
00337 #define P80211DID_MKISTABLE(a)  P80211DID_MK(a, \
00338           P80211DID_MASK_ISTABLE, \
00339           P80211DID_LSB_ISTABLE )
00340 
00341 
00342 #define P80211DID_MKID(s,g,i,n,t,a) (P80211DID_MKSECTION(s) | \
00343             P80211DID_MKGROUP(g) | \
00344             P80211DID_MKITEM(i) | \
00345             P80211DID_MKINDEX(n) | \
00346             P80211DID_MKISTABLE(t) | \
00347             (a) )
00348 
00349 
00350 #define P80211DID_GET(a,m,l)  ((((UINT32)(a)) >> (l)) & (m))
00351 
00352 #define P80211DID_SECTION(a)  P80211DID_GET(a, \
00353           P80211DID_MASK_SECTION, \
00354           P80211DID_LSB_SECTION)
00355 #define P80211DID_GROUP(a)  P80211DID_GET(a, \
00356           P80211DID_MASK_GROUP, \
00357           P80211DID_LSB_GROUP)
00358 #define P80211DID_ITEM(a) P80211DID_GET(a, \
00359           P80211DID_MASK_ITEM, \
00360           P80211DID_LSB_ITEM)
00361 #define P80211DID_INDEX(a)  P80211DID_GET(a, \
00362           P80211DID_MASK_INDEX, \
00363           P80211DID_LSB_INDEX)
00364 #define P80211DID_ISTABLE(a)  P80211DID_GET(a, \
00365           P80211DID_MASK_ISTABLE, \
00366           P80211DID_LSB_ISTABLE)
00367 #define P80211DID_ACCESS(a) P80211DID_GET(a, \
00368           P80211DID_MASK_ACCESS, \
00369           P80211DID_LSB_ACCESS)
00370 
00371 /*================================================================*/
00372 /* Types */
00373 
00374 /*----------------------------------------------------------------*/
00375 /* The following structure types are used for the represenation */
00376 /*  of ENUMINT type metadata. */
00377 
00378 typedef struct p80211enumpair
00379 {
00380   UINT32      val;
00381   char      *name;
00382 } p80211enumpair_t;
00383 
00384 typedef struct p80211enum
00385 {
00386   INT     nitems;
00387   p80211enumpair_t  *list;
00388 } p80211enum_t;
00389 
00390 /*----------------------------------------------------------------*/
00391 /* The following structure types are used to store data items in */
00392 /*  messages. */
00393 
00394 /* Template pascal string */
00395 typedef struct p80211pstr
00396 {
00397   UINT8   len;      
00398 } __WLAN_ATTRIB_PACK__ p80211pstr_t;
00399 
00400 typedef struct p80211pstrd
00401 {
00402   UINT8   len;      
00403   UINT8   data[0];
00404 } __WLAN_ATTRIB_PACK__ p80211pstrd_t;
00405 
00406 /* Maximum pascal string */
00407 typedef struct p80211pstr255
00408 {
00409   UINT8   len;
00410   UINT8   data[MAXLEN_PSTR255];
00411 } __WLAN_ATTRIB_PACK__ p80211pstr255_t;
00412 
00413 /* pascal string for macaddress and bssid */
00414 typedef struct p80211pstr6
00415 {
00416   UINT8   len;
00417   UINT8   data[MAXLEN_PSTR6];
00418 } __WLAN_ATTRIB_PACK__ p80211pstr6_t;
00419 
00420 /* pascal string for channel list */
00421 typedef struct p80211pstr14
00422 {
00423   UINT8   len;
00424   UINT8   data[MAXLEN_PSTR14];
00425 } __WLAN_ATTRIB_PACK__ p80211pstr14_t;
00426 
00427 /* pascal string for ssid */
00428 typedef struct p80211pstr32
00429 {
00430   UINT8   len;
00431   UINT8   data[MAXLEN_PSTR32];
00432 } __WLAN_ATTRIB_PACK__ p80211pstr32_t;
00433 
00434 /* MAC address array */
00435 typedef struct p80211macarray
00436 {
00437   UINT32    cnt;
00438   UINT8   data[1][MAXLEN_PSTR6];
00439 } __WLAN_ATTRIB_PACK__ p80211macarray_t;
00440 
00441 /* prototype template */
00442 typedef struct p80211item
00443 {
00444   UINT32    did;
00445   UINT16    status;
00446   UINT16    len;
00447 } __WLAN_ATTRIB_PACK__ p80211item_t;
00448 
00449 /* prototype template w/ data item */
00450 typedef struct p80211itemd
00451 {
00452   UINT32    did;
00453   UINT16    status;
00454   UINT16    len;
00455   UINT8   data[0];
00456 } __WLAN_ATTRIB_PACK__ p80211itemd_t;
00457 
00458 /* message data item for INT, BOUNDEDINT, ENUMINT */
00459 typedef struct p80211item_uint32
00460 {
00461   UINT32    did;
00462   UINT16    status;
00463   UINT16    len;
00464   UINT32    data;
00465 } __WLAN_ATTRIB_PACK__ p80211item_uint32_t;
00466 
00467 /* message data item for OCTETSTR, DISPLAYSTR */
00468 typedef struct p80211item_pstr6
00469 {
00470   UINT32    did;
00471   UINT16    status;
00472   UINT16    len;
00473   p80211pstr6_t data;
00474 } __WLAN_ATTRIB_PACK__ p80211item_pstr6_t;
00475 
00476 /* message data item for OCTETSTR, DISPLAYSTR */
00477 typedef struct p80211item_pstr14
00478 {
00479   UINT32      did;
00480   UINT16      status;
00481   UINT16      len;
00482   p80211pstr14_t    data;
00483 } __WLAN_ATTRIB_PACK__ p80211item_pstr14_t;
00484 
00485 /* message data item for OCTETSTR, DISPLAYSTR */
00486 typedef struct p80211item_pstr32
00487 {
00488   UINT32      did;
00489   UINT16      status;
00490   UINT16      len;
00491   p80211pstr32_t    data;
00492 } __WLAN_ATTRIB_PACK__ p80211item_pstr32_t;
00493 
00494 /* message data item for OCTETSTR, DISPLAYSTR */
00495 typedef struct p80211item_pstr255
00496 {
00497   UINT32      did;
00498   UINT16      status;
00499   UINT16      len;
00500   p80211pstr255_t   data;
00501 } __WLAN_ATTRIB_PACK__ p80211item_pstr255_t;
00502 
00503 /* message data item for UNK 392, namely mib items */
00504 typedef struct  p80211item_unk392
00505 {
00506   UINT32    did;
00507   UINT16    status;
00508   UINT16    len;
00509   UINT8   data[MAXLEN_MIBATTRIBUTE];
00510 } __WLAN_ATTRIB_PACK__ p80211item_unk392_t;
00511 
00512 /* message data item for UNK 1025, namely p2 pdas */
00513 typedef struct  p80211item_unk1024
00514 {
00515   UINT32    did;
00516   UINT16    status;
00517   UINT16    len;
00518   UINT8   data[1024];
00519 }  __WLAN_ATTRIB_PACK__ p80211item_unk1024_t;
00520 
00521 /* message data item for UNK 4096, namely p2 download chunks */
00522 typedef struct  p80211item_unk4096
00523 {
00524   UINT32    did;
00525   UINT16    status;
00526   UINT16    len;
00527   UINT8   data[4096];
00528 }  __WLAN_ATTRIB_PACK__ p80211item_unk4096_t;
00529 
00530 struct catlistitem;
00531 
00532 /*----------------------------------------------------------------*/
00533 /* The following structure type is used to represent all of the */
00534 /*  metadata items.  Some components may choose to use more, */
00535 /*  less or different metadata items. */
00536 
00537 typedef void (*p80211_totext_t)( struct catlistitem *, UINT32 did, UINT8* itembuf, char *textbuf);
00538 typedef void (*p80211_fromtext_t)( struct catlistitem *, UINT32 did, UINT8* itembuf, char *textbuf);
00539 typedef UINT32 (*p80211_valid_t)( struct catlistitem *, UINT32 did, UINT8* itembuf);
00540 
00541 
00542 /*================================================================*/
00543 /* Extern Declarations */
00544 
00545 /*----------------------------------------------------------------*/
00546 /* Enumeration Lists */
00547 /*  The following are the external declarations */
00548 /*  for all enumerations  */
00549 
00550 extern p80211enum_t MKENUMNAME(truth); 
00551 extern p80211enum_t MKENUMNAME(ifstate); 
00552 extern p80211enum_t MKENUMNAME(powermgmt);
00553 extern p80211enum_t MKENUMNAME(bsstype);
00554 extern p80211enum_t MKENUMNAME(authalg);
00555 extern p80211enum_t MKENUMNAME(phytype);
00556 extern p80211enum_t MKENUMNAME(temptype);
00557 extern p80211enum_t MKENUMNAME(regdomain);
00558 extern p80211enum_t MKENUMNAME(ccamode);
00559 extern p80211enum_t MKENUMNAME(diversity);
00560 extern p80211enum_t MKENUMNAME(scantype);
00561 extern p80211enum_t MKENUMNAME(resultcode);
00562 extern p80211enum_t MKENUMNAME(reason);
00563 extern p80211enum_t MKENUMNAME(status);
00564 extern p80211enum_t MKENUMNAME(msgcode);
00565 extern p80211enum_t MKENUMNAME(msgitem_status);
00566 
00567 extern p80211enum_t MKENUMNAME(lnxroam_reason);
00568 
00569 extern p80211enum_t MKENUMNAME(p2preamble); 
00570 
00571 /*================================================================*/
00572 /* Function Declarations */
00573 
00574 /*----------------------------------------------------------------*/
00575 /* The following declare some utility functions for use with the */
00576 /*  p80211enum_t type. */
00577 
00578 UINT32 p80211enum_text2int(p80211enum_t *ep, char *text);
00579 UINT32 p80211enum_int2text(p80211enum_t *ep, UINT32 val, char *text);
00580 void p80211_error2text(int err_code, char *err_str);
00581 
00582 /*----------------------------------------------------------------*/
00583 /* The following declare some utility functions for use with the */
00584 /*  p80211item_t and p80211meta_t types. */
00585 
00586 /*----------------------------------------------------------------*/
00587 /* The following declare functions that perform validation and    */
00588 /* text to binary conversions based on the metadata for interface */
00589 /* and MIB data items.                                            */
00590 /*----------------------------------------------------------------*/
00591 
00592 /*-- DISPLAYSTR ------------------------------------------------------*/
00593 /* pstr ==> cstr */
00594 void p80211_totext_displaystr( struct catlistitem *metalist, UINT32 did, UINT8 *itembuf, char *textbuf );
00595 
00596 /* cstr ==> pstr */
00597 void p80211_fromtext_displaystr( struct catlistitem *metalist, UINT32 did, UINT8 *itembuf, char *textbuf );
00598 
00599 /* function that checks validity of a displaystr binary value */
00600 UINT32 p80211_isvalid_displaystr( struct catlistitem *metalist, UINT32 did, UINT8 *itembuf );
00601 
00602 /*-- OCTETSTR --------------------------------------------------------*/
00603 /* pstr ==> "xx:xx:...." */
00604 void p80211_totext_octetstr( struct catlistitem *metalist, UINT32 did, UINT8 *itembuf, char *textbuf );
00605 
00606 /* "xx:xx:...." ==> pstr */
00607 void p80211_fromtext_octetstr( struct catlistitem *metalist, UINT32 did, UINT8 *itembuf, char *textbuf );
00608 
00609 /* function that checks validity of an octetstr binary value */
00610 UINT32 p80211_isvalid_octetstr( struct catlistitem *metalist, UINT32 did, UINT8 *itembuf );
00611 
00612 /*-- INT -------------------------------------------------------------*/
00613 /* UINT32 ==> %d */
00614 void p80211_totext_int( struct catlistitem *metalist, UINT32 did, UINT8 *itembuf, char *textbuf );
00615 
00616 /* %d ==> UINT32 */
00617 void p80211_fromtext_int( struct catlistitem *metalist, UINT32 did, UINT8 *itembuf, char *textbuf );
00618 
00619 /* function that checks validity of an int's binary value (always successful) */
00620 UINT32 p80211_isvalid_int( struct catlistitem *metalist, UINT32 did, UINT8 *itembuf );
00621 
00622 /*-- ENUMINT ---------------------------------------------------------*/
00623 /* UINT32 ==> <valuename> */
00624 void p80211_totext_enumint( struct catlistitem *metalist, UINT32 did, UINT8 *itembuf, char *textbuf );
00625 
00626 /* <valuename> ==> UINT32 */
00627 void p80211_fromtext_enumint( struct catlistitem *metalist, UINT32 did, UINT8 *itembuf, char *textbuf );
00628 
00629 /* function that checks validity of an enum's binary value */
00630 UINT32 p80211_isvalid_enumint( struct catlistitem *metalist, UINT32 did, UINT8 *itembuf );
00631 
00632 /*-- INTARRAY --------------------------------------------------------*/
00633 /* UINT32[] => %d,%d,%d,... */
00634 void p80211_totext_intarray( struct catlistitem *metalist, UINT32 did, UINT8 *itembuf, char *textbuf );
00635 
00636 /* %d,%d,%d,... ==> UINT32[] */
00637 void p80211_fromtext_intarray( struct catlistitem *metalist, UINT32 did, UINT8 *itembuf, char *textbuf );
00638 
00639 /* function that checks validity of an integer array's value */
00640 UINT32 p80211_isvalid_intarray( struct catlistitem *metalist, UINT32 did, UINT8 *itembuf );
00641 
00642 /*-- BITARRAY --------------------------------------------------------*/
00643 /* UINT32 ==> %d,%d,%d,... */
00644 void p80211_totext_bitarray( struct catlistitem *metalist, UINT32 did, UINT8 *itembuf, char *textbuf );
00645 
00646 /* %d,%d,%d,... ==> UINT32 */
00647 void p80211_fromtext_bitarray( struct catlistitem *metalist, UINT32 did, UINT8 *itembuf, char *textbuf );
00648 
00649 /* function that checks validity of a bit array's value */
00650 UINT32 p80211_isvalid_bitarray( struct catlistitem *metalist, UINT32 did, UINT8 *itembuf );
00651 
00652 /*-- MACARRAY --------------------------------------------------------*/
00653 void p80211_totext_macarray( struct catlistitem *metalist, UINT32 did, UINT8 *itembuf, char *textbuf );
00654 
00655 void p80211_fromtext_macarray( struct catlistitem *metalist, UINT32 did, UINT8 *itembuf, char *textbuf );
00656 
00657 /* function that checks validity of a MAC address array's value */
00658 UINT32 p80211_isvalid_macarray( struct catlistitem *metalist, UINT32 did, UINT8 *itembuf );
00659 
00660 /*-- MIBATTRIUBTE ------------------------------------------------------*/
00661 /* <mibvalue> ==> <textual representation identified in MIB metadata> */
00662 void p80211_totext_getmibattribute( struct catlistitem *metalist, UINT32 did, UINT8 *itembuf, char *textbuf );
00663 void p80211_totext_setmibattribute( struct catlistitem *metalist, UINT32 did, UINT8 *itembuf, char *textbuf );
00664 
00665 
00666 /* <textual representation identified in MIB metadata> ==> <mibvalue> */
00667 void p80211_fromtext_getmibattribute( struct catlistitem *metalist, UINT32 did, UINT8 *itembuf, char *textbuf );
00668 void p80211_fromtext_setmibattribute( struct catlistitem *metalist, UINT32 did, UINT8 *itembuf, char *textbuf );
00669 
00670 /* function that checks validity of a mibitem's binary value */
00671 UINT32 p80211_isvalid_getmibattribute( struct catlistitem *metalist, UINT32 did, UINT8 *itembuf );
00672 UINT32 p80211_isvalid_setmibattribute( struct catlistitem *metalist, UINT32 did, UINT8 *itembuf );
00673 
00674 #endif /* _P80211TYPES_H */
00675 

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