Loading...
Searching...
No Matches
addr.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2019 Freie Universität Berlin
3 * SPDX-License-Identifier: LGPL-2.1-only
4 */
5
6#pragma once
7
19
20#include <stdint.h>
21
22#include "net/ble.h"
23
24#ifdef __cplusplus
25extern "C" {
26#endif
27
31#define BLUETIL_ADDR_STRLEN (18U)
32
36#define BLUETIL_IPV6_IID_STRLEN (28U)
37
46void bluetil_addr_swapped_cp(const uint8_t *src, uint8_t *dst);
47
57void bluetil_addr_sprint(char *out, const uint8_t *addr);
58
67void bluetil_addr_print(const uint8_t *addr);
68
83uint8_t *bluetil_addr_from_str(uint8_t *addr, const char *addr_str);
84
95void bluetil_addr_ipv6_l2ll_sprint(char *out, const uint8_t *addr);
96
105void bluetil_addr_ipv6_l2ll_print(const uint8_t *addr);
106
107#ifdef __cplusplus
108}
109#endif
110
uint8_t * bluetil_addr_from_str(uint8_t *addr, const char *addr_str)
Parse a BLE address from the given string.
void bluetil_addr_ipv6_l2ll_sprint(char *out, const uint8_t *addr)
Get a string representation of the given BLE addresses IID-based link local address.
void bluetil_addr_ipv6_l2ll_print(const uint8_t *addr)
Dump the given BLE addresses IPv6 IID-based link local address to STDIO.
void bluetil_addr_print(const uint8_t *addr)
Print the given BLE address to STDOUT.
void bluetil_addr_swapped_cp(const uint8_t *src, uint8_t *dst)
Copy address and swap the byte order in the target buffer.
void bluetil_addr_sprint(char *out, const uint8_t *addr)
Convert the given BLE address to a human readable string.
General BLE values as defined by the BT standard.