summaryrefslogtreecommitdiffstats
path: root/hcid/storage.c
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2007-10-10 09:20:20 +0000
committerMarcel Holtmann <marcel@holtmann.org>2007-10-10 09:20:20 +0000
commitdce6ee99a3e9dc99c032654dd4fb7de15be698bd (patch)
tree4fdf984bf79185e61102486c4c9a875f58180f7a /hcid/storage.c
parent8cfa0ed821e386e1fb8e31f16522f7be67ba1d31 (diff)
Store Extended Inquiry Response data information
Diffstat (limited to 'hcid/storage.c')
-rw-r--r--hcid/storage.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/hcid/storage.c b/hcid/storage.c
index bec8fec1..8cf15d1a 100644
--- a/hcid/storage.c
+++ b/hcid/storage.c
@@ -289,6 +289,23 @@ int read_device_name(bdaddr_t *local, bdaddr_t *peer, char *name)
return 0;
}
+int write_remote_eir(bdaddr_t *local, bdaddr_t *peer, uint8_t *data)
+{
+ char filename[PATH_MAX + 1], addr[18], str[481];
+ int i;
+
+ memset(str, 0, sizeof(str));
+ for (i = 0; i < 240; i++)
+ sprintf(str + (i * 2), "%2.2X", data[i]);
+
+ create_filename(filename, PATH_MAX, local, "eir");
+
+ create_file(filename, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+
+ ba2str(peer, addr);
+ return textfile_put(filename, addr, str);
+}
+
int write_l2cap_info(bdaddr_t *local, bdaddr_t *peer,
uint16_t mtu_result, uint16_t mtu,
uint16_t mask_result, uint32_t mask)