util.h 826 B

1234567891011121314151617181920212223242526
  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 <stdbool.h>
  11. struct mesh_publication;
  12. void set_menu_prompt(const char *name, const char *id);
  13. void print_byte_array(const char *prefix, const void *ptr, int len);
  14. bool str2hex(const char *str, uint16_t in_len, uint8_t *out_buf,
  15. uint16_t out_len);
  16. size_t hex2str(uint8_t *in, size_t in_len, char *out,
  17. size_t out_len);
  18. uint16_t mesh_opcode_set(uint32_t opcode, uint8_t *buf);
  19. bool mesh_opcode_get(const uint8_t *buf, uint16_t sz, uint32_t *opcode, int *n);
  20. const char *mesh_status_str(uint8_t status);
  21. void print_model_pub(uint16_t ele_addr, uint32_t mod_id,
  22. struct mesh_publication *pub);
  23. void swap_u256_bytes(uint8_t *u256);