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