2
0

pseudo_terminals.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /*
  2. * SpanDSP - a series of DSP components for telephony
  3. *
  4. * pseudo_terminals.h - pseudo terminal handling.
  5. *
  6. * Written by Steve Underwood <steveu@coppice.org>
  7. *
  8. * Copyright (C) 2012 Steve Underwood
  9. *
  10. * All rights reserved.
  11. *
  12. * This program is free software; you can redistribute it and/or modify
  13. * it under the terms of the GNU General Public License version 2, as
  14. * published by the Free Software Foundation.
  15. *
  16. * This program is distributed in the hope that it will be useful,
  17. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  18. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  19. * GNU General Public License for more details.
  20. *
  21. * You should have received a copy of the GNU General Public License
  22. * along with this program; if not, write to the Free Software
  23. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  24. */
  25. #if !defined(HAVE_POSIX_OPENPT) && !defined(HAVE_DEV_PTMX) && !defined(WIN32)
  26. #define USE_OPENPTY 1
  27. #endif
  28. struct modem_s
  29. {
  30. int slot;
  31. int master;
  32. int slave;
  33. const char *stty;
  34. char devlink[128];
  35. int block_read;
  36. int block_write;
  37. logging_state_t logging;
  38. };
  39. typedef struct modem_s modem_t;
  40. int pseudo_terminal_close(modem_t *modem);
  41. int pseudo_terminal_create(modem_t *modem);