diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2012-12-08 23:48:30 +0100 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2012-12-08 23:48:30 +0100 |
commit | d47f4a0410e30c97ba14f426b879da36b72db908 (patch) | |
tree | 139def6098b2499c330d026eddeb98166f30cc1b /src/oui.c | |
parent | 61afd46c8576660df9f41a4993ddbc0f040251e2 (diff) |
core: Introduce batocomp helper function
Diffstat (limited to 'src/oui.c')
-rw-r--r-- | src/oui.c | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -34,6 +34,8 @@ #include <sys/stat.h> #include <sys/mman.h> +#include <bluetooth/bluetooth.h> + #include "oui.h" /* http://standards.ieee.org/regauth/oui/oui.txt */ @@ -88,3 +90,12 @@ char *ouitocomp(const char *oui) return str; } + +char *batocomp(const bdaddr_t *ba) +{ + char oui[9]; + + sprintf(oui, "%2.2X-%2.2X-%2.2X", ba->b[5], ba->b[4], ba->b[3]); + + return ouitocomp(oui); +} |