misc: move part of vpe apis to vlibmemory
[vpp.git] / src / vpp / api / vpe.api
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 vpe control-plane API messages which are generally
19     called through a shared memory interface.
20 */
21
22 option version = "1.7.0";
23
24 import "vpp/api/vpe_types.api";
25
26 /*
27  * Note: API placement cleanup in progress
28  * If you're looking for interface APIs, please
29  * see .../src/vnet/{interface.api,interface_api.c}
30  * IP APIs: see .../src/vnet/ip/{ip.api, ip_api.c}
31  * VXLAN APIs: see .../src/vnet/vxlan/{vxlan.api, vxlan_api.c}
32  * GENEVE APIs: see .../src/vnet/geneve/{geneve.api, geneve_api.c}
33  * LLDP APIs: see .../src/vnet/lldp/{lldp.api, lldp_api.c}
34  * AF-PACKET APIs: see ... /vnet/devices/af_packet/{af_packet.api, af_packet_api.c}
35  * VHOST-USER APIs: see .../vnet/devices/virtio/{vhost_user.api, vhost_user_api.c}
36  * VXLAN GPE APIs: see .../src/vnet/vxlan-gpe/{vxlan_gpe.api, vxlan_gpe_api.c}
37  * GRE APIs: see .../src/vnet/gre/{gre.api, gre_api.c}
38  * L2 APIs: see .../src/vnet/l2/{l2.api, l2_api.c}
39  * L2TP APIs: see .../src/vnet/l2tp/{l2tp.api, l2tp_api.c}
40  * BFD APIs: see .../src/vnet/bfd/{bfd.api, bfd_api.c}
41  * IPSEC APIs: see .../src/vnet/ipsec/{ipsec.api, ipsec_api.c}
42  * LISP APIs: see .../src/vnet/lisp/{lisp.api, lisp_api.c}
43  * LISP-GPE APIs: see .../src/vnet/lisp-gpe/{lisp_gpe.api, lisp_gpe_api.c}
44  * SESSION APIs: .../vnet/session/{session.api session_api.c}
45  * MPLS APIs: see .../src/vnet/mpls/{mpls.api, mpls_api.c}
46  * SR APIs: see .../src/vnet/srv6/{sr.api, sr_api.c}
47  * CLASSIFY APIs: see ... /src/vnet/classify/{classify.api, classify_api.c}
48  * FLOW APIs: see ... /src/vnet/flow/{flow.api, flow_api.c}
49  * DHCP APIs: see ... /src/vnet/dhcp/{dhcp.api, dhcp_api.c}
50  * COP APIs: see ... /src/vnet/cop/{cop.api, cop_api.c}
51  * POLICER APIs: see ... /src/vnet/policer/{policer.api, policer_api.c}
52  * BIER APIs: see ... /src/vnet/policer/{bier.api, bier_api.c}.
53  * flow APIs: see .../vnet/vnet/flow/{flow.api, flow_api.c}
54  */
55
56 /** \brief Control ping from client to api server request
57     @param client_index - opaque cookie to identify the sender
58     @param context - sender context, to match reply w/ request
59 */
60 define control_ping
61 {
62   u32 client_index;
63   u32 context;
64 };
65
66 /** \brief Control ping from the client to the server response
67     @param client_index - opaque cookie to identify the sender
68     @param context - sender context, to match reply w/ request
69     @param retval - return code for the request
70     @param vpe_pid - the pid of the vpe, returned by the server
71 */
72 define control_ping_reply
73 {
74   u32 context;
75   i32 retval;
76   u32 client_index;
77   u32 vpe_pid;
78 };
79
80 /** \brief show version
81     @param client_index - opaque cookie to identify the sender
82     @param context - sender context, to match reply w/ request
83 */
84 define show_version
85 {
86   u32 client_index;
87   u32 context;
88 };
89
90 /** \brief show version response
91     @param context - sender context, to match reply w/ request
92     @param retval - return code for the request
93     @param program - name of the program (vpe)
94     @param version  - version of the program
95     @param build_directory - root of the workspace where the program was built
96 */
97 define show_version_reply
98 {
99   u32 context;
100   i32 retval;
101   string program[32];
102   string version[32];
103   string build_date[32];
104   string build_directory[256];
105 };
106
107 /** \brief Show the current system timestamp.
108     @param client_index - opaque cookie to identify the sender
109     @param context - sender context, to match reply w/ request
110 */
111 define show_vpe_system_time
112 {
113   u32 client_index;
114   u32 context;
115 };
116
117 /** \brief Reply for show vpe system time.
118     @param context - sender context which was passed in the request
119     @param retval - return value
120     @param vpe_system_time - the time in seconds since epoch of the host system.
121 */
122 define show_vpe_system_time_reply
123 {
124   u32 context;
125   i32 retval;
126   vl_api_timestamp_t vpe_system_time;
127 };
128
129 define log_dump {
130   u32 client_index;
131   u32 context;
132   vl_api_timestamp_t start_timestamp;
133 };
134
135 define log_details {
136   u32 context;
137   vl_api_timestamp_t timestamp;
138   vl_api_log_level_t level;
139   string msg_class[32];
140   string message[256];
141 };
142
143 /*
144  * Local Variables:
145  * eval: (c-set-style "gnu")
146  * End:
147  */