blob: 0c1a848a677a80c7060254eea07d484c11d9fb79 [file] [log] [blame]
Jakub Grajciar7c5c40d2017-08-30 10:13:25 +02001/*
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_
Jakub Grajciar5e1f69a2018-04-12 13:56:29 +020019#define _SOCKET_H_
Jakub Grajciar7c5c40d2017-08-30 10:13:25 +020020
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
Jakub Grajciar134f1e02021-01-04 11:10:42 +010034int memif_listener_handler (memif_fd_event_type_t type, void *private_ctx);
Jakub Grajciar7c5c40d2017-08-30 10:13:25 +020035
Jakub Grajciar134f1e02021-01-04 11:10:42 +010036int memif_control_channel_handler (memif_fd_event_type_t type,
37 void *private_ctx);
Jakub Grajciar7c5c40d2017-08-30 10:13:25 +020038
Jakub Grajciar134f1e02021-01-04 11:10:42 +010039void memif_delete_control_channel (memif_control_channel_t *cc);
Jakub Grajciar7c5c40d2017-08-30 10:13:25 +020040
41#endif /* _SOCKET_H_ */