smtstate.h 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. /******************************************************************************
  2. *
  3. * (C)Copyright 1998,1999 SysKonnect,
  4. * a business unit of Schneider & Koch & Co. Datensysteme GmbH.
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation; either version 2 of the License, or
  9. * (at your option) any later version.
  10. *
  11. * The information in this file is provided "AS IS" without warranty.
  12. *
  13. ******************************************************************************/
  14. #ifndef _SKFP_H_SMTSTATE_H_
  15. #define _SKFP_H_SMTSTATE_H_
  16. /*
  17. * SMT state definitions
  18. */
  19. #ifndef KERNEL
  20. /*
  21. * PCM states
  22. */
  23. #define PC0_OFF 0
  24. #define PC1_BREAK 1
  25. #define PC2_TRACE 2
  26. #define PC3_CONNECT 3
  27. #define PC4_NEXT 4
  28. #define PC5_SIGNAL 5
  29. #define PC6_JOIN 6
  30. #define PC7_VERIFY 7
  31. #define PC8_ACTIVE 8
  32. #define PC9_MAINT 9
  33. /*
  34. * PCM modes
  35. */
  36. #define PM_NONE 0
  37. #define PM_PEER 1
  38. #define PM_TREE 2
  39. /*
  40. * PCM type
  41. */
  42. #define TA 0
  43. #define TB 1
  44. #define TS 2
  45. #define TM 3
  46. #define TNONE 4
  47. /*
  48. * CFM states
  49. */
  50. #define SC0_ISOLATED 0 /* isolated */
  51. #define SC1_WRAP_A 5 /* wrap A */
  52. #define SC2_WRAP_B 6 /* wrap B */
  53. #define SC4_THRU_A 12 /* through A */
  54. #define SC5_THRU_B 7 /* through B (SMt 6.2) */
  55. #define SC7_WRAP_S 8 /* SAS */
  56. /*
  57. * ECM states
  58. */
  59. #define EC0_OUT 0
  60. #define EC1_IN 1
  61. #define EC2_TRACE 2
  62. #define EC3_LEAVE 3
  63. #define EC4_PATH_TEST 4
  64. #define EC5_INSERT 5
  65. #define EC6_CHECK 6
  66. #define EC7_DEINSERT 7
  67. /*
  68. * RMT states
  69. */
  70. #define RM0_ISOLATED 0
  71. #define RM1_NON_OP 1 /* not operational */
  72. #define RM2_RING_OP 2 /* ring operational */
  73. #define RM3_DETECT 3 /* detect dupl addresses */
  74. #define RM4_NON_OP_DUP 4 /* dupl. addr detected */
  75. #define RM5_RING_OP_DUP 5 /* ring oper. with dupl. addr */
  76. #define RM6_DIRECTED 6 /* sending directed beacons */
  77. #define RM7_TRACE 7 /* trace initiated */
  78. #endif
  79. struct pcm_state {
  80. unsigned char pcm_type ; /* TA TB TS TM */
  81. unsigned char pcm_state ; /* state PC[0-9]_* */
  82. unsigned char pcm_mode ; /* PM_{NONE,PEER,TREE} */
  83. unsigned char pcm_neighbor ; /* TA TB TS TM */
  84. unsigned char pcm_bsf ; /* flag bs : TRUE/FALSE */
  85. unsigned char pcm_lsf ; /* flag ls : TRUE/FALSE */
  86. unsigned char pcm_lct_fail ; /* counter lct_fail */
  87. unsigned char pcm_ls_rx ; /* rx line state */
  88. short pcm_r_val ; /* signaling bits */
  89. short pcm_t_val ; /* signaling bits */
  90. } ;
  91. struct smt_state {
  92. struct pcm_state pcm_state[NUMPHYS] ; /* port A & port B */
  93. } ;
  94. #endif