File: util.h

package info (click to toggle)
bluez 5.83-1~exp1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 25,664 kB
  • sloc: ansic: 471,418; python: 4,751; sh: 4,580; makefile: 1,042; xml: 126
file content (26 lines) | stat: -rw-r--r-- 826 bytes parent folder | download | duplicates (3)
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
/* SPDX-License-Identifier: LGPL-2.1-or-later */
/*
 *
 *  BlueZ - Bluetooth protocol stack for Linux
 *
 *  Copyright (C) 2017  Intel Corporation. All rights reserved.
 *
 *
 */

#include <stdbool.h>

struct mesh_publication;

void set_menu_prompt(const char *name, const char *id);
void print_byte_array(const char *prefix, const void *ptr, int len);
bool str2hex(const char *str, uint16_t in_len, uint8_t *out_buf,
		uint16_t out_len);
size_t hex2str(uint8_t *in, size_t in_len, char *out,
		size_t out_len);
uint16_t mesh_opcode_set(uint32_t opcode, uint8_t *buf);
bool mesh_opcode_get(const uint8_t *buf, uint16_t sz, uint32_t *opcode, int *n);
const char *mesh_status_str(uint8_t status);
void print_model_pub(uint16_t ele_addr, uint32_t mod_id,
						struct mesh_publication *pub);
void swap_u256_bytes(uint8_t *u256);