Wintun operates using Adapters and Sessions.
- Adapters: Named interfaces (e.g., "OfficeNet") that belong to a specific pool (e.g., "WireGuard"). Multiple adapters can exist within the same pool.
- Sessions: A tunnel session started on a specific adapter to facilitate packet transfer.
Use WintunCreateAdapter to define an adapter and WintunStartSession to begin a session on that adapter.
// Create adapters within a pool named "WireGuard"
WINTUN_ADAPTER_HANDLE Adapter1 = WintunCreateAdapter(L"WireGuard", L"OfficeNet", &SomeFixedGUID1, NULL);
WINTUN_ADAPTER_HANDLE Adapter2 = WintunCreateAdapter(L"WireGuard", L"HomeNet", &SomeFixedGUID2, NULL);
// Start a session on an adapter
WINTUN_SESSION_HANDLE Session = WintunStartSession(Adapter2, 0x400000);