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-2024 OpenVPN Inc <sales@openvpn.net>
6 * Copyright (C) 2018-2024 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, write to the Free Software Foundation, Inc.,
19 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20 */
21
22#ifndef BASIC_H
23#define BASIC_H
24
25#ifdef _UNICODE
26#define PRIsLPTSTR "ls"
27#define PRIsLPOLESTR "ls"
28#else
29#define PRIsLPTSTR "s"
30#define PRIsLPOLESTR "ls"
31#endif
32#define PRIXGUID "{%08lX-%04hX-%04hX-%02hhX%02hhX-%02hhX%02hhX%02hhX%02hhX%02hhX%02hhX}"
33#define PRIGUID_PARAM(g) \
34 (g).Data1, (g).Data2, (g).Data3, (g).Data4[0], (g).Data4[1], (g).Data4[2], (g).Data4[3], (g).Data4[4], (g).Data4[5], (g).Data4[6], (g).Data4[7]
35#define PRIGUID_PARAM_REF(g) \
36 &(g).Data1, &(g).Data2, &(g).Data3, &(g).Data4[0], &(g).Data4[1], &(g).Data4[2], &(g).Data4[3], &(g).Data4[4], &(g).Data4[5], &(g).Data4[6], &(g).Data4[7]
37
38#define __L(q) L ## q
39#define _L(q) __L(q)
40
41#ifndef _In_
42#define _In_
43#endif
44#ifndef _In_opt_
45#define _In_opt_
46#endif
47#ifndef _In_z_
48#define _In_z_
49#endif
50#ifndef _Inout_
51#define _Inout_
52#endif
53#ifndef _Inout_opt_
54#define _Inout_opt_
55#endif
56#ifndef _Out_
57#define _Out_
58#endif
59#ifndef _Out_opt_
60#define _Out_opt_
61#endif
62#ifndef _Out_z_cap_
63#define _Out_z_cap_(n)
64#endif
65
66#endif /* ifndef BASIC_H */