1 /* 2 * Copyright 2008 Oliver Ruiz Dorantes, oliver.ruiz.dorantes_at_gmail.com 3 * All rights reserved. Distributed under the terms of the MIT License. 4 */ 5 #ifndef _L2CAP_CMDS_H_ 6 #define _L2CAP_CMDS_H_ 7 8 #include <NetBufferUtilities.h> 9 10 #include <l2cap.h> 11 12 13 extern net_buffer_module_info *gBufferModule; 14 15 net_buffer* 16 l2cap_cmd_rej(uint8 _ident, uint16 _reason, uint16 _mtu, uint16 _scid, uint16 _dcid); 17 18 net_buffer* 19 l2cap_con_req(uint8 _ident, uint16 _psm, uint16 _scid); 20 21 net_buffer* 22 l2cap_con_rsp(uint8 _ident, uint16 _dcid, uint16 _scid, uint16 _result, uint16 _status); 23 24 net_buffer* 25 l2cap_cfg_req(uint8 _ident, uint16 _dcid, uint16 _flags, net_buffer* _data); 26 27 net_buffer* 28 l2cap_cfg_rsp(uint8 _ident, uint16 _scid, uint16 _flags, uint16 _result, net_buffer* _data); 29 30 net_buffer* 31 l2cap_build_cfg_options(uint16* _mtu, uint16* _flush_timo, l2cap_flow_t* _flow); 32 33 net_buffer* 34 l2cap_discon_req(uint8 _ident, uint16 _dcid, uint16 _scid); 35 36 net_buffer* 37 l2cap_discon_rsp(uint8 _ident, uint16 _dcid, uint16 _scid); 38 39 net_buffer* 40 l2cap_echo_req(uint8 _ident, void* _data, size_t _size); 41 42 net_buffer* 43 l2cap_info_req(uint8 _ident, uint16 _type); 44 45 net_buffer* 46 l2cap_info_rsp(uint8 _ident, uint16 _type, uint16 _result, uint16 _mtu); 47 48 #endif 49