Thiyagarajan Subramani | 89fffc0 | 2019-05-13 21:33:20 +0000 | [diff] [blame] | 1 | /* |
Girish Gowdra | a707e7c | 2019-11-07 11:36:13 +0530 | [diff] [blame] | 2 | * Copyright 2018-present Open Networking Foundation |
Thiyagarajan Subramani | 89fffc0 | 2019-05-13 21:33:20 +0000 | [diff] [blame] | 3 | |
Girish Gowdra | a707e7c | 2019-11-07 11:36:13 +0530 | [diff] [blame] | 4 | * 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 Subramani | 89fffc0 | 2019-05-13 21:33:20 +0000 | [diff] [blame] | 7 | |
Girish Gowdra | a707e7c | 2019-11-07 11:36:13 +0530 | [diff] [blame] | 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
Thiyagarajan Subramani | 89fffc0 | 2019-05-13 21:33:20 +0000 | [diff] [blame] | 9 | |
Girish Gowdra | a707e7c | 2019-11-07 11:36:13 +0530 | [diff] [blame] | 10 | * 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 Subramani | 89fffc0 | 2019-05-13 21:33:20 +0000 | [diff] [blame] | 16 | #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 |
| 20 | typedef int bcmcli_session; |
| 21 | typedef char bcmcli_entry[50]; |
| 22 | typedef char bcmcli_cmd_parm; |
| 23 | struct bcmos_task { |
| 24 | char task_name[50]; |
| 25 | }; |
| 26 | |
| 27 | typedef struct bcmcli_session_parm { |
| 28 | void *get_prompt; |
| 29 | int access_right; |
| 30 | } bcmcli_session_parm; |
| 31 | |
| 32 | #define BCMCLI_ACCESS_ADMIN 0xff |
| 33 | #define BUG_ON // |
| 34 | #define BCMCLI_MAKE_CMD_NOPARM(ptr, command1, command2, command3) |
| 35 | #define BAL_API_VERSION 3 |
| 36 | |
| 37 | |
| 38 | extern bool bcmcli_is_stopped(bcmcli_session *sess); |
| 39 | extern bool bcmcli_parse(bcmcli_session *sess, char *s); |
| 40 | extern bool bcmcli_driver(bcmcli_session *sess); |
| 41 | extern void bcmcli_token_destroy(void *); |
| 42 | extern void bcmcli_session_close(bcmcli_session *sess); |
| 43 | extern bcmos_errno bcm_api_cli_set_commands(bcmcli_session *sess); |
| 44 | extern void bcmcli_stop(bcmcli_session *sess); |
| 45 | extern void bcmcli_session_print(bcmcli_session *sess, const char *s); |
| 46 | extern bcmos_errno bcmcli_session_open(bcmcli_session_parm *mon_sess, bcmcli_session **curr_sess); |
| 47 | #endif |
| 48 | |