~ubuntu-branches/ubuntu/vivid/wpasupplicant/vivid

« back to all changes in this revision

Viewing changes to src/rsn_supp/peerkey.h

  • Committer: Bazaar Package Importer
  • Author(s): Kel Modderman
  • Date: 2008-03-12 20:03:04 UTC
  • mfrom: (1.1.10 upstream)
  • mto: This revision was merged to the branch mainline in revision 4.
  • Revision ID: james.westby@ubuntu.com-20080312200304-4331y9wj46pdd34z
Tags: 0.6.3-1
* New upstream release.
* Drop patches applied upstream:
  - debian/patches/30_wpa_gui_qt4_eventhistoryui_rework.patch
  - debian/patches/31_wpa_gui_qt4_eventhistory_always_scrollbar.patch
  - debian/patches/32_wpa_gui_qt4_eventhistory_scroll_with_events.patch
  - debian/patches/40_dbus_ssid_data.patch
* Tidy up the clean target of debian/rules. Now that the madwifi headers are
  handled differently we no longer need to do any cleanup.
* Fix formatting error in debian/ifupdown/wpa_action.8 to make lintian
  quieter.
* Add patch to fix formatting errors in manpages build from sgml source. Use
  <emphasis> tags to hightlight keywords instead of surrounding them in
  strong quotes.
  - debian/patches/41_manpage_format_fixes.patch
* wpasupplicant binary package no longer suggests pcscd, guessnet, iproute
  or wireless-tools, nor does it recommend dhcp3-client. These are not
  needed.
* Add debian/patches/10_silence_siocsiwauth_icotl_failure.patch to disable
  ioctl failure messages that occur under normal conditions.
* Cherry pick two upstream git commits concerning the dbus interface:
  - debian/patches/11_avoid_dbus_version_namespace.patch
  - debian/patches/12_fix_potential_use_after_free.patch
* Add debian/patches/42_manpage_explain_available_drivers.patch to explain
  that not all of the driver backends are available in the provided
  wpa_supplicant binary, and that the canonical list of supported driver
  backends can be retrieved from the wpa_supplicant -h (help) output.
  (Closes: #466910)
* Add debian/patches/20_wpa_gui_qt4_disable_link_prl.patch to remove
  link_prl CONFIG compile flag added by qmake-qt4 >= 4.3.4-2 to avoid excess
  linking.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * WPA Supplicant - PeerKey for Direct Link Setup (DLS)
 
3
 * Copyright (c) 2006, Jouni Malinen <j@w1.fi>
 
4
 *
 
5
 * This program is free software; you can redistribute it and/or modify
 
6
 * it under the terms of the GNU General Public License version 2 as
 
7
 * published by the Free Software Foundation.
 
8
 *
 
9
 * Alternatively, this software may be distributed under the terms of BSD
 
10
 * license.
 
11
 *
 
12
 * See README and COPYING for more details.
 
13
 */
 
14
 
 
15
#ifndef PEERKEY_H
 
16
#define PEERKEY_H
 
17
 
 
18
#define PEERKEY_MAX_IE_LEN 80
 
19
struct wpa_peerkey {
 
20
        struct wpa_peerkey *next;
 
21
        int initiator; /* whether this end was initator for SMK handshake */
 
22
        u8 addr[ETH_ALEN]; /* other end MAC address */
 
23
        u8 inonce[WPA_NONCE_LEN]; /* Initiator Nonce */
 
24
        u8 pnonce[WPA_NONCE_LEN]; /* Peer Nonce */
 
25
        u8 rsnie_i[PEERKEY_MAX_IE_LEN]; /* Initiator RSN IE */
 
26
        size_t rsnie_i_len;
 
27
        u8 rsnie_p[PEERKEY_MAX_IE_LEN]; /* Peer RSN IE */
 
28
        size_t rsnie_p_len;
 
29
        u8 smk[PMK_LEN];
 
30
        int smk_complete;
 
31
        u8 smkid[PMKID_LEN];
 
32
        u32 lifetime;
 
33
        os_time_t expiration;
 
34
        int cipher; /* Selected cipher (WPA_CIPHER_*) */
 
35
        u8 replay_counter[WPA_REPLAY_COUNTER_LEN];
 
36
        int replay_counter_set;
 
37
 
 
38
        struct wpa_ptk stk, tstk;
 
39
        int stk_set, tstk_set;
 
40
};
 
41
 
 
42
 
 
43
#ifdef CONFIG_PEERKEY
 
44
 
 
45
int peerkey_verify_eapol_key_mic(struct wpa_sm *sm,
 
46
                                 struct wpa_peerkey *peerkey,
 
47
                                 struct wpa_eapol_key *key, u16 ver,
 
48
                                 const u8 *buf, size_t len);
 
49
void peerkey_rx_eapol_4way(struct wpa_sm *sm, struct wpa_peerkey *peerkey,
 
50
                           struct wpa_eapol_key *key, u16 key_info, u16 ver);
 
51
void peerkey_rx_eapol_smk(struct wpa_sm *sm, const u8 *src_addr,
 
52
                          struct wpa_eapol_key *key, size_t extra_len,
 
53
                          u16 key_info, u16 ver);
 
54
void peerkey_deinit(struct wpa_sm *sm);
 
55
 
 
56
#else /* CONFIG_PEERKEY */
 
57
 
 
58
static inline int
 
59
peerkey_verify_eapol_key_mic(struct wpa_sm *sm,
 
60
                             struct wpa_peerkey *peerkey,
 
61
                             struct wpa_eapol_key *key, u16 ver,
 
62
                             const u8 *buf, size_t len)
 
63
{
 
64
        return -1;
 
65
}
 
66
 
 
67
static inline void
 
68
peerkey_rx_eapol_4way(struct wpa_sm *sm, struct wpa_peerkey *peerkey,
 
69
                      struct wpa_eapol_key *key, u16 key_info, u16 ver)
 
70
{
 
71
}
 
72
 
 
73
static inline void
 
74
peerkey_rx_eapol_smk(struct wpa_sm *sm, const u8 *src_addr,
 
75
                     struct wpa_eapol_key *key, size_t extra_len,
 
76
                     u16 key_info, u16 ver)
 
77
{
 
78
}
 
79
 
 
80
static inline void peerkey_deinit(struct wpa_sm *sm)
 
81
{
 
82
}
 
83
 
 
84
#endif /* CONFIG_PEERKEY */
 
85
 
 
86
#endif /* PEERKEY_H */