xref: /haiku/src/add-ons/kernel/network/protocols/l2cap/l2cap_command.h (revision 746cac055adc6ac3308c7bc2d29040fb95689cc9)
1 /*
2  * Copyright 2007 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 <net_buffer.h>
9 
10 #include <l2cap.h>
11 
12 
13 extern net_buffer_module_info *gBufferModule;
14 
15 static inline net_buffer*
16 l2cap_cmd_rej(uint8 _ident, uint16 _reason, uint16 _mtu, uint16 _scid, uint16 _dcid);
17 
18 static inline net_buffer*
19 l2cap_con_req(uint8 _ident, uint16 _psm, uint16 _scid);
20 
21 static inline net_buffer*
22 l2cap_con_rsp(uint8 _ident, uint16 _dcid, uint16 _scid, uint16 _result, uint16 _status);
23 
24 static inline net_buffer*
25 l2cap_cfg_req(uint8 _ident, uint16 _dcid, uint16 _flags, net_buffer* _data);
26 
27 static inline net_buffer*
28 l2cap_cfg_rsp(uint8 _ident, uint16 _scid, uint16 _flags, uint16 _result, net_buffer* _data);
29 
30 static inline net_buffer*
31 l2cap_discon_req(uint8 _ident, uint16 _dcid, uint16 _scid);
32 
33 static inline net_buffer*
34 l2cap_discon_rsp(uint8 _ident, uint16 _dcid, uint16 _scid);
35 
36 static inline net_buffer*
37 l2cap_echo_req(uint8 _ident, void* _data, size_t _size);
38 
39 static inline net_buffer*
40 l2cap_info_req(uint8 _ident, uint16 _type);
41 
42 static inline net_buffer*
43 l2cap_info_rsp(uint8 _ident, uint16 _type, uint16 _result, uint16 _mtu);
44 
45 #endif /* L2CAP_CMDS_H_ */
46 
47