diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2004-02-09 10:08:18 +0000 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2004-02-09 10:08:18 +0000 |
commit | 5ff58cb0e277fb4cb4613aa3d2a83e7237c59894 (patch) | |
tree | 3c455492de694b11e6739c64b9a4fbab7183e5a7 /hcid/hcid.h | |
parent | 16e217b4b13b828a9bb6c372d544deafa0e01f24 (diff) |
Add device specific configuration
Diffstat (limited to 'hcid/hcid.h')
-rw-r--r-- | hcid/hcid.h | 27 |
1 files changed, 19 insertions, 8 deletions
diff --git a/hcid/hcid.h b/hcid/hcid.h index 55ef0ab0..3bd0ad46 100644 --- a/hcid/hcid.h +++ b/hcid/hcid.h @@ -20,23 +20,24 @@ ALL LIABILITY, INCLUDING LIABILITY FOR INFRINGEMENT OF ANY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS, RELATING TO USE OF THIS SOFTWARE IS DISCLAIMED. */ + /* * $Id$ */ #include <sys/types.h> -#include "glib-ectomy.h" - #include <bluetooth/bluetooth.h> +#include "glib-ectomy.h" + #define HCID_CONFIG_FILE "/etc/bluetooth/hcid.conf" #define HCID_PIN_FILE "/etc/bluetooth/pin" #define HCID_KEY_FILE "/etc/bluetooth/link_key" #define HCID_PIN_HELPER "/bin/bluepin" struct device_opts { - char *name; + char *name; uint32_t class; uint16_t pkt_type; uint16_t scan; @@ -44,15 +45,23 @@ struct device_opts { uint16_t link_policy; uint16_t auth; uint16_t encrypt; -}; -extern struct device_opts devi; +}; + +extern struct device_opts default_device; +extern struct device_opts *parser_device; + +struct device_list { + char *ref; /* HCI device or Bluetooth address */ + struct device_list *next; + struct device_opts opts; +}; struct link_key { bdaddr_t sba; bdaddr_t dba; - uint8_t key[16]; - uint8_t type; - time_t time; + uint8_t key[16]; + uint8_t type; + time_t time; }; struct hcid_opts { @@ -84,6 +93,8 @@ extern struct hcid_opts hcid; int read_config(char *file); +struct device_opts *alloc_device_opts(char *addr); + gboolean io_stack_event(GIOChannel *chan, GIOCondition cond, gpointer data); gboolean io_security_event(GIOChannel *chan, GIOCondition cond, gpointer data); |