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 15 /* 16 * SMT state definitions 17 */ 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 /* 35 * PCM modes 36 */ 37 #define PM_NONE 0 38 #define PM_PEER 1 39 #define PM_TREE 2 40 41 /* 42 * PCM type 43 */ 44 #define TA 0 45 #define TB 1 46 #define TS 2 47 #define TM 3 48 #define TNONE 4 49 50 /* 51 * CFM states 52 */ 53 #define SC0_ISOLATED 0 /* isolated */ 54 #define SC1_WRAP_A 5 /* wrap A */ 55 #define SC2_WRAP_B 6 /* wrap B */ 56 #define SC4_THRU_A 12 /* through A */ 57 #define SC5_THRU_B 7 /* through B (SMt 6.2) */ 58 #define SC7_WRAP_S 8 /* SAS */ 59 60 /* 61 * ECM states 62 */ 63 #define EC0_OUT 0 64 #define EC1_IN 1 65 #define EC2_TRACE 2 66 #define EC3_LEAVE 3 67 #define EC4_PATH_TEST 4 68 #define EC5_INSERT 5 69 #define EC6_CHECK 6 70 #define EC7_DEINSERT 7 71 72 /* 73 * RMT states 74 */ 75 #define RM0_ISOLATED 0 76 #define RM1_NON_OP 1 /* not operational */ 77 #define RM2_RING_OP 2 /* ring operational */ 78 #define RM3_DETECT 3 /* detect dupl addresses */ 79 #define RM4_NON_OP_DUP 4 /* dupl. addr detected */ 80 #define RM5_RING_OP_DUP 5 /* ring oper. with dupl. addr */ 81 #define RM6_DIRECTED 6 /* sending directed beacons */ 82 #define RM7_TRACE 7 /* trace initiated */ 83 #endif 84 85 struct pcm_state { 86 unsigned char pcm_type ; /* TA TB TS TM */ 87 unsigned char pcm_state ; /* state PC[0-9]_* */ 88 unsigned char pcm_mode ; /* PM_{NONE,PEER,TREE} */ 89 unsigned char pcm_neighbor ; /* TA TB TS TM */ 90 unsigned char pcm_bsf ; /* flag bs : TRUE/FALSE */ 91 unsigned char pcm_lsf ; /* flag ls : TRUE/FALSE */ 92 unsigned char pcm_lct_fail ; /* counter lct_fail */ 93 unsigned char pcm_ls_rx ; /* rx line state */ 94 short pcm_r_val ; /* signaling bits */ 95 short pcm_t_val ; /* signaling bits */ 96 } ; 97 98 struct smt_state { 99 struct pcm_state pcm_state[NUMPHYS] ; /* port A & port B */ 100 } ; 101