HACK: pinfo->private_data points to smb_info again
[wireshark-wip.git] / epan / crypt / wep-wpadefs.h
blobbba03adeefbd3bea2aff9c864eb6ee66b6b53e4a
1 /* wap-wpadefs.h
3 * $Id$
5 * Copyright (c) 2006 CACE Technologies, Davis (California)
6 * All rights reserved.
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions
10 * are met:
11 * 1. Redistributions of source code must retain the above copyright
12 * notice, this list of conditions and the following disclaimer.
13 * 2. Redistributions in binary form must reproduce the above copyright
14 * notice, this list of conditions and the following disclaimer in the
15 * documentation and/or other materials provided with the distribution.
16 * 3. Neither the name of the project nor the names of its contributors
17 * may be used to endorse or promote products derived from this software
18 * without specific prior written permission.
20 * Alternatively, this software may be distributed under the terms of the
21 * GNU General Public License ("GPL") version 2 as published by the Free
22 * Software Foundation.
24 * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
25 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
26 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
27 * ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
28 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
30 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
31 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
32 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34 * SUCH DAMAGE.
37 #ifndef __WEP_WPADEFS_H__
38 #define __WEP_WPADEFS_H__
40 #ifdef __cplusplus
41 extern "C" {
42 #endif
44 /** @file
45 * WEP and WPA definitions
47 * Copied from airpcap.h.
50 /**
51 * Maximum number of encryption keys. This determines the size of
52 * structures in packet-ieee80211.c, as well as the number of keys
53 * in the IEEE 802.11 preferences.
55 #define MAX_ENCRYPTION_KEYS 64
57 /**
58 * Maximum size of a WEP key, in bytes. This is the size of an entry in the
59 * AirpcapWepKeysCollection structure.
61 #define WEP_KEY_MAX_SIZE 32
63 /**
64 * WEP_KEY_MAX_SIZE is in bytes, but each byte is represented as a
65 * hexadecimal string.
67 #define WEP_KEY_MAX_CHAR_SIZE (WEP_KEY_MAX_SIZE*2)
69 /**
70 * WEP_KEY_MAX_SIZE is in bytes, this is in bits...
72 #define WEP_KEY_MAX_BIT_SIZE (WEP_KEY_MAX_SIZE*8)
74 #define WEP_KEY_MIN_CHAR_SIZE 2
75 #define WEP_KEY_MIN_BIT_SIZE 8
77 /**
78 * WPA key sizes.
80 #define WPA_KEY_MAX_SIZE 63 /* 63 chars followed by a '\0' */
82 #define WPA_KEY_MAX_CHAR_SIZE (WPA_KEY_MAX_SIZE*1)
83 #define WPA_KEY_MAX_BIT_SIZE (WPA_KEY_MAX_SIZE*8)
84 #define WPA_KEY_MIN_CHAR_SIZE 8
85 #define WPA_KEY_MIN_BIT_SIZE (WPA_KEY_MIN_CHAR_SIZE*8)
87 /**
88 * SSID sizes
90 #define WPA_SSID_MAX_SIZE 32
92 #define WPA_SSID_MAX_CHAR_SIZE (WPA_SSID_MAX_SIZE*1)
93 #define WPA_SSID_MAX_BIT_SIZE (WPA_SSID_MAX_SIZE*8)
94 #define WPA_SSID_MIN_CHAR_SIZE 0
95 #define WPA_SSID_MIN_BIT_SIZE (WPA_SSID_MIN_CHAR_SIZE*8)
97 /**
98 * Let the user enter a raw PSK along with a passphrase + SSID
100 #define WPA_PSK_KEY_SIZE 32 /* Fixed size, 32 bytes (256bit) */
101 #define WPA_PSK_KEY_CHAR_SIZE (WPA_PSK_KEY_SIZE*2)
102 #define WPA_PSK_KEY_BIT_SIZE (WPA_PSK_KEY_SIZE*8)
105 * Prefix definitions for preferences
107 #define STRING_KEY_TYPE_WEP "wep"
108 #define STRING_KEY_TYPE_WPA_PWD "wpa-pwd"
109 #define STRING_KEY_TYPE_WPA_PSK "wpa-psk"
111 #ifdef __cplusplus
113 #endif
115 #endif /* __WEP_WPADEFS_H__ */