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:
7 * http://www.apache.org/licenses/LICENSE-2.0
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.
18 This file defines packet-generator interface APIs.
21 option version = "1.0.0";
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
28 define pg_create_interface
35 /** \brief PacketGenerator create interface response
36 @param context - sender context, to match reply w/ request
37 @param retval - return value for request
39 define pg_create_interface_reply
46 /** \brief PacketGenerator capture packets on given interface request
47 @param client_index - opaque cookie to identify the sender
48 @param context - sender context, to match reply w/ request
49 @param interface_id - pg interface index
50 @param is_enabled - 1 if enabling streams, 0 if disabling
51 @param count - number of packets to be captured
52 @param pcap_file - pacp file name to store captured packets
54 autoreply define pg_capture
62 u8 pcap_file_name[pcap_name_length];
65 /** \brief Enable / disable packet generator request
66 @param client_index - opaque cookie to identify the sender
67 @param context - sender context, to match reply w/ request
68 @param is_enabled - 1 if enabling streams, 0 if disabling
69 @param stream - stream name to be enable/disabled, if not specified handle all streams
71 autoreply define pg_enable_disable
76 u32 stream_name_length;
77 u8 stream_name[stream_name_length];
82 * eval: (c-set-style "gnu")