blob: c4b55ae0be175edec031167bf0284bb77b5afb71 [file] [log] [blame]
Ed Warnickecb9cada2015-12-08 15:45:58 -07001/*
Ole Troan6855f6c2016-04-09 03:16:30 +02002 * Copyright (c) 2016 Cisco and/or its affiliates.
Ed Warnickecb9cada2015-12-08 15:45:58 -07003 * 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 */
Ole Troan5f9dcff2016-08-01 04:59:13 +020015#ifndef included_pneum_h
16#define included_pneum_h
Ed Warnickecb9cada2015-12-08 15:45:58 -070017
Ole Troan7e3a8752016-12-05 10:27:09 +010018#include <stdint.h>
Dave Barach557d1282016-11-10 14:22:49 -050019#include <vppinfra/types.h>
20
21typedef void (*pneum_callback_t)(unsigned char * data, int len);
Dave Barachf9526922017-01-06 16:33:06 -050022int pneum_connect(char * name, char * chroot_prefix, pneum_callback_t cb,
23 int rx_qlen);
Ole Troan6855f6c2016-04-09 03:16:30 +020024int pneum_disconnect(void);
Ole Troandfc9b7c2017-03-06 23:51:57 +010025int pneum_read(char **data, int *l, unsigned short timeout);
Ole Troan6855f6c2016-04-09 03:16:30 +020026int pneum_write(char *data, int len);
Dave Barach557d1282016-11-10 14:22:49 -050027void pneum_free(void * msg);
28uword * pneum_msg_table_get_hash (void);
29int pneum_msg_table_size(void);
Ole Troan7e3a8752016-12-05 10:27:09 +010030uint32_t pneum_get_msg_index(unsigned char * name);
Ole Troandfc9b7c2017-03-06 23:51:57 +010031void pneum_rx_suspend (void);
32void pneum_rx_resume (void);
Ed Warnickecb9cada2015-12-08 15:45:58 -070033
Ole Troan6855f6c2016-04-09 03:16:30 +020034#endif