blob: 42f1e83139177e87583c4cd189c00add9fb647fb [file] [log] [blame]
Thiyagarajan Subramani89fffc02019-05-13 21:33:20 +00001/*
Girish Gowdraa707e7c2019-11-07 11:36:13 +05302 * Copyright 2018-present Open Networking Foundation
Thiyagarajan Subramani89fffc02019-05-13 21:33:20 +00003
Girish Gowdraa707e7c2019-11-07 11:36:13 +05304 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
Thiyagarajan Subramani89fffc02019-05-13 21:33:20 +00007
Girish Gowdraa707e7c2019-11-07 11:36:13 +05308 * http://www.apache.org/licenses/LICENSE-2.0
Thiyagarajan Subramani89fffc02019-05-13 21:33:20 +00009
Girish Gowdraa707e7c2019-11-07 11:36:13 +053010 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
Thiyagarajan Subramani89fffc02019-05-13 21:33:20 +000016#ifndef __BCMCLI_SESSION_H__
17#define __BCMCLI_SESSION_H__
18#include "bcmos_errno.h"
19// This is a stub header file for unit test case only
20typedef int bcmcli_session;
21typedef char bcmcli_entry[50];
22typedef char bcmcli_cmd_parm;
Thiyagarajan Subramani89fffc02019-05-13 21:33:20 +000023
24typedef struct bcmcli_session_parm {
25 void *get_prompt;
26 int access_right;
27} bcmcli_session_parm;
28
Girish Gowdra5287fde2021-07-31 00:41:45 +000029typedef struct bcmcli_cmd_cb {
30 int dummy;
31} bcmcli_cmd_cb;
32
33typedef struct bcmcli_access_right {
34 int dummy;
35} bcmcli_access_right;
36
37typedef struct bcmcli_cmd_extra_parm {
38 int dummy;
39} bcmcli_cmd_extra_parm;
40
Thiyagarajan Subramani89fffc02019-05-13 21:33:20 +000041#define BCMCLI_ACCESS_ADMIN 0xff
Thiyagarajan Subramani89fffc02019-05-13 21:33:20 +000042#define BCMCLI_MAKE_CMD_NOPARM(ptr, command1, command2, command3)
43#define BAL_API_VERSION 3
44
45
46extern bool bcmcli_is_stopped(bcmcli_session *sess);
47extern bool bcmcli_parse(bcmcli_session *sess, char *s);
48extern bool bcmcli_driver(bcmcli_session *sess);
49extern void bcmcli_token_destroy(void *);
50extern void bcmcli_session_close(bcmcli_session *sess);
51extern bcmos_errno bcm_api_cli_set_commands(bcmcli_session *sess);
52extern void bcmcli_stop(bcmcli_session *sess);
53extern void bcmcli_session_print(bcmcli_session *sess, const char *s);
54extern bcmos_errno bcmcli_session_open(bcmcli_session_parm *mon_sess, bcmcli_session **curr_sess);
55#endif
56