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
29 extern "C" {
30 #endif
31 
35 #define BLUETIL_ADDR_STRLEN (18U)
36 
40 #define BLUETIL_IPV6_IID_STRLEN (28U)
41 
50 void bluetil_addr_swapped_cp(const uint8_t *src, uint8_t *dst);
51 
61 void bluetil_addr_sprint(char *out, const uint8_t *addr);
62 
71 void bluetil_addr_print(const uint8_t *addr);
72 
87 uint8_t *bluetil_addr_from_str(uint8_t *addr, const char *addr_str);
88 
99 void bluetil_addr_ipv6_l2ll_sprint(char *out, const uint8_t *addr);
100 
109 void bluetil_addr_ipv6_l2ll_print(const uint8_t *addr);
110 
111 #ifdef __cplusplus
112 }
113 #endif
114 
115 #endif /* NET_BLUETIL_ADDR_H */
116 
bluetil_addr_ipv6_l2ll_sprint
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.
ble.h
General BLE values as defined by the BT standard.
bluetil_addr_ipv6_l2ll_print
void bluetil_addr_ipv6_l2ll_print(const uint8_t *addr)
Dump the given BLE addresses IPv6 IID-based link local address to STDIO.
bluetil_addr_from_str
uint8_t * bluetil_addr_from_str(uint8_t *addr, const char *addr_str)
Parse a BLE address from the given string.
bluetil_addr_sprint
void bluetil_addr_sprint(char *out, const uint8_t *addr)
Convert the given BLE address to a human readable string.
bluetil_addr_swapped_cp
void bluetil_addr_swapped_cp(const uint8_t *src, uint8_t *dst)
Copy address and swap the byte order in the target buffer.
bluetil_addr_print
void bluetil_addr_print(const uint8_t *addr)
Print the given BLE address to STDOUT.