FD.io VPP  v21.06-3-gbb25fbf28
Vector Packet Processing
vppapiclient.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 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 #ifndef included_vppapiclient_h
16 #define included_vppapiclient_h
17 
18 #include <stdint.h>
19 #include <stdbool.h>
20 
21 typedef enum
22 {
28 } vac_errno_t;
29 
30 typedef void (*vac_callback_t)(unsigned char * data, int len);
31 typedef void (*vac_error_callback_t)(void *, unsigned char *, int);
32 int vac_connect(char * name, char * chroot_prefix, vac_callback_t cb,
33  int rx_qlen);
34 int vac_disconnect(void);
35 int vac_read(char **data, int *l, unsigned short timeout);
36 int vac_write(char *data, int len);
37 void vac_free(void * msg);
38 
39 int vac_get_msg_index(char * name);
40 int vac_msg_table_size(void);
41 int vac_msg_table_max_index(void);
42 
43 void vac_rx_suspend (void);
44 void vac_rx_resume (void);
46 void vac_mem_init (size_t size);
47 
48 #endif
VAC_SVM_QUEUE_SUB_2
@ VAC_SVM_QUEUE_SUB_2
Definition: vppapiclient.h:24
name
string name[64]
Definition: fib.api:25
VAC_SVM_QUEUE_SUB_1
@ VAC_SVM_QUEUE_SUB_1
Definition: vppapiclient.h:23
vac_rx_resume
void vac_rx_resume(void)
Definition: client.c:261
len
u8 len
Definition: ip_types.api:103
vac_read
int vac_read(char **data, int *l, unsigned short timeout)
Definition: client.c:410
vac_errno_t
vac_errno_t
Definition: vppapiclient.h:21
vac_msg_table_max_index
int vac_msg_table_max_index(void)
Definition: client.c:543
vac_mem_init
void vac_mem_init(size_t size)
Definition: client.c:568
data
u8 data[128]
Definition: ipsec_types.api:92
size
u32 size
Definition: vhost_user.h:125
vac_error_callback_t
void(* vac_error_callback_t)(void *, unsigned char *, int)
Definition: vppapiclient.h:31
VAC_SHM_NOT_READY
@ VAC_SHM_NOT_READY
Definition: vppapiclient.h:26
vac_connect
int vac_connect(char *name, char *chroot_prefix, vac_callback_t cb, int rx_qlen)
Definition: client.c:288
vac_set_error_handler
void vac_set_error_handler(vac_error_callback_t)
Definition: client.c:558
vac_free
void vac_free(void *msg)
Definition: client.c:120
vac_rx_suspend
void vac_rx_suspend(void)
Definition: client.c:240
VAC_TIMEOUT
@ VAC_TIMEOUT
Definition: vppapiclient.h:27
vac_msg_table_size
int vac_msg_table_size(void)
Definition: client.c:281
vac_disconnect
int vac_disconnect(void)
Definition: client.c:359
vac_write
int vac_write(char *data, int len)
Definition: client.c:512
vac_get_msg_index
int vac_get_msg_index(char *name)
Definition: client.c:537
VAC_NOT_CONNECTED
@ VAC_NOT_CONNECTED
Definition: vppapiclient.h:25
vac_callback_t
void(* vac_callback_t)(unsigned char *data, int len)
Definition: vppapiclient.h:30