| 1 |
|
| 2 | |
| 3 | BlueZ - Bluetooth protocol stack for Linux
|
| 4 | Copyright (C) 2015 Intel Coropration
|
| 5 |
|
| 6 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
| 7 | OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
| 8 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS.
|
| 9 | IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) AND AUTHOR(S) BE LIABLE FOR ANY
|
| 10 | CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES
|
| 11 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
| 12 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
| 13 | OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
| 14 |
|
| 15 | ALL LIABILITY, INCLUDING LIABILITY FOR INFRINGEMENT OF ANY PATENTS,
|
| 16 | COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS, RELATING TO USE OF THIS
|
| 17 | SOFTWARE IS DISCLAIMED.
|
| 18 |
|
| 19 |
|
| 20 | struct mgmt_mesh_tx {
|
| 21 | struct list_head list;
|
| 22 | int index;
|
| 23 | size_t param_len;
|
| 24 | struct sock *sk;
|
| 25 | u8 handle;
|
| 26 | u8 instance;
|
| 27 | u8 param[sizeof(struct mgmt_cp_mesh_send) + 31];
|
| 28 | };
|
| 29 |
|
| 30 | struct mgmt_pending_cmd {
|
| 31 | struct list_head list;
|
| 32 | u16 opcode;
|
| 33 | struct hci_dev *hdev;
|
| 34 | void *param;
|
| 35 | size_t param_len;
|
| 36 | struct sock *sk;
|
| 37 | struct sk_buff *skb;
|
| 38 | void *user_data;
|
| 39 | int (*cmd_complete)(struct mgmt_pending_cmd *cmd, u8 status);
|
| 40 | };
|
| 41 |
|
| 42 | struct sk_buff *mgmt_alloc_skb(struct hci_dev *hdev, u16 opcode,
|
| 43 | unsigned int size);
|
| 44 | int mgmt_send_event_skb(unsigned short channel, struct sk_buff *skb, int flag,
|
| 45 | struct sock *skip_sk);
|
| 46 | int mgmt_send_event(u16 event, struct hci_dev *hdev, unsigned short channel,
|
| 47 | void *data, u16 data_len, int flag, struct sock *skip_sk);
|
| 48 | int mgmt_cmd_status(struct sock *sk, u16 index, u16 cmd, u8 status);
|
| 49 | int mgmt_cmd_complete(struct sock *sk, u16 index, u16 cmd, u8 status,
|
| 50 | void *rp, size_t rp_len);
|
| 51 |
|
| 52 | struct mgmt_pending_cmd *mgmt_pending_find(unsigned short channel, u16 opcode,
|
| 53 | struct hci_dev *hdev);
|
| 54 | void mgmt_pending_foreach(u16 opcode, struct hci_dev *hdev, bool remove,
|
| 55 | void (*cb)(struct mgmt_pending_cmd *cmd, void *data),
|
| 56 | void *data);
|
| 57 | struct mgmt_pending_cmd *mgmt_pending_add(struct sock *sk, u16 opcode,
|
| 58 | struct hci_dev *hdev,
|
| 59 | void *data, u16 len);
|
| 60 | struct mgmt_pending_cmd *mgmt_pending_new(struct sock *sk, u16 opcode,
|
| 61 | struct hci_dev *hdev,
|
| 62 | void *data, u16 len);
|
| 63 | void mgmt_pending_free(struct mgmt_pending_cmd *cmd);
|
| 64 | void mgmt_pending_remove(struct mgmt_pending_cmd *cmd);
|
| 65 | bool __mgmt_pending_listed(struct hci_dev *hdev, struct mgmt_pending_cmd *cmd);
|
| 66 | bool mgmt_pending_listed(struct hci_dev *hdev, struct mgmt_pending_cmd *cmd);
|
| 67 | bool mgmt_pending_valid(struct hci_dev *hdev, struct mgmt_pending_cmd *cmd);
|
| 68 | void mgmt_mesh_foreach(struct hci_dev *hdev,
|
| 69 | void (*cb)(struct mgmt_mesh_tx *mesh_tx, void *data),
|
| 70 | void *data, struct sock *sk);
|
| 71 | struct mgmt_mesh_tx *mgmt_mesh_find(struct hci_dev *hdev, u8 handle);
|
| 72 | struct mgmt_mesh_tx *mgmt_mesh_next(struct hci_dev *hdev, struct sock *sk);
|
| 73 | struct mgmt_mesh_tx *mgmt_mesh_add(struct sock *sk, struct hci_dev *hdev,
|
| 74 | void *data, u16 len);
|
| 75 | void mgmt_mesh_remove(struct mgmt_mesh_tx *mesh_tx);
|