summaryrefslogtreecommitdiffstats
path: root/wifi/supplicant/2.0/ISupplicantVendorStaIfaceCallback.hal
blob: 7016072d270c6d225787e718dc72997d8e4a98ef (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
/* Copyright (c) 2018, The Linux Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*     * Redistributions of source code must retain the above copyright
*       notice, this list of conditions and the following disclaimer.
*     * Redistributions in binary form must reproduce the above
*       copyright notice, this list of conditions and the following
*       disclaimer in the documentation and/or other materials provided
*       with the distribution.
*     * Neither the name of The Linux Foundation nor the names of its
*       contributors may be used to endorse or promote products derived
*       from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
* ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
* IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/

package vendor.qti.hardware.wifi.supplicant@2.0;

import android.hardware.wifi.supplicant@1.0::ISupplicantStaIfaceCallback;
import android.hardware.wifi.supplicant@1.0::types;

/**
 * Vendor StaIface Callback Interface
 */
interface ISupplicantVendorStaIfaceCallback {
  /**
   * Used to indicate a state change event on this particular iface. If this
   * event is triggered by a particular network, the |SupplicantNetworkId|,
   * |ssid|, |bssid| parameters must indicate the parameters of the network/AP
   * which caused this state transition.
   *
   * @param newState New State of the interface. This must be one of the |State|
   *        values above.
   * @param bssid BSSID of the corresponding AP which caused this state
   *        change event. This must be zero'ed if this event is not
   *        specific to a particular network.
   * @param id ID of the corresponding network which caused this
   *        state change event. This must be invalid (UINT32_MAX) if this
   *        event is not specific to a particular network.
   * @param ssid SSID of the corresponding network which caused this state
   *        change event. This must be empty if this event is not specific
   *        to a particular network.
   * @param filsHlpSent If FILS HLP IEs were included in this association.
   */
  oneway onVendorStateChanged(
      State newState, Bssid bssid, SupplicantNetworkId id, Ssid ssid, bool filsHlpSent);

   /** DPP Authentication parameter. */
   enum DppAuthParam : uint8_t {
     CONNECTOR = 1 << 0,
     C_SIGN_KEY = 1 << 1,
     NET_ACCESS_KEY = 1 << 2,
     NET_ACCESS_KEY_EXPIRY = 1 << 3,
   };

   /** DPP Config message type. */
   enum DppConfigType : uint8_t {
      FAILED = 0,
      SENT = 1,
      RECEIVED = 2,
   };

  /**
   * Used to indicate dpp authentication success status.
   *
   * @param initiator Indicates if this is received on initiator(1) side
   *        or responder side (0)
   */
  oneway onDppAuthSuccess(bool initiator);

  /**
   * Used to indicate dpp capability of the peer.
   *
   * @param initiator Indicates if this is for initiator(1) or responder(0)
   *        At the Initiator with capab showing Responder’s capabilities.
   *        At the Responder with capab showing Initiator’s capabilities.
   */
  oneway onDppNotCompatible(uint8_t capab, bool initiator);

  /**
   * Used to indicate pending dpp response.
   */
  oneway onDppResponsePending();

  /**
   * Current dpp authentication needs mutual authentication. DPP: Mutual
   * authentication required with QR Codes, but peer info is not yet available.
   * Request more time.
   *
   * @param bootstrapData Hash of initiator's public bootstrap key.
   *
   */
  oneway onDppScanPeerQrCode(vec<uint8_t> bootstrapData);

  /**
   * Used to indicate if configuration event at the Enrollee/Configurator.
   *
   * @param type Type of configuration messaage. This must be one of
   *        |DppConfigType|.
   * @param ssid SSID (in hex format) received in the Configuration Object
   *        at Enrollee side.
   * @param connector Connector (in hex format) received in the Configuration
   *        Object at Enrollee side.
   * @param c_sign C-Sign-Key (in hex format) received in the Configuration
   *        Object at Enrollee side.
   * @param net_access Net-Access-Key (in hex format) received in the
   *        Configuration Object at Enrollee side.
   * @param net_access_expiry Net-Access-Key Expiry time received in the
   *        Configuration Object at Enrollee side.
   * @param passphrase Passphrase as string received in the Configuration
   *        Object at Enrollee side.
   * @param psk PSK received in the Configuration Object at Enrollee side.
   */
  oneway onDppConf(uint8_t type, Ssid ssid, string connector,
                   vec<uint8_t> c_sign, vec<uint8_t> net_access,
                   uint32_t net_access_expiry, string passphrase,
                   vec<uint8_t> psk);

  /**
   * Used to indicate missing dpp authentication param when trying to connect
   * to a DPP network.
   *
   * @param auth Indicates what requisite fields are missing/expired. It sets
   *        missing param bitfield from |DppAuthParam|.
   */
  oneway onDppMissingAuth(bitfield<DppAuthParam> auth);

  /**
   * This event is received when a DPP network is added by on successful DPP
   * Provisioning on the Enrollee.
   *
   * @param id Network id of added DPP network.
   */
  oneway onDppNetworkId(uint32_t id);
};