openbcm

Git mirror of https://github.com/Broadcom-Network-Switching-Software/OpenBCM
git clone git://git.finwo.net/mirror/broadcom/openbcm
Log | Files | Refs | README

ui_pure_defi.h (71249B)


      1 /* 
      2  * This license is set out in https://raw.githubusercontent.com/Broadcom-Network-Switching-Software/OpenBCM/master/Legal/LICENSE file.
      3  * 
      4  * Copyright 2007-2020 Broadcom Inc. All rights reserved.
      5 */
      6 #ifndef UI_PURE_DEFI_INCLUDED
      7 /* { */
      8 #define UI_PURE_DEFI_INCLUDED
      9 
     10 
     11 #include <appl/diag/dpp/ui_defx.h>
     12 #include <appl/dpp/UserInterface/ui_pure_defi_fmf.h>
     13 #include <appl/dpp/UserInterface/ui_consts.h>
     14 #include <appl/diag/dpp/utils_memory.h>
     15 
     16 
     17 typedef struct
     18 {
     19     /*
     20      * Type of value loaded in 'in_val_chars' (numeric or symbolic):
     21      * VAL_NUMERIC, VAL_SYMBOL, VAL_TEXT, VAL_IP, VAL_NONE
     22      * 'VAL_NONE' indicates no value has been entered
     23      * for this entry.
     24      */
     25   int val_type ;
     26     /*
     27      * Numeric value related to string_value. Only relevant
     28      * for val_type = VAL_SYMBOL
     29      */
     30   int numeric_equivalent ;
     31   union
     32   {
     33     unsigned long  ulong_value ;
     34     const char     *string_value ;
     35     char           val_text[MAX_SIZE_OF_TEXT_VAR] ;
     36     unsigned long  ip_value ;
     37   } value ;
     38 } PARAM_VAL ;
     39 /*
     40  * Container for a value typed in by the user. These ASCII
     41  * characetrs may constitute a numeric value (hex or integer)
     42  * or a string (symbolic name).
     43  */
     44 typedef struct
     45 {
     46     /*
     47      * Identifier of the parameter for which this value was entered.
     48      */
     49   const char *par_name ;
     50     /*
     51      * Index, of the parameter for which this value was entered,
     52      * in the array 'allowed_params' of the corresponding
     53      * subject.
     54      */
     55   unsigned int param_match_index ;
     56     /*
     57      * Input representing numeric value (hex or integer) or
     58      * symbolic name (which must be null terminated!).
     59      * Only loaded after full field has been typed in and
     60      * accepted.
     61      * Also contains type of value loaded in 'in_val_chars'
     62      * (numeric or symbolic):
     63      * VAL_NUMERIC, VAL_SYMBOL, VAL_TEXT, VAL_IP, VAL_NONE
     64      * 'VAL_NONE' indicates no value has been entered
     65      * for this entry.
     66      */
     67   PARAM_VAL param_value ;
     68     /*
     69      * Index, of the value specified in 'param_value',
     70      * in the array 'allowed_vals' of the corresponding
     71      * parameter.
     72      */
     73   unsigned int val_match_index ;
     74     /*
     75      * Index of value for specified 'par_name'. This takes care
     76      * of the case where there may be more than one value following
     77      * one parameter name. Counting starts at '0'.
     78      */
     79   unsigned int in_val_index ;
     80 } PARAM_VAL_PAIR ;
     81 typedef struct
     82 {
     83     /*
     84      * Numeric value related to this symbolic value.
     85      */
     86   int numeric_equivalent ;
     87     /*
     88      * Description of this parameter, in plain text (for 'help'
     89      * purposes).
     90      */
     91   char *plain_text_help ;
     92     /*
     93      * Pointer to a function to call after the symbol value
     94      * has been accepted.
     95      */
     96   VAL_PROC_PTR val_checker ;
     97 } VAL_SYMB_DESCRIPTOR ;
     98 typedef struct
     99 {
    100     /*
    101      * Maximal number of characters.
    102      */
    103   unsigned int max_num_chars ;
    104     /*
    105      * Description of this parameter, in plain text (for 'help'
    106      * purposes).
    107      */
    108   char *plain_text_help ;
    109 } VAL_TEXT_DESCRIPTOR ;
    110 typedef struct
    111 {
    112     /*
    113      * Currently nothing.
    114      */
    115   int TBD_CURRENTLY_NOTHING;
    116 } VAL_IP_DESCRIPTOR ;
    117 
    118 /*
    119  *  Flag for the use of SOC_SAND_FAP20V ATM in UI
    120  */
    121 /*
    122  *  Flag for the end of ChipSim in SOC_SAND_FAP20V
    123  */
    124 
    125 
    126 /*
    127  * Bits and fields related to 'val_numeric_attributes'
    128  * element.
    129  */
    130 /*
    131  * If 'true' then 'val_max' is meaningful.
    132  */
    133 #define HAS_MIN_VALUE      BIT(0)
    134 #define HAS_NO_MIN_VALUE   0
    135 /*
    136  * If 'true' then 'val_min' is meaningful.
    137  */
    138 #define HAS_MAX_VALUE      BIT(1)
    139 #define HAS_NO_MAX_VALUE   0
    140 /*
    141  * If 'true' then 'val_checker' is meaningful (i.e., A validation
    142  * routine should be called for this param value.
    143  */
    144 /*
    145  * If 'true' then value must be positive.
    146  */
    147 #define POSITIVE_VALUE  BIT(3)
    148 /*
    149  * If 'true' then value must be negative.
    150  */
    151 #define NEGATIVE_VALUE  BIT(4)
    152 typedef struct
    153 {
    154     /*
    155      * Attribute bits and fields. See list above.
    156      */
    157   unsigned long val_numeric_attributes ;
    158     /*
    159      * Maximal allowed value.
    160      */
    161   long val_max ;
    162     /*
    163      * Minimal allowed value.
    164      */
    165   long val_min ;
    166     /*
    167      * Number of times this value may be repeated (i.e.,
    168      * value is an array). Must be at least 1!
    169      */
    170   unsigned long max_num_repeated ;
    171     /*
    172      * Pointer to a function to call after every digit
    173      * is received and after the full numeric value
    174      * has been accepted.
    175      */
    176   VAL_PROC_PTR val_checker ;
    177 } VAL_NUM_DESCRIPTOR ;
    178 typedef union
    179 {
    180   VAL_NUM_DESCRIPTOR  val_num_descriptor ;
    181   VAL_SYMB_DESCRIPTOR val_symb_descriptor ;
    182   VAL_TEXT_DESCRIPTOR val_text_descriptor ;
    183   VAL_IP_DESCRIPTOR   val_ip_descriptor ;
    184 } VAL_DESCRIPTOR ;
    185 /*
    186  * Values for 'val_type' element in PARAM_VAL_RULES
    187  */
    188 #define VAL_END_OF_LIST    0
    189 #define VAL_NONE           VAL_END_OF_LIST
    190 #define VAL_NUMERIC        BIT(1)
    191 #define VAL_SYMBOL         BIT(2)
    192 #define VAL_TEXT           BIT(3)
    193 #define VAL_IP             BIT(4)
    194 #define VAL_TYPES_MASK     (VAL_NUMERIC | VAL_SYMBOL | VAL_TEXT | VAL_IP)
    195 #define LAST_VAL_ON_LINE   BIT(16)
    196 #define VAL_INDEX_ALL      BIT(17)
    197 #define VAL_SYMBOL_LAST    (VAL_SYMBOL | LAST_VAL_ON_LINE)
    198 #define VAL_TEXT_QUOTATION (BIT(18) | VAL_TEXT)
    199 /*
    200  * Symbolic name assigned to numeric values
    201  * on an array of PARAM_VAL_RULES describing
    202  * allowed values per parameter.
    203  */
    204 #define SYMB_NAME_NUMERIC SPECIAL_DOLLAR_STRING"numeric"
    205 /*
    206  * Symbolic name assigned to free text values
    207  * on an array of PARAM_VAL_RULES describing
    208  * allowed values per parameter.
    209  */
    210 #define SYMB_NAME_TEXT    SPECIAL_DOLLAR_STRING"text"
    211 /*
    212  * Symbolic name assigned to IP address values
    213  * on an array of PARAM_VAL_RULES describing
    214  * allowed values per parameter.
    215  */
    216 #define SYMB_NAME_IP      SPECIAL_DOLLAR_STRING"ipaddr"
    217 typedef struct
    218 {
    219     /*
    220      * Indicator on what type of param value it is.
    221      */
    222   int val_type ;
    223     /*
    224      * ASCII presentation of the symbolic value.
    225      * Note: Must be small letters only!
    226      * For numeric variables:
    227      * This is a dummey variable. Enables searching
    228      * array of 'PARAM_VAL_RULES' for name (string)
    229      * matching without special case for numeric
    230      * variable.
    231      */
    232   const char *symb_val ;
    233   VAL_DESCRIPTOR val_descriptor ;
    234 } PARAM_VAL_RULES ;
    235 /*
    236  * List of identifiers for parameters:
    237  */
    238 #define PARAM_END_OF_LIST              0
    239 #define PARAM_MEM_READ_ID              1
    240 #define PARAM_MEM_WRITE_ID             2
    241 #define PARAM_HIST_LEN_ID              3
    242 #define PARAM_MEM_DISP_ID              4
    243 #define PARAM_MEM_FORMAT_ID            5
    244 #define PARAM_AB_ID                    6
    245 #define PARAM_ABB_ID                   7
    246 #define PARAM_AA_ID                    8
    247 #define PARAM_BB_ID                    9
    248 #define PARAM_HIST_GET_ID             10
    249 #define PARAM_MEM_TYPE_ID                 11
    250 #define PARAM_MEM_DATA_ID                 12
    251 #define PARAM_MEM_MUL_DATA_ID             13
    252 #define PARAM_MEM_LEN_ID                  14
    253 #define PARAM_MEM_OFFSET_ID               15
    254 #define PARAM_MEM_REPEAT_ID               16
    255 #define PARAM_MEM_OVERRIDE_ID             17
    256 #define PARAM_NVRAM_SHOW_ID               18
    257 #define PARAM_NVRAM_BLOCK_ID              19
    258 #define PARAM_NVRAM_UPDATE_ID             20
    259 #define PARAM_NVRAM_DATA_CACHE_ID         22
    260 #define PARAM_NVRAM_INST_CACHE_ID         23
    261 #define PARAM_NVRAM_AUTO_FLASH_ID         24
    262 #define PARAM_NVRAM_L_DEFAULTS_ID         25
    263 #define PARAM_NVRAM_LOAD_METHOD_ID        26
    264 #define PARAM_NVRAM_KERNEL_STARTUP_ID     27
    265 #define PARAM_NVRAM_APP_SOURCE_ID         28
    266 #define PARAM_NVRAM_TEST_AT_STARTUP_ID    29
    267 #define PARAM_NVRAM_ETH_ADDRESS_ID        30
    268 #define PARAM_NVRAM_CONSOLE_BAUD_ID       31
    269 #define PARAM_NVRAM_DLD_FILE_NAME_ID             32
    270 #define PARAM_NVRAM_LOC_IP_ADDR_ID               33
    271 #define PARAM_NVRAM_GATEWAY_ADDR_ID              34
    272 #define PARAM_NVRAM_DLD_HOST_ADDR_ID             35
    273 #define PARAM_NVRAM_LOC_IP_MASK_ID               36
    274 #define PARAM_VXSHELL_REBOOT_ID                  37
    275 #define PARAM_VXSHELL_ROUTE_SHOW_ID              38
    276 #define PARAM_VXSHELL_DEVS_ID                    39
    277 #define PARAM_VXSHELL_LOGOUT_ID                  40
    278 #define PARAM_VXSHELL_I_ID                       41
    279 #define PARAM_GENERAL_SHOW_ID                    42
    280 #define PARAM_GENERAL_TEMPERATURE_ID             43
    281 #define PARAM_GENERAL_FLASH_ID                   44
    282 #define PARAM_GENERAL_ERASE_ID                   45
    283 #define PARAM_GENERAL_APP_FILE_ID                46
    284 #define PARAM_GENERAL_TIME_FROM_STARTUP_ID       47
    285 #define PARAM_GENERAL_RUNTIME_LOG_ID             48
    286 #define PARAM_GENERAL_CLEAR_ID                   49
    287 #define PARAM_GENERAL_DISPLAY_ID                 50
    288 #define PARAM_VXSHELL_IOSFDSHOW_ID               51
    289 #define PARAM_NVRAM_BOARD_SERIAL_NUM_ID          52
    290 #define PARAM_NVRAM_BOARD_HW_VERSION_ID          53
    291 #define PARAM_NVRAM_BOARD_TYPE_ID                54
    292 #define PARAM_NVRAM_BOARD_DESCRIPTION_ID         55
    293 #define PARAM_NVRAM_LINE_MODE_ID                 56
    294 #define PARAM_NVRAM_PAGE_MODE_ID                 57
    295 #define PARAM_NVRAM_PAGE_LINES_ID                58
    296 #define PARAM_NVRAM_CONF_FROM_MD_ID              59
    297 #define PARAM_NVRAM_FE_CONFIGURATION_ID          60
    298 #define PARAM_NVRAM_STARTUP_COUNTER_ID           106
    299 #define PARAM_NVRAM_ACTIVATE_WATCHDOG_ID         107
    300 #define PARAM_NVRAM_WATCHDOG_PERIOD_ID           108
    301 #define PARAM_GENERAL_WATCHDOG_ID                109
    302 #define PARAM_GENERAL_EXERCISES_ID               111
    303 #define PARAM_NVRAM_TELNET_TIMEOUT_STD_ID        112
    304 #define PARAM_NVRAM_TELNET_TIMEOUT_CONT_ID       113
    305 #define PARAM_NVRAM_EVENT_DISPLAY_LVL_ID         114
    306 #define PARAM_NVRAM_EVENT_NVRAM_LVL_ID           115
    307 #define PARAM_NVRAM_ACTIVATE_DPSS_ID             116
    308 #define PARAM_NVRAM_BASE_REGISTER_04_ID          117
    309 #define PARAM_NVRAM_BASE_REGISTER_05_ID          118
    310 #define PARAM_NVRAM_OPTION_REGISTER_04_ID        119
    311 #define PARAM_NVRAM_OPTION_REGISTER_05_ID        120
    312 #define PARAM_SNMP_LOAD_CONFIG_FILE_ID           121
    313 #define PARAM_SNMP_DISP_FILE_ID                  122
    314 #define PARAM_SNMP_DIR_ID                        123
    315 #define PARAM_SNMP_SET_CMD_LINE_ID               124
    316 #define PARAM_SNMP_DOWNLOAD_MIBS_ID              125
    317 #define PARAM_SNMP_INCLUDE_NETSNMP_ID            126
    318 #define PARAM_SNMP_SHUTDOWN_AGENT_ID             127
    319 #define PARAM_MEM_XOR_ID                         128
    320 #define PARAM_MEM_AND_ID                         129
    321 #define PARAM_MEM_OR_ID                          130
    322 #define PARAM_VXSHELL_PING_ID                    131
    323 #define PARAM_VXSHELL_HOST_IP_ID                 132
    324 #define PARAM_VXSHELL_PING_NOF_PKTS_ID           133
    325 #define PARAM_VXSHELL_PING_OPT_NOHOST_ID         134
    326 #define PARAM_VXSHELL_PING_OPT_DONTROUTE_ID      135
    327 #define PARAM_VXSHELL_PING_OPT_SILENT_ID         136
    328 #define PARAM_VXSHELL_PING_OPT_DEBUG_ID          137
    329 #define PARAM_GENERAL_DOWNLOAD_ID                138
    330 #define PARAM_GENERAL_DOWNLOAD_APP_ID            139
    331 #define PARAM_GENERAL_DOWNLOAD_HOST_IP_ID        140
    332 #define PARAM_GENERAL_DOWNLOAD_BOOT_ID           141
    333 #define PARAM_GENERAL_FLASH_SHOW_ID              142
    334 #define PARAM_SIM_START_ID                       143
    335 #define PARAM_SIM_END_ID                         144
    336 #define PARAM_SIM_INDIRECT_DELAY_ID              146
    337 #define PARAM_SIM_PRINT_CLEAR_LOG_ID             147
    338 #define PARAM_SIM_SET_SPY_LOW_MEM_LOG_ID         148
    339 #define PARAM_SIM_CELL_TX_DELAY_ID               149
    340 #define PARAM_SIM_CELL_RX_CNT_ID                 150
    341 #define PARAM_SIM_TASK_SLEEP_TIME_ID             151
    342 #define PARAM_SIM_TASK_WAKE_UP_ID                152
    343 #define PARAM_SIM_CNTR_ENABLE_ID                 153
    344 #define PARAM_SIM_INT_ENABLE_ID                  154
    345 #define PARAM_SIM_TIME_MONITOR_PRINT_ID          155
    346 #define PARAM_SIM_INTERRUPT_ASSERT_ID            156
    347 #define PARAM_SIM_INTERRUPT_CNT_ID               157
    348 #define PARAM_SIM_INT_MASK_ALL_ID                158
    349 #define PARAM_GENERAL_PERIODIC_SUSPEND_TEST_ID   159
    350 #define PARAM_NVRAM_IP_SOURCE_MODE_ID            160
    351 #define PARAM_MEM_SILENT_ID                      161
    352 #define PARAM_NVRAM_TCP_TIMEOUT_ID               166
    353 #define PARAM_NVRAM_TCP_RETRIES_ID               170
    354 #define PARAM_NVRAM_HOST_BOARD_TYPE_ID           171
    355 #define PARAM_NVRAM_HOST_BOARD_CAT_NUM_ID        172
    356 #define PARAM_NVRAM_HOST_BOARD_DESC_ID           173
    357 #define PARAM_NVRAM_HOST_BOARD_VER_ID            174
    358 #define PARAM_NVRAM_HOST_BOARD_SN_ID             175
    359 #define PARAM_NVRAM_BOARD_PARAMS_ID              176
    360 #define PARAM_VXSHELL_IF_SHOW_ID                 177
    361 #define PARAM_VXSHELL_I_NET_STAT_SHOW_ID         178
    362 #define PARAM_VXSHELL_ARP_SHOW_ID                179
    363 #define PARAM_VXSHELL_ICMP_STAT_SHOW_ID          180
    364 #define PARAM_VXSHELL_MEM_SHOW_ID                181
    365 #define PARAM_VXSHELL_SHOW_FREE_LIST_ID          182
    366 #define PARAM_VXSHELL_PRINT_ERRNO_ID             183
    367 #define PARAM_VXSHELL_CHECK_STACK_SHOW_ID        184
    368 #define PARAM_MEM_VAL_READ_ID                    185
    369 #define PARAM_MEM_VAL_VAL_ID                     186
    370 #define PARAM_MEM_VAL_MASK_ID                    187
    371 #define PARAM_MEM_VAL_TIMEOUT_ID                 188
    372 #define PARAM_MEM_VAL_OPERATION_ID               189
    373 #define PARAM_MEM_COUNTERS_ID                    190
    374 #define PARAM_MEM_COUNTERS_GET_ID                191
    375 #define PARAM_MEM_COUNTERS_CLEAR_ID              192
    376 #define PARAM_MEM_BUFF_OFFSET_ID                 193
    377 #define PARAM_GENERAL_CLI_ERROR_COUNTER_ID       194
    378 #define PARAM_GENERAL_CLI_ID                     195
    379 #define PARAM_GENERAL_CLI_DOWNLOAD_ID            196
    380 #define PARAM_GENERAL_CLI_FILENAME_ID            197
    381 #define PARAM_GENERAL_CLI_DIR_ID                 198
    382 #define PARAM_GENERAL_CLI_ERASE_ID               199
    383 #define PARAM_GENERAL_CLI_DISPLAY_ID             200
    384 #define PARAM_GENERAL_CLI_RUN_ID                 201
    385 #define PARAM_GENERAL_CLI_EXEC_TIME_ID           202
    386 #define PARAM_MEM_MUL_WRITE_ID                   203
    387 #define PARAM_NVRAM_DPSS_DISPLAY_LEVEL_ID        204
    388 #define PARAM_NVRAM_DPSS_DEBUG_LEVEL_ID          205
    389 #define PARAM_GENERAL_CLI_DOWNLOAD_HOST_IP_ID   206
    390 
    391 #define PARAM_NVRAM_RUN_UI_STARTUP_SCRIPT_ID         207
    392 #define PARAM_NVRAM_DPSS_LOAD_FROM_FLASH_NOT_TFTP_ID 208
    393 #define PARAM_NVRAM_STARTUP_DEMO_MODE_ID             209
    394 #define PARAM_GENERAL_VERSIONS_ID                    210
    395 #define PARAM_GENERAL_TRACE_ID                       211
    396 #define PARAM_GENERAL_TRACE_DISPLAY_ID               212
    397 #define PARAM_GENERAL_TRACE_DISPLAY_N_CLEAR_ID       213
    398 #define PARAM_GENERAL_REMARK_ID                      214
    399 #define PARAM_VXSHELL_REBOOT_SOFT_ID                 215
    400 #define PARAM_MEM_NUM_OF_TIMES_ID                    216
    401 #define PARAM_MEM_PAUSE_AFTER_READ_ID                217
    402 #define PARAM_MEM_REMOTE_OPERATION_ID                218
    403 #define PARAM_NVRAM_FAP10M_RUN_MODE_ID               219
    404 #define PARAM_GENERAL_HOST_BOARD_SN_ID               220
    405 #define PARAM_NVRAM_HOST_BOARD_FAP_PP_IF_CLK_ID      221
    406 #define PARAM_NVRAM_EEPROM_FRONT_CARD_TYPE_ID        222
    407 #define PARAM_NVRAM_HOST_BOARD_FAP_USE_EEPROM_VALS_ID 223
    408 #define PARAM_GENERAL_DEMO_ID                        224
    409 #define PARAM_GENERAL_DEMO_DISPLAY_NETWORK_ID        225
    410 #define PARAM_GENERAL_DEMO_SHOW_FE_LINK_ID           226
    411 #define PARAM_GENERAL_DEMO_CRATE_TYPE_ID             227
    412 #define PARAM_GENERAL_DEMO_LINE_CARD_SLOT_ID         228
    413 #define PARAM_GENERAL_DEMO_FABRIC_CARD_SLOT_ID       229
    414 #define PARAM_GENERAL_DEMO_FAP_LINK_ID               230
    415 #define PARAM_MEM_ADDRESS_IN_LONGS_ID                231
    416 #define PARAM_GENERAL_AUX_INPUT_ID                   232
    417 #define PARAM_GENERAL_PRINT_STATUS_ID                233
    418 #define PARAM_GENERAL_AUX_INPUT_RESTART_ID           234
    419 #define PARAM_GENERAL_FREE_UI_BITS_ID                235
    420 #define PARAM_GENERAL_FPGA_INDIRECT_ID               236
    421 #define PARAM_GENERAL_FPGA_IND_READ_ID               237
    422 #define PARAM_GENERAL_FPGA_IND_WRITE_ID              238
    423 #define PARAM_GENERAL_FPGA_IND_SUB_BLOCK_READ_ID     239
    424 #define PARAM_GENERAL_FPGA_IND_SUB_BLOCK_WRITE_ID    240
    425 #define PARAM_GENERAL_FPGA_IND_FROM_ELEMENT_ID       241
    426 #define PARAM_GENERAL_FPGA_IND_TO_ELEMENT_ID         242
    427 #define PARAM_GENERAL_FPGA_IND_ELEMENT_NUMBER_ID     243
    428 #define PARAM_GENERAL_FPGA_IND_WRITE_DATA_ID         244
    429 #define PARAM_GENERAL_FPGA_IND_AUTO_CLEAR_ID         245
    430 
    431 #define PARAM_GENERAL_FPGA_RATE_ID                   246
    432 #define PARAM_GENERAL_FPGA_RATE_START_ID             247
    433 #define PARAM_GENERAL_FPGA_RATE_STOP_ID              248
    434 #define PARAM_GENERAL_FPGA_RATE_CONTINUOUS_ID        249
    435 #define PARAM_GENERAL_FPGA_RATE_COLLECTION_RATE_ID   250
    436 #define PARAM_GENERAL_FPGA_RATE_REPORT_RATE_ID       251
    437 #define PARAM_GENERAL_FPGA_RATE_HOST_IP_ID           252
    438 #define PARAM_GENERAL_FPGA_RATE_GET_CURRENT_ID       253
    439 
    440 #define PARAM_GENERAL_DCL_ID                         254
    441 #define PARAM_GENERAL_HOST_FILE_ID                   255
    442 #define PARAM_GENERAL_HOST_FILE_SET_ID               256
    443 #define PARAM_GENERAL_HOST_FILE_DELETE_ID            257
    444 #define PARAM_GENERAL_HOST_FILE_HOST_IP_ID           258
    445 #define PARAM_GENERAL_HOST_FILE_DEST_HOST_ID         259
    446 #define PARAM_GENERAL_HOST_FILE_FIRST_FILE_ID        260
    447 #define PARAM_GENERAL_HOST_FILE_LAST_FILE_ID         261
    448 
    449 #define PARAM_GENERAL_MULTI_MEM_ID                   262
    450 #define PARAM_GENERAL_MULTI_MEM_READ_ID              263
    451 #define PARAM_GENERAL_MULTI_MEM_WRITE_ID             264
    452 #define PARAM_GENERAL_MULTI_MEM_ADDRESS_ID           265
    453 #define PARAM_GENERAL_MULTI_MEM_FORMAT_ID            266
    454 #define PARAM_GENERAL_MULTI_MEM_REPEAT_ID            267
    455 #define PARAM_GENERAL_MULTI_MEM_DATA_ID              268
    456 
    457 #define PARAM_NVRAM_FRONT_BOARD_TYPE_ID              270
    458 #define PARAM_NVRAM_FRONT_BOARD_CAT_NUM_ID           271
    459 #define PARAM_NVRAM_FRONT_BOARD_DESC_ID              272
    460 #define PARAM_NVRAM_FRONT_BOARD_VER_ID               273
    461 #define PARAM_NVRAM_FRONT_BOARD_SN_ID                274
    462 
    463 #define PARAM_NVRAM_HOST_DB_BOARD_TYPE_ID            275
    464 #define PARAM_NVRAM_HOST_DB_BOARD_CAT_NUM_ID         276
    465 #define PARAM_NVRAM_HOST_DB_BOARD_DESC_ID            277
    466 #define PARAM_NVRAM_HOST_DB_BOARD_VER_ID             278
    467 #define PARAM_NVRAM_HOST_DB_BOARD_SN_ID              279
    468 
    469 #define PARAM_NVRAM_EVENT_SYSLOG_LVL_ID              280
    470 #define PARAM_NVRAM_HOOK_SOFTWARE_EXCEPTION_EXC_ID   290
    471 #define PARAM_NVRAM_BCKG_TEMPERATURES_EN_ID          291
    472 #define PARAM_NVRAM_USR_APP_FLAVOR_ID                292
    473 #define PARAM_GENERAL_GET_BOARD_INFO                 293
    474 
    475 #define PARAM_NVRAM_CLK_MIRROR_DATA_ID              304
    476 #define PARAM_GENERAL_GENERIC_TEST_ID               305
    477 #define PARAM_GENERAL_GENERIC_PARAM_0_ID            294
    478 #define PARAM_GENERAL_GENERIC_PARAM_1_ID            295
    479 #define PARAM_GENERAL_GENERIC_PARAM_2_ID            296
    480 #define PARAM_GENERAL_GENERIC_PARAM_3_ID            297
    481 #define PARAM_GENERAL_GENERIC_PARAM_4_ID            298
    482 #define PARAM_GENERAL_GENERIC_PARAM_5_ID            299
    483 #define PARAM_GENERAL_GENERIC_PARAM_6_ID            300
    484 #define PARAM_GENERAL_GENERIC_PARAM_7_ID            301
    485 #define PARAM_GENERAL_GENERIC_PARAM_8_ID            302
    486 #define PARAM_GENERAL_GENERIC_PARAM_9_ID            303
    487 
    488 
    489 #define PARAM_NVRAM_EEPROM_HOST_DB_CARD_TYPE_ID       311
    490 #define PARAM_GENERAL_PETRA_TEST_CHIP_PROGRAM_LOAD_ID 312
    491 #define PARAM_GENERAL_CHIP_ID_ID                      313
    492 #define PARAM_GENERAL_DSDA_INIT                       314
    493 
    494 
    495 #define PARAM_FE200_START_RANGE_ID                   320
    496 #define PARAM_FE200_END_RANGE_ID                     599
    497 
    498 #define PARAM_PSS_START_RANGE_ID                      600
    499 #define PARAM_PSS_END_RANGE_ID                        799
    500 
    501 #define PARAM_FAP10M_START_RANGE_ID                  800
    502 #define PARAM_FAP10M_END_RANGE_ID                    1399
    503 
    504 #define PARAM_LINE_CARD_START_RANGE_ID               1400
    505 #define PARAM_LINE_CARD_END_RANGE_ID                 1799
    506 
    507 #define PARAM_DEMO_START_RANGE_ID                    1800
    508 #define PARAM_DEMO_END_RANGE_ID                      2099
    509 
    510 #define PARAM_SWEEP_APP_START_RANGE_ID                2100
    511 #define PARAM_SWEEP_APP_END_RANGE_ID                  2299
    512 
    513 #define PARAM_FAP20V_START_RANGE_ID                   2300
    514 #define PARAM_FAP20V_END_RANGE_ID                     4000
    515 
    516 #define PARAM_LINE_TGS_START_RANGE_ID                 4100
    517 #define PARAM_LINE_TGS_END_RANGE_ID                   4500
    518 
    519 #define PARAM_FMF_START_RANGE_ID                      4600
    520 #define PARAM_FMF_END_RANGE_ID                        4800
    521 
    522 #define PARAM_SKT_START_RANGE_ID                      5001
    523 #define PARAM_SKT_END_RANGE_ID                        5099
    524 
    525 #define PARAM_CSYS_START_RANGE_ID                     5100
    526 #define PARAM_CSYS_END_RANGE_ID                       7000
    527 
    528 #define PARAM_LINE_GFA_START_RANGE_ID                 7100
    529 #define PARAM_LINE_GFA_END_RANGE_ID                   7300
    530 
    531 #define PARAM_DHRP_API_START_RANGE_ID                 8000
    532 #define PARAM_DHRP_API_END_RANGE_ID                   8099
    533 
    534 #define PARAM_VXSHELL_TASK_ID                        8310
    535 #define PARAM_VXSHELL_TASK_OPT_DELETE_ID             8311
    536 #define PARAM_VXSHELL_TASK_OPT_RESTART_ID            8312
    537 #define PARAM_VXSHELL_TASK_OPT_RESUME_ID             8313
    538 #define PARAM_VXSHELL_TASK_OPT_SUSPEND_ID            8314
    539 
    540 #define PARAM_SAND_TRACE_PRINT_ID                    8720
    541 #define PARAM_SAND_TRACE_CLEAR_ID                    8721
    542 #define PARAM_SAND_TCM_PRINT_DELTA_LIST_ID           8722
    543 #define PARAM_SAND_OS_RESOURCE_PRINT_ID              8723
    544 #define PARAM_SAND_STATUS_ID                         8725
    545 #define PARAM_SAND_TRANSLATE_ID                      8726
    546 #define PARAM_SAND_TRANSLATE_TO_PROC_ID_ID           8727
    547 #define PARAM_SAND_TCM_ID                            8728
    548 #define PARAM_SAND_DEVICE_TYPE_ID                    8729
    549 #define PARAM_SAND_PRINT_WHEN_WRITING_ID             8730
    550 #define PARAM_SAND_PRINT_WHEN_WRITING_EN_ID          8731
    551 #define PARAM_SAND_PRINT_WHEN_WRITING_DIS_ID         8732
    552 #define PARAM_SAND_PRINT_WHEN_WRITING_IND_ID         8733
    553 #define PARAM_SAND_PRINT_WHEN_WRITING_ASIC_STYLE_ID  8735
    554 
    555 #define PARAM_SAND_CALL_SYSTEM_ID                    8740
    556 
    557 #define PARAM_GENERAL_REGRESSION_TEST_ID             9000
    558 #define PARAM_GENERAL_REGRESSION_ALL_ID              9001
    559 #define PARAM_GENERAL_REGRESSION_AUTOLEARN_ID        9002
    560 #define PARAM_GENERAL_REGRESSION_SHORT_ID            9003
    561 #define PARAM_GENERAL_REGRESSION_FULL_ID             9004
    562 
    563 #define PARAM_GENERAL_STOP_NETWORK_LEARNING          9007
    564 
    565 #define PARAM_GENERAL_FLASH_DFFS_ID                  9010
    566 #define PARAM_GENERAL_FLASH_DFFS_DIR_ID              9011
    567 #define PARAM_GENERAL_FLASH_DFFS_DLD_ID              9012
    568 #define PARAM_GENERAL_FLASH_DFFS_DEL_ID              9013
    569 #define PARAM_GENERAL_FLASH_DFFS_PRINT_ID            9014
    570 #define PARAM_GENERAL_FLASH_DFFS_ADD_COMMENT_ID      9015
    571 #define PARAM_GENERAL_FLASH_DFFS_SHOW_COMMENT_ID     9016
    572 #define PARAM_GENERAL_FLASH_DFFS_COMMENT_ID          9017
    573 #define PARAM_GENERAL_FLASH_DFFS_ADD_ATTR_ID         9018
    574 #define PARAM_GENERAL_FLASH_DFFS_DATE_ID             9019
    575 #define PARAM_GENERAL_FLASH_DFFS_VER_ID              9020
    576 #define PARAM_GENERAL_FLASH_DFFS_ATTR1_ID            9021
    577 #define PARAM_GENERAL_FLASH_DFFS_ATTR2_ID            9022
    578 #define PARAM_GENERAL_FLASH_DFFS_ATTR3_ID            9023
    579 #define PARAM_GENERAL_FLASH_DFFS_NAME_ID             9024
    580 #define PARAM_GENERAL_FLASH_DFFS_PRINT_SIZE_ID       9025
    581 #define PARAM_GENERAL_FLASH_DFFS_DIR_FORMAT_ID       9026
    582 #define PARAM_GENERAL_FLASH_DFFS_DIAGNOSTICS_ID      9027
    583 
    584 #define PARAM_LINE_TEVB_START_RANGE_ID               9100
    585 #define PARAM_LINE_TEVB_END_RANGE_ID                 9199
    586 #define PARAM_DHRP_START_RANGE_ID                    9200
    587 #define PARAM_DHRP_END_RANGE_ID                      9399
    588 #define PARAM_DIAG_START_RANGE_ID                    9400
    589 #define PARAM_DIAG_END_RANGE_ID                      9499
    590 
    591 #define PARAM_ACCESS_TIMNA_START_RANGE_ID            9700
    592 #define PARAM_ACCESS_TIMNA_END_RANGE_ID              9999
    593 
    594 #define PARAM_TIMNA_API_START_RANGE_ID               10000
    595 #define PARAM_TIMNA_API_END_RANGE_ID                 11999
    596 
    597 #define PARAM_FAP21V_API_START_RANGE_ID              12000
    598 #define PARAM_FAP21V_API_END_RANGE_ID                13999
    599 
    600 #define PARAM_PETRA_PP_API_START_RANGE_ID            14000
    601 #define PARAM_PETRA_PP_API_END_RANGE_ID              15999
    602 
    603 #define PARAM_FAP21V_ACC_START_RANGE_ID              16000
    604 #define PARAM_FAP21V_ACC_END_RANGE_ID                17899
    605 
    606 #define PARAM_FE600_BSP_START_RANGE_ID               17900
    607 #define PARAM_FE600_BSP_END_RANGE_ID                 17950
    608 
    609 #define PARAM_FAP21V_GFA_START_RANGE_ID              18000
    610 
    611 #define PARAM_FAP21V_APP_START_RANGE_ID              19000
    612 
    613 #define PARAM_SWEEPT20_API_START_RANGE_ID            20000
    614 #define PARAM_SWEEPT20_API_END_RANGE_ID              21999
    615 
    616 #define PARAM_PETRA_API_START_RANGE_ID               22000
    617 #define PARAM_PETRA_API_END_RANGE_ID                 23999
    618 
    619 #define PARAM_PTG_START_RANGE_ID                     24000
    620 
    621 #define PARAM_PETRA_PP_ACC_START_RANGE_ID            25000
    622 
    623 #define PARAM_PETRA_ACC_START_RANGE_ID               26000
    624 #define PARAM_PETRA_ACC_END_RANGE_ID                 27999
    625 
    626 #define PARAM_PETRA_PP_SWP_START_RANGE_ID            28000
    627 #define PARAM_PETRA_PP_SWP_END_RANGE_ID              28999
    628 
    629 #define PARAM_PETRA_GFA_START_RANGE_ID               29000
    630 
    631 #define PARAM_FE600_API_START_RANGE_ID               30000
    632 #define PARAM_FE600_API_END_RANGE_ID                 30499
    633 
    634 #define PARAM_SWP_P_START_RANGE_ID                   31000
    635 #define PARAM_SWP_P_END_RANGE_ID                     31999
    636 
    637 #define PARAM_GSA_START_RANGE_ID                     32000
    638 
    639 #define PARAM_GSA_PETRA_START_RANGE_ID               33000
    640 
    641 #define PARAM_T20E_ACC_START_RANGE_ID                34000
    642 #define PARAM_T20E_ACC_END_RANGE_ID                  35999
    643 
    644 #define SOC_PARAM_PPD_API_START_RANGE_ID                 36000
    645 #define SOC_PARAM_PPD_API_END_RANGE_ID                   37999
    646 
    647 #define PARAM_OAM_ACC_START_RANGE_ID                 38000
    648 #define PARAM_OAM_ACC_END_RANGE_ID                   39999
    649 
    650 #define PARAM_OAM_API_START_RANGE_ID                 40000
    651 #define PARAM_OAM_API_END_RANGE_ID                   41999
    652 
    653 #define PARAM_PPA_API_START_RANGE_ID                 42000
    654 #define PARAM_PPA_API_END_RANGE_ID                   42999
    655 
    656 #define PARAM_TMD_API_START_RANGE_ID                 43000
    657 #define PARAM_TMD_API_END_RANGE_ID                   44999
    658 
    659 #define PARAM_PB_API_START_RANGE_ID                  45000
    660 #define PARAM_PB_API_END_RANGE_ID                    45999
    661 
    662 #define PARAM_PB_PP_ACC_START_RANGE_ID               46000
    663 #define PARAM_PB_PP_ACC_END_RANGE_ID                 47999
    664 
    665 #define PARAM_PB_PP_ACC2_START_RANGE_ID              48000
    666 #define PARAM_PB_PP_ACC2_END_RANGE_ID                48999
    667 
    668 #define PARAM_PCP_API_START_RANGE_ID                 49000
    669 
    670 
    671 /*
    672  * Values for parameter 'default_care':
    673  */
    674 #define HAS_DEFAULT       BIT(0)
    675 #define HAS_NO_DEFAULT        0
    676 #define HAS_DEFAULT_MASK  BIT(0)
    677 #define MUST_APPEAR       BIT(1)
    678 #define MAY_NOT_APPEAR        0
    679 #define MUST_APPEAR_MASK  BIT(1)
    680 /*
    681  * Maximal value allowed for ordinal numbers on parameter description
    682  * within 'PARAM' structures in ui_rom_defi.h.
    683  * Make sure to give it a sensible value and NOT use bits 31,30,29
    684  * Parameters marked as LAST_ORDINAL are treated differently from other
    685  * parameters marked with some positive ordinal: They may all be entered
    686  * without interfering with each other, on the same line. (For other
    687  * parameters, with smaller 'ordinal', only one may be selected and
    688  * appear on the line.
    689  */
    690 #define LAST_ORDINAL               1000
    691 /*
    692  * Number of elements in the 'mutex_control' array which is used
    693  * for defining various 'paths' along one CLI line.
    694  */
    695 #define NUM_ELEMENTS_MUTEX_CONTROL 16
    696 typedef   struct
    697 {
    698   int          param_id ;
    699   const char   *par_name ;
    700   PARAM_VAL_RULES *allowed_vals ;
    701     /*
    702      * Number of elements in 'allowed_vals' array.
    703      */
    704   unsigned int num_allowed_vals ;
    705     /*
    706      * 2 Control flags.
    707      *  1. Says if the parameter has/hasn't a default value.
    708      *     Only if it has - then 'default_val' is meaningful.
    709      *     The possible values for this are 'HAS_DEFAULT' or 'HAS_NO_DEFAULT' (defined above)
    710      *  2. Says if the parameter must apear or not.
    711      *     This refers to the subtree defined by 'mutex_control' (see below),
    712      *      Ex: If the parameter is defined for BIT(3), and here you specify
    713      *          that it MUST apear, it means that only for the 'subdirectory'/'subtree'/group
    714      *          of parameters that are defined for BIT(3) - this parameter MUST appear.
    715      *          In another group like BIT(4) - it may not appear.
    716      *     The possible values for this are 'MUST_APPEAR' or 'MAY_NOT_APPEAR' (defined above)
    717      * So you put in this flag bitwise OR between the 2 controls.
    718      * Exapmle: HAS_DEFAULT | MAY_NOT_APPEAR
    719      */
    720   int          default_care ;
    721   PARAM_VAL    *default_val ;
    722     /*
    723      * Number of numeric values in array 'allowed_vals'.
    724      */
    725   unsigned int num_numeric_vals ;
    726     /*
    727      * Number of symbolic values in array 'allowed_vals'.
    728      */
    729   unsigned int num_symbolic_vals ;
    730     /*
    731      * Number of free text values in array 'allowed_vals'.
    732      */
    733   unsigned int num_text_vals ;
    734     /*
    735      * Number of IP address values in array 'allowed_vals'.
    736      */
    737   unsigned int num_ip_vals ;
    738     /*
    739      * Index of numeric value (if there is any) in
    740      * array 'allowed_vals'.
    741      */
    742   unsigned int numeric_index ;
    743     /*
    744      * Index of free text value (if there is any) in
    745      * array 'allowed_vals'.
    746      */
    747   unsigned int text_index ;
    748     /*
    749      * Index of IP address value (if there is any) in
    750      * array 'allowed_vals'.
    751      */
    752   unsigned int ip_index ;
    753   const char   *param_short_help ;
    754   const char   *param_detailed_help ;
    755     /*
    756      * Help for variables attached to this parameter.
    757      */
    758   const char   *vals_detailed_help ;
    759     /*
    760      * Mutual exclusion and grouping syntax control.
    761      * Up to 32 groups specified by bits.
    762      * If a parameter has specific
    763      * bits set then other parameters, with none of
    764      * these bits set, may not be on the same line.
    765      * Also, if specific bits are set for all
    766      * parameters on a specific command line then
    767      * all other allowed parameters with any of
    768      * these bits set are also required (provided
    769      * they do not have default values).
    770      */
    771   unsigned long mutex_control[NUM_ELEMENTS_MUTEX_CONTROL] ;
    772     /*
    773      * Order control for parameters on command line.
    774      * If this value is 'zero' then this parameter
    775      * string is not in the "ordinal" game and may
    776      * be found anywhere on the line.
    777      * See remark concerning LAST_ORDINAL above!
    778      * Otherwise, parameters with a smaller "ordinal"
    779      * must come before parameters with a larger
    780      * "ordinal" (unless, of course, they do not have
    781      * to be on the line at all).
    782      */
    783   unsigned int  ordinal ;
    784     /*
    785      * Pointer to a function to call after full
    786      * symbolic parameter has been accepted.
    787      */
    788   VAL_PROC_PTR val_checker ;
    789 } PARAM ;
    790 
    791 typedef struct
    792 {
    793     /*
    794      * Buffer containing whatever has been input
    795      * so far plus spare.
    796      */
    797   char          line_buf[MAX_CHARS_ON_LINE + 2] ;
    798     /*
    799      * Maximal number of charachters allowed on
    800      * prompt line (without spare).
    801      */
    802   unsigned int  max_chars_on_line ;
    803     /*
    804  */
    805   unsigned int  max_chars_on_screen_line ;
    806     /*
    807      * Total size of currently allocated 'line_buf'.
    808      */
    809   unsigned long line_buf_size ;
    810     /*
    811      * Index of next input ASCII character to go into 'line_buf'.
    812      */
    813   unsigned long line_buf_index ;
    814     /*
    815      * Number of ASCII character already loaded into 'line_buf'.
    816      * If there were no 'insert_mode' then this would be the
    817      * same number as 'line_buf_index'.
    818      */
    819   unsigned long num_loaded ;
    820     /*
    821      * Currently used prompt.
    822      */
    823   char          *prompt_string ;
    824     /*
    825      * Index, in 'line_buf', where currently entered field has started
    826      * (for 'subject', this is alwasy zero).
    827      */
    828   unsigned int  start_index_this_field ;
    829     /*
    830      * Number of characters already entered in currently
    831      * handled field
    832      * (for 'subject', this is alwasy equal to 'num_loaded').
    833      */
    834   unsigned int  num_loaded_this_field ;
    835     /*
    836      * Processing state for current line.
    837      */
    838   int           proc_state ;
    839     /*
    840      * Processed line section. Filled on line and
    841      * checked after CR has been hit.
    842      */
    843     /*
    844      * Identifiers of subject on current line.
    845      */
    846   char                *line_subject_name ;
    847   struct subject_str  *line_subject ;
    848     /*
    849      * Indicator: Subject already entered or not.
    850      */
    851   int           subject_entered ;
    852     /*
    853      * List of parameter values on current line.
    854      * Note that if a single parameter gets more than one value
    855      * then there will be a few entries with the same 'par_name'.
    856      */
    857   PARAM_VAL_PAIR  param_val_pair[MAX_PARAMS_VAL_PAIRS_ON_LINE] ;
    858     /*
    859      * Index of currently entered param_val_pair entry (which contains
    860      * the pair: param ID and value).
    861      */
    862   unsigned int  param_index ;
    863     /*
    864      * Indicator: Parameter name string already entered or not.
    865      */
    866   int           param_string_entered ;
    867     /*
    868      * Index of the parameter 'param_string',
    869      * in the array 'allowed_params' of the corresponding
    870      * subject.
    871      */
    872   unsigned int  current_param_match_index ;
    873     /*
    874      * Indicator: Number of parameter values already entered
    875      * for the last entered parameter name.
    876      */
    877   unsigned int  num_param_values ;
    878     /*
    879      * List of parameters (identified by 'par_name', char *)
    880      * on current line.
    881      */
    882   PARAM         *parameters[MAX_PARAM_NAMES_ON_LINE] ;
    883     /*
    884      * Indicator: Number of parameter names already entered
    885      * for this subject on this line.
    886      */
    887   unsigned int   num_param_names ;
    888     /*
    889      * Indicator: Ordinal number of input character
    890      * at which a special action is scheduled. Related
    891      * to the static variable 'num_chars_handled'
    892      * in procedure 'handle_next_char'.
    893      */
    894   unsigned int   scheduled_num_char ;
    895     /*
    896      * Indicator:
    897      *   Quotation mark status - User is entering text with
    898      *   embedded spaces. This state ends when a second quotation
    899      *   mark is entered.
    900      */
    901   int           quotation_mark_entered ;
    902 } CURRENT_LINE ;
    903 /*
    904  * List of identifiers for subjects:
    905  */
    906 typedef enum
    907 {
    908   SUBJECT_END_OF_LIST = 0,
    909   SUBJECT_MEM_ID,
    910   SUBJECT_HISTORY_ID,
    911   SUBJECT_NEW_01_ID,
    912   SUBJECT_NEW_02_ID,
    913   SUBJECT_NVRAM_ID,
    914   SUBJECT_HELP_ID,
    915   SUBJECT_GENERAL_ID,
    916   SUBJECT_VX_SHELL_ID,
    917   SUBJECT_FREE_PLACE_1_ID,
    918   SUBJECT_FREE_PLACE_2_ID,
    919   SUBJECT_SNMP_ID,
    920   SUBJECT_FAP10M_SERVICES_ID,
    921   SUBJECT_SIM_SERVICES_ID,
    922   SUBJECT_FE200_SERVICES_ID,
    923   SUBJECT_PSS_SERVICES_ID,
    924   SUBJECT_SAND_SERVICES_ID,
    925   SUBJECT_LINE_CARD_SERVICES_ID,
    926   SUBJECT_NEGEV_DEMO_SERVICES_ID,
    927   SUBJECT_GOBI_DEMO_SERVICES_ID,
    928   SUBJECT_DEMO_SERVICES_ID,
    929   SUBJECT_FMF_SERVICES_ID,
    930   SUBJECT_GFA_SERVICES_ID,
    931   SUBJECT_FAP20V_SERVICES_ID,
    932   SUBJECT_FAP20V_SWEEP_APP_SERVICES_ID,
    933   SUBJECT_TGS_SERVICES_ID,
    934   SUBJECT_CSYS_SERVICES_ID,
    935   SUBJECT_SKT_ID,
    936   SUBJECT_FAP20V_B_SERVICES_ID,
    937   SUBJECT_FAP20V_SWEEP_APP_B_SERVICES_ID,
    938   SUBJECT_TEVB_SERVICES_ID,
    939   SUBJECT_DHRP_SERVICES_ID,
    940   SUBJECT_DIAG_SERVICES_ID,
    941   SUBJECT_DHRP_API_SERVICES_ID,
    942   SUBJECT_TIMNA_ACCESS_SERVICES_ID,
    943   SUBJECT_TIMNA_API_SERVICES_ID,
    944   SUBJECT_FAP21V_API_SERVICES_ID,
    945   SUBJECT_PETRA_API_SERVICES_ID,
    946   SUBJECT_SWP_PETRA_SERVICES_ID,
    947   SUBJECT_PETRA_PP_API_SERVICES_ID,
    948   SUBJECT_FAP21V_ACC_SERVICES_ID,
    949   SUBJECT_FAP21V_GFA_SERVICES_ID,
    950   SUBJECT_FAP21V_APP_SERVICES_ID,
    951   SUBJECT_TIMNA_APP_SERVICES_ID,
    952   SUBJECT_PTG_SERVICES_ID,
    953   SUBJECT_PETRA_ACC_SERVICES_ID,
    954   SUBJECT_PETRA_PP_ACC_SERVICES_ID,
    955   SUBJECT_PETRA_PP_SWP_SERVICES_ID,
    956   SUBJECT_PETRA_PP_GSA_SERVICES_ID,
    957   SUBJECT_PETRA_GSA_SERVICES_ID,
    958   SUBJECT_PETRA_APP_SERVICES_ID,
    959   SUBJECT_PETRA_PP_APP_SERVICES_ID,
    960   SUBJECT_PETRA_GFA_SERVICES_ID,
    961   SUBJECT_PB_API_SERVICES_ID,
    962   SUBJECT_PB_PP_ACC_SERVICES_ID,
    963   SUBJECT_PB_PP_ACC2_SERVICES_ID,
    964   SUBJECT_PCP_API_SERVICES_ID,
    965   SUBJECT_FE600_BSP_SERVICES_ID,
    966   SUBJECT_FE600_API_SERVICES_ID,
    967   SUBJECT_T20E_ACC_SERVICES_ID,
    968   SUBJECT_PPD_API_SERVICES_ID,
    969   SUBJECT_OAM_ACC_SERVICES_ID,
    970   SUBJECT_OAM_API_SERVICES_ID,
    971   SUBJECT_TMD_API_SERVICES_ID
    972 } SUBJECT_SERVICES_IDS;
    973 
    974 /*
    975  * Pointer to a procedure to activate one a line
    976  * conaining related subject has been checked
    977  * and accepted.
    978  */
    979 typedef int (*SUBJECT_PROC)(CURRENT_LINE *,CURRENT_LINE **) ;
    980 typedef struct subject_str
    981 {
    982   int          subject_id ;
    983   char         *subj_name ;
    984   PARAM        *allowed_params ;
    985   unsigned int num_allowed_params ;
    986     /*
    987      * Pointer to ascii array (null terminated)containing
    988      * the names of all parameters, for this subject,
    989      * separated by CR/LF.
    990      */
    991   char         *params_ascii_list ;
    992   char         *subj_short_help ;
    993   char         *subj_detailed_help ;
    994     /*
    995      * Number of parameters, within the allowed list, which have
    996      * a default value.
    997      */
    998   unsigned int num_params_with_default ;
    999     /*
   1000      * Number of parameters, within the allowed list,
   1001      * which do not have a default value.
   1002      */
   1003   unsigned int num_params_without_default ;
   1004     /*
   1005      * Pointer to a procedure to call after the full
   1006      * line has been accepted (to do the action related
   1007      * to this subject).
   1008      */
   1009   SUBJECT_PROC subject_handler ;
   1010     /*
   1011      * Flag. If 'true' then subject may be the only text
   1012      * on the command line for meaningful processing to be
   1013      * carried out.
   1014      */
   1015   unsigned int may_stand_alone ;
   1016 } SUBJECT ;
   1017 /*
   1018  * Security levels.
   1019  */
   1020 #define UNDEFINED_LEVEL -1
   1021 /*
   1022  * Security level to start with. On final version, this
   1023  * should be UNDEFINED_LEVEL.
   1024  */
   1025 typedef struct
   1026 {
   1027   int level ;
   1028 } SECURITY ;
   1029 /*
   1030  * UI processing state of current line.
   1031  */
   1032 #define EXPECTING_PASSWORD      BIT(0)
   1033 #define RECEIVING_PASSWORD      BIT(1)
   1034 #define EXPECTING_SUBJECT       BIT(2)
   1035 #define RECEIVING_SUBJECT       BIT(3)
   1036 #define EXPECTING_PARAM_STRING  BIT(4)
   1037 #define RECEIVING_PARAM_STRING  BIT(5)
   1038 #define EXPECTING_PARAM_VAL     BIT(6)
   1039 #define RECEIVING_PARAM_VAL     BIT(7)
   1040 #define INSERT_MODE             BIT(8)
   1041 #define EXPECTING_ENTER         BIT(9)
   1042 /*
   1043  * State to start with. On final version, this
   1044  * should be ECPECTING_PASSWORD.
   1045  */
   1046 #define STARTER_STATE         EXPECTING_SUBJECT
   1047 /*
   1048  * Prompt to display at the beginning of a line.
   1049  */
   1050 #define PROMPT_STRING "Dune >"
   1051 /*
   1052  * Definitions related to 'select_learning_mode' parameter
   1053  * in subject "pss" (under "vlan").
   1054  * {
   1055  */
   1056 #define VLAN_INDIVIDUAL_EQUIVALENT 1
   1057 #define VLAN_SHARED_EQUIVALENT     2
   1058 /*
   1059  * }
   1060  */
   1061 /*
   1062  * Definitions related to 'memory_type' parameter
   1063  * in subject "pss" (under "diagnostics test_mem").
   1064  * {
   1065  */
   1066 #define BUFFER_DRAM_EQUIVALENT   1
   1067 #define WIDE_SRAM_EQUIVALENT     2
   1068 #define NARROW_SRAM_EQUIVALENT   3
   1069 #define FLOW_DRAM_EQUIVALENT     4
   1070 #define MAC_TBL_MEM_EQUIVALENT   5
   1071 #define VLAN_TBL_MEM_EQUIVALENT  6
   1072 /*
   1073  * }
   1074  */
   1075 /*
   1076  * Definitions related to 'test_profile' parameter
   1077  * in subject "pss" (under "diagnostics test_mem").
   1078  * {
   1079  */
   1080 #define INCREMENTAL_EQUIVALENT   1
   1081 #define BIT_TOGGLE_EQUIVALENT    2
   1082 #define AA_55_EQUIVALENT         3
   1083 /*
   1084  * }
   1085  */
   1086 /*
   1087  * Definitions related to 'cmd_type' parameter
   1088  * in subject "pss" (under "user_tx_table add").
   1089  * {
   1090  */
   1091 #define GT_CMD_TX_BY_VLAN_EQUIVALENT  1
   1092 #define GT_CMD_TX_BY_IF_EQUIVALENT    2
   1093 #define GT_CMD_TX_BY_LPORT_EQUIVALENT 3
   1094 /*
   1095  * }
   1096  */
   1097 /*
   1098  * Definitions related to 'encapsulation' parameter
   1099  * in subject "pss" (under "user_tx_table add").
   1100  * {
   1101  */
   1102 #define GT_REGULAR_ENCAPSULATION_EQUIVALENT  1
   1103 #define GT_CONTROL_ENCAPSULATION_EQUIVALENT  2
   1104 /*
   1105  * }
   1106  */
   1107 /*
   1108  * Definitions related to 'num_loop_cycles' parameter
   1109  * in subject "pss" (under "user_tx_table set_tx_mode").
   1110  * {
   1111  */
   1112 #define GT_INFINITE_CYCLES_EQUIVALENT        -1
   1113 /*
   1114  * }
   1115  */
   1116 /*
   1117  * Definitions related to 'buffer_mode' parameter
   1118  * in subject "pss" (under "user_rx_table set_rx_mode").
   1119  * {
   1120  */
   1121 #define GT_CYCLIC_BUFFER_EQUIVALENT                1
   1122 #define GT_USE_ONCE_BUFFER_EQUIVALENT              2
   1123 /*
   1124  * }
   1125  */
   1126 /*
   1127  * Definitions related to 'start_tx' parameter
   1128  * in subject "pss" (under "user_tx_table tx_action").
   1129  * {
   1130  */
   1131 #define GT_START_TX_EQUIVALENT               1
   1132 #define GT_STOP_TX_EQUIVALENT                2
   1133 /*
   1134  * }
   1135  */
   1136 /*
   1137  * Definitions related to 'start_rx' parameter
   1138  * in subject "pss" (under "user_rx_table rx_action").
   1139  * {
   1140  */
   1141 #define GT_START_RX_EQUIVALENT               1
   1142 #define GT_STOP_RX_EQUIVALENT                2
   1143 /*
   1144  * }
   1145  */
   1146 /*
   1147  * Definitions related to 'tot_num_packets' parameter
   1148  * in subject "pss" (under "user_tx_table set_tx_mode").
   1149  * {
   1150  */
   1151 #define GT_AS_SPECIFIED_PER_ENTRY_EQUIVALENT -1
   1152 /*
   1153  * }
   1154  */
   1155 /*
   1156  * Definitions related to 'data' parameter
   1157  * in subject "pss" (under "user_tx_table add").
   1158  * {
   1159  */
   1160 /*
   1161  * Maximal number of data items allowed for the user to
   1162  * specify for a message to transmit.
   1163  */
   1164 #define PSS_DATA_NUM_VALS  30
   1165 /*
   1166  * }
   1167  */
   1168 /*
   1169  * Definitions related to 'port_type' parameter
   1170  * in subject "pss" (under "vlan").
   1171  * {
   1172  */
   1173 #define PORT_STANDARD_EQUIVALENT 1
   1174 #define PORT_TRUNK_EQUIVALENT    2
   1175 /*
   1176  * }
   1177  */
   1178 /*
   1179  * Definitions related to 'exercises' parameter
   1180  * ('general' subject).
   1181  * {
   1182  */
   1183 #define EVENT_STORM_EQUIVALENT                               1
   1184 #define ERR_WITHIN_ERR_EQUIVALENT                            2
   1185 #define EVENT_AGING_EQUIVALENT                               3
   1186 #define FATAL_ERROR_EQUIVALENT                               4
   1187 #define EVENT_DOUBLE_EQUIVALENT                              5
   1188 #define EVENT_ALARM_ON_EQUIVALENT                            6
   1189 #define EVENT_ALARM_OFF_EQUIVALENT                           7
   1190 #define EVENT_PRINT_TASK_ON_EQUIVALENT                       8
   1191 #define EVENT_PRINT_TASK_OFF_EQUIVALENT                      9
   1192 #define LOAD_REAL_TIME_TRACE_EQUIVALENT                      10
   1193 #define CALL_MAIN_DPSS_INTERRUPT_EQUIVALENT                  11
   1194 #define CAUSE_SOFTWARE_EMULATION_EXCEPTION_EQUIVALENT        12
   1195 #define CALL_SOFTWARE_EMULATION_EXCEPTION_HANDLER_EQUIVALENT 13
   1196 #define CALL_ALIGNMENT_EXCEPTION_HANDLER_EQUIVALENT          14
   1197 #define CALL_DSI_EXCEPTION_HANDLER_EQUIVALENT                15
   1198 #define CALL_ISI_EXCEPTION_HANDLER_EQUIVALENT                16
   1199 #define CALL_CHAR_BUFF_MODULE_TEST                           17
   1200 #define INIT_FPGA_REAL_TIME_COLLETION                        18
   1201 #define CALL_FPGA_COLLETION_ISR                              19
   1202 #define START_FPGA_A_COLLETION_PROCESS                       20
   1203 #define STOP_FPGA_B_COLLETION_PROCESS                        21
   1204 #define START_FPGA_B_COLLETION_PROCESS                       22
   1205 #define STOP_FPGA_A_COLLETION_PROCESS                        23
   1206 #define STOP_FPGA_FULL_COL_SCENARIO                          24
   1207 /*
   1208  * }
   1209  */
   1210 /*
   1211  * Definitions related to 'watchdog' parameter
   1212  * ('general' subject).
   1213  * {
   1214  */
   1215 #define STOP_RESET_EQUIVALENT       1
   1216 #define INVOKE_HANDLER_EQUIVALENT   2
   1217 /*
   1218  * }
   1219  */
   1220 /*
   1221  * Definitions related to 'app_source_file' parameter
   1222  * {
   1223  */
   1224 #define HOST_SOURCE_EQUIVALENT   0
   1225 /*
   1226  * }
   1227  */
   1228 /*
   1229  * Definitions related to 'console_baud_rate' parameter.
   1230  * {
   1231  */
   1232 #define B_4800_EQUIVALENT      4800
   1233 #define B_9600_EQUIVALENT      9600
   1234 #define B_38400_EQUIVALENT    38400
   1235 #define B_19200_EQUIVALENT    19200
   1236 /*
   1237  * }
   1238  */
   1239 /*
   1240  * Definitions related to 'block' parameter
   1241  * {
   1242  */
   1243 #define BLOCK_1_EQUIVALENT       1
   1244 #define BLOCK_2_EQUIVALENT       2
   1245 #define BLOCK_3_EQUIVALENT       5
   1246 #define BLOCK_4_EQUIVALENT       6
   1247 #define BLOCK_5_EQUIVALENT       7
   1248 #define BLOCK_6_EQUIVALENT       8
   1249 #define BLOCK_7_EQUIVALENT       11
   1250 #define BLOCK_100_EQUIVALENT     3
   1251 #define BLOCK_101_EQUIVALENT     4
   1252 #define BLOCK_200_EQUIVALENT     9
   1253 #define BLOCK_201_EQUIVALENT     10
   1254 #define BLOCK_300_EQUIVALENT     12
   1255 #define BLOCK_301_EQUIVALENT     13
   1256 #define BLOCK_400_EQUIVALENT     14
   1257 #define BLOCK_401_EQUIVALENT     15
   1258 /*
   1259  * }
   1260  */
   1261 /*
   1262  * Definitions related to 'load_defaults' parameter
   1263  * {
   1264  */
   1265 #define DEFAULTS_ALL_EQUIVALENT        0
   1266 #define DEFAULTS_BLOCK_2_EQUIVALENT    2
   1267 #define DEFAULTS_BLOCK_3_EQUIVALENT    5
   1268 #define DEFAULTS_BLOCK_4_EQUIVALENT    6
   1269 #define DEFAULTS_BLOCK_5_EQUIVALENT    7
   1270 #define DEFAULTS_BLOCK_6_EQUIVALENT    8
   1271 #define DEFAULTS_BLOCK_7_EQUIVALENT    11
   1272 #define DEFAULTS_BLOCK_101_EQUIVALENT  4
   1273 #define DEFAULTS_BLOCK_200_EQUIVALENT  9
   1274 #define DEFAULTS_BLOCK_201_EQUIVALENT  10
   1275 /*
   1276  * }
   1277  */
   1278 /*
   1279  * Definitions related to 'update' parameter
   1280  * {
   1281  */
   1282 #define RUN_TIME_EQUIVALENT      1
   1283 #define NEXT_STARTUP_EQUIVALENT  2
   1284 #define BOTH_EQUIVALENT          3
   1285 /*
   1286  * }
   1287  */
   1288 /*
   1289  * Definitions related to 'format' parameter
   1290  * {
   1291  */
   1292 #define CHAR_EQUIVALENT  1
   1293 #define SHORT_EQUIVALENT 2
   1294 #define LONG_EQUIVALENT  4
   1295 /*
   1296  * }
   1297  */
   1298 /*
   1299  * Definitions related to 'disp' parameter
   1300  * {
   1301  */
   1302 #define HEX_EQUIVALENT              1
   1303 #define UNSIGNED_INTEGER_EQUIVALENT 2
   1304 #define SIGNED_INTEGER_EQUIVALENT   3
   1305 /*
   1306  * }
   1307  */
   1308 /*
   1309  * Definitions related to 'type' parameter
   1310  * {
   1311  */
   1312 #define FE_1_REGS_EQUIVALENT       1
   1313 #define FE_2_REGS_EQUIVALENT       2
   1314 #define SDRAM_EQUIVALENT           3
   1315 #define FLASH_BANK_1_EQUIVALENT    4
   1316 #define E2PROM_EQUIVALENT          5
   1317 #define EPLD_EQUIVALENT            6
   1318 #define GP2_EQUIVALENT             7
   1319 #define GP3_EQUIVALENT             8
   1320 #define INTERNAL_DPRAM_EQUIVALENT  9
   1321 #define FAP10M_1_REGS_EQUIVALENT   11
   1322 #define FAP10M_2_REGS_EQUIVALENT   12
   1323 #define GP1_FE1_EQUIVALENT         13
   1324 #define GP1_FE2_EQUIVALENT         14
   1325 #define MEM_BUFFER_EQUIVALENT      15
   1326 #define GT64131_SDRAM_EQUIVALENT   16
   1327 #define GT64131_REGS_EQUIVALENT    17
   1328 #define PCI_IO_EQUIVALENT          18
   1329 #define PCI_MEM1_EQUIVALENT        19
   1330 #define PCI_MEM2_EQUIVALENT        20
   1331 #define GP1_FAP10M_EQUIVALENT      21
   1332 #define GP1_FAP20V_1_EQUIVALENT    22
   1333 #define GP1_FTG_A_EQUIVALENT       23
   1334 #define GP1_FTG_B_EQUIVALENT       24
   1335 #define GP1_FAP20V_FSC_1_EQUIVALENT     25
   1336 #define GP1_FAP20V_EPLD_1_EQUIVALENT    26
   1337 #define GP1_FAP20V_FLASH_1_EQUIVALENT   27
   1338 #define GP1_FAP20V_STRM_IF_1_EQUIVALENT 28
   1339 #define TEVB_TIMNA_EQUIVALENT 29
   1340 #define TEVB_EPLD_EQUIVALENT 30
   1341 #define TEVB_FLASH_EQUIVALENT 31
   1342 
   1343 #define GP1_FAP21V_1_EQUIVALENT    22
   1344 #define GP1_FAP21V_FSC_1_EQUIVALENT     25
   1345 #define GP1_FAP21V_EPLD_1_EQUIVALENT    26
   1346 #define GP1_FAP21V_FLASH_1_EQUIVALENT   27
   1347 #define GP1_FAP21V_STRM_IF_1_EQUIVALENT 28
   1348 
   1349 #define GFA_PETRA_PETRA_EQUIVALENT                            29
   1350 #define GFA_PETRA_STATISTICS_EQUIVALENT                       30
   1351 #define GFA_PETRA_IO_FPGA_EQUIVALENT                          31
   1352 #define GFA_PETRA_FILE_SYSTEM_FLASH_EQUIVALENT                32
   1353 #define UTILS_PTG_FRONT_END_IO_FPGA_EQUIVALENT                33
   1354 #define UTILS_PTG_FRONT_END_FILE_SYSTEM_FLASH_EQUIVALENT      34
   1355 #define UTILS_PTG_FRONT_END_DEVICE_0_EQUIVALENT               35
   1356 #define UTILS_PTG_FRONT_END_DEVICE_1_EQUIVALENT               36
   1357 #define GFA_BI_PETRA_EQUIVALENT                               37
   1358 #define GFA_BI_PCP_EQUIVALENT                                 38
   1359 #define GFA_BI_IO_FPGA_EQUIVALENT                             39
   1360 
   1361 /*
   1362  * }
   1363  */
   1364 /*
   1365  * Definitions related to 'offset' parameter
   1366  * and also for general use.
   1367  * {
   1368  */
   1369 #define FALSE_EQUIVALENT         0
   1370 #define ON_EQUIVALENT            1
   1371 #define OFF_EQUIVALENT           0
   1372 /*
   1373  * }
   1374  */
   1375 /*
   1376  * Definitions related to 'general_parameters' parameter
   1377  * ('pss bridge')
   1378  * {
   1379  */
   1380 #define SET_MAC_DA_SA_TRAP_EQUIVALENT 1
   1381 #define HOST_COUNTERS_EQUIVALENT      2
   1382 /*
   1383  * }
   1384  */
   1385 /*
   1386  * Definitions related to 'num_packets' parameters
   1387  * {
   1388  */
   1389 #define NUM_PACKETS_INFINITE   (unsigned long)(-1)
   1390 /*
   1391  * }
   1392  */
   1393 /*
   1394  * Definitions related to 'telnet_timeout_*' parameters
   1395  * {
   1396  */
   1397 #define TELNET_INACTIVITY_NONE  255
   1398 /*
   1399  * }
   1400  */
   1401 /*
   1402  * Definitions related to 'show' parameter
   1403  * in the context of 'general' subject and
   1404  * also for general use.
   1405  * {
   1406  */
   1407 #define METHOD_REGULAR_DISPLAY   0
   1408 #define METHOD_PERIODIC_DISPLAY  2
   1409 /*
   1410  * }
   1411  */
   1412 /*
   1413  * Definitions related to 'read' parameter
   1414  * in the context of 'general fpga_indirect'
   1415  * subject and also for general use.
   1416  * {
   1417  */
   1418 #define GENERATOR_ACCESS     0
   1419 #define VALIDATOR_ACCESS     1
   1420 #define FLOW_CONTROL_ACCESS  2
   1421 /*
   1422  * }
   1423  */
   1424 /*
   1425  * Definitions related to 'sub_block' parameter
   1426  * in the context of 'general fpga_indirect'
   1427  * subject and also for general use.
   1428  * {
   1429  */
   1430 #define SUB_BLOCK_CALENDAR_TABLE                  0
   1431 #define SUB_BLOCK_EGRESS_STREAM_TABLE             1
   1432 #define SUB_BLOCK_EGRESS_PATTERN_TABLE            2
   1433 #define SUB_BLOCK_LOG_MEMORY_TABLE                3
   1434 #define SUB_BLOCK_CHANNEL_TO_PORT_TABLE           4
   1435 #define SUB_BLOCK_INGRESS_STREAM_TABLE            5
   1436 #define SUB_BLOCK_INGRESS_PATTERN_TABLE           6
   1437 #define SUB_BLOCK_LOGICAL_MULTICAST_TABLE         7
   1438 #define SUB_BLOCK_INGRESS_MULTICAST_STREAM_TABLE  8
   1439 #define SUB_BLOCK_STREAM_SELECTION_TABLE          9
   1440 #define SUB_BLOCK_STREAM_RATE_TABLE               10
   1441 #define SUB_BLOCK_PORT_RATE_TABLE                 11
   1442 #define SUB_BLOCK_M_DELAY_TABLE                   12
   1443 #define SUB_BLOCK_LAST_DELAY_TABLE                13
   1444 #define SUB_BLOCK_DELAY_HISTOGRAM_TABLE           14
   1445 #define SUB_BLOCK_LAST_TIMESTAMP_TABLE            15
   1446 #define SUB_BLOCK_INTER_PACKET_DELAY_HISTOGRAM    16
   1447 #define SUB_BLOCK_JITTER_HISTOGRAM_TABLE          17
   1448 #define SUB_BLOCK_PORT_STATISTICS_TABLE           18
   1449 #define SUB_BLOCK_CHANNEL_WEIGHT_TABLE            19
   1450 #define SUB_BLOCK_CHANNEL_FIFO_SIZE_TABLE         20
   1451 #define SUB_BLOCK_SPILL_OVER_TABLE                21
   1452 /*
   1453  * }
   1454  */
   1455 /*
   1456  * Definitions related to general use of
   1457  * 'action' parameter (read or write) in
   1458  * the context of 'general' subject
   1459  * {
   1460  */
   1461 #define FPGA_READ_ACTION     0
   1462 #define FPGA_WRITE_ACTION    1
   1463 /*
   1464  * }
   1465  */
   1466 /*
   1467  * Definitions related to 'fpga_indirect'
   1468  * parameter in the context of 'general'
   1469  * subject and also for general use.
   1470  * {
   1471  */
   1472 #define FPGA_A_IDENTIFIER     0
   1473 #define FPGA_B_IDENTIFIER     1
   1474 /*
   1475  * }
   1476  */
   1477 /*
   1478  * Definitions related to 'operation' parameter
   1479  * in the context of 'mem' subject (val_read).
   1480  * {
   1481  */
   1482 #define EQUAL_EQUIVALENT      0
   1483 #define NOT_EQUAL_EQUIVALENT  1
   1484 /*
   1485  * }
   1486  */
   1487 /*
   1488  * Definitions related to 'counter get' or 'counter clear'
   1489  * parameters in the context of 'mem' subject ('counter').
   1490  * {
   1491  */
   1492 #define VAL_READ_FAILURES_EQUIVALENT  1
   1493 /*
   1494  * }
   1495  */
   1496 /*
   1497  * Definitions related to 'fe_indirect' subject
   1498  * {
   1499  */
   1500 /*
   1501  * }
   1502  */
   1503 
   1504 /*
   1505  * Definitions related to 'regression' subject
   1506  * {
   1507  */
   1508 /*
   1509  * Numerical value equivalent for symbolic
   1510  * value 'all'.
   1511  */
   1512 typedef enum{
   1513   SHORT_RGR_EQUIVALENT=0,
   1514   FULL_RGR_EQUIVALENT
   1515 } UI_RGR_SCOPE_TYPE;
   1516 /*
   1517  * }
   1518  */
   1519 /*
   1520  * Definitions related to 'history' subject
   1521  * {
   1522  */
   1523 /*
   1524  * Numerical value equivalent for symbolic
   1525  * value 'all'.
   1526  */
   1527 #define ALL_EQUIVALENT 1
   1528 /*
   1529  * Number of elements in history fifo.
   1530  * Should be 20 or so
   1531  */
   1532 #define NUM_HISTORY_ELEMENTS 25
   1533 /*
   1534  * Values for 'display_direction' element.
   1535  */
   1536 #define DIRECTION_NONE 0
   1537 #define DIRECTION_UP   1
   1538 #define DIRECTION_DOWN 2
   1539 typedef struct
   1540 {
   1541     /*
   1542      * Next index to load in '*history_array'.
   1543      * Range: 0 -> (elements_in_array - 1)
   1544      */
   1545   unsigned int index ;
   1546     /*
   1547      * Index last used to display a line on
   1548      * the screen. It is made equal to 'index'
   1549      * every time an <enter> key is hit.
   1550      * Range: 0 -> (elements_in_array - 1)
   1551      */
   1552   unsigned int display_index ;
   1553     /*
   1554      * Direction of history display path (backward
   1555      * or forward, equivalent to up and down).
   1556      */
   1557   unsigned int display_direction ;
   1558     /*
   1559      * Number of meaningful entries in '*history_array'.
   1560      * Can be up to 'elements_in_array'. Newest entry
   1561      * is pointed by (index - 1) [modulo the size of
   1562      * the array].
   1563      */
   1564   unsigned int num_loaded ;
   1565     /*
   1566      * Number of entries in 'history_array'.
   1567      */
   1568   unsigned int elements_in_array ;
   1569     /*
   1570      * Array of pointers to structures of
   1571      * type CURRENT_LINE.
   1572      */
   1573   CURRENT_LINE **history_array ;
   1574     /*
   1575      * Pointer to structure of
   1576      * type CURRENT_LINE. Used as a trash can.
   1577      */
   1578   CURRENT_LINE *trash_line_ptr ;
   1579 } HISTORY_FIFO ;
   1580 /*
   1581  * }
   1582  */
   1583 /*
   1584  * Definitions related to 'mem' subject
   1585  * {
   1586  */
   1587 /*
   1588  * Maximal number of memory blocks allowed for this
   1589  * system.
   1590  */
   1591 /*
   1592  * Various attributes for memory blocks.
   1593  */
   1594 /*
   1595  * Access block using only long access, aligned
   1596  * on long boundary.
   1597  */
   1598 #define LONG_ALIGNED_WRITE_ONLY BIT(0)
   1599 /*
   1600  * Access block using byte access only.
   1601  */
   1602 #define BYTE_ACCESS_ONLY        BIT(1)
   1603 /*
   1604  * Block is an EEPROM and requires special access
   1605  * routines for writing.
   1606  */
   1607 #define EEPROM_ACCESS           BIT(2)
   1608 /*
   1609  * Block may only be accessed for 'read' ('write'
   1610  * using 'override' only)
   1611  */
   1612 #define BLOCK_READ_ONLY         BIT(3)
   1613 
   1614 /*
   1615  * }
   1616  */
   1617 
   1618 /*
   1619  * Parameters related to 'handle_nv_item' procedure:
   1620  */
   1621 #define PRINT_ITEMS      BIT(0)
   1622 #define CHANGE_NV        BIT(1)
   1623 #define CHANGE_RUN_TIME  BIT(2)
   1624 /*
   1625  * Prototypes.
   1626  * {
   1627  */
   1628 char
   1629   sys_getch(
   1630     void
   1631   ) ;
   1632 void
   1633   sys_flush_getch(
   1634     void
   1635   ) ;
   1636 /*
   1637  * Definitions related to 'ui_proc_signal'
   1638  */
   1639 /*
   1640  * Indications on telnet channels
   1641  */
   1642 #define BOTH_DEAD  1
   1643 #define BOTH_ALIVE 2
   1644 /*
   1645  * Number of times timer procedure detects a change in
   1646  * status before it believes it.
   1647  */
   1648 #define MAX_TRIGGER_DELAY 1
   1649 void
   1650   ui_proc_signal(
   1651     int signal_id
   1652   ) ;
   1653 int
   1654   search_subjects(
   1655     char          *subj_string,
   1656     unsigned int  size_subj_string,
   1657     int           search_all,
   1658     unsigned int  num_match,
   1659     unsigned int  *match_index,
   1660     unsigned int  *full_match,
   1661     char          **subject_name_ptr,
   1662     unsigned int  *common_len
   1663   ) ;
   1664 #if DEBUG_AID
   1665 /* { */
   1666 int
   1667   aa_value_checker(
   1668     unsigned long  source_id,
   1669     char *err_msg
   1670   ) ;
   1671 /* } */
   1672 #endif
   1673 /*
   1674  * }
   1675  */
   1676 /*
   1677  * Definitions related to 'ui_utils'
   1678  * {
   1679  */
   1680 void
   1681   init_current_line(
   1682     CURRENT_LINE *current_line
   1683   ) ;
   1684 int
   1685   display_line_info(
   1686     CURRENT_LINE *current_line
   1687   ) ;
   1688 int
   1689   space_while_receiving_subject(
   1690     CURRENT_LINE *current_line,
   1691     int          enter_case
   1692   ) ;
   1693 int
   1694   space_receiving_param_string(
   1695     CURRENT_LINE *current_line,
   1696     int          enter_case
   1697   ) ;
   1698 int
   1699   space_receiving_param_val(
   1700     CURRENT_LINE *current_line,
   1701     int          enter_case
   1702   ) ;
   1703 int
   1704   is_field_legitimate_ip(
   1705     CURRENT_LINE  *current_line,
   1706     char          **err_msg,
   1707     unsigned long partial,
   1708     unsigned long *ip_addr
   1709   ) ;
   1710 int
   1711   param_val_pair_to_ascii(
   1712     CURRENT_LINE *current_line,
   1713     unsigned int index,
   1714     char         **presentation
   1715   ) ;
   1716 const char
   1717   *proc_state_to_ascii(
   1718     CURRENT_LINE *current_line
   1719   ) ;
   1720 unsigned int
   1721   index_of_last_space(
   1722     CURRENT_LINE *current_line
   1723   ) ;
   1724 int
   1725   convert_numeric_field(
   1726     CURRENT_LINE  *current_line,
   1727     char          **err_mag,
   1728     unsigned long *value,
   1729     unsigned long partial
   1730   ) ;
   1731 int
   1732   is_char_numeric_starter(
   1733     char in_char
   1734   ) ;
   1735 int
   1736   is_last_field_numeric(
   1737     CURRENT_LINE *current_line
   1738   ) ;
   1739 unsigned
   1740   int
   1741     get_current_ordinal(
   1742       CURRENT_LINE  *current_line,
   1743       unsigned long *current_mutex,
   1744       unsigned int  ignore_multi_val
   1745     ) ;
   1746 int
   1747   is_char_legitimate_text(
   1748     char in_char
   1749   ) ;
   1750 int
   1751   is_field_legitimate_text(
   1752     CURRENT_LINE  *current_line,
   1753     char          **err_msg,
   1754     unsigned long partial
   1755   ) ;
   1756 int
   1757   is_field_numeric_starter(
   1758     CURRENT_LINE *current_line,
   1759     char         **err_mag
   1760   ) ;
   1761 int
   1762   get_current_mutex_control(
   1763     CURRENT_LINE  *current_line,
   1764     unsigned long *current_mutex
   1765   ) ;
   1766 int
   1767   get_blank_proc_state(
   1768     CURRENT_LINE *current_line
   1769   ) ;
   1770 int
   1771   search_params(
   1772     const char    *reference_string,
   1773     unsigned int  size_reference_string,
   1774     int           search_all,
   1775     unsigned int  num_match,
   1776     unsigned int  *match_index,
   1777     unsigned int  *full_match,
   1778     char    **parameter_name_ptr,
   1779     unsigned int  *common_len,
   1780     char          *params_list,
   1781     unsigned int  num_parameters,
   1782     unsigned int  element_size,
   1783     unsigned int  name_offest,
   1784     char          *found_names_list,
   1785     unsigned int  extra_search_on,
   1786     unsigned long *reference_mask,
   1787     unsigned int  mask_offest,
   1788     char          **excluded_params_base,
   1789     unsigned int  num_exc_parameters,
   1790     unsigned long reference_ordinal,
   1791     unsigned int  ordinal_offest
   1792   ) ;
   1793 int
   1794   compare_param_vals_by_name(
   1795     const void *parameter_val_1,
   1796     const void *parameter_val_2
   1797   ) ;
   1798 int
   1799   compare_params_by_name(
   1800     const void *parameter_1,
   1801     const void *parameter_2
   1802   ) ;
   1803 int
   1804   compare_subjs_by_name(
   1805     const void *subject_1,
   1806     const void *subject_2
   1807   ) ;
   1808 void
   1809   print_detailed_help(
   1810     CURRENT_LINE *current_line,
   1811     int          for_subjects
   1812   ) ;
   1813 void
   1814   all_subjs_short_help(
   1815     CURRENT_LINE *current_line,
   1816     int          for_subjects
   1817   ) ;
   1818 int
   1819   complete_last_field(
   1820     const char         *field_string,
   1821     CURRENT_LINE *current_line,
   1822     int          partial_in_string,
   1823     unsigned int c_len
   1824   ) ;
   1825 int
   1826   get_num_subjs(
   1827     void
   1828   ) ;
   1829 int
   1830   get_subj_list_len(
   1831     void
   1832   ) ;
   1833 char
   1834   *get_subj_list_ptr(
   1835     void
   1836   ) ;
   1837 void
   1838   clear_n_redisplay_line(
   1839     CURRENT_LINE *current_line
   1840   ) ;
   1841 int
   1842   is_params_on_line(
   1843     const char   *param_name,
   1844     CURRENT_LINE *current_line
   1845   ) ;
   1846 void
   1847   back_space_line(
   1848     CURRENT_LINE *current_line
   1849   ) ;
   1850 void
   1851   redisplay_line(
   1852     CURRENT_LINE *current_line
   1853   ) ;
   1854 void
   1855   msg_and_redisplay(
   1856     const char *msg_string,
   1857     CURRENT_LINE *current_line
   1858   ) ;
   1859 int
   1860   send_char_to_screen(
   1861     char    out_char
   1862   ) ;
   1863 int
   1864   low_level_to_screen(
   1865     char *out_string,
   1866     int  num_to_send
   1867   ) ;
   1868 int
   1869   send_array_to_screen(
   1870     const char *const_out_string,
   1871     int  num_to_send
   1872   ) ;
   1873 int
   1874   send_string_to_screen(
   1875     const char *out_string,
   1876     int  add_cr_lf
   1877   ) ;
   1878 int
   1879   params_fully_loaded(
   1880     CURRENT_LINE *current_line,
   1881     char         *err_msg
   1882   ) ;
   1883 int
   1884   is_params_mutex(
   1885     unsigned int  match_index,
   1886     CURRENT_LINE *current_line,
   1887     char         *err_msg
   1888   ) ;
   1889 int
   1890   help_for_match(
   1891     char         *field_string,
   1892     unsigned int num_loaded,
   1893     PARAM        *parameter_ptr
   1894   );
   1895 
   1896 char
   1897   *get_blank_line(
   1898     void
   1899     ) ;
   1900 char
   1901   get_rotating_stick(
   1902     void
   1903     ) ;
   1904 void
   1905   send_to_shell(
   1906     char         *string_to_send,
   1907     unsigned int len
   1908   ) ;
   1909 /*
   1910  * Object: Input file (for CLI interpreter)
   1911  * This object is related to the special mode where a local
   1912  * file is made (temporarily) the input channel of the main
   1913  * CLI interpreter (handle_next_char())
   1914  * {
   1915  */
   1916 void
   1917   clear_file_input_mode(
   1918     void
   1919   ) ;
   1920 void
   1921   set_file_input_mode(
   1922     void
   1923   ) ;
   1924 unsigned
   1925   int
   1926     is_file_input_mode(
   1927       void
   1928     ) ;
   1929 void
   1930   set_cli_input_fd(
   1931     int file_descriptor
   1932   ) ;
   1933 int
   1934   get_cli_input_fd(
   1935     void
   1936   ) ;
   1937 void
   1938   close_cli_input_fd(
   1939     void
   1940   ) ;
   1941 void
   1942   set_cli_times_available(
   1943     void
   1944   ) ;
   1945 void
   1946   clear_cli_times_available(
   1947     void
   1948   ) ;
   1949 int
   1950   are_cli_times_available(
   1951     void
   1952   ) ;
   1953 void
   1954   set_cli_start_time(
   1955     unsigned long time_from_startup
   1956   ) ;
   1957 void
   1958   set_cli_end_time(
   1959     unsigned long time_from_startup
   1960   ) ;
   1961 int
   1962   get_cli_elapsed_time(
   1963     unsigned long *elapsed_time,
   1964     char          **file_name
   1965   ) ;
   1966 /*
   1967  * }
   1968  */
   1969 /*
   1970  * Object: page_print
   1971  * {
   1972  */
   1973 void
   1974   clear_abort_print_flag(
   1975     void
   1976   ) ;
   1977 void
   1978   set_abort_print_flag(
   1979     void
   1980   ) ;
   1981 unsigned
   1982   int
   1983     is_abort_print_flag_set(
   1984       void
   1985     ) ;
   1986 void
   1987   clear_line_mode(
   1988     void
   1989   ) ;
   1990 void
   1991   set_line_mode(
   1992     void
   1993   ) ;
   1994 unsigned
   1995   int
   1996     is_line_mode_set(
   1997       void
   1998     ) ;
   1999 int
   2000   line_mode_from_nv(
   2001     unsigned char *line_mode
   2002   ) ;
   2003 int
   2004   base_and_option_registers_from_nv(
   2005     unsigned long *long_vals
   2006   );
   2007 void
   2008   clear_page_mode(
   2009     void
   2010   ) ;
   2011 void
   2012   set_page_mode(
   2013     void
   2014   ) ;
   2015 
   2016 void
   2017   ui_triger_page_mode(
   2018     void
   2019   ) ;
   2020 
   2021 unsigned
   2022   int
   2023     is_page_mode_set(
   2024       void
   2025     ) ;
   2026 int
   2027   page_lines_from_nv(
   2028     unsigned char *page_lines
   2029   ) ;
   2030 int
   2031   page_mode_from_nv(
   2032     unsigned char *page_mode
   2033   ) ;
   2034 void
   2035   init_page_print(
   2036     unsigned int lines_per_page
   2037   ) ;
   2038 void
   2039   set_lines_per_page(
   2040     unsigned int lines_per_page
   2041   ) ;
   2042 void
   2043   clear_num_lines_printed(
   2044     void
   2045   ) ;
   2046 void
   2047   inc_num_lines_printed(
   2048     unsigned int add_lines
   2049   ) ;
   2050 /*
   2051  * Indicate by how many lines there will be page
   2052  * overflow if input parameter lines are added.
   2053  */
   2054 unsigned int
   2055   get_page_overflow(
   2056     unsigned int add_lines
   2057   ) ;
   2058 /*
   2059  * Indicate how many lines current page can take
   2060  * before overflow.
   2061  */
   2062 unsigned int
   2063   get_page_left(
   2064     void
   2065   ) ;
   2066 /*
   2067  * }
   2068  */
   2069 int
   2070   get_array_num_lines(
   2071     char         *in_arr,
   2072     unsigned int size_arr
   2073   ) ;
   2074 char
   2075   *get_ptr_of_lf(
   2076     char         *in_str,
   2077     unsigned int lf_number,
   2078     unsigned int size_arr
   2079   ) ;
   2080 /*
   2081  * Definitions related to ask_get()
   2082  */
   2083 /*
   2084  * {
   2085  */
   2086 /*
   2087  * Maximal number of characters on line presenting question
   2088  * to the user in the 'one_line' mode.
   2089  */
   2090 #define MAX_ONE_LINE_ASK 60
   2091 /*
   2092  * Wait for the user to hit 'y' or 'n'
   2093  * and return with '0' for 'no' and
   2094  * any other number for 'yes'.
   2095  */
   2096 #define EXPECT_YES_NO     0
   2097 /*
   2098  * Wait for the user to hit 'space' or any
   2099  * other key (standing for 'continue' and
   2100  * 'abort', respectively) and return with '0'
   2101  * for 'abort' and any other number for
   2102  * 'continue'.
   2103  */
   2104 #define EXPECT_CONT_ABORT 1
   2105 /*
   2106  * Wait for the user to hit any character
   2107  * and return with the ASCII value of that
   2108  * character.
   2109  */
   2110 #define EXPECT_ANY        2
   2111 /*
   2112  * Wait for the user to hit 'carriage return'
   2113  * and return with the ASCII value of that
   2114  * character.
   2115  */
   2116 #define EXPECT_CR         3
   2117 /*
   2118  * }
   2119  */
   2120 int
   2121   ask_get(
   2122     char         *ask_text,
   2123     unsigned int expect,
   2124     unsigned int one_line_mode,
   2125     unsigned int temporary_unsafe
   2126   ) ;
   2127 /*
   2128  * }
   2129  */
   2130 /*
   2131  * Definitions related to 'ui_process'
   2132  * {
   2133  */
   2134 int
   2135   paste_text_params_quotation_marks(
   2136     CURRENT_LINE *current_line
   2137   ) ;
   2138 int
   2139   cut_text_params_quotation_marks(
   2140     CURRENT_LINE *current_line
   2141   ) ;
   2142 int
   2143   search_param_val_pairs(
   2144     CURRENT_LINE *current_line,
   2145     unsigned int *match_index,
   2146     int          param_id,
   2147     unsigned int ocr_num
   2148   ) ;
   2149 int
   2150   get_val_of(
   2151     CURRENT_LINE  *current_line,
   2152     int           *match_indicator,
   2153     int           param_id,
   2154     unsigned int  ocr_num,
   2155     PARAM_VAL     **param_val,
   2156     unsigned long param_type,
   2157     char          *err_msg
   2158   ) ;
   2159 int
   2160   process_line(
   2161     CURRENT_LINE *current_line,
   2162     CURRENT_LINE **current_line_ptr
   2163   ) ;
   2164 /*
   2165  * }
   2166  */
   2167 /*
   2168  * Definitions related to 'ui_snmp'
   2169  * {
   2170  */
   2171 #if INCLUDE_NET_SNMP
   2172 /* { */
   2173 int
   2174   subject_snmp(
   2175     CURRENT_LINE *current_line,
   2176     CURRENT_LINE **current_line_ptr
   2177   ) ;
   2178 /* } INCLUDE_NET_SNMP */
   2179 #endif
   2180 
   2181 
   2182 /*
   2183  * }
   2184  */
   2185 /*
   2186  * Definitions related to 'ui_fe200'
   2187  * {
   2188  */
   2189 int
   2190   subject_fe200(
   2191     CURRENT_LINE *current_line,
   2192     CURRENT_LINE **current_line_ptr
   2193   ) ;
   2194 /*
   2195  * }
   2196  */
   2197 /*
   2198  * Definitions related to 'ui_sand'
   2199  * {
   2200  */
   2201 int
   2202   subject_sand(
   2203     CURRENT_LINE *current_line,
   2204     CURRENT_LINE **current_line_ptr
   2205   ) ;
   2206 /*
   2207  * }
   2208  */
   2209 int
   2210   subject_dhrp(
   2211     CURRENT_LINE *current_line,
   2212     CURRENT_LINE **current_line_ptr
   2213   );
   2214 
   2215 /*
   2216  * Definitions related to 'ui_line_card'
   2217  * {
   2218  */
   2219 int
   2220   subject_line_card(
   2221     CURRENT_LINE *current_line,
   2222     CURRENT_LINE **current_line_ptr
   2223   ) ;
   2224 /*
   2225  * }
   2226  */
   2227 /*
   2228  * Definitions related to 'ui_line_gfa'
   2229  * {
   2230  */
   2231 int
   2232   subject_line_gfa(
   2233     CURRENT_LINE *current_line,
   2234     CURRENT_LINE **current_line_ptr
   2235   ) ;
   2236 /*
   2237  * }
   2238  */
   2239 
   2240 /*
   2241  * Definitions related to 'ui_line_tgs'
   2242  * {
   2243  */
   2244 int
   2245   subject_line_tgs(
   2246     CURRENT_LINE *current_line,
   2247     CURRENT_LINE **current_line_ptr
   2248   ) ;
   2249 /*
   2250  * Definitions related to 'ui_line_tevb'
   2251  * {
   2252  */
   2253 int
   2254   subject_line_tevb(
   2255     CURRENT_LINE *current_line,
   2256     CURRENT_LINE **current_line_ptr
   2257   );
   2258 
   2259 /*
   2260  * Definitions related to 'ui_diag'
   2261  * {
   2262  */
   2263 int
   2264   subject_diag(
   2265     CURRENT_LINE *current_line,
   2266     CURRENT_LINE **current_line_ptr
   2267   );
   2268 /*
   2269  * }
   2270  */
   2271 
   2272 /*
   2273  * Definitions related to 'ui_negev_demo'
   2274  * {
   2275  */
   2276 int
   2277   subject_demo(
   2278     CURRENT_LINE *current_line,
   2279     CURRENT_LINE **current_line_ptr
   2280   ) ;
   2281 int
   2282   subject_gobi_demo(
   2283     CURRENT_LINE *current_line,
   2284     CURRENT_LINE **current_line_ptr
   2285   ) ;
   2286 int
   2287   subject_negev_demo(
   2288     CURRENT_LINE *current_line,
   2289     CURRENT_LINE **current_line_ptr
   2290   ) ;
   2291 int
   2292   subject_fap20v_sweep_app(
   2293     CURRENT_LINE *current_line,
   2294     CURRENT_LINE **current_line_ptr
   2295   ) ;
   2296 int
   2297   subject_fap20v_sweep_app_b(
   2298     CURRENT_LINE *current_line,
   2299     CURRENT_LINE **current_line_ptr
   2300   ) ;
   2301 int
   2302   subject_csys(
   2303     CURRENT_LINE *current_line,
   2304     CURRENT_LINE **current_line_ptr
   2305   ) ;
   2306 int
   2307   subject_skt(
   2308     CURRENT_LINE *current_line,
   2309     CURRENT_LINE **current_line_ptr
   2310   ) ;
   2311 
   2312 /*
   2313  * }
   2314  */
   2315 /*
   2316  * Definitions related to 'ui_history'
   2317  * {
   2318  */
   2319 int
   2320   subject_history(
   2321     CURRENT_LINE *current_line,
   2322     CURRENT_LINE **current_line_ptr
   2323   ) ;
   2324 int
   2325   init_history_fifo(
   2326     void
   2327   ) ;
   2328 int
   2329   put_history_fifo(
   2330     CURRENT_LINE **current_line_ptr
   2331   ) ;
   2332 void
   2333   dec_display_index(
   2334     void
   2335   ) ;
   2336 void
   2337   inc_display_index(
   2338     void
   2339   ) ;
   2340 void
   2341   show_prev_history_line(
   2342     CURRENT_LINE **current_line_ptre
   2343   ) ;
   2344 void
   2345   show_next_history_line(
   2346     CURRENT_LINE **current_line_ptr
   2347   ) ;
   2348 /*
   2349  * }
   2350  */
   2351 /*
   2352  * Definitions related to 'ui_fe_indirect'
   2353  * {
   2354  */
   2355 /*
   2356  * Numerical value equivalent for symbolic
   2357  * value 'all' in the context of 'index'.
   2358  */
   2359 #define ALL_INDEX_EQUIVALENT   -1
   2360 int
   2361   subject_fe_indirect(
   2362     CURRENT_LINE *current_line,
   2363     CURRENT_LINE **current_line_ptr
   2364   ) ;
   2365 int
   2366   fe_ind_rr_index_checker(
   2367     void           *current_line_ptr,
   2368     unsigned long  data_value,
   2369     char           *err_msg,
   2370     unsigned long  partial
   2371   ) ;
   2372 int
   2373   fe_ind_data_checker(
   2374     void           *current_line_ptr,
   2375     unsigned long  data_value,
   2376     char           *err_msg,
   2377     unsigned long  partial
   2378     ) ;
   2379 /*
   2380  * }
   2381  */
   2382 /*
   2383  * Definitions related to 'ui_vx_shell'
   2384  * {
   2385  */
   2386 int
   2387   subject_vx_shell(
   2388     CURRENT_LINE *current_line,
   2389     CURRENT_LINE **current_line_ptr
   2390   ) ;
   2391 /*
   2392  * }
   2393  */
   2394 /*
   2395  * Definitions related to 'ui_general'
   2396  * {
   2397  */
   2398 
   2399 void
   2400   ui_printing_policy_set(
   2401     unsigned int short_prints
   2402   );
   2403 
   2404 unsigned int
   2405   ui_printing_policy_get(
   2406     void
   2407   );
   2408 
   2409 int
   2410   subject_general(
   2411     CURRENT_LINE *current_line,
   2412     CURRENT_LINE **current_line_ptr
   2413   ) ;
   2414 int
   2415   app_file_id_checker(
   2416     void           *current_line_ptr,
   2417     unsigned long  data_value,
   2418     char           *err_msg,
   2419     unsigned long  partial
   2420   ) ;
   2421 int
   2422   line_card_slot_id_checker(
   2423     void           *current_line_ptr,
   2424     unsigned long  data_value,
   2425     char           *err_msg,
   2426     unsigned long  partial
   2427   ) ;
   2428 int
   2429   fabric_card_slot_id_checker(
   2430     void           *current_line_ptr,
   2431     unsigned long  data_value,
   2432     char           *err_msg,
   2433     unsigned long  partial
   2434   ) ;
   2435 /*
   2436  * }
   2437  */
   2438 /*
   2439  * Definitions related to 'ui_nvram'
   2440  * {
   2441  */
   2442 int
   2443   app_source_checker(
   2444     void           *current_line_ptr,
   2445     unsigned long  source_id,
   2446     char           *err_msg,
   2447     unsigned long  partial
   2448     ) ;
   2449 int
   2450   subject_nvram(
   2451     CURRENT_LINE *current_line,
   2452     CURRENT_LINE **current_line_ptr
   2453   ) ;
   2454 int
   2455   handle_nv_item(
   2456     void         **val_ptrs,
   2457     unsigned int param_id,
   2458     unsigned int action
   2459   ) ;
   2460 int
   2461   update_nvram_param(
   2462     unsigned int update,
   2463     unsigned int param_id,
   2464     unsigned int param_val
   2465   );
   2466 int
   2467   get_run_downloading_host_addr(
   2468     unsigned long *ip_addr_ptr
   2469   ) ;
   2470 int
   2471   get_run_ip_addr(
   2472     unsigned long *ip_addr_ptr
   2473     ) ;
   2474 int
   2475   set_run_vals(
   2476     char *string,
   2477     int  strLen,
   2478     int  offset
   2479     );
   2480 int
   2481   load_run_vals(
   2482     void
   2483     ) ;
   2484 int
   2485   get_block_info(
   2486     unsigned int    block_id,
   2487     char            **block_base,
   2488     unsigned long   *block_size,
   2489     unsigned short  **block_crc_ptr
   2490     ) ;
   2491 int
   2492   load_defaults_conditional(
   2493     unsigned int  block_id
   2494     ) ;
   2495 /*
   2496  * }
   2497  */
   2498 /*
   2499  * Definitions related to 'ui_pss'
   2500  * {
   2501  */
   2502 int
   2503   is_legit_mac_address(
   2504     char       *c_ptr
   2505   ) ;
   2506 int
   2507   subject_pss(
   2508     CURRENT_LINE *current_line,
   2509     CURRENT_LINE **current_line_ptr
   2510   ) ;
   2511 /*
   2512  * }
   2513  */
   2514 /*
   2515  * Definitions related to 'ui_fmf'
   2516  * {
   2517  */
   2518 int
   2519   subject_fmf(
   2520     CURRENT_LINE *current_line,
   2521     CURRENT_LINE **current_line_ptr
   2522   ) ;
   2523 /*
   2524  * }
   2525  */
   2526 int
   2527   subject_fap20v(
   2528     CURRENT_LINE *current_line,
   2529     CURRENT_LINE **current_line_ptr
   2530   ) ;
   2531 int
   2532   subject_fap20v_b(
   2533     CURRENT_LINE *current_line,
   2534     CURRENT_LINE **current_line_ptr
   2535   );
   2536 int
   2537   subject_fap10m(
   2538     CURRENT_LINE *current_line,
   2539     CURRENT_LINE **current_line_ptr
   2540   ) ;
   2541 int
   2542   subject_sim(
   2543     CURRENT_LINE *current_line,
   2544     CURRENT_LINE **current_line_ptr
   2545   ) ;
   2546 int
   2547   subject_fap21v_api(
   2548     CURRENT_LINE *current_line,
   2549     CURRENT_LINE **current_line_ptr
   2550   );
   2551 int
   2552   subject_fap21v_acc(
   2553     CURRENT_LINE *current_line,
   2554     CURRENT_LINE **current_line_ptr
   2555   );
   2556 int
   2557   subject_petra_api(
   2558     CURRENT_LINE *current_line,
   2559     CURRENT_LINE **current_line_ptr
   2560   );
   2561 int
   2562   subject_tmd_api(
   2563     CURRENT_LINE *current_line,
   2564     CURRENT_LINE **current_line_ptr
   2565   );
   2566 int
   2567   subject_pb_pp_acc2(
   2568     CURRENT_LINE *current_line,
   2569     CURRENT_LINE **current_line_ptr
   2570   );
   2571 int
   2572   subject_pcp_api(
   2573     CURRENT_LINE *current_line,
   2574     CURRENT_LINE **current_line_ptr
   2575   );
   2576 int
   2577   subject_swp_p_api(
   2578     CURRENT_LINE *current_line,
   2579     CURRENT_LINE **current_line_ptr
   2580   );
   2581 int
   2582   subject_petra_gfa(
   2583     CURRENT_LINE *current_line,
   2584     CURRENT_LINE **current_line_ptr
   2585   );
   2586 int
   2587   subject_petra_pp_api(
   2588     CURRENT_LINE *current_line,
   2589     CURRENT_LINE **current_line_ptr
   2590   );
   2591 int
   2592   subject_swp_p_pp_api(
   2593     CURRENT_LINE *current_line,
   2594     CURRENT_LINE **current_line_ptr
   2595   );
   2596 int
   2597   subject_gsa_api(
   2598     CURRENT_LINE *current_line,
   2599     CURRENT_LINE **current_line_ptr
   2600   );
   2601 int
   2602   subject_gsa_petra_api(
   2603     CURRENT_LINE *current_line,
   2604     CURRENT_LINE **current_line_ptr
   2605   );
   2606 int
   2607   subject_ptg(
   2608     CURRENT_LINE *current_line,
   2609     CURRENT_LINE **current_line_ptr
   2610   );
   2611 int
   2612   subject_petra_acc(
   2613     CURRENT_LINE *current_line,
   2614     CURRENT_LINE **current_line_ptr
   2615   );
   2616 int
   2617   subject_petra_pp_acc(
   2618     CURRENT_LINE *current_line,
   2619     CURRENT_LINE **current_line_ptr
   2620   );
   2621 
   2622 int
   2623   subject_fe600_bsp(
   2624     CURRENT_LINE *current_line,
   2625     CURRENT_LINE **current_line_ptr
   2626   );
   2627 int
   2628   subject_fe600_api(
   2629     CURRENT_LINE *current_line,
   2630     CURRENT_LINE **current_line_ptr
   2631   );
   2632 int
   2633   subject_t20e_acc(
   2634     CURRENT_LINE *current_line,
   2635     CURRENT_LINE **current_line_ptr
   2636   );
   2637 int
   2638   subject_ppd_api(
   2639     CURRENT_LINE *current_line,
   2640     CURRENT_LINE **current_line_ptr
   2641   );
   2642 int
   2643   subject_oam_acc(
   2644     CURRENT_LINE *current_line,
   2645     CURRENT_LINE **current_line_ptr
   2646   );
   2647 int
   2648   subject_oam_api(
   2649     CURRENT_LINE *current_line,
   2650     CURRENT_LINE **current_line_ptr
   2651   );
   2652 
   2653 /*
   2654  * Definitions related to 'ui_memory'
   2655  * {
   2656  */
   2657 int
   2658   subject_mem(
   2659     CURRENT_LINE *current_line,
   2660     CURRENT_LINE **current_line_ptr
   2661   ) ;
   2662 void
   2663   fill_blanks(
   2664     char          *in_str,
   2665     unsigned int  num,
   2666     unsigned long options
   2667   ) ;
   2668 int
   2669   display_all_mac_counters(
   2670     unsigned int logical_port_is_trunk,
   2671     unsigned int logical_port_unit,
   2672     unsigned int logical_port_device,
   2673     unsigned int logical_port_port,
   2674     unsigned int display_format,
   2675     unsigned int clear_after_read
   2676   );
   2677 /*
   2678  * }
   2679  */
   2680 
   2681  /*
   2682  * Definitions related to 'ui_dhrp_api'
   2683  * {
   2684 */
   2685 
   2686 int
   2687   subject_dhrp_api(
   2688     CURRENT_LINE *current_line,
   2689     CURRENT_LINE **current_line_ptr
   2690   );
   2691 int
   2692   subject_access_timna(
   2693     CURRENT_LINE *current_line,
   2694     CURRENT_LINE **current_line_ptr
   2695   );
   2696 int
   2697   subject_timna_api(
   2698     CURRENT_LINE *current_line,
   2699     CURRENT_LINE **current_line_ptr
   2700   );
   2701 int
   2702   subject_sweept20_api(
   2703     CURRENT_LINE *current_line,
   2704     CURRENT_LINE **current_line_ptr
   2705   );
   2706 int
   2707   subject_fap21v_gfa(
   2708     CURRENT_LINE *current_line,
   2709     CURRENT_LINE **current_line_ptr
   2710   );
   2711 int
   2712   subject_fap21v_app(
   2713     CURRENT_LINE *current_line,
   2714     CURRENT_LINE **current_line_ptr
   2715   );
   2716 void
   2717   handle_next_char(
   2718     CURRENT_LINE **current_line_ptr,
   2719     char         in_char
   2720   );
   2721 /*
   2722  * }
   2723  */
   2724 /* } */
   2725 #endif