summaryrefslogtreecommitdiffstats
path: root/src/vat/main.c
AgeCommit message (Expand)AuthorFilesLines
2019-06-07build: add -Wall and -fno-common, fix reported issuesBenoƮt Ganne1-1/+0
2019-03-28vat:ignore SIGWINCH signalezkexma1-0/+1
2019-01-20Rework of debian packagingDamjan Marion1-0/+34
2018-10-23c11 safe string handling supportDave Barach1-1/+1
2018-07-31Fix undefined symbol: fformat_append_cr in vat plugins loadingYi He1-11/+0
2018-07-18Add config option to use dlmalloc instead of mheapDave Barach1-9/+1
2018-05-30vppinfra: explicitely state for signed types that they are signedDamjan Marion1-1/+1
2018-01-05sock api: add infra for bootstrapping shm clientsFlorin Coras1-1/+1
2017-10-18CSIT-844: fix binary api rx pthread heap push/popDave Barach1-0/+13
2017-10-03Repair vlib API socket serverDave Barach1-7/+31
2017-09-25Fix usage string for vatJerome Tollet1-1/+2
2017-03-30Fix more "symbol XXX found in none of the libs" warningsDave Barach1-1/+0
2016-12-28Reorganize source tree to use single autotools instanceDamjan Marion1-0/+421
t .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ }
/*
 * Copyright (c) 2019 Cisco and/or its affiliates.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this
 * 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.
 *
 * VCL Locked Sessions
 */

#ifndef SRC_VCL_VCL_LOCKED_H_
#define SRC_VCL_VCL_LOCKED_H_

#include <vcl/vppcom.h>

#define VLS_INVALID_HANDLE ((int)-1)
#define VLS_WORKER_RPC_TIMEOUT 3 /* timeout to wait rpc response. */

typedef int vls_handle_t;

vls_handle_t vls_create (uint8_t proto, uint8_t is_nonblocking);
int vls_shutdown (vls_handle_t vlsh, int how);
int vls_close (vls_handle_t vlsh);
int vls_bind (vls_handle_t vlsh, vppcom_endpt_t * ep);
int vls_listen (vls_handle_t vlsh, int q_len);
int vls_connect (vls_handle_t vlsh, vppcom_endpt_t * server_ep);
vls_handle_t vls_accept (vls_handle_t vlsh, vppcom_endpt_t * ep, int flags);
ssize_t vls_read (vls_handle_t vlsh, void *buf, size_t nbytes);
ssize_t vls_recvfrom (vls_handle_t vlsh, void *buffer, uint32_t buflen,
		      int flags, vppcom_endpt_t * ep);
int vls_write (vls_handle_t vlsh, void *buf, size_t nbytes);
int vls_write_msg (vls_handle_t vlsh, void *buf, size_t nbytes);
int vls_sendto (vls_handle_t vlsh, void *buf, int buflen, int flags,
		vppcom_endpt_t * ep);
int vls_attr (vls_handle_t vlsh, uint32_t op, void *buffer,
	      uint32_t * buflen);
vls_handle_t vls_epoll_create (void);
int vls_epoll_ctl (vls_handle_t ep_vlsh, int op, vls_handle_t vlsh,
		   struct epoll_event *event);
int vls_epoll_wait (vls_handle_t ep_vlsh, struct epoll_event *events,
		    int maxevents, double wait_for_time);
int vls_select (int n_bits, vcl_si_set * read_map, vcl_si_set * write_map,
		vcl_si_set * except_map, double wait_for_time);
vcl_session_handle_t vlsh_to_sh (vls_handle_t vlsh);
vcl_session_handle_t vlsh_to_session_index (vls_handle_t vlsh);
vls_handle_t vls_session_index_to_vlsh (uint32_t session_index);
int vls_app_create (char *app_name);
unsigned char vls_use_eventfd (void);
unsigned char vls_mt_wrk_supported (void);
int vls_use_real_epoll (void);
void vls_register_vcl_worker (void);

#endif /* SRC_VCL_VCL_LOCKED_H_ */

/*
 * fd.io coding-style-patch-verification: ON
 *
 * Local Variables:
 * eval: (c-set-style "gnu")
 * End:
 */