OpenVPN
mock_push_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 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License version 2
12 * as published by the Free Software Foundation.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License along
20 * with this program; if not, see <https://www.gnu.org/licenses/>.
21 */
22
23/* Set of mocked function/globals to get unit tests to
24 * compile that use the push_util.c file */
25
26
27#ifdef HAVE_CONFIG_H
28#include "config.h"
29#endif
30
31#include "error.h"
32#include "options.h"
33
34void
35throw_signal_soft(const int signum, const char *signal_text)
36{
37 msg(M_WARN, "Offending option received from server");
38}
39
40uint64_t
49
50void
52{
53}
54
55void
57{
58}
59
60void
61update_vhash(struct multi_context *m, struct multi_instance *mi, const char *new_ip, const char *new_ipv6)
62{
63}
64
65bool
67{
68 return true;
69}
bool options_postprocess_pull(struct options *options, struct env_set *es)
void throw_signal_soft(const int signum, const char *signal_text)
Throw a soft global signal.
uint64_t pull_permission_mask(const struct context *c)
void unlearn_ifconfig_ipv6(struct multi_context *m, struct multi_instance *mi)
void unlearn_ifconfig(struct multi_context *m, struct multi_instance *mi)
void update_vhash(struct multi_context *m, struct multi_instance *mi, const char *new_ip, const char *new_ipv6)
Update the vhash with new IP/IPv6 addresses in the multi_context when a push-update message containin...
#define msg(flags,...)
Definition error.h:152
#define M_WARN
Definition error.h:92
#define OPT_P_UP
Definition options.h:732
#define OPT_P_NCP
Negotiable crypto parameters.
Definition options.h:743
#define OPT_P_ECHO
Definition options.h:751
#define OPT_P_EXPLICIT_NOTIFY
Definition options.h:750
#define OPT_P_SHAPER
Definition options.h:737
#define OPT_P_SOCKFLAGS
Definition options.h:757
#define OPT_P_MESSAGES
Definition options.h:742
#define OPT_P_SETENV
Definition options.h:736
#define OPT_P_SOCKBUF
Definition options.h:756
#define OPT_P_TIMER
Definition options.h:738
#define OPT_P_DHCPDNS
Definition options.h:734
#define OPT_P_PULL_MODE
Definition options.h:754
#define OPT_P_PUSH_MTU
Definition options.h:761
#define OPT_P_PERSIST
Definition options.h:739
#define OPT_P_COMP
Definition options.h:741
#define OPT_P_ROUTE_EXTRAS
Definition options.h:753
#define OPT_P_PEER_ID
Definition options.h:759
#define OPT_P_ROUTE
Definition options.h:733
Contains all state information for one tunnel.
Definition openvpn.h:471
Main OpenVPN server state structure.
Definition multi.h:162
Server-mode state structure for one single VPN tunnel.
Definition multi.h:102