diff options
Diffstat (limited to 'api')
-rw-r--r-- | api/exports.def | 2 | ||||
-rw-r--r-- | api/session.c | 2 | ||||
-rw-r--r-- | api/wintun.h | 12 |
3 files changed, 7 insertions, 9 deletions
diff --git a/api/exports.def b/api/exports.def index 4ca739f..e3bedcd 100644 --- a/api/exports.def +++ b/api/exports.def @@ -14,7 +14,7 @@ EXPORTS WintunGetReadWaitEvent WintunGetRunningDriverVersion WintunReceivePacket - WintunReceiveRelease + WintunReleaseReceivePacket WintunSendPacket WintunSetAdapterName WintunSetLogger diff --git a/api/session.c b/api/session.c index 867ac04..e854bde 100644 --- a/api/session.c +++ b/api/session.c @@ -222,7 +222,7 @@ cleanup: } void WINAPI -WintunReceiveRelease(_In_ TUN_SESSION *Session, _In_ const BYTE *Packet) +WintunReleaseReceivePacket(_In_ TUN_SESSION *Session, _In_ const BYTE *Packet) { EnterCriticalSection(&Session->Send.Lock); TUN_PACKET *ReleasedBuffPacket = (TUN_PACKET *)(Packet - offsetof(TUN_PACKET, Data)); diff --git a/api/wintun.h b/api/wintun.h index dd232fb..7a54aa0 100644 --- a/api/wintun.h +++ b/api/wintun.h @@ -41,7 +41,7 @@ typedef void *WINTUN_ADAPTER_HANDLE; * @return If the function succeeds, the return value is the adapter handle. Must be released with WintunFreeAdapter. If * the function fails, the return value is NULL. To get extended error information, call GetLastError. */ -typedef _Return_type_success_(return != NULL) WINTUN_ADAPTER_HANDLE (WINAPI *WINTUN_CREATE_ADAPTER_FUNC)( +typedef _Return_type_success_(return != NULL) WINTUN_ADAPTER_HANDLE(WINAPI *WINTUN_CREATE_ADAPTER_FUNC)( _In_z_ const WCHAR *Pool, _In_z_ const WCHAR *Name, _In_opt_ const GUID *RequestedGUID, @@ -104,10 +104,8 @@ typedef BOOL(CALLBACK *WINTUN_ENUM_CALLBACK)(_In_ WINTUN_ADAPTER_HANDLE Adapter, * @return If the function succeeds, the return value is nonzero. If the function fails, the return value is zero. To * get extended error information, call GetLastError. */ -typedef _Return_type_success_(return != FALSE) BOOL(WINAPI *WINTUN_ENUM_ADAPTERS_FUNC)( - _In_z_ const WCHAR *Pool, - _In_ WINTUN_ENUM_CALLBACK Callback, - _In_ LPARAM Param); +typedef _Return_type_success_(return != FALSE) BOOL( + WINAPI *WINTUN_ENUM_ADAPTERS_FUNC)(_In_z_ const WCHAR *Pool, _In_ WINTUN_ENUM_CALLBACK Callback, _In_ LPARAM Param); /** * Releases Wintun adapter resources. @@ -273,7 +271,7 @@ typedef HANDLE(WINAPI *WINTUN_GET_READ_WAIT_EVENT_FUNC)(_In_ WINTUN_SESSION_HAND #define WINTUN_MAX_IP_PACKET_SIZE 0xFFFF /** - * Retrieves one or packet. After the packet content is consumed, call WintunReceiveRelease with Packet returned + * Retrieves one or packet. After the packet content is consumed, call WintunReleaseReceivePacket with Packet returned * from this function to release internal buffer. This function is thread-safe. * * @param Session Wintun session handle obtained with WintunStartSession @@ -297,7 +295,7 @@ typedef _Return_type_success_(return != NULL) _Ret_bytecount_(*PacketSize) BYTE * * @param Packet Packet obtained with WintunReceivePacket */ -typedef void(WINAPI *WINTUN_RECEIVE_RELEASE_FUNC)(_In_ WINTUN_SESSION_HANDLE Session, _In_ const BYTE *Packet); +typedef void(WINAPI *WINTUN_RELEASE_RECEIVE_PACKET_FUNC)(_In_ WINTUN_SESSION_HANDLE Session, _In_ const BYTE *Packet); /** * Allocates memory for a packet to send. After the memory is filled with packet data, call WintunSendPacket to send |