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
21#ifndef NET_BLUETIL_ADDR_H
22#define NET_BLUETIL_ADDR_H
23
24#include <stdint.h>
25
26#include "net/ble.h"
27
28#ifdef __cplusplus
29extern "C" {
30#endif
31
35#define BLUETIL_ADDR_STRLEN (18U)
36
40#define BLUETIL_IPV6_IID_STRLEN (28U)
41
50void bluetil_addr_swapped_cp(const uint8_t *src, uint8_t *dst);
51
61void bluetil_addr_sprint(char *out, const uint8_t *addr);
62
71void bluetil_addr_print(const uint8_t *addr);
72
87uint8_t *bluetil_addr_from_str(uint8_t *addr, const char *addr_str);
88
99void bluetil_addr_ipv6_l2ll_sprint(char *out, const uint8_t *addr);
100
109void bluetil_addr_ipv6_l2ll_print(const uint8_t *addr);
110
111#ifdef __cplusplus
112}
113#endif
114
115#endif /* NET_BLUETIL_ADDR_H */
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.