diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2005-02-11 04:17:16 +0000 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2005-02-11 04:17:16 +0000 |
commit | c608311e7472325514f0578a20d59efc86792e39 (patch) | |
tree | 9736fc86bc598fa2ce2e40ddbe50fb8a3959851e | |
parent | 49ce09906c8786d890da498fe2708c0cd6484c6c (diff) |
Add function for getting the remote name with a clock offset
-rw-r--r-- | include/hci_lib.h | 1 | ||||
-rw-r--r-- | src/hci.c | 8 |
2 files changed, 8 insertions, 1 deletions
diff --git a/include/hci_lib.h b/include/hci_lib.h index 1e5ecc96..e2f06fda 100644 --- a/include/hci_lib.h +++ b/include/hci_lib.h @@ -69,6 +69,7 @@ int hci_devid(const char *str); int hci_read_local_name(int dd, int len, char *name, int to); int hci_write_local_name(int dd, const char *name, int to); int hci_read_remote_name(int dd, const bdaddr_t *bdaddr, int len, char *name, int to); +int hci_read_remote_name_with_clock_offset(int dd, const bdaddr_t *bdaddr, uint16_t clkoffset, int len, char *name, int to); int hci_read_remote_features(int dd, uint16_t handle, uint8_t *features, int to); int hci_read_remote_version(int dd, uint16_t handle, struct hci_version *ver, int to); int hci_read_clock_offset(int dd, uint16_t handle, uint16_t *clkoffset, int to); @@ -898,7 +898,7 @@ int hci_write_local_name(int dd, const char *name, int to) return 0; } -int hci_read_remote_name(int dd, const bdaddr_t *bdaddr, int len, char *name, int to) +int hci_read_remote_name_with_clock_offset(int dd, const bdaddr_t *bdaddr, uint16_t clkoffset, int len, char *name, int to) { evt_remote_name_req_complete rn; remote_name_req_cp cp; @@ -907,6 +907,7 @@ int hci_read_remote_name(int dd, const bdaddr_t *bdaddr, int len, char *name, in memset(&cp, 0, sizeof(cp)); bacpy(&cp.bdaddr, bdaddr); cp.pscan_rep_mode = 0x02; + cp.clock_offset = clkoffset; memset(&rq, 0, sizeof(rq)); rq.ogf = OGF_LINK_CTL; @@ -930,6 +931,11 @@ int hci_read_remote_name(int dd, const bdaddr_t *bdaddr, int len, char *name, in return 0; } +int hci_read_remote_name(int dd, const bdaddr_t *bdaddr, int len, char *name, int to) +{ + return hci_read_remote_name_with_clock_offset(dd, bdaddr, 0x0000, len, name, to); +} + int hci_read_remote_features(int dd, uint16_t handle, uint8_t *features, int to) { evt_read_remote_features_complete rp; |