Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-or-later */
0002 /******************************************************************************
0003  *
0004  *  (C)Copyright 1998,1999 SysKonnect,
0005  *  a business unit of Schneider & Koch & Co. Datensysteme GmbH.
0006  *
0007  *  The information in this file is provided "AS IS" without warranty.
0008  *
0009  ******************************************************************************/
0010 
0011 #ifndef _SKFP_H_SMTSTATE_H_
0012 #define _SKFP_H_SMTSTATE_H_
0013 
0014 /*
0015  *  SMT state definitions
0016  */
0017 
0018 #ifndef KERNEL
0019 /*
0020  * PCM states
0021  */
0022 #define PC0_OFF         0
0023 #define PC1_BREAK       1
0024 #define PC2_TRACE       2
0025 #define PC3_CONNECT     3
0026 #define PC4_NEXT        4
0027 #define PC5_SIGNAL      5
0028 #define PC6_JOIN        6
0029 #define PC7_VERIFY      7
0030 #define PC8_ACTIVE      8
0031 #define PC9_MAINT       9
0032 
0033 /*
0034  * PCM modes
0035  */
0036 #define PM_NONE         0
0037 #define PM_PEER         1
0038 #define PM_TREE         2
0039 
0040 /*
0041  * PCM type
0042  */
0043 #define TA          0
0044 #define TB          1
0045 #define TS          2
0046 #define TM          3
0047 #define TNONE           4
0048 
0049 /*
0050  * CFM states
0051  */
0052 #define SC0_ISOLATED    0       /* isolated */
0053 #define SC1_WRAP_A  5       /* wrap A */
0054 #define SC2_WRAP_B  6       /* wrap B */
0055 #define SC4_THRU_A  12      /* through A */
0056 #define SC5_THRU_B  7       /* through B (SMt 6.2) */
0057 #define SC7_WRAP_S  8       /* SAS */
0058 
0059 /*
0060  * ECM states
0061  */
0062 #define EC0_OUT     0
0063 #define EC1_IN      1
0064 #define EC2_TRACE   2
0065 #define EC3_LEAVE   3
0066 #define EC4_PATH_TEST   4
0067 #define EC5_INSERT  5
0068 #define EC6_CHECK   6
0069 #define EC7_DEINSERT    7
0070 
0071 /*
0072  * RMT states
0073  */
0074 #define RM0_ISOLATED    0
0075 #define RM1_NON_OP  1       /* not operational */
0076 #define RM2_RING_OP 2       /* ring operational */
0077 #define RM3_DETECT  3       /* detect dupl addresses */
0078 #define RM4_NON_OP_DUP  4       /* dupl. addr detected */
0079 #define RM5_RING_OP_DUP 5       /* ring oper. with dupl. addr */
0080 #define RM6_DIRECTED    6       /* sending directed beacons */
0081 #define RM7_TRACE   7       /* trace initiated */
0082 #endif
0083 
0084 struct pcm_state {
0085     unsigned char   pcm_type ;      /* TA TB TS TM */
0086     unsigned char   pcm_state ;     /* state PC[0-9]_* */
0087     unsigned char   pcm_mode ;      /* PM_{NONE,PEER,TREE} */
0088     unsigned char   pcm_neighbor ;      /* TA TB TS TM */
0089     unsigned char   pcm_bsf ;       /* flag bs : TRUE/FALSE */
0090     unsigned char   pcm_lsf ;       /* flag ls : TRUE/FALSE */
0091     unsigned char   pcm_lct_fail ;      /* counter lct_fail */
0092     unsigned char   pcm_ls_rx ;     /* rx line state */
0093     short       pcm_r_val ;     /* signaling bits */
0094     short       pcm_t_val ;     /* signaling bits */
0095 } ;
0096 
0097 struct smt_state {
0098     struct pcm_state pcm_state[NUMPHYS] ;   /* port A & port B */
0099 } ;
0100 
0101 #endif
0102