1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
// SPDX-License-Identifier: MIT OR Apache-2.0
//
// Copyright (c) 2024 Nathaniel Bennett <me[at]nathanielbennett[dotcom]>
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// https://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or https://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
use NonNull;
pub use Wintun;
pub use Wintun;
use PCWSTR;
/*
/// The minimum ring capacity of a Wintun interface.
pub const WINTUN_MIN_RING_CAPACITY: u32 = 0x20000; // 128kiB
/// The maximum ring capacity of a Wintun interface.
pub const WINTUN_MAX_RING_CAPACITY: u32 = 0x4000000; // 64MiB
/// The maximum IP packet size that can be moved through a Wintun interface.
const WINTUN_MAX_IP_PACKET_SIZE: u32 = 0xFFFF;
*/
/// An opaque Wintun adapter type that WINTUN_ADAPTER_HANDLE would point to.
pub type WintunAdapter = c_void;
/// An opaque Wintun session type that WINTUN_SESSION_HANDLE would point to.
pub type WintunSession = c_void;
pub type WintunPacket = ;
/// Called by internal logger to report diagnostic messages.
///
/// #Arguments
/// * `level` The log level of the message
/// * `timestamp` The time at which the message was logged, measured in 100ns intervals since
/// 1601-01-01 UTC
/// * `message` The text of the log message
pub type WintunLoggerCallback =
unsafe extern "C" fn;