FD.io VPP  v21.01.1
Vector Packet Processing
pg.api
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2015-2016 Cisco and/or its affiliates.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at:
6  *
7  * http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 /** \file
17 
18  This file defines packet-generator interface APIs.
19 */
20 
21 option version = "2.0.0";
22 
23 import "vnet/interface_types.api";
24 
25 /** \brief PacketGenerator create interface request
26  @param client_index - opaque cookie to identify the sender
27  @param context - sender context, to match reply w/ request
28  @param interface_id - interface index
29  @param gso_enabled - enable gso on this interface
30  @param gso_size - gso size on this interface
31 */
32 define pg_create_interface
33 {
36  vl_api_interface_index_t interface_id;
39 };
40 
41 /** \brief PacketGenerator create interface response
42  @param context - sender context, to match reply w/ request
43  @param retval - return value for request
44 */
45 define pg_create_interface_reply
46 {
49  vl_api_interface_index_t sw_if_index;
50 };
51 
52 /** \brief PacketGenerator interface enable/disable packet coalesce
53  @param client_index - opaque cookie to identify the sender
54  @param context - sender context, to match reply w/ request
55  @param interface_id - interface index
56  @param coalesce_enabled - enable/disable packet coalesce on this interface
57 */
59 {
62  vl_api_interface_index_t sw_if_index;
64  option status="in_progress";
65 };
66 
67 /** \brief PacketGenerator capture packets on given interface request
68  @param client_index - opaque cookie to identify the sender
69  @param context - sender context, to match reply w/ request
70  @param interface_id - pg interface index
71  @param is_enabled - 1 if enabling streams, 0 if disabling
72  @param count - number of packets to be captured
73  @param pcap_file_name - pacp file name to store captured packets
74 */
75 autoreply define pg_capture
76 {
79  vl_api_interface_index_t interface_id;
80  bool is_enabled [default=true];
82  string pcap_file_name[];
83 };
84 
85 /** \brief Enable / disable packet generator request
86  @param client_index - opaque cookie to identify the sender
87  @param context - sender context, to match reply w/ request
88  @param is_enabled - 1 if enabling streams, 0 if disabling
89  @param stream_name - stream name to be enable/disabled, if not specified handle all streams
90 */
91 autoreply define pg_enable_disable
92 {
95  bool is_enabled [default=true];
96  string stream_name[];
97 };
98 
99 /*
100  * Local Variables:
101  * eval: (c-set-style "gnu")
102  * End:
103  */
vl_api_interface_index_t sw_if_index
Definition: pg.api:49
void pg_interface_enable_disable_coalesce(pg_interface_t *pi, u8 enable, u32 tx_node_index)
Definition: stream.c:216
vl_api_interface_index_t sw_if_index
Definition: pg.api:62
unsigned int u32
Definition: types.h:88
vl_api_interface_index_t interface_id
Definition: pg.api:36
clib_error_t * pg_capture(pg_capture_args_t *a)
Definition: cli.c:81
vl_api_interface_index_t interface_id
Definition: pg.api:79
option version
Definition: pg.api:21
signed int i32
Definition: types.h:77
u32 client_index
Definition: pg.api:77
void pg_enable_disable(u32 stream_index, int is_enable)
Definition: cli.c:58