Home | History | Annotate | Download | only in bluetooth
      1 /*
      2  *
      3  *  BlueZ - Bluetooth protocol stack for Linux
      4  *
      5  *  Copyright (C) 2002-2003  Maxim Krasnyansky <maxk (at) qualcomm.com>
      6  *  Copyright (C) 2002-2010  Marcel Holtmann <marcel (at) holtmann.org>
      7  *
      8  *
      9  *  This program is free software; you can redistribute it and/or modify
     10  *  it under the terms of the GNU General Public License as published by
     11  *  the Free Software Foundation; either version 2 of the License, or
     12  *  (at your option) any later version.
     13  *
     14  *  This program is distributed in the hope that it will be useful,
     15  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
     16  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     17  *  GNU General Public License for more details.
     18  *
     19  *  You should have received a copy of the GNU General Public License
     20  *  along with this program; if not, write to the Free Software
     21  *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
     22  *
     23  */
     24 
     25 #ifndef __SCO_H
     26 #define __SCO_H
     27 
     28 #ifdef __cplusplus
     29 extern "C" {
     30 #endif
     31 
     32 /* SCO defaults */
     33 #define SCO_DEFAULT_MTU		500
     34 #define SCO_DEFAULT_FLUSH_TO	0xFFFF
     35 
     36 #define SCO_CONN_TIMEOUT	(HZ * 40)
     37 #define SCO_DISCONN_TIMEOUT	(HZ * 2)
     38 #define SCO_CONN_IDLE_TIMEOUT	(HZ * 60)
     39 
     40 /* SCO socket address */
     41 struct sockaddr_sco {
     42 	sa_family_t	sco_family;
     43 	bdaddr_t	sco_bdaddr;
     44 	/* for use with eSCO masks such as SCO_ESCO_MASK */
     45 	uint16_t	sco_pkt_type;
     46 
     47 };
     48 
     49 /* set/get sockopt defines */
     50 #define SCO_OPTIONS	0x01
     51 struct sco_options {
     52 	uint16_t	mtu;
     53 };
     54 
     55 #define SCO_CONNINFO	0x02
     56 struct sco_conninfo {
     57 	uint16_t	hci_handle;
     58 	uint8_t		dev_class[3];
     59 };
     60 
     61 #ifdef __cplusplus
     62 }
     63 #endif
     64 
     65 #endif /* __SCO_H */
     66