hs-test: more debug output in http3 test
[vpp.git] / extras / libmemif / src / socket.h
1 /*
2  *------------------------------------------------------------------
3  * Copyright (c) 2017 Cisco and/or its affiliates.
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at:
7  *
8  *     http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *------------------------------------------------------------------
16  */
17
18 #ifndef _SOCKET_H_
19 #define _SOCKET_H_
20
21 #include <memif_private.h>
22
23 /* interface identification errors (disconnect messages)*/
24 #define MEMIF_VER_ERR       "incompatible version"
25 #define MEMIF_ID_ERR        "unmatched interface id"
26 #define MEMIF_SLAVE_ERR     "cannot connect to salve"
27 #define MEMIF_CONN_ERR      "already connected"
28 #define MEMIF_MODE_ERR      "mode mismatch"
29 #define MEMIF_SECRET_ERR    "incorrect secret"
30 #define MEMIF_NOSECRET_ERR  "secret required"
31
32 /* socket.c */
33
34 int memif_listener_handler (memif_fd_event_type_t type, void *private_ctx);
35
36 int memif_control_channel_handler (memif_fd_event_type_t type,
37                                    void *private_ctx);
38
39 void memif_delete_control_channel (memif_control_channel_t *cc);
40
41 #endif /* _SOCKET_H_ */