FD.io VPP
v18.10-34-gcce845e
Vector Packet Processing
Main Page
Related Pages
Modules
Namespaces
Data Structures
Source
Files
Symbols
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
=
"1.0.0"
;
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
27
*/
28
define pg_create_interface
29
{
30
u32
client_index
;
31
u32
context
;
32
u32
interface_id
;
33
};
34
35
/** \brief PacketGenerator create interface response
36
@param context - sender context, to match reply w/ request
37
@param retval - return value for request
38
*/
39
define pg_create_interface_reply
40
{
41
u32
context
;
42
i32
retval
;
43
u32
sw_if_index
;
44
};
45
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
53
*/
54
autoreply define
pg_capture
55
{
56
u32
client_index
;
57
u32
context
;
58
u32
interface_id
;
59
u8
is_enabled
;
60
u32
count
;
61
u32
pcap_name_length
;
62
u8
pcap_file_name[pcap_name_length];
63
};
64
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
70
*/
71
autoreply define
pg_enable_disable
72
{
73
u32
client_index
;
74
u32
context
;
75
u8
is_enabled
;
76
u32
stream_name_length
;
77
u8
stream_name[stream_name_length];
78
};
79
80
/*
81
* Local Variables:
82
* eval: (c-set-style "gnu")
83
* End:
84
*/
pg_capture
clib_error_t * pg_capture(pg_capture_args_t *a)
Definition:
cli.c:81
vl_api_pg_capture_t::context
u32 context
Definition:
pg.api:57
vl_api_pg_create_interface_reply_t::context
u32 context
Definition:
pg.api:41
vl_api_pg_capture_t::is_enabled
u8 is_enabled
Definition:
pg.api:59
u8
unsigned char u8
Definition:
types.h:56
vl_api_pg_create_interface_t::interface_id
u32 interface_id
Definition:
pg.api:32
vl_api_pg_enable_disable_t::stream_name_length
u32 stream_name_length
Definition:
pg.api:76
u32
unsigned int u32
Definition:
types.h:88
vl_api_pg_create_interface_reply_t::sw_if_index
u32 sw_if_index
Definition:
pg.api:43
vl_api_pg_capture_t::count
u32 count
Definition:
pg.api:60
vl_api_pg_capture_t::pcap_name_length
u32 pcap_name_length
Definition:
pg.api:61
vl_api_pg_enable_disable_t::context
u32 context
Definition:
pg.api:74
version
option version
Definition:
pg.api:21
vl_api_pg_create_interface_reply_t::retval
i32 retval
Definition:
pg.api:42
i32
signed int i32
Definition:
types.h:77
pg_enable_disable
void pg_enable_disable(u32 stream_index, int is_enable)
Definition:
cli.c:58
vl_api_pg_capture_t::client_index
u32 client_index
Definition:
pg.api:56
vl_api_pg_create_interface_t::client_index
u32 client_index
Definition:
pg.api:30
vl_api_pg_enable_disable_t::is_enabled
u8 is_enabled
Definition:
pg.api:75
vl_api_pg_capture_t::interface_id
u32 interface_id
Definition:
pg.api:58
vl_api_pg_enable_disable_t::client_index
u32 client_index
Definition:
pg.api:73
vl_api_pg_create_interface_t::context
u32 context
Definition:
pg.api:31
src
vnet
pg
pg.api
Generated on Thu May 16 2019 14:26:49 for FD.io VPP by
1.8.11