FD.io VPP
v21.10.1-2-g0a485f517
Vector Packet Processing
cli.c
Go to the documentation of this file.
1
/*
2
* SPDX-License-Identifier: Apache-2.0
3
* Copyright(c) 2021 Cisco Systems, Inc.
4
*/
5
6
#include <
vnet/vnet.h
>
7
#include <
vnet/hash/hash.h
>
8
9
static
clib_error_t
*
10
show_hash
(
vlib_main_t
*
vm
,
unformat_input_t
*input,
vlib_cli_command_t
*cmd)
11
{
12
clib_error_t
*
error
= 0;
13
vnet_hash_main_t
*hm = &
vnet_hash_main
;
14
vnet_hash_function_registration_t
*hash;
15
16
hash = hm->
hash_registrations
;
17
18
vlib_cli_output
(
vm
,
"%-25s%-8s%s"
,
"Name"
,
"Prio"
,
"Description"
);
19
while
(hash)
20
{
21
vlib_cli_output
(
vm
,
"%-25s%-8u%s"
, hash->
name
, hash->
priority
,
22
hash->
description
);
23
hash = hash->
next
;
24
}
25
26
return
(
error
);
27
}
28
29
VLIB_CLI_COMMAND
(
cmd_show_hash
,
static
) = {
30
.path =
"show hash"
,
31
.short_help =
"show hash"
,
32
.function =
show_hash
,
33
};
vnet_hash_function_registration::priority
int priority
Definition:
hash.h:29
vlib_cli_command_t::path
char * path
Definition:
cli.h:96
hash.h
vm
vlib_main_t * vm
X-connect all packets from the HOST to the PHY.
Definition:
nat44_ei.c:3047
unformat_input_t
struct _unformat_input_t unformat_input_t
error
Definition:
cJSON.c:88
vnet_hash_function_registration::next
struct vnet_hash_function_registration * next
Definition:
hash.h:32
show_hash
static clib_error_t * show_hash(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition:
cli.c:10
cmd_show_hash
static vlib_cli_command_t cmd_show_hash
(constructor) VLIB_CLI_COMMAND (cmd_show_hash)
Definition:
cli.c:29
VLIB_CLI_COMMAND
#define VLIB_CLI_COMMAND(x,...)
Definition:
cli.h:163
vlib_cli_output
void vlib_cli_output(vlib_main_t *vm, char *fmt,...)
Definition:
cli.c:716
vnet_hash_function_registration
Definition:
hash.h:25
vnet_hash_main
vnet_hash_main_t vnet_hash_main
Definition:
hash.c:11
vnet_hash_main_t
Definition:
hash.h:35
vnet_hash_function_registration::description
const char * description
Definition:
hash.h:28
vlib_main_t
Definition:
main.h:102
clib_error_t
Definition:
clib_error.h:21
vnet_hash_main_t::hash_registrations
vnet_hash_function_registration_t * hash_registrations
Definition:
hash.h:37
vnet_hash_function_registration::name
const char * name
Definition:
hash.h:27
vnet.h
vlib_cli_command_t
Definition:
cli.h:92
src
vnet
hash
cli.c
Generated on Sat Jan 8 2022 10:35:00 for FD.io VPP by
1.8.17