aboutsummaryrefslogtreecommitdiffstats
path: root/cicn-plugin/cicn/cicn_api_handler.h
blob: d1e949a0b8ed9c5c453a9e6789f004974b2fca84 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
/*
 * Copyright (c) 2017 Cisco and/or its affiliates.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at:
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
/*
 * cicn_api_handler.h - Binary API support definitions
 *
 * - This header file consolidates imports/uses of vl_api definitions,
 *   to avoid polluting other plugin-internal header files.
 */

#ifndef __CICN_API_HANDLER_H__
#define __CICN_API_HANDLER_H__

#if !CICN_VPP_PLUGIN
#error "cicn-internal file included externally"
#endif

#include <vnet/vnet.h>

#include <cicn/cicn_api.h>

/*
 * Binary serialization for get face configuration API.
 */
vnet_api_error_t
cicn_face_api_entry_params_serialize (int faceid,
				      vl_api_cicn_api_face_params_get_reply_t
				      * reply);

/*
 * Binary serialization for show faces API.
 */
vnet_api_error_t
cicn_face_api_entry_props_serialize (vl_api_cicn_api_face_props_get_reply_t *
				     reply);

/*
 * Binary serialization for face statistics API.
 */
vnet_api_error_t
cicn_face_api_entry_stats_serialize (int faceid,
				     vl_api_cicn_api_face_stats_get_reply_t *
				     reply);

/*
 * Binary serialization for show FIB API.
 */
vnet_api_error_t
  cicn_fib_api_entry_props_serialize
  (vl_api_cicn_api_fib_entry_props_get_reply_t * reply, int page);

/*
 * Binary serialization for UT API.
 */
struct test_cicn_api_op_s
{
  vl_api_cicn_api_test_run_get_reply_t *reply;
};

int test_cicn_api_results_serialize (test_cicn_api_op_t * test_cicn_api_op);

#endif // __CICN_API_HANDLER_H__