1b8d4481aSNeale Ranns/*
2b8d4481aSNeale Ranns * Copyright (c) 2015-2016 Cisco and/or its affiliates.
3b8d4481aSNeale Ranns * Licensed under the Apache License, Version 2.0 (the "License");
4b8d4481aSNeale Ranns * you may not use this file except in compliance with the License.
5b8d4481aSNeale Ranns * You may obtain a copy of the License at:
6b8d4481aSNeale Ranns *
7b8d4481aSNeale Ranns *     http://www.apache.org/licenses/LICENSE-2.0
8b8d4481aSNeale Ranns *
9b8d4481aSNeale Ranns * Unless required by applicable law or agreed to in writing, software
10b8d4481aSNeale Ranns * distributed under the License is distributed on an "AS IS" BASIS,
11b8d4481aSNeale Ranns * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12b8d4481aSNeale Ranns * See the License for the specific language governing permissions and
13b8d4481aSNeale Ranns * limitations under the License.
14b8d4481aSNeale Ranns */
15b8d4481aSNeale Ranns
16b8d4481aSNeale Ranns/** \file
17b8d4481aSNeale Ranns
18b8d4481aSNeale Ranns    This file defines packet-generator interface APIs.
19b8d4481aSNeale Ranns*/
20b8d4481aSNeale Ranns
21db86329aSJakub Grajciaroption version = "2.0.0";
22db86329aSJakub Grajciar
23db86329aSJakub Grajciarimport "vnet/interface_types.api";
24b8d4481aSNeale Ranns
25b8d4481aSNeale Ranns/** \brief PacketGenerator create interface request
26b8d4481aSNeale Ranns    @param client_index - opaque cookie to identify the sender
27b8d4481aSNeale Ranns    @param context - sender context, to match reply w/ request
28b8d4481aSNeale Ranns    @param interface_id - interface index
290cf52823SMohsin Kazmi    @param gso_enabled - enable gso on this interface
3022e9cfd7SMohsin Kazmi    @param gso_size - gso size on this interface
31b8d4481aSNeale Ranns*/
32b8d4481aSNeale Rannsdefine pg_create_interface
33b8d4481aSNeale Ranns{
34b8d4481aSNeale Ranns  u32 client_index;
35b8d4481aSNeale Ranns  u32 context;
36db86329aSJakub Grajciar  vl_api_interface_index_t interface_id;
37db86329aSJakub Grajciar  bool gso_enabled;
3822e9cfd7SMohsin Kazmi  u32 gso_size;
39b8d4481aSNeale Ranns};
40b8d4481aSNeale Ranns
41b8d4481aSNeale Ranns/** \brief PacketGenerator create interface response
42b8d4481aSNeale Ranns    @param context - sender context, to match reply w/ request
43b8d4481aSNeale Ranns    @param retval - return value for request
44b8d4481aSNeale Ranns*/
45b8d4481aSNeale Rannsdefine pg_create_interface_reply
46b8d4481aSNeale Ranns{
47b8d4481aSNeale Ranns  u32 context;
48b8d4481aSNeale Ranns  i32 retval;
49db86329aSJakub Grajciar  vl_api_interface_index_t sw_if_index;
50b8d4481aSNeale Ranns};
51b8d4481aSNeale Ranns
52b8d4481aSNeale Ranns/** \brief PacketGenerator capture packets on given interface request
53b8d4481aSNeale Ranns    @param client_index - opaque cookie to identify the sender
54b8d4481aSNeale Ranns    @param context - sender context, to match reply w/ request
55b8d4481aSNeale Ranns    @param interface_id - pg interface index
56b8d4481aSNeale Ranns    @param is_enabled - 1 if enabling streams, 0 if disabling
57b8d4481aSNeale Ranns    @param count - number of packets to be captured
58db86329aSJakub Grajciar    @param pcap_file_name - pacp file name to store captured packets
59b8d4481aSNeale Ranns*/
60b8d4481aSNeale Rannsautoreply define pg_capture
61b8d4481aSNeale Ranns{
62b8d4481aSNeale Ranns  u32 client_index;
63b8d4481aSNeale Ranns  u32 context;
64db86329aSJakub Grajciar  vl_api_interface_index_t interface_id;
65db86329aSJakub Grajciar  bool is_enabled [default=true];
66b8d4481aSNeale Ranns  u32 count;
67db86329aSJakub Grajciar  string pcap_file_name[];
68b8d4481aSNeale Ranns};
69b8d4481aSNeale Ranns
70b8d4481aSNeale Ranns/** \brief Enable / disable packet generator request
71b8d4481aSNeale Ranns    @param client_index - opaque cookie to identify the sender
72b8d4481aSNeale Ranns    @param context - sender context, to match reply w/ request
73b8d4481aSNeale Ranns    @param is_enabled - 1 if enabling streams, 0 if disabling
74db86329aSJakub Grajciar    @param stream_name - stream name to be enable/disabled, if not specified handle all streams
75b8d4481aSNeale Ranns*/
76b8d4481aSNeale Rannsautoreply define pg_enable_disable
77b8d4481aSNeale Ranns{
78b8d4481aSNeale Ranns  u32 client_index;
79b8d4481aSNeale Ranns  u32 context;
80db86329aSJakub Grajciar  bool is_enabled [default=true];
81db86329aSJakub Grajciar  string stream_name[];
82b8d4481aSNeale Ranns};
83b8d4481aSNeale Ranns
84b8d4481aSNeale Ranns/*
85b8d4481aSNeale Ranns * Local Variables:
86b8d4481aSNeale Ranns * eval: (c-set-style "gnu")
87b8d4481aSNeale Ranns * End:
88b8d4481aSNeale Ranns */
89