FD.io VPP
v18.01-8-g0eacf49
Vector Packet Processing
Main Page
Related Pages
Modules
Namespaces
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
vl_api_version
1.0.0
17
18
/** \brief Create memory interface
19
@param client_index - opaque cookie to identify the sender
20
@param context - sender context, to match reply w/ request
21
@param role - role of the interface in the connection (master/slave)
22
@param mode - interface mode
23
@param rx_queues - number of rx queues (only valid for slave)
24
#param tx_queues - number of tx queues (only valid for slave)
25
@param id - 32bit integer used to authenticate and match opposite sides
26
of the connection
27
@param socket_filename - filename of the socket to be used for connection
28
establishment
29
@param ring_size - the number of entries of RX/TX rings
30
@param buffer_size - size of the buffer allocated for each ring entry
31
@param hw_addr - interface MAC address
32
*/
33
define
memif_create
34
{
35
u32
client_index
;
36
u32
context
;
37
38
u8
role
;
/* 0 = master, 1 = slave */
39
u8
mode
;
/* 0 = ethernet, 1 = ip, 2 = punt/inject */
40
u8
rx_queues
;
/* optional, default is 1 */
41
u8
tx_queues
;
/* optional, default is 1 */
42
u32
id
;
/* optional, default is 0 */
43
u8
socket_filename[128];
/* optional, default is "/var/vpp/memif.sock" */
44
u8
secret[24];
/* optional, default is "" */
45
u32
ring_size
;
/* optional, default is 1024 entries, must be power of 2 */
46
u16
buffer_size
;
/* optional, default is 2048 bytes */
47
u8
hw_addr[6];
/* optional, randomly generated if not defined */
48
};
49
50
/** \brief Create memory interface response
51
@param context - sender context, to match reply w/ request
52
@param retval - return value for request
53
@param sw_if_index - software index of the newly created interface
54
*/
55
define memif_create_reply
56
{
57
u32
context
;
58
i32
retval
;
59
u32
sw_if_index
;
60
};
61
62
/** \brief Delete memory interface
63
@param client_index - opaque cookie to identify the sender
64
@param context - sender context, to match reply w/ request
65
@param sw_if_index - software index of the interface to delete
66
*/
67
autoreply define
memif_delete
68
{
69
u32
client_index
;
70
u32
context
;
71
72
u32
sw_if_index
;
73
};
74
75
/** \brief Memory interface details structure
76
@param context - sender context, to match reply w/ request (memif_dump)
77
@param sw_if_index - index of the interface
78
@param if_name - name of the interface
79
@param hw_addr - interface MAC address
80
@param id - id associated with the interface
81
@param role - role of the interface in the connection (master/slave)
82
@param mode - interface mode
83
@param socket_filename - name of the socket used by this interface
84
to establish new connections
85
@param ring_size - the number of entries of RX/TX rings
86
@param buffer_size - size of the buffer allocated for each ring entry
87
@param admin_up_down - interface administrative status
88
@param link_up_down - interface link status
89
90
*/
91
define memif_details
92
{
93
u32
context
;
94
95
u32
sw_if_index
;
96
u8
if_name[64];
97
u8
hw_addr[6];
98
99
/* memif specific parameters */
100
u32
id
;
101
u8
role
;
/* 0 = master, 1 = slave */
102
u8
mode
;
/* 0 = ethernet, 1 = ip, 2 = punt/inject */
103
u8
socket_filename[128];
104
u32
ring_size
;
105
u16
buffer_size
;
/* optional, default is 2048 bytes */
106
107
/* 1 = up, 0 = down */
108
u8
admin_up_down
;
109
u8
link_up_down
;
110
};
111
112
/** \brief Dump all memory interfaces
113
@param client_index - opaque cookie to identify the sender
114
@param context - sender context, to match reply w/ request
115
*/
116
define memif_dump
117
{
118
u32
client_index
;
119
u32
context
;
120
};
121
122
/*
123
* Local Variables:
124
* eval: (c-set-style "gnu")
125
* End:
126
*/
vl_api_memif_details_t::mode
u8 mode
Definition:
memif.api:102
vl_api_memif_create_t::client_index
u32 client_index
Definition:
memif.api:35
vl_api_memif_create_t::mode
u8 mode
Definition:
memif.api:39
vl_api_memif_create_t::ring_size
u32 ring_size
Definition:
memif.api:45
vl_api_version
#define vl_api_version(n, v)
Definition:
jvpp_registry.c:18
i32
int i32
Definition:
types.h:81
vl_api_memif_details_t::link_up_down
u8 link_up_down
Definition:
memif.api:109
vl_api_memif_create_reply_t::retval
i32 retval
Definition:
memif.api:58
vl_api_memif_dump_t::client_index
u32 client_index
Definition:
memif.api:118
vl_api_memif_delete_t::client_index
u32 client_index
Definition:
memif.api:69
vl_api_memif_dump_t::context
u32 context
Definition:
memif.api:119
vl_api_memif_details_t::buffer_size
u16 buffer_size
Definition:
memif.api:105
vl_api_memif_details_t::ring_size
u32 ring_size
Definition:
memif.api:104
vl_api_memif_details_t::role
u8 role
Definition:
memif.api:101
vl_api_memif_details_t::admin_up_down
u8 admin_up_down
Definition:
memif.api:108
vl_api_memif_create_reply_t::context
u32 context
Definition:
memif.api:57
vl_api_memif_create_t::tx_queues
u8 tx_queues
Definition:
memif.api:41
vl_api_memif_details_t::id
u32 id
Definition:
memif.api:100
u32
unsigned int u32
Definition:
types.h:88
memif_create
int memif_create(memif_conn_handle_t *conn, memif_conn_args_t *args, memif_connection_update_t *on_connect, memif_connection_update_t *on_disconnect, memif_interrupt_t *on_interrupt, void *private_ctx)
Memory interface create function.
Definition:
main.c:538
vl_api_memif_details_t::context
u32 context
Definition:
memif.api:93
vl_api_memif_create_t::buffer_size
u16 buffer_size
Definition:
memif.api:46
vl_api_memif_details_t::sw_if_index
u32 sw_if_index
Definition:
memif.api:95
vl_api_memif_create_t::id
u32 id
Definition:
memif.api:42
vl_api_memif_create_t::context
u32 context
Definition:
memif.api:36
vl_api_memif_create_t::role
u8 role
Definition:
memif.api:38
vl_api_memif_create_reply_t::sw_if_index
u32 sw_if_index
Definition:
memif.api:59
vl_api_memif_create_t::rx_queues
u8 rx_queues
Definition:
memif.api:40
vl_api_memif_delete_t::sw_if_index
u32 sw_if_index
Definition:
memif.api:72
u16
unsigned short u16
Definition:
types.h:57
u8
unsigned char u8
Definition:
types.h:56
memif_delete
int memif_delete(memif_conn_handle_t *conn)
Memif delete.
Definition:
main.c:1111
vl_api_memif_delete_t::context
u32 context
Definition:
memif.api:70
src
plugins
memif
memif.api
Generated on Wed Feb 7 2018 04:45:27 for FD.io VPP by
1.8.11