OpenVPN
basic.h
Go to the documentation of this file.
1/*
2 * basic -- Basic macros
3 * https://community.openvpn.net/openvpn/wiki/Tapctl
4 *
5 * Copyright (C) 2002-2025 OpenVPN Inc <sales@openvpn.net>
6 * Copyright (C) 2018-2025 Simon Rozman <simon@rozman.si>
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2
10 * as published by the Free Software Foundation.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License along
18 * with this program; if not, see <https://www.gnu.org/licenses/>.
19 */
20
21#ifndef BASIC_H
22#define BASIC_H
23
24/* We do not support non-unicode builds */
25#ifndef UNICODE
26#define UNICODE
27#endif
28
29#define PRIXGUID "{%08lX-%04hX-%04hX-%02hhX%02hhX-%02hhX%02hhX%02hhX%02hhX%02hhX%02hhX}"
30#define PRIGUID_PARAM(g) \
31 (g).Data1, (g).Data2, (g).Data3, (g).Data4[0], (g).Data4[1], (g).Data4[2], (g).Data4[3], \
32 (g).Data4[4], (g).Data4[5], (g).Data4[6], (g).Data4[7]
33#define PRIGUID_PARAM_REF(g) \
34 &(g).Data1, &(g).Data2, &(g).Data3, &(g).Data4[0], &(g).Data4[1], &(g).Data4[2], \
35 &(g).Data4[3], &(g).Data4[4], &(g).Data4[5], &(g).Data4[6], &(g).Data4[7]
36
37#define __L(q) L##q
38#define _L(q) __L(q)
39
40#ifndef _In_
41#define _In_
42#endif
43#ifndef _In_opt_
44#define _In_opt_
45#endif
46#ifndef _In_z_
47#define _In_z_
48#endif
49#ifndef _Inout_
50#define _Inout_
51#endif
52#ifndef _Inout_opt_
53#define _Inout_opt_
54#endif
55#ifndef _Out_
56#define _Out_
57#endif
58#ifndef _Out_opt_
59#define _Out_opt_
60#endif
61#ifndef _Out_z_cap_
62#define _Out_z_cap_(n)
63#endif
64
65#endif /* ifndef BASIC_H */