Neale Ranns | b8d4481 | 2017-11-10 06:53:54 -0800 | [diff] [blame] | 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 | |
Mohsin Kazmi | 22e9cfd | 2019-07-23 11:54:48 +0200 | [diff] [blame] | 21 | option version = "1.1.0"; |
Neale Ranns | b8d4481 | 2017-11-10 06:53:54 -0800 | [diff] [blame] | 22 | |
| 23 | /** \brief PacketGenerator create interface request |
| 24 | @param client_index - opaque cookie to identify the sender |
| 25 | @param context - sender context, to match reply w/ request |
| 26 | @param interface_id - interface index |
Mohsin Kazmi | 22e9cfd | 2019-07-23 11:54:48 +0200 | [diff] [blame] | 27 | @param enable_gso - enable gso on this interface |
| 28 | @param gso_size - gso size on this interface |
Neale Ranns | b8d4481 | 2017-11-10 06:53:54 -0800 | [diff] [blame] | 29 | */ |
| 30 | define pg_create_interface |
| 31 | { |
| 32 | u32 client_index; |
| 33 | u32 context; |
| 34 | u32 interface_id; |
Mohsin Kazmi | 22e9cfd | 2019-07-23 11:54:48 +0200 | [diff] [blame] | 35 | u8 gso_enabled; |
| 36 | u32 gso_size; |
Neale Ranns | b8d4481 | 2017-11-10 06:53:54 -0800 | [diff] [blame] | 37 | }; |
| 38 | |
| 39 | /** \brief PacketGenerator create interface response |
| 40 | @param context - sender context, to match reply w/ request |
| 41 | @param retval - return value for request |
| 42 | */ |
| 43 | define pg_create_interface_reply |
| 44 | { |
| 45 | u32 context; |
| 46 | i32 retval; |
| 47 | u32 sw_if_index; |
| 48 | }; |
| 49 | |
| 50 | /** \brief PacketGenerator capture packets on given interface request |
| 51 | @param client_index - opaque cookie to identify the sender |
| 52 | @param context - sender context, to match reply w/ request |
| 53 | @param interface_id - pg interface index |
| 54 | @param is_enabled - 1 if enabling streams, 0 if disabling |
| 55 | @param count - number of packets to be captured |
| 56 | @param pcap_file - pacp file name to store captured packets |
| 57 | */ |
| 58 | autoreply define pg_capture |
| 59 | { |
| 60 | u32 client_index; |
| 61 | u32 context; |
| 62 | u32 interface_id; |
| 63 | u8 is_enabled; |
| 64 | u32 count; |
| 65 | u32 pcap_name_length; |
| 66 | u8 pcap_file_name[pcap_name_length]; |
| 67 | }; |
| 68 | |
| 69 | /** \brief Enable / disable packet generator request |
| 70 | @param client_index - opaque cookie to identify the sender |
| 71 | @param context - sender context, to match reply w/ request |
| 72 | @param is_enabled - 1 if enabling streams, 0 if disabling |
| 73 | @param stream - stream name to be enable/disabled, if not specified handle all streams |
| 74 | */ |
| 75 | autoreply define pg_enable_disable |
| 76 | { |
| 77 | u32 client_index; |
| 78 | u32 context; |
| 79 | u8 is_enabled; |
| 80 | u32 stream_name_length; |
| 81 | u8 stream_name[stream_name_length]; |
| 82 | }; |
| 83 | |
| 84 | /* |
| 85 | * Local Variables: |
| 86 | * eval: (c-set-style "gnu") |
| 87 | * End: |
| 88 | */ |