blob: 86343d5c8df80d8d5e33fbff4060a75d70aee641 [file] [log] [blame]
Neale Rannsb8d44812017-11-10 06:53:54 -08001/*
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
Jakub Grajciardb863292020-01-30 14:14:15 +010021option version = "2.0.0";
22
23import "vnet/interface_types.api";
Neale Rannsb8d44812017-11-10 06:53:54 -080024
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
Mohsin Kazmi0cf52822020-06-10 12:35:05 +020029 @param gso_enabled - enable gso on this interface
Mohsin Kazmi22e9cfd2019-07-23 11:54:48 +020030 @param gso_size - gso size on this interface
Neale Rannsb8d44812017-11-10 06:53:54 -080031*/
32define pg_create_interface
33{
34 u32 client_index;
35 u32 context;
Jakub Grajciardb863292020-01-30 14:14:15 +010036 vl_api_interface_index_t interface_id;
37 bool gso_enabled;
Mohsin Kazmi22e9cfd2019-07-23 11:54:48 +020038 u32 gso_size;
Neale Rannsb8d44812017-11-10 06:53:54 -080039};
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*/
45define pg_create_interface_reply
46{
47 u32 context;
48 i32 retval;
Jakub Grajciardb863292020-01-30 14:14:15 +010049 vl_api_interface_index_t sw_if_index;
Neale Rannsb8d44812017-11-10 06:53:54 -080050};
51
52/** \brief PacketGenerator capture packets on given interface request
53 @param client_index - opaque cookie to identify the sender
54 @param context - sender context, to match reply w/ request
55 @param interface_id - pg interface index
56 @param is_enabled - 1 if enabling streams, 0 if disabling
57 @param count - number of packets to be captured
Jakub Grajciardb863292020-01-30 14:14:15 +010058 @param pcap_file_name - pacp file name to store captured packets
Neale Rannsb8d44812017-11-10 06:53:54 -080059*/
60autoreply define pg_capture
61{
62 u32 client_index;
63 u32 context;
Jakub Grajciardb863292020-01-30 14:14:15 +010064 vl_api_interface_index_t interface_id;
65 bool is_enabled [default=true];
Neale Rannsb8d44812017-11-10 06:53:54 -080066 u32 count;
Jakub Grajciardb863292020-01-30 14:14:15 +010067 string pcap_file_name[];
Neale Rannsb8d44812017-11-10 06:53:54 -080068};
69
70/** \brief Enable / disable packet generator request
71 @param client_index - opaque cookie to identify the sender
72 @param context - sender context, to match reply w/ request
73 @param is_enabled - 1 if enabling streams, 0 if disabling
Jakub Grajciardb863292020-01-30 14:14:15 +010074 @param stream_name - stream name to be enable/disabled, if not specified handle all streams
Neale Rannsb8d44812017-11-10 06:53:54 -080075*/
76autoreply define pg_enable_disable
77{
78 u32 client_index;
79 u32 context;
Jakub Grajciardb863292020-01-30 14:14:15 +010080 bool is_enabled [default=true];
81 string stream_name[];
Neale Rannsb8d44812017-11-10 06:53:54 -080082};
83
84/*
85 * Local Variables:
86 * eval: (c-set-style "gnu")
87 * End:
88 */