edss1.h 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. /*
  2. * DSS.1 module definitions
  3. *
  4. * Copyright (C) 1996 Universidade de Lisboa
  5. *
  6. * Written by Pedro Roque Marques (roque@di.fc.ul.pt)
  7. *
  8. * This software may be used and distributed according to the terms of
  9. * the GNU General Public License, incorporated herein by reference.
  10. */
  11. #ifndef EDSS1_H
  12. #define EDSS1_H
  13. /* ISDN states */
  14. #define ST_NULL 0
  15. #define ST_CALL_INIT 1 /* Call initiated */
  16. #define ST_OVER_SEND 2 /* Overlap sending - Requests More Info 4 call */
  17. #define ST_CALL_PROC 3 /* Call Proceeding */
  18. #define ST_CALL_DELV 4
  19. #define ST_CALL_PRES 6 /* Call Present - Received CONN.IND */
  20. #define ST_CALL_RECV 7 /* Alerting sent */
  21. #define ST_CONN_REQ 8 /* Answered - waiting 4 CONN.CONF */
  22. #define ST_INCM_PROC 9
  23. #define ST_ACTIVE 10
  24. #define ST_DISC_REQ 11
  25. #define ST_DISC_IND 12
  26. #define ST_SUSP_REQ 15
  27. #define ST_RESM_REQ 17
  28. #define ST_RELS_REQ 19
  29. #define ST_OVER_RECV 25
  30. #define ST_ACTIVE_SELP 26 /* Select protocol on B-Channel */
  31. #define ST_ACTIVE_ACTV 27 /* Activate B-channel protocol */
  32. #define MAX_STATE ST_ACTIVE_ACTV
  33. #define EV_NULL 0
  34. #define EV_USR_SETUP_REQ 1
  35. #define EV_USR_SETUP_RESP 2
  36. #define EV_USR_PROCED_REQ 3
  37. #define EV_USR_RELEASE_REQ 4
  38. #define EV_USR_REJECT_REQ 4
  39. #define EV_NET_SETUP 16
  40. #define EV_NET_CALL_PROC 17
  41. #define EV_NET_SETUP_ACK 18
  42. #define EV_NET_CONN 19
  43. #define EV_NET_CONN_ACK 20
  44. #define EV_NET_SELP_RESP 21
  45. #define EV_NET_ACTV_RESP 22
  46. #define EV_NET_DISC 23
  47. #define EV_NET_RELEASE 24
  48. #define EV_NET_RELEASE_COMP 25
  49. #define EV_TIMER 26
  50. #define EV_ERROR 32
  51. /*
  52. * Cause values
  53. * only the ones we use
  54. */
  55. #define CAUSE_NORMAL 0x10U
  56. #define CAUSE_NOCHAN 0x22U
  57. struct callb_data {
  58. unsigned short type;
  59. union {
  60. struct ConnInfo {
  61. char *CalledPN;
  62. char *CallingPN;
  63. } setup;
  64. unsigned short cause;
  65. } data;
  66. };
  67. struct fsm_entry {
  68. unsigned short init;
  69. unsigned short final;
  70. unsigned short event;
  71. void (*callb)(struct pcbit_dev *, struct pcbit_chan *, struct callb_data*);
  72. };
  73. struct fsm_timer_entry {
  74. unsigned short init;
  75. unsigned long timeout; /* in seconds */
  76. };
  77. extern const char * const isdn_state_table[];
  78. void pcbit_fsm_event(struct pcbit_dev *, struct pcbit_chan *,
  79. unsigned short event, struct callb_data *);
  80. char *strisdnevent(ushort ev);
  81. #endif