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; |
Thiyagarajan Subramani | 89fffc0 | 2019-05-13 21:33:20 +0000 | [diff] [blame] | 23 | |
| 24 | typedef struct bcmcli_session_parm { |
| 25 | void *get_prompt; |
| 26 | int access_right; |
| 27 | } bcmcli_session_parm; |
| 28 | |
Girish Gowdra | 5287fde | 2021-07-31 00:41:45 +0000 | [diff] [blame] | 29 | typedef struct bcmcli_cmd_cb { |
| 30 | int dummy; |
| 31 | } bcmcli_cmd_cb; |
| 32 | |
| 33 | typedef struct bcmcli_access_right { |
| 34 | int dummy; |
| 35 | } bcmcli_access_right; |
| 36 | |
| 37 | typedef struct bcmcli_cmd_extra_parm { |
| 38 | int dummy; |
| 39 | } bcmcli_cmd_extra_parm; |
| 40 | |
Thiyagarajan Subramani | 89fffc0 | 2019-05-13 21:33:20 +0000 | [diff] [blame] | 41 | #define BCMCLI_ACCESS_ADMIN 0xff |
Thiyagarajan Subramani | 89fffc0 | 2019-05-13 21:33:20 +0000 | [diff] [blame] | 42 | #define BCMCLI_MAKE_CMD_NOPARM(ptr, command1, command2, command3) |
| 43 | #define BAL_API_VERSION 3 |
| 44 | |
| 45 | |
| 46 | extern bool bcmcli_is_stopped(bcmcli_session *sess); |
| 47 | extern bool bcmcli_parse(bcmcli_session *sess, char *s); |
| 48 | extern bool bcmcli_driver(bcmcli_session *sess); |
| 49 | extern void bcmcli_token_destroy(void *); |
| 50 | extern void bcmcli_session_close(bcmcli_session *sess); |
| 51 | extern bcmos_errno bcm_api_cli_set_commands(bcmcli_session *sess); |
| 52 | extern void bcmcli_stop(bcmcli_session *sess); |
| 53 | extern void bcmcli_session_print(bcmcli_session *sess, const char *s); |
| 54 | extern bcmos_errno bcmcli_session_open(bcmcli_session_parm *mon_sess, bcmcli_session **curr_sess); |
| 55 | #endif |
| 56 | |