net.h 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /* SPDX-License-Identifier: LGPL-2.1-or-later */
  2. /*
  3. *
  4. * BlueZ - Bluetooth protocol stack for Linux
  5. *
  6. * Copyright (C) 2017 Intel Corporation. All rights reserved.
  7. *
  8. *
  9. */
  10. #include "gdbus/gdbus.h"
  11. typedef void (*net_mesh_session_open_callback)(int status);
  12. uint32_t net_get_iv_index(bool *iv_update);
  13. bool net_get_key(uint16_t net_idx, uint8_t *key);
  14. bool net_get_flags(uint16_t net_idx, uint8_t *out_flags);
  15. void net_set_iv_index(uint32_t index, bool update);
  16. uint32_t get_sequence_number(void);
  17. void set_sequence_number(uint32_t seq_number);
  18. uint16_t net_validate_proxy_beacon(const uint8_t *proxy_beacon);
  19. bool net_add_address_pool(uint16_t min, uint16_t max);
  20. uint16_t net_obtain_address(uint8_t num_elements);
  21. bool net_reserve_address_range(uint16_t base, uint8_t num_elements);
  22. void net_release_address(uint16_t addr, uint8_t num_elements);
  23. bool net_session_open(GDBusProxy *data_in, bool provisioner,
  24. net_mesh_session_open_callback cb);
  25. void net_session_close(GDBusProxy *data_in);
  26. bool net_data_ready(uint8_t *ptr, uint8_t len);
  27. bool net_access_layer_send(uint8_t ttl, uint16_t src, uint32_t dst,
  28. uint16_t app_idx, uint8_t *buf, uint16_t len);
  29. bool net_ctl_msg_send(uint8_t ttl, uint16_t src, uint16_t dst,
  30. uint8_t *buf, uint16_t len);
  31. bool net_set_default_ttl(uint8_t ttl);
  32. uint8_t net_get_default_ttl(void);
  33. bool net_set_seq_num(uint32_t seq_num);
  34. uint32_t net_get_seq_num(void);
  35. void net_dest_ref(uint16_t dst);
  36. void net_dest_unref(uint16_t dst);
  37. bool net_register_unicast(uint16_t unicast, uint8_t count);
  38. bool net_register_group(uint16_t group_addr);
  39. uint32_t net_register_virtual(uint8_t buf[16]);
  40. bool mesh_model_recv(uint16_t app_idx, uint16_t src, uint32_t dst,
  41. uint8_t *payload, uint16_t len);