OpenVPN
mock_dco_dependencies.c
Go to the documentation of this file.
1/*
2 * OpenVPN -- An application to securely tunnel IP networks
3 * over a single UDP port, with support for SSL/TLS-based
4 * session authentication and key exchange,
5 * packet encryption, packet authentication, and
6 * packet compression.
7 *
8 * Copyright (C) 2002-2026 OpenVPN Inc <sales@openvpn.net>
9 * Copyright (C) 2026 Gianmarco De Gregori <gianmarco@mandelbit.com>
10 *
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License version 2
13 * as published by the Free Software Foundation.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License along
21 * with this program; if not, see <https://www.gnu.org/licenses/>.
22 */
23
24/*
25 * Stubs for what dco_linux.c drags in but capability probing never reaches:
26 * the data path, the event loop and the signal machinery.
27 */
28
29#ifdef HAVE_CONFIG_H
30#include "config.h"
31#endif
32
33#include "syshead.h"
34#include "dco.h"
35#include "crypto_backend.h"
36#include "forward.h"
37#include "multi.h"
38#include "networking.h"
39#include "socket_util.h"
40
41void
45
46void
50
51void
52register_signal(struct signal_info *si, int signum, const char *signal_text)
53{
54}
55
56int
57net_iface_new(const openvpn_net_ctx_t *ctx, const openvpn_net_iface_t *iface, const char *type,
58 const void *arg)
59{
60 return 0;
61}
62
63int
65{
66 return 0;
67}
68
69unsigned int
70cipher_kt_key_size(const char *ciphername)
71{
72 return 0;
73}
74
75const char *
76print_sockaddr_ex(const struct sockaddr *addr, const char *separator, const unsigned int flags,
77 struct gc_arena *gc)
78{
79 return "[mock]";
80}
Data Channel Cryptography SSL library-specific backend interface.
void * dco_context_t
Definition dco.h:270
Interface functions to the internal and external multiplexers.
void process_incoming_dco(dco_context_t *dco)
Process an incoming DCO message (from kernel space).
int net_iface_new(const openvpn_net_ctx_t *ctx, const openvpn_net_iface_t *iface, const char *type, const void *arg)
void multi_process_incoming_dco(dco_context_t *dco)
Process an incoming DCO message (from kernel space).
int net_iface_del(const openvpn_net_ctx_t *ctx, const openvpn_net_iface_t *iface)
unsigned int cipher_kt_key_size(const char *ciphername)
Returns the size of keys used by the cipher, in bytes.
void register_signal(struct signal_info *si, int signum, const char *signal_text)
Register a soft signal in the signal_info struct si respecting priority.
const char * print_sockaddr_ex(const struct sockaddr *addr, const char *separator, const unsigned int flags, struct gc_arena *gc)
Header file for server-mode related structures and functions.
void * openvpn_net_iface_t
Definition networking.h:42
void * openvpn_net_ctx_t
Definition networking.h:41
Garbage collection arena used to keep track of dynamically allocated memory.
Definition buffer.h:127
static char * iface
struct gc_arena gc
Definition test_ssl.c:138