1 /* 2 * Copyright (C) 2022 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 package android.hardware.wifi; 18 19 import android.hardware.wifi.NanPairingRequestType; 20 import android.hardware.wifi.NanPairingSecurityConfig; 21 22 /** 23 * NAN pairing initiate request. 24 * Can be used for setup (the initial pairing request) or 25 * verification (re-pairing for paired devices). 26 * See Wi-Fi Aware R4.0 section 7.6.1.1 27 */ 28 @VintfStability 29 parcelable NanPairingRequest { 30 /** 31 * ID of the peer. Obtained as part of an earlier |IWifiNanIfaceEventCallback.eventMatch| or 32 * |IWifiNanIfaceEventCallback.eventFollowupReceived|. 33 */ 34 int peerId; 35 /** 36 * NAN management interface MAC address of the peer. Obtained as part of an earlier 37 * |IWifiNanIfaceEventCallback.eventMatch| or 38 * |IWifiNanIfaceEventCallback.eventFollowupReceived|. 39 */ 40 byte[6] peerDiscMacAddr; 41 /** 42 * Indicate the pairing session is for setup or verification 43 */ 44 NanPairingRequestType requestType; 45 /** 46 * Whether to cache the negotiated NIK/NPK for future verification 47 */ 48 boolean enablePairingCache; 49 /** 50 * The Identity key for pairing, can be used for pairing verification 51 */ 52 byte[16] pairingIdentityKey; 53 /** 54 * Security config used for the pairing 55 */ 56 NanPairingSecurityConfig securityConfig; 57 } 58