summaryrefslogtreecommitdiff
path: root/wifi/supplicant/1.0/types.hal
blob: 10cf483c266035cc60813d21d3af650a8d621c70 (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
/*
 * Copyright 2016 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package android.hardware.wifi.supplicant@1.0;
/**
 * Enum values indicating the status of any supplicant operation.
 */
enum SupplicantStatusCode : uint32_t {
  /** No errors. */
  SUCCESS,
  /** Unknown failure occured. */
  FAILURE_UNKNOWN,
  /** One of the incoming args is invalid. */
  FAILURE_ARGS_INVALID,
  /** |ISupplicantIface| HIDL interface object is no longer valid. */
  FAILURE_IFACE_INVALID,
  /** Iface with the provided name does not exist. */
  FAILURE_IFACE_UNKNOWN,
  /** Iface with the provided name already exists. */
  FAILURE_IFACE_EXISTS,
  /** Iface is disabled and cannot be used. */
  FAILURE_IFACE_DISABLED,
  /** Iface is not currently disconnected, so cannot reconnect. */
  FAILURE_IFACE_NOT_DISCONNECTED,
  /** |ISupplicantNetwork| HIDL interface object is no longer valid. */
  FAILURE_NETWORK_INVALID,
  /** Network with the provided id does not exist. */
  FAILURE_NETWORK_UNKNOWN
};

/**
 * Generic structure to return the status of any supplicant operation.
 */
struct SupplicantStatus {
  SupplicantStatusCode code;
  /**
   * A vendor specific error message to provide more information beyond the
   * status code.
   * This will be used for debbuging purposes only.
   */
  string debugMessage;
};

/** SSID type. Max of 32 octets representing service identifier of a network. */
typedef vec<uint8_t> Ssid;

/** MAC Address type. 6 octets representing physical address of a device. */
typedef uint8_t[6] MacAddress;

/** BSSID type. 6 octets representing the physical address of an AP. */
typedef MacAddress Bssid;

/** Supplicant network ID type. */
typedef uint32_t SupplicantNetworkId;

/**
 * List of Iface types supported.
 */
enum IfaceType : uint32_t {
  STA,
  P2P
};

/**
 * P2P group capability.
 */
enum P2pGroupCapabilityMask : uint32_t {
  GROUP_OWNER = 1 << 0,
  PERSISTENT_GROUP = 1 << 1,
  GROUP_LIMIT = 1 << 2,
  INTRA_BSS_DIST = 1 << 3,
  CROSS_CONN = 1 << 4,
  PERSISTENT_RECONN = 1 << 5,
  GROUP_FORMATION = 1 << 6
};

/**
 * WPS config methods.
 * Refer to section 3 of IBSS with Wi-Fi Protected Setup
 * Technical Specification Version 1.0.0.
 */
enum WpsConfigMethods : uint16_t {
  USBA = 0x0001,
  ETHERNET = 0x0002,
  LABEL = 0x0004,
  DISPLAY = 0x0008,
  EXT_NFC_TOKEN = 0x0010,
  INT_NFC_TOKEN = 0x0020,
  NFC_INTERFACE = 0x0040,
  PUSHBUTTON = 0x0080,
  KEYPAD = 0x0100,
  VIRT_PUSHBUTTON = 0x0280,
  PHY_PUSHBUTTON = 0x0480,
  P2PS = 0x1000,
  VIRT_DISPLAY = 0x2008,
  PHY_DISPLAY = 0x4008
};