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.NanDataPathChannelCfg; 20 import android.hardware.wifi.NanDataPathSecurityConfig; 21 22 /** 23 * Data Path Initiator requesting a data-path. 24 */ 25 @VintfStability 26 parcelable NanInitiateDataPathRequest { 27 /** 28 * ID of the peer. Obtained as part of an earlier |IWifiNanIfaceEventCallback.eventMatch| or 29 * |IWifiNanIfaceEventCallback.eventFollowupReceived|. 30 */ 31 int peerId; 32 /** 33 * NAN management interface MAC address of the peer. Obtained as part of an earlier 34 * |IWifiNanIfaceEventCallback.eventMatch| or 35 * |IWifiNanIfaceEventCallback.eventFollowupReceived|. 36 */ 37 byte[6] peerDiscMacAddr; 38 /** 39 * Config flag for channel request. 40 */ 41 NanDataPathChannelCfg channelRequestType; 42 /** 43 * Channel frequency in MHz to start data-path. Not relevant if |channelRequestType| is 44 * |NanDataPathChannelCfg.CHANNEL_NOT_REQUESTED|. 45 */ 46 int channel; 47 /** 48 * NAN data interface name on which this data-path session is to be initiated. 49 * This must be an interface created using |IWifiNanIface.createDataInterfaceRequest|. 50 */ 51 String ifaceName; 52 /** 53 * Security configuration of the requested data-path. 54 */ 55 NanDataPathSecurityConfig securityConfig; 56 /** 57 * Arbitrary information communicated to the peer as part of the data-path setup process. There 58 * is no semantic meaning to these bytes. They are passed-through from sender to receiver as-is 59 * with no parsing. 60 * Max length: |NanCapabilities.maxAppInfoLen|. 61 * NAN Spec: Data Path Attributes / NDP Attribute / NDP Specific Info 62 */ 63 byte[] appInfo; 64 /** 65 * A service name to be used with |passphrase| to construct a Pairwise Master Key (PMK) for the 66 * data-path. Only relevant when a data-path is requested which is not associated with a NAN 67 * discovery session - e.g. using out-of-band discovery. 68 * Constraints: same as |NanDiscoveryCommonConfig.serviceName| 69 * NAN Spec: Appendix: Mapping pass-phrase to PMK for NCS-SK Cipher Suites 70 */ 71 byte[] serviceNameOutOfBand; 72 /** 73 * ID of an active publish or subscribe discovery session. 74 * NAN Spec: Service Descriptor Attribute (SDA) / Instance ID 75 */ 76 byte discoverySessionId; 77 } 78