1 /* 2 * l2cap.h 3 * 4 * Logical Link Control and Adaption Protocl (L2CAP) 5 * 6 * Created by Matthias Ringwald on 5/16/09. 7 */ 8 9 #pragma once 10 11 #include "hci.h" 12 13 typedef enum { 14 COMMAND_REJECT = 1, 15 CONNECTION_REQUEST, 16 CONNECTION_RESPONSE, 17 CONFIGURE_REQUEST, 18 CONFIGURE_RESPONSE, 19 DISCONNECTION_REQUEST, 20 DISCONNECTION_RESPONSE, 21 ECHO_REQUEST, 22 ECHO_RESPONSE, 23 INFORMATIONAL_REQUEST, 24 INFORMATIONAL_RESPONSE 25 } L2CAP_SIGNALING_COMMANDS; 26 27 typedef struct { 28 29 } l2cap_channel_t; 30 31 typedef struct { 32 33 } l2cap_service_t; 34 35 void l2cap_init(); 36 uint16_t l2cap_create_signaling_packet(uint8_t *acl_buffer, hci_con_handle_t handle, L2CAP_SIGNALING_COMMANDS cmd, uint8_t identifier, ...); 37 uint16_t l2cap_create_signaling_internal(uint8_t * acl_buffer,hci_con_handle_t handle, L2CAP_SIGNALING_COMMANDS cmd, uint8_t identifier, va_list argptr); 38 int l2cap_send_signaling_packet(hci_con_handle_t handle, L2CAP_SIGNALING_COMMANDS cmd, uint8_t identifier, ...); 39 40 extern uint16_t local_cid; 41 extern uint8_t sig_seq_nr; 42