summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorStephen Crane <steve.crane@rococosoft.com>2003-02-11 10:22:23 +0000
committerStephen Crane <steve.crane@rococosoft.com>2003-02-11 10:22:23 +0000
commit109bfa547ab9e24672472371e2183dcec24d0058 (patch)
tree55dcd30597464569faff8ffc70874260b1f80676 /include
parentbff9ecffc1771df893e0cccc59fe708cf9ba43bb (diff)
add const to fn sigs; fns to auth and enc links
Diffstat (limited to 'include')
-rw-r--r--include/bluetooth.h14
-rw-r--r--include/hci.h2
-rw-r--r--include/hci_lib.h14
3 files changed, 16 insertions, 14 deletions
diff --git a/include/bluetooth.h b/include/bluetooth.h
index b93c4e35..93a6f628 100644
--- a/include/bluetooth.h
+++ b/include/bluetooth.h
@@ -91,20 +91,20 @@ typedef struct {
#define BDADDR_LOCAL (&(bdaddr_t) {{0, 0, 0, 0xff, 0xff, 0xff}})
/* Copy, swap, convert BD Address */
-static inline int bacmp(bdaddr_t *ba1, bdaddr_t *ba2)
+static inline int bacmp(const bdaddr_t *ba1, const bdaddr_t *ba2)
{
return memcmp(ba1, ba2, sizeof(bdaddr_t));
}
-static inline void bacpy(bdaddr_t *dst, bdaddr_t *src)
+static inline void bacpy(bdaddr_t *dst, const bdaddr_t *src)
{
memcpy(dst, src, sizeof(bdaddr_t));
}
-void baswap(bdaddr_t *dst, bdaddr_t *src);
-bdaddr_t *strtoba(char *str);
-char *batostr(bdaddr_t *ba);
-int ba2str(bdaddr_t *ba, char *str);
-int str2ba(char *str, bdaddr_t *ba);
+void baswap(bdaddr_t *dst, const bdaddr_t *src);
+bdaddr_t *strtoba(const char *str);
+char *batostr(const bdaddr_t *ba);
+int ba2str(const bdaddr_t *ba, char *str);
+int str2ba(const char *str, bdaddr_t *ba);
int bt_error(uint16_t code);
char *bt_compidtostr(int id);
diff --git a/include/hci.h b/include/hci.h
index 8168a492..212db12b 100644
--- a/include/hci.h
+++ b/include/hci.h
@@ -823,7 +823,7 @@ typedef struct {
uint16_t event;
uint16_t proto;
uint16_t subproto;
- uint8_t incomming;
+ uint8_t incoming;
} __attribute__ ((packed)) evt_si_security;
#define EVT_TESTING 0xfe
diff --git a/include/hci_lib.h b/include/hci_lib.h
index 81d29ecf..d6d76214 100644
--- a/include/hci_lib.h
+++ b/include/hci_lib.h
@@ -56,20 +56,20 @@ int hci_close_dev(int dd);
int hci_send_cmd(int dd, uint16_t ogf, uint16_t ocf, uint8_t plen, void *param);
int hci_send_req(int dd, struct hci_request *req, int timeout);
-int hci_create_connection(int dd, bdaddr_t *ba, uint16_t ptype, uint16_t clkoffset, uint8_t rswitch, uint16_t *handle, int to);
+int hci_create_connection(int dd, const bdaddr_t *ba, uint16_t ptype, uint16_t clkoffset, uint8_t rswitch, uint16_t *handle, int to);
int hci_disconnect(int dd, uint16_t handle, uint8_t reason, int to);
-int hci_inquiry(int dev_id, int len, int num_rsp, uint8_t *lap, inquiry_info **ii, long flags);
+int hci_inquiry(int dev_id, int len, int num_rsp, const uint8_t *lap, inquiry_info **ii, long flags);
int hci_devinfo(int dev_id, struct hci_dev_info *di);
int hci_devba(int dev_id, bdaddr_t *ba);
-int hci_devid(char *str);
+int hci_devid(const char *str);
// deprecated: preserve compatibility
int hci_local_name(int dd, int len, char *name, int to);
int hci_read_local_name(int dd, int len, char *name, int to);
-int hci_write_local_name(int dd, char *name, int to);
-int hci_remote_name(int dd, bdaddr_t *ba, int len, char *name, int to);
-int hci_read_remote_name(int dd, bdaddr_t *ba, int len, char *name, int to);
+int hci_write_local_name(int dd, const char *name, int to);
+int hci_remote_name(int dd, const bdaddr_t *ba, int len, char *name, int to);
+int hci_read_remote_name(int dd, const bdaddr_t *ba, 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_local_version(int dd, struct hci_version *ver, int to);
@@ -79,6 +79,8 @@ int hci_read_voice_setting(int dd, uint16_t *vs, int to);
int hci_write_voice_setting(int dd, uint16_t vs, int to);
int hci_read_current_iac_lap(int dd, uint8_t *num_iac, uint8_t *lap, int to);
int hci_write_current_iac_lap(int dd, uint8_t num_iac, uint8_t *lap, int to);
+int hci_authenticate_link(int dd, uint16_t handle, int to);
+int hci_encrypt_link(int dd, uint16_t handle, int on, int to);
int hci_for_each_dev(int flag, int(*func)(int s, int dev_id, long arg), long arg);
int hci_get_route(bdaddr_t *bdaddr);