Gabriel Biren | 910d5df | 2022-04-08 18:21:22 +0000 | [diff] [blame] | 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.NanDataPathSecurityConfig; |
| 20 | |
| 21 | /** |
| 22 | * Response to a data-path request from a peer. |
| 23 | */ |
| 24 | @VintfStability |
| 25 | parcelable NanRespondToDataPathIndicationRequest { |
| 26 | /** |
| 27 | * Accept (true) or reject (false) the request. |
| 28 | * NAN Spec: Data Path Attributes / NDP Attribute / Type and Status |
| 29 | */ |
| 30 | boolean acceptRequest; |
| 31 | /** |
| 32 | * ID of the data-path (NDP) for which we're responding. Obtained as part of the request in |
| 33 | * |IWifiNanIfaceEventCallback.eventDataPathRequest|. |
| 34 | */ |
| 35 | int ndpInstanceId; |
| 36 | /** |
| 37 | * NAN data interface name on which this data-path session is to be started. |
| 38 | * This must be an interface created using |IWifiNanIface.createDataInterfaceRequest|. |
| 39 | */ |
| 40 | String ifaceName; |
| 41 | /** |
| 42 | * Security configuration of the requested data-path. |
| 43 | */ |
| 44 | NanDataPathSecurityConfig securityConfig; |
| 45 | /** |
| 46 | * Arbitrary information communicated to the peer as part of the data-path setup process. There |
| 47 | * is no semantic meaning to these bytes. They are passed-through from sender to receiver as-is |
| 48 | * with no parsing. |
| 49 | * Max length: |NanCapabilities.maxAppInfoLen|. |
| 50 | * NAN Spec: Data Path Attributes / NDP Attribute / NDP Specific Info |
| 51 | */ |
| 52 | byte[] appInfo; |
| 53 | /** |
| 54 | * A service name to be used with |passphrase| to construct a Pairwise Master Key (PMK) for the |
| 55 | * data-path. Only relevant when a data-path is requested which is not associated with a NAN |
| 56 | * discovery session - e.g. using out-of-band discovery. |
| 57 | * Constraints: same as |NanDiscoveryCommonConfig.serviceName| |
| 58 | * NAN Spec: Appendix: Mapping pass-phrase to PMK for NCS-SK Cipher Suites |
| 59 | */ |
| 60 | byte[] serviceNameOutOfBand; |
Nate Jiang | d6cc331 | 2023-02-14 16:37:54 -0800 | [diff] [blame] | 61 | /** |
| 62 | * ID of an active publish or subscribe discovery session. |
| 63 | * NAN Spec: Service Descriptor Attribute (SDA) / Instance ID |
| 64 | */ |
| 65 | byte discoverySessionId; |
Gabriel Biren | 910d5df | 2022-04-08 18:21:22 +0000 | [diff] [blame] | 66 | } |