/* Connection states */
#define DISCONNECTED 0
-#define CONNECTED 1
-#define PENDING 2
+#define CONNECTED 1
/* CMD request states*/
#define FREE 0
__u8 actual_status;
__u8 id;
__u16 req_opcode;
- __u16 evt_code; // code of expected ansver event , command status event will be accepted everytime
- void *p_serv_rutine;
+ __u16 evt_code;//codes of expected ansver event,command status event will be accepted everytime
+ void (*p_serv_rutine)(void);
} __attribute__((packed)) cmd_state_request;
+
typedef struct{
__u16 con_id;
__u8 con_state;
+ struct hci_dev_info master;
+ struct hci_dev_info slave;
+ int handle;
int socket_fd;
}connection_hci;
+extern int create_master_connection(connection_hci *p_connection);
+extern int show_all_local_dev(struct hci_dev_info *master);
+extern int show_all_remote_dev(struct hci_dev_info *master, bt_address *p_remadrar,int *p_remd_count);
+
+extern int l2cap_call_cmd(__u16 ocf_ogf,int dd, void *p_param);
+
+extern int req_fcn_add(cmd_state_request *p_req);
+extern void req_fcn_remove(void);
+extern void *rutine_catch_bd_addr(void *arg);
-//extern void show_all_local_dev(connection_hci *connection, bt_device *p_device);
-//extern void call_hci_inquiry_cmd(dev_lap lap,__u8 inq_length,__u8 resp_count);
-//extern void call_hci_create_connection(bt_address *dev_adress,unsigned short pkt_type,__u8 sc_mod);
-//extern void call_hci_read_bd_addr_cmd(bt_device *p_device);
-//extern void call_hci_read_local_name_cmd(bt_device *p_device);
-//extern void create_BTsocket_connection(connection_hci *connection, bt_device *p_device);