Author: tfaber
Date: Sat Apr 4 07:38:39 2015
New Revision: 67029
URL:
http://svn.reactos.org/svn/reactos?rev=67029&view=rev
Log:
[NDK][RTL]
- Fix RtlIpv* function prototypes, and add missing ones. Patch by Mark Jansen
CORE-6490
Modified:
trunk/reactos/include/ndk/rtlfuncs.h
trunk/reactos/lib/rtl/network.c
Modified: trunk/reactos/include/ndk/rtlfuncs.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/rtlfuncs.h?rev…
==============================================================================
--- trunk/reactos/include/ndk/rtlfuncs.h [iso-8859-1] (original)
+++ trunk/reactos/include/ndk/rtlfuncs.h [iso-8859-1] Sat Apr 4 07:38:39 2015
@@ -3994,6 +3994,41 @@
// Network Functions
//
NTSYSAPI
+PSTR
+NTAPI
+RtlIpv4AddressToStringA(
+ _In_ const struct in_addr *Addr,
+ _Out_writes_(16) PCHAR S
+);
+
+NTSYSAPI
+PWSTR
+NTAPI
+RtlIpv4AddressToStringW(
+ _In_ const struct in_addr *Addr,
+ _Out_writes_(16) PWCHAR S
+);
+
+NTSYSAPI
+NTSTATUS
+NTAPI
+RtlIpv4AddressToStringExA(
+ _In_ const struct in_addr *Address,
+ _In_ USHORT Port,
+ _Out_writes_to_(*AddressStringLength, *AddressStringLength) PCHAR AddressString,
+ _Inout_ PULONG AddressStringLength
+);
+
+NTSTATUS
+NTAPI
+RtlIpv4AddressToStringExW(
+ _In_ const struct in_addr *Address,
+ _In_ USHORT Port,
+ _Out_writes_to_(*AddressStringLength, *AddressStringLength) PWCHAR AddressString,
+ _Inout_ PULONG AddressStringLength
+);
+
+NTSYSAPI
NTSTATUS
NTAPI
RtlIpv4StringToAddressA(
@@ -4034,11 +4069,49 @@
);
NTSYSAPI
+PSTR
+NTAPI
+RtlIpv6AddressToStringA(
+ _In_ const struct in6_addr *Addr,
+ _Out_writes_(46) PSTR S
+);
+
+NTSYSAPI
+PWSTR
+NTAPI
+RtlIpv6AddressToStringW(
+ _In_ const struct in6_addr *Addr,
+ _Out_writes_(46) PWSTR S
+);
+
+NTSYSAPI
+NTSTATUS
+NTAPI
+RtlIpv6AddressToStringExA(
+ _In_ const struct in6_addr *Address,
+ _In_ ULONG ScopeId,
+ _In_ USHORT Port,
+ _Out_writes_to_(*AddressStringLength, *AddressStringLength) PSTR AddressString,
+ _Inout_ PULONG AddressStringLength
+);
+
+NTSYSAPI
+NTSTATUS
+NTAPI
+RtlIpv6AddressToStringExW(
+ _In_ const struct in6_addr *Address,
+ _In_ ULONG ScopeId,
+ _In_ USHORT Port,
+ _Out_writes_to_(*AddressStringLength, *AddressStringLength) PWCHAR AddressString,
+ _Inout_ PULONG AddressStringLength
+);
+
+NTSYSAPI
NTSTATUS
NTAPI
RtlIpv6StringToAddressA(
- _In_ PCHAR Name,
- _Out_ PCHAR *Terminator,
+ _In_ PCSTR String,
+ _Out_ PCSTR *Terminator,
_Out_ struct in6_addr *Addr
);
@@ -4046,8 +4119,8 @@
NTSTATUS
NTAPI
RtlIpv6StringToAddressW(
- _In_ PWCHAR Name,
- _Out_ PCHAR *Terminator,
+ _In_ PCWSTR String,
+ _Out_ PCWSTR *Terminator,
_Out_ struct in6_addr *Addr
);
@@ -4055,20 +4128,20 @@
NTSTATUS
NTAPI
RtlIpv6StringToAddressExA(
- _In_ PCHAR AddressString,
- _In_ struct in6_addr *Address,
- _In_ PULONG ScopeId,
- _In_ PUSHORT Port
+ _In_ PCSTR AddressString,
+ _Out_ struct in6_addr *Address,
+ _Out_ PULONG ScopeId,
+ _Out_ PUSHORT Port
);
NTSYSAPI
NTSTATUS
NTAPI
RtlIpv6StringToAddressExW(
- _In_ PWCHAR AddressName,
- _In_ struct in6_addr *Address,
- _In_ PULONG ScopeId,
- _In_ PUSHORT Port
+ _In_ PCWSTR AddressString,
+ _Out_ struct in6_addr *Address,
+ _Out_ PULONG ScopeId,
+ _Out_ PUSHORT Port
);
Modified: trunk/reactos/lib/rtl/network.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/network.c?rev=6702…
==============================================================================
--- trunk/reactos/lib/rtl/network.c [iso-8859-1] (original)
+++ trunk/reactos/lib/rtl/network.c [iso-8859-1] Sat Apr 4 07:38:39 2015
@@ -102,9 +102,9 @@
/*
* @implemented
*/
-LPSTR
-NTAPI
-RtlIpv4AddressToStringA(IN struct in_addr *Addr,
+PSTR
+NTAPI
+RtlIpv4AddressToStringA(IN const struct in_addr *Addr,
OUT PCHAR S)
{
INT Length;
@@ -124,7 +124,7 @@
*/
NTSTATUS
NTAPI
-RtlIpv4AddressToStringExA(IN struct in_addr *Address,
+RtlIpv4AddressToStringExA(IN const struct in_addr *Address,
IN USHORT Port,
OUT PCHAR AddressString,
IN OUT PULONG AddressStringLength)
@@ -156,9 +156,9 @@
/*
* @implemented
*/
-LPWSTR
-NTAPI
-RtlIpv4AddressToStringW(IN struct in_addr *Addr,
+PWSTR
+NTAPI
+RtlIpv4AddressToStringW(IN const struct in_addr *Addr,
OUT PWCHAR S)
{
INT Length;
@@ -177,7 +177,7 @@
*/
NTSTATUS
NTAPI
-RtlIpv4AddressToStringExW(IN struct in_addr *Address,
+RtlIpv4AddressToStringExW(IN const struct in_addr *Address,
IN USHORT Port,
OUT PWCHAR AddressString,
IN OUT PULONG AddressStringLength)
@@ -388,23 +388,23 @@
/*
* @unimplemented
*/
-NTSTATUS
-NTAPI
-RtlIpv6AddressToStringA(IN struct in6_addr *Addr,
+PSTR
+NTAPI
+RtlIpv6AddressToStringA(IN const struct in6_addr *Addr,
OUT PCHAR S)
{
UNIMPLEMENTED;
- return STATUS_NOT_IMPLEMENTED;
-}
-
-/*
-* @unimplemented
-*/
-NTSTATUS
-NTAPI
-RtlIpv6AddressToStringExA(IN struct in6_addr *Address,
+ return NULL;
+}
+
+/*
+* @unimplemented
+*/
+NTSTATUS
+NTAPI
+RtlIpv6AddressToStringExA(IN const struct in6_addr *Address,
IN ULONG ScopeId,
- IN ULONG Port,
+ IN USHORT Port,
OUT PCHAR AddressString,
IN OUT PULONG AddressStringLength)
{
@@ -415,21 +415,21 @@
/*
* @unimplemented
*/
-NTSTATUS
-NTAPI
-RtlIpv6AddressToStringW(IN struct in6_addr *Addr,
+PWSTR
+NTAPI
+RtlIpv6AddressToStringW(IN const struct in6_addr *Addr,
OUT PWCHAR S)
{
UNIMPLEMENTED;
- return STATUS_NOT_IMPLEMENTED;
-}
-
-/*
-* @unimplemented
-*/
-NTSTATUS
-NTAPI
-RtlIpv6AddressToStringExW(IN struct in6_addr *Address,
+ return NULL;
+}
+
+/*
+* @unimplemented
+*/
+NTSTATUS
+NTAPI
+RtlIpv6AddressToStringExW(IN const struct in6_addr *Address,
IN ULONG ScopeId,
IN USHORT Port,
IN OUT PWCHAR AddressString,
@@ -444,8 +444,8 @@
*/
NTSTATUS
NTAPI
-RtlIpv6StringToAddressA(IN PCHAR Name,
- OUT PCHAR *Terminator,
+RtlIpv6StringToAddressA(IN PCSTR Name,
+ OUT PCSTR *Terminator,
OUT struct in6_addr *Addr)
{
UNIMPLEMENTED;
@@ -457,7 +457,7 @@
*/
NTSTATUS
NTAPI
-RtlIpv6StringToAddressExA(IN PCHAR AddressString,
+RtlIpv6StringToAddressExA(IN PCSTR AddressString,
OUT struct in6_addr *Address,
OUT PULONG ScopeId,
OUT PUSHORT Port)
@@ -471,8 +471,8 @@
*/
NTSTATUS
NTAPI
-RtlIpv6StringToAddressW(IN PWCHAR Name,
- OUT PCHAR *Terminator,
+RtlIpv6StringToAddressW(IN PCWSTR Name,
+ OUT PCWSTR *Terminator,
OUT struct in6_addr *Addr)
{
UNIMPLEMENTED;
@@ -484,7 +484,7 @@
*/
NTSTATUS
NTAPI
-RtlIpv6StringToAddressExW(IN PWCHAR AddressName,
+RtlIpv6StringToAddressExW(IN PCWSTR AddressName,
OUT struct in6_addr *Address,
OUT PULONG ScopeId,
OUT PUSHORT Port)