sco.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. /*
  2. *
  3. * BlueZ - Bluetooth protocol stack for Linux
  4. *
  5. * Copyright (C) 2002-2003 Maxim Krasnyansky <maxk@qualcomm.com>
  6. * Copyright (C) 2002-2010 Marcel Holtmann <marcel@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. #ifndef __SCO_H
  25. #define __SCO_H
  26. #ifdef __cplusplus
  27. extern "C" {
  28. #endif
  29. /* SCO defaults */
  30. #define SCO_DEFAULT_MTU 500
  31. #define SCO_DEFAULT_FLUSH_TO 0xFFFF
  32. #define SCO_CONN_TIMEOUT (HZ * 40)
  33. #define SCO_DISCONN_TIMEOUT (HZ * 2)
  34. #define SCO_CONN_IDLE_TIMEOUT (HZ * 60)
  35. /* SCO socket address */
  36. struct sockaddr_sco {
  37. sa_family_t sco_family;
  38. bdaddr_t sco_bdaddr;
  39. };
  40. /* set/get sockopt defines */
  41. #define SCO_OPTIONS 0x01
  42. struct sco_options {
  43. uint16_t mtu;
  44. };
  45. #define SCO_CONNINFO 0x02
  46. struct sco_conninfo {
  47. uint16_t hci_handle;
  48. uint8_t dev_class[3];
  49. };
  50. #ifdef __cplusplus
  51. }
  52. #endif
  53. #endif /* __SCO_H */