Jakub Grajciar | 7c5c40d | 2017-08-30 10:13:25 +0200 | [diff] [blame] | 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_ |
Jakub Grajciar | 5e1f69a | 2018-04-12 13:56:29 +0200 | [diff] [blame] | 19 | #define _SOCKET_H_ |
Jakub Grajciar | 7c5c40d | 2017-08-30 10:13:25 +0200 | [diff] [blame] | 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 | |
Jakub Grajciar | 134f1e0 | 2021-01-04 11:10:42 +0100 | [diff] [blame] | 34 | int memif_listener_handler (memif_fd_event_type_t type, void *private_ctx); |
Jakub Grajciar | 7c5c40d | 2017-08-30 10:13:25 +0200 | [diff] [blame] | 35 | |
Jakub Grajciar | 134f1e0 | 2021-01-04 11:10:42 +0100 | [diff] [blame] | 36 | int memif_control_channel_handler (memif_fd_event_type_t type, |
| 37 | void *private_ctx); |
Jakub Grajciar | 7c5c40d | 2017-08-30 10:13:25 +0200 | [diff] [blame] | 38 | |
Jakub Grajciar | 134f1e0 | 2021-01-04 11:10:42 +0100 | [diff] [blame] | 39 | void memif_delete_control_channel (memif_control_channel_t *cc); |
Jakub Grajciar | 7c5c40d | 2017-08-30 10:13:25 +0200 | [diff] [blame] | 40 | |
| 41 | #endif /* _SOCKET_H_ */ |