FD.io VPP
v17.04.2-2-ga8f93f8
Vector Packet Processing
Main Page
Related Pages
Data Structures
Source
Files
Symbols
memif.api
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2017 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
/** \brief Create memory interface
17
@param client_index - opaque cookie to identify the sender
18
@param context - sender context, to match reply w/ request
19
@param role - role of the interface in the connection (master/slave)
20
@param key - 64bit integer used to authenticate and match opposite sides
21
of the connection
22
@param socket_filename - filename of the socket to be used for connection
23
establishment
24
@param ring_size - the number of entries of RX/TX rings
25
@param buffer_size - size of the buffer allocated for each ring entry
26
@param hw_addr - interface MAC address
27
*/
28
define memif_create
29
{
30
u32
client_index
;
31
u32
context
;
32
33
u8
role
;
/* 0 = master, 1 = slave */
34
u64
key
;
/* optional, default is 0 */
35
u8
socket_filename[128];
/* optional, default is "/var/vpp/memif.sock"
36
and can be changed in VPP startup config */
37
38
u32
ring_size
;
/* optional, default is 1024 entries, must be power of 2 */
39
u16
buffer_size
;
/* optional, default is 2048 bytes */
40
u8
hw_addr[6];
/* optional, randomly generated if not defined */
41
};
42
43
/** \brief Create memory interface response
44
@param context - sender context, to match reply w/ request
45
@param retval - return value for request
46
@param sw_if_index - software index of the newly created interface
47
*/
48
define memif_create_reply
49
{
50
u32
context
;
51
i32
retval
;
52
u32
sw_if_index
;
53
};
54
55
/** \brief Delete memory interface
56
@param client_index - opaque cookie to identify the sender
57
@param context - sender context, to match reply w/ request
58
@param sw_if_index - software index of the interface to delete
59
*/
60
define memif_delete
61
{
62
u32
client_index
;
63
u32
context
;
64
65
u32
sw_if_index
;
66
};
67
68
/** \brief Delete host-interface response
69
@param context - sender context, to match reply w/ request
70
@param retval - return value for request
71
*/
72
define memif_delete_reply
73
{
74
u32
context
;
75
i32
retval
;
76
};
77
78
/** \brief Memory interface details structure
79
@param context - sender context, to match reply w/ request (memif_dump)
80
@param sw_if_index - index of the interface
81
@param if_name - name of the interface
82
@param hw_addr - interface MAC address
83
@param key - key associated with the interface
84
@param role - role of the interface in the connection (master/slave)
85
@param socket_filename - name of the socket used by this interface
86
to establish new connections
87
@param ring_size - the number of entries of RX/TX rings
88
@param buffer_size - size of the buffer allocated for each ring entry
89
@param admin_up_down - interface administrative status
90
@param link_up_down - interface link status
91
92
*/
93
define memif_details
94
{
95
u32
context
;
96
97
u32
sw_if_index
;
98
u8
if_name[64];
99
u8
hw_addr[6];
100
101
/* memif specific parameters */
102
u64
key
;
103
u8
role
;
/* 0 = master, 1 = slave */
104
u8
socket_filename[128];
105
u32
ring_size
;
106
u16
buffer_size
;
/* optional, default is 2048 bytes */
107
108
/* 1 = up, 0 = down */
109
u8
admin_up_down
;
110
u8
link_up_down
;
111
};
112
113
/** \brief Dump all memory interfaces
114
@param client_index - opaque cookie to identify the sender
115
@param context - sender context, to match reply w/ request
116
*/
117
define memif_dump
118
{
119
u32
client_index
;
120
u32
context
;
121
};
122
123
/*
124
* Local Variables:
125
* eval: (c-set-style "gnu")
126
* End:
127
*/
vl_api_memif_create_t::client_index
u32 client_index
Definition:
memif.api:30
vl_api_memif_create_t::ring_size
u32 ring_size
Definition:
memif.api:38
i32
int i32
Definition:
types.h:81
u64
unsigned long u64
Definition:
types.h:89
vl_api_memif_delete_reply_t::context
u32 context
Definition:
memif.api:74
vl_api_memif_details_t::link_up_down
u8 link_up_down
Definition:
memif.api:110
vl_api_memif_create_reply_t::retval
i32 retval
Definition:
memif.api:51
vl_api_memif_dump_t::client_index
u32 client_index
Definition:
memif.api:119
vl_api_memif_delete_t::client_index
u32 client_index
Definition:
memif.api:62
vl_api_memif_dump_t::context
u32 context
Definition:
memif.api:120
vl_api_memif_details_t::buffer_size
u16 buffer_size
Definition:
memif.api:106
vl_api_memif_details_t::ring_size
u32 ring_size
Definition:
memif.api:105
vl_api_memif_details_t::role
u8 role
Definition:
memif.api:103
vl_api_memif_details_t::admin_up_down
u8 admin_up_down
Definition:
memif.api:109
vl_api_memif_create_reply_t::context
u32 context
Definition:
memif.api:50
vl_api_memif_delete_reply_t::retval
i32 retval
Definition:
memif.api:75
u32
unsigned int u32
Definition:
types.h:88
vl_api_memif_details_t::key
u64 key
Definition:
memif.api:102
vl_api_memif_details_t::context
u32 context
Definition:
memif.api:95
vl_api_memif_create_t::buffer_size
u16 buffer_size
Definition:
memif.api:39
vl_api_memif_details_t::sw_if_index
u32 sw_if_index
Definition:
memif.api:97
vl_api_memif_create_t::context
u32 context
Definition:
memif.api:31
vl_api_memif_create_t::key
u64 key
Definition:
memif.api:34
vl_api_memif_create_t::role
u8 role
Definition:
memif.api:33
vl_api_memif_create_reply_t::sw_if_index
u32 sw_if_index
Definition:
memif.api:52
vl_api_memif_delete_t::sw_if_index
u32 sw_if_index
Definition:
memif.api:65
u16
unsigned short u16
Definition:
types.h:57
u8
unsigned char u8
Definition:
types.h:56
vl_api_memif_delete_t::context
u32 context
Definition:
memif.api:63
src
plugins
memif
memif.api
Generated on Sat Jul 1 2017 12:01:38 for FD.io VPP by
1.8.11