Blog
Community
Development
Documentation
CNDP
22.08.0
Toggle main menu visibility
Loading...
Searching...
No Matches
cli_search.h
Go to the documentation of this file.
1
/* SPDX-License-Identifier: BSD-3-Clause
2
* Copyright (c) 2019-2022 Intel Corporation.
3
*/
4
5
#ifndef _CLI_SEARCH_H_
6
#define _CLI_SEARCH_H_
7
8
#include <stdio.h>
9
#include <stdint.h>
// for uint32_t, uint16_t, uint64_t
10
#include <stdlib.h>
11
#include <string.h>
12
#include <stdarg.h>
13
#include <unistd.h>
14
#include <inttypes.h>
15
16
#include "
cne_common.h
"
// for CNDP_API
17
18
// IWYU pragma: no_forward_declare cli_node
19
struct
cli_node;
20
26
27
#ifdef __cplusplus
28
extern
"C"
{
29
#endif
30
31
typedef
union
{
32
void
*voidp;
33
char
chr[8];
34
uint64_t u64;
35
uint32_t u32[2];
36
uint16_t u16[4];
37
} arg_u;
38
39
typedef
struct
{
40
arg_u arg1;
/* Argument Word 1 */
41
arg_u arg2;
/* Argument Word 2 */
42
arg_u arg3;
/* Argument Word 3 */
43
arg_u arg4;
/* Argument Word 4 */
44
}
args_t
;
/* 32 bytes of arguments */
45
46
struct
cli;
47
struct
cli_node;
48
49
typedef
int (*cli_scan_t)(
struct
cli_node *node, uint32_t flags,
args_t
*args);
51
68
CNDP_API
int
cli_scan_directory
(
struct
cli_node *dir, cli_scan_t func, uint32_t flags,
69
args_t
*args);
70
83
CNDP_API
int
cli_find_node
(
const
char
*path,
struct
cli_node **ret);
84
95
CNDP_API
struct
cli_node *
cli_find_cmd
(
const
char
*path);
96
109
CNDP_API uint32_t
cli_dir_item_count
(
struct
cli_node *node, uint32_t types);
110
119
CNDP_API uint32_t
cli_path_cmd_count
(
void
);
120
135
CNDP_API uint32_t
cli_node_list_with_type
(
struct
cli_node *node, uint32_t flags,
void
**ret);
136
147
CNDP_API
void
cli_node_list_free
(
void
*node);
148
159
CNDP_API uint32_t
cli_path_item_count
(uint32_t types);
160
171
CNDP_API
struct
cli_node *
cli_last_dir_in_path
(
const
char
*path);
172
187
CNDP_API
struct
cli_node *
cli_search_dir
(
struct
cli_node *dir,
const
char
*name, uint32_t type);
188
205
CNDP_API
int
cli_scan_path
(
const
char
*path, cli_scan_t func, uint32_t flags,
args_t
*args);
206
207
#ifdef __cplusplus
208
}
209
#endif
210
211
#endif
/* _CLI_SEARCH_H_ */
cli_find_node
CNDP_API int cli_find_node(const char *path, struct cli_node **ret)
cli_dir_item_count
CNDP_API uint32_t cli_dir_item_count(struct cli_node *node, uint32_t types)
cli_find_cmd
CNDP_API struct cli_node * cli_find_cmd(const char *path)
cli_search_dir
CNDP_API struct cli_node * cli_search_dir(struct cli_node *dir, const char *name, uint32_t type)
cli_path_cmd_count
CNDP_API uint32_t cli_path_cmd_count(void)
cli_path_item_count
CNDP_API uint32_t cli_path_item_count(uint32_t types)
cli_node_list_free
CNDP_API void cli_node_list_free(void *node)
cli_scan_path
CNDP_API int cli_scan_path(const char *path, cli_scan_t func, uint32_t flags, args_t *args)
cli_node_list_with_type
CNDP_API uint32_t cli_node_list_with_type(struct cli_node *node, uint32_t flags, void **ret)
cli_last_dir_in_path
CNDP_API struct cli_node * cli_last_dir_in_path(const char *path)
cli_scan_directory
CNDP_API int cli_scan_directory(struct cli_node *dir, cli_scan_t func, uint32_t flags, args_t *args)
cne_common.h
args_t
Definition
cli_search.h:39
lib
usr
app
cli
cli_search.h
Generated by
1.18.0