FD.io VPP  v21.10.1-2-g0a485f517
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 
26 {
30 };
31 
32 /** \brief PacketGenerator create interface request
33  @param client_index - opaque cookie to identify the sender
34  @param context - sender context, to match reply w/ request
35  @param interface_id - interface index
36  @param gso_enabled - enable gso on this interface
37  @param gso_size - gso size on this interface
38 */
39 define pg_create_interface
40 {
43  vl_api_interface_index_t interface_id;
46 };
47 define pg_create_interface_v2
48 {
51  vl_api_interface_index_t interface_id;
54  vl_api_pg_interface_mode_t mode;
55 };
56 
57 /** \brief PacketGenerator create interface response
58  @param context - sender context, to match reply w/ request
59  @param retval - return value for request
60 */
61 define pg_create_interface_reply
62 {
65  vl_api_interface_index_t sw_if_index;
66 };
67 define pg_create_interface_v2_reply
68 {
71  vl_api_interface_index_t sw_if_index;
72 };
73 
74 /** \brief PacketGenerator interface enable/disable packet coalesce
75  @param client_index - opaque cookie to identify the sender
76  @param context - sender context, to match reply w/ request
77  @param interface_id - interface index
78  @param coalesce_enabled - enable/disable packet coalesce on this interface
79 */
81 {
84  vl_api_interface_index_t sw_if_index;
86  option status="in_progress";
87 };
88 
89 /** \brief PacketGenerator capture packets on given interface request
90  @param client_index - opaque cookie to identify the sender
91  @param context - sender context, to match reply w/ request
92  @param interface_id - pg interface index
93  @param is_enabled - 1 if enabling streams, 0 if disabling
94  @param count - number of packets to be captured
95  @param pcap_file_name - pacp file name to store captured packets
96 */
97 autoreply define pg_capture
98 {
101  vl_api_interface_index_t interface_id;
102  bool is_enabled [default=true];
104  string pcap_file_name[];
105 };
106 
107 /** \brief Enable / disable packet generator request
108  @param client_index - opaque cookie to identify the sender
109  @param context - sender context, to match reply w/ request
110  @param is_enabled - 1 if enabling streams, 0 if disabling
111  @param stream_name - stream name to be enable/disabled, if not specified handle all streams
112 */
113 autoreply define pg_enable_disable
114 {
117  bool is_enabled [default=true];
118  string stream_name[];
119 };
120 
121 /*
122  * Local Variables:
123  * eval: (c-set-style "gnu")
124  * End:
125  */
pg_interface_enable_disable_coalesce
void pg_interface_enable_disable_coalesce(pg_interface_t *pi, u8 enable, u32 tx_node_index)
Definition: stream.c:215
vl_api_pg_capture_t::is_enabled
bool is_enabled[default=true]
Definition: pg.api:102
vl_api_pg_capture_t::context
u32 context
Definition: pg.api:100
vl_api_pg_create_interface_v2_t::context
u32 context
Definition: pg.api:50
PG_API_MODE_ETHERNET
@ PG_API_MODE_ETHERNET
Definition: pg.api:27
vl_api_pg_interface_enable_disable_coalesce_t::status
option status
Definition: pg.api:86
vl_api_pg_create_interface_reply_t::context
u32 context
Definition: pg.api:63
pg_capture
clib_error_t * pg_capture(pg_capture_args_t *a)
Definition: cli.c:81
vl_api_pg_create_interface_v2_t::mode
vl_api_pg_interface_mode_t mode
Definition: pg.api:54
vl_api_pg_create_interface_v2_reply_t
Definition: pg.api:67
vl_api_pg_interface_enable_disable_coalesce_t::sw_if_index
vl_api_interface_index_t sw_if_index
Definition: pg.api:84
i32
signed int i32
Definition: types.h:77
vl_api_pg_enable_disable_t
Enable / disable packet generator request.
Definition: pg.api:113
version
option version
Definition: pg.api:21
vl_api_pg_interface_enable_disable_coalesce_t
PacketGenerator interface enable/disable packet coalesce.
Definition: pg.api:80
vl_api_pg_capture_t::count
u32 count
Definition: pg.api:103
vl_api_pg_create_interface_v2_t::client_index
u32 client_index
Definition: pg.api:49
vl_api_pg_enable_disable_t::context
u32 context
Definition: pg.api:116
vl_api_pg_enable_disable_t::is_enabled
bool is_enabled[default=true]
Definition: pg.api:117
vl_api_pg_capture_t::interface_id
vl_api_interface_index_t interface_id
Definition: pg.api:101
vl_api_pg_create_interface_t::interface_id
vl_api_interface_index_t interface_id
Definition: pg.api:43
PG_API_MODE_IP4
@ PG_API_MODE_IP4
Definition: pg.api:28
vl_api_pg_interface_enable_disable_coalesce_t::coalesce_enabled
bool coalesce_enabled
Definition: pg.api:85
vl_api_pg_enable_disable_t::stream_name
string stream_name[]
Definition: pg.api:118
vl_api_pg_capture_t
PacketGenerator capture packets on given interface request.
Definition: pg.api:97
vl_api_pg_create_interface_t
PacketGenerator create interface request.
Definition: pg.api:39
PG_API_MODE_IP6
@ PG_API_MODE_IP6
Definition: pg.api:29
vl_api_pg_create_interface_v2_reply_t::retval
i32 retval
Definition: pg.api:70
vl_api_pg_create_interface_t::gso_size
u32 gso_size
Definition: pg.api:45
vl_api_pg_create_interface_v2_t::gso_enabled
bool gso_enabled
Definition: pg.api:52
pg_interface_mode
pg_interface_mode
Definition: pg.api:25
vl_api_pg_create_interface_t::gso_enabled
bool gso_enabled
Definition: pg.api:44
vl_api_pg_create_interface_reply_t
PacketGenerator create interface response.
Definition: pg.api:61
pg_enable_disable
void pg_enable_disable(u32 stream_index, int is_enable)
Definition: cli.c:58
u32
unsigned int u32
Definition: types.h:88
vl_api_pg_create_interface_v2_t::interface_id
vl_api_interface_index_t interface_id
Definition: pg.api:51
vl_api_pg_create_interface_reply_t::retval
i32 retval
Definition: pg.api:64
vl_api_pg_create_interface_t::context
u32 context
Definition: pg.api:42
vl_api_pg_create_interface_v2_reply_t::sw_if_index
vl_api_interface_index_t sw_if_index
Definition: pg.api:71
vl_api_pg_create_interface_v2_t::gso_size
u32 gso_size
Definition: pg.api:53
vl_api_pg_create_interface_v2_reply_t::context
u32 context
Definition: pg.api:69
u8
unsigned char u8
Definition: types.h:56
vl_api_pg_capture_t::pcap_file_name
string pcap_file_name[]
Definition: pg.api:104
vl_api_pg_interface_enable_disable_coalesce_t::client_index
u32 client_index
Definition: pg.api:82
vl_api_pg_interface_enable_disable_coalesce_t::context
u32 context
Definition: pg.api:83
vl_api_pg_capture_t::client_index
u32 client_index
Definition: pg.api:99
vl_api_pg_enable_disable_t::client_index
u32 client_index
Definition: pg.api:115
vl_api_pg_create_interface_t::client_index
u32 client_index
Definition: pg.api:41
vl_api_pg_create_interface_v2_t
Definition: pg.api:47
vl_api_pg_create_interface_reply_t::sw_if_index
vl_api_interface_index_t sw_if_index
Definition: pg.api:65