aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/nsim/nsim.api
blob: 6549325202280550357a8987285ed2786d4fe1f7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
/**
 * @file nsim.api
 * @brief VPP control-plane API messages for the network delay simulator
 */

option version = "2.2.1";
import "vnet/interface_types.api";

/** \brief enable / disable the network delay simulation cross-connect
    @param client_index - opaque cookie to identify the sender
    @param context - sender context, to match reply w/ request
    @param enable_disable - enable or disable the feature
    @param sw_if_index0 - one interface to cross-connect
    @param sw_if_index1 - the other interface to cross-connect
*/
autoreply define nsim_cross_connect_enable_disable 
{
  /* Client identifier, set from api_main.my_client_index */
  u32 client_index;
  
  /* Arbitrary context, so client can match reply to request */
  u32 context;
  
  /* Enable / disable the feature on the interfaces */
  bool enable_disable;
  
  /* Interface handles */
  vl_api_interface_index_t sw_if_index0;
  vl_api_interface_index_t sw_if_index1;
  option vat_help = "[<intfc0> | sw_if_index <swif0>] [<intfc1> | sw_if_index <swif1>] [disable]";
};

/** \brief enable / disable the network delay simulation output feature
    @param client_index - opaque cookie to identify the sender
    @param context - sender context, to match reply w/ request
    @param enable_disable - enable or disable the feature
    @param sw_if_index0 - interface 
*/
autoreply define nsim_output_feature_enable_disable 
{
  /* Client identifier, set from api_main.my_client_index */
  u32 client_index;
  
  /* Arbitrary context, so client can match reply to request */
  u32 context;
  
  /* Enable / disable the feature on the interfaces */
  bool enable_disable;
  
  /* Interface handles */
  vl_api_interface_index_t sw_if_index;
  option vat_help = "[<intfc> | sw_if_index <nnn> [disable]";
};

/** \brief configure the network delay simulation cross-connect
    @param client_index - opaque cookie to identify the sender
    @param context - sender context, to match reply w/ request
    @param delay_in_usec - microseconds of link delay to simulate
    @param average_packet_size - average packet size for wheel sizing
    @param bandwidth_in_bits_per_second - bps for wheel sizing
*/
autoreply define nsim_configure
{
  option deprecated="v21.01";
  /* Client identifier, set from api_main.my_client_index */
  u32 client_index;
  
  /* Arbitrary context, so client can match reply to request */
  u32 context;

  /* Configuration parameters */
  u32 delay_in_usec;
  u32 average_packet_size;
  u64 bandwidth_in_bits_per_second;
  u32 packets_per_drop;
  option vat_help = "delay <time> bandwidth <bw> [packet-size <nn>] [packets-per-drop <nnnn>]";
};

/** \brief configure the network delay simulation cross-connect
    @param client_index - opaque cookie to identify the sender
    @param context - sender context, to match reply w/ request
    @param delay_in_usec - microseconds of link delay to simulate
    @param average_packet_size - average packet size for wheel sizing
    @param bandwidth_in_bits_per_second - bps for wheel sizing
*/
autoreply define nsim_configure2
{
  /* Client identifier, set from api_main.my_client_index */
  u32 client_index;
  
  /* Arbitrary context, so client can match reply to request */
  u32 context;

  /* Configuration parameters */
  u32 delay_in_usec;
  u32 average_packet_size;
  u64 bandwidth_in_bits_per_second;
  u32 packets_per_drop;
  u32 packets_per_reorder;
  option vat_help = "delay <time> bandwidth <bw> [packet-size <nn>] [packets-per-drop <nnnn>]";
};