Loading...
Searching...
No Matches
addr.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2019 Freie Universität Berlin
3 *
4 * This file is subject to the terms and conditions of the GNU Lesser
5 * General Public License v2.1. See the file LICENSE in the top level
6 * directory for more details.
7 */
8
9#pragma once
10
22
23#include <stdint.h>
24
25#include "net/ble.h"
26
27#ifdef __cplusplus
28extern "C" {
29#endif
30
34#define BLUETIL_ADDR_STRLEN (18U)
35
39#define BLUETIL_IPV6_IID_STRLEN (28U)
40
49void bluetil_addr_swapped_cp(const uint8_t *src, uint8_t *dst);
50
60void bluetil_addr_sprint(char *out, const uint8_t *addr);
61
70void bluetil_addr_print(const uint8_t *addr);
71
86uint8_t *bluetil_addr_from_str(uint8_t *addr, const char *addr_str);
87
98void bluetil_addr_ipv6_l2ll_sprint(char *out, const uint8_t *addr);
99
108void bluetil_addr_ipv6_l2ll_print(const uint8_t *addr);
109
110#ifdef __cplusplus
111}
112#endif
113
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.