FD.io VPP
v20.09-64-g4f7b92f0a
Vector Packet Processing
nsim.api
Go to the documentation of this file.
1
/**
2
* @file nsim.api
3
* @brief VPP control-plane API messages for the network delay simulator
4
*/
5
6
option
version
=
"2.2.1"
;
7
import
"vnet/interface_types.api"
;
8
9
/** \brief enable / disable the network delay simulation cross-connect
10
@param client_index - opaque cookie to identify the sender
11
@param context - sender context, to match reply w/ request
12
@param enable_disable - enable or disable the feature
13
@param sw_if_index0 - one interface to cross-connect
14
@param sw_if_index1 - the other interface to cross-connect
15
*/
16
autoreply define
nsim_cross_connect_enable_disable
17
{
18
/* Client identifier, set from api_main.my_client_index */
19
u32
client_index
;
20
21
/* Arbitrary context, so client can match reply to request */
22
u32
context
;
23
24
/* Enable / disable the feature on the interfaces */
25
bool
enable_disable
;
26
27
/* Interface handles */
28
vl_api_interface_index_t
sw_if_index0
;
29
vl_api_interface_index_t
sw_if_index1
;
30
option vat_help =
"[<intfc0> | sw_if_index <swif0>] [<intfc1> | sw_if_index <swif1>] [disable]"
;
31
};
32
33
/** \brief enable / disable the network delay simulation output feature
34
@param client_index - opaque cookie to identify the sender
35
@param context - sender context, to match reply w/ request
36
@param enable_disable - enable or disable the feature
37
@param sw_if_index0 - interface
38
*/
39
autoreply define
nsim_output_feature_enable_disable
40
{
41
/* Client identifier, set from api_main.my_client_index */
42
u32
client_index
;
43
44
/* Arbitrary context, so client can match reply to request */
45
u32
context
;
46
47
/* Enable / disable the feature on the interfaces */
48
bool
enable_disable
;
49
50
/* Interface handles */
51
vl_api_interface_index_t
sw_if_index
;
52
option vat_help =
"[<intfc> | sw_if_index <nnn> [disable]"
;
53
};
54
55
/** \brief configure the network delay simulation cross-connect
56
@param client_index - opaque cookie to identify the sender
57
@param context - sender context, to match reply w/ request
58
@param delay_in_usec - microseconds of link delay to simulate
59
@param average_packet_size - average packet size for wheel sizing
60
@param bandwidth_in_bits_per_second - bps for wheel sizing
61
*/
62
autoreply define
nsim_configure
63
{
64
option
deprecated
;
65
/* Client identifier, set from api_main.my_client_index */
66
u32
client_index
;
67
68
/* Arbitrary context, so client can match reply to request */
69
u32
context
;
70
71
/* Configuration parameters */
72
u32
delay_in_usec
;
73
u32
average_packet_size
;
74
u64
bandwidth_in_bits_per_second
;
75
u32
packets_per_drop
;
76
option vat_help =
"delay <time> bandwidth <bw> [packet-size <nn>] [packets-per-drop <nnnn>]"
;
77
};
78
79
/** \brief configure the network delay simulation cross-connect
80
@param client_index - opaque cookie to identify the sender
81
@param context - sender context, to match reply w/ request
82
@param delay_in_usec - microseconds of link delay to simulate
83
@param average_packet_size - average packet size for wheel sizing
84
@param bandwidth_in_bits_per_second - bps for wheel sizing
85
*/
86
autoreply define nsim_configure2
87
{
88
/* Client identifier, set from api_main.my_client_index */
89
u32
client_index
;
90
91
/* Arbitrary context, so client can match reply to request */
92
u32
context
;
93
94
/* Configuration parameters */
95
u32
delay_in_usec
;
96
u32
average_packet_size
;
97
u64
bandwidth_in_bits_per_second
;
98
u32
packets_per_drop
;
99
u32
packets_per_reorder
;
100
option vat_help =
"delay <time> bandwidth <bw> [packet-size <nn>] [packets-per-drop <nnnn>]"
;
101
};
102
vl_api_nsim_configure2_t::packets_per_reorder
u32 packets_per_reorder
Definition:
nsim.api:99
vl_api_nsim_configure2_t::delay_in_usec
u32 delay_in_usec
Definition:
nsim.api:95
vl_api_nsim_cross_connect_enable_disable_t::sw_if_index1
vl_api_interface_index_t sw_if_index1
Definition:
nsim.api:29
u64
unsigned long u64
Definition:
types.h:89
vl_api_nsim_output_feature_enable_disable_t::context
u32 context
Definition:
nsim.api:45
nsim_cross_connect_enable_disable
int nsim_cross_connect_enable_disable(nsim_main_t *nsm, u32 sw_if_index0, u32 sw_if_index1, int enable_disable)
Definition:
nsim.c:44
vl_api_nsim_configure_t::context
u32 context
Definition:
nsim.api:69
vl_api_nsim_cross_connect_enable_disable_t::client_index
u32 client_index
Definition:
nsim.api:19
vl_api_nsim_cross_connect_enable_disable_t::enable_disable
bool enable_disable
Definition:
nsim.api:25
u32
unsigned int u32
Definition:
types.h:88
vl_api_nsim_output_feature_enable_disable_t::client_index
u32 client_index
Definition:
nsim.api:42
vl_api_nsim_configure_t::deprecated
option deprecated
Definition:
nsim.api:64
vl_api_nsim_cross_connect_enable_disable_t::context
u32 context
Definition:
nsim.api:22
vl_api_nsim_configure2_t::bandwidth_in_bits_per_second
u64 bandwidth_in_bits_per_second
Definition:
nsim.api:97
vl_api_nsim_output_feature_enable_disable_t::enable_disable
bool enable_disable
Definition:
nsim.api:48
vl_api_nsim_configure2_t::average_packet_size
u32 average_packet_size
Definition:
nsim.api:96
version
option version
Definition:
nsim.api:6
nsim_output_feature_enable_disable
int nsim_output_feature_enable_disable(nsim_main_t *nsm, u32 sw_if_index, int enable_disable)
Definition:
nsim.c:95
vl_api_nsim_configure_t::bandwidth_in_bits_per_second
u64 bandwidth_in_bits_per_second
Definition:
nsim.api:74
vl_api_nsim_configure_t::average_packet_size
u32 average_packet_size
Definition:
nsim.api:73
vl_api_nsim_configure_t::client_index
u32 client_index
Definition:
nsim.api:66
vl_api_nsim_output_feature_enable_disable_t::sw_if_index
vl_api_interface_index_t sw_if_index
Definition:
nsim.api:51
vl_api_nsim_configure_t::packets_per_drop
u32 packets_per_drop
Definition:
nsim.api:75
vl_api_nsim_cross_connect_enable_disable_t::sw_if_index0
vl_api_interface_index_t sw_if_index0
Definition:
nsim.api:28
nsim_configure
static int nsim_configure(nsim_main_t *nsm, f64 bandwidth, f64 delay, f64 packet_size, f64 drop_fraction, f64 reorder_fraction)
Definition:
nsim.c:153
vl_api_nsim_configure2_t::context
u32 context
Definition:
nsim.api:92
vl_api_nsim_configure_t::delay_in_usec
u32 delay_in_usec
Definition:
nsim.api:72
vl_api_nsim_configure2_t::packets_per_drop
u32 packets_per_drop
Definition:
nsim.api:98
vl_api_nsim_configure2_t::client_index
u32 client_index
Definition:
nsim.api:89
src
plugins
nsim
nsim.api
Generated on Thu Jun 3 2021 16:04:55 for FD.io VPP by
1.8.13