2004-08-05 18:17:37 +00:00
|
|
|
/*
|
|
|
|
* COPYRIGHT: See COPYING in the top level directory
|
2006-05-10 17:47:44 +00:00
|
|
|
* PROJECT: ReactOS Runtime Library
|
2004-08-05 18:17:37 +00:00
|
|
|
* PURPOSE: Network Address Translation implementation
|
2006-05-10 17:47:44 +00:00
|
|
|
* PROGRAMMER: Alex Ionescu (alexi@tinykrnl.org)
|
2004-08-05 18:17:37 +00:00
|
|
|
*/
|
|
|
|
|
2005-09-08 00:09:32 +00:00
|
|
|
/* INCLUDES *****************************************************************/
|
|
|
|
|
2005-07-26 08:39:07 +00:00
|
|
|
#include <rtl.h>
|
2004-08-05 18:17:37 +00:00
|
|
|
|
|
|
|
#define NDEBUG
|
|
|
|
#include <debug.h>
|
2005-09-08 00:09:32 +00:00
|
|
|
|
|
|
|
/* FUNCTIONS ***************************************************************/
|
2004-08-05 18:17:37 +00:00
|
|
|
|
|
|
|
/*
|
2006-05-10 17:47:44 +00:00
|
|
|
* @implemented
|
|
|
|
*/
|
2004-09-13 20:25:26 +00:00
|
|
|
LPSTR
|
2005-10-19 17:03:38 +00:00
|
|
|
NTAPI
|
2006-05-10 17:47:44 +00:00
|
|
|
RtlIpv4AddressToStringA(IN struct in_addr *Addr,
|
|
|
|
OUT PCHAR S)
|
2004-08-05 18:17:37 +00:00
|
|
|
{
|
2006-05-10 17:47:44 +00:00
|
|
|
return S + sprintf(S, "%u.%u.%u.%u", Addr->S_un.S_un_b.s_b1,
|
|
|
|
Addr->S_un.S_un_b.s_b2,
|
|
|
|
Addr->S_un.S_un_b.s_b3,
|
|
|
|
Addr->S_un.S_un_b.s_b4);
|
2004-08-05 18:17:37 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
2006-05-10 17:47:44 +00:00
|
|
|
* @unimplemented
|
|
|
|
*/
|
2004-08-05 18:17:37 +00:00
|
|
|
NTSTATUS
|
2005-10-19 17:03:38 +00:00
|
|
|
NTAPI
|
2006-05-10 17:47:44 +00:00
|
|
|
RtlIpv4AddressToStringExA(IN struct in_addr *Address,
|
|
|
|
IN USHORT Port,
|
|
|
|
OUT PCHAR AddressString,
|
|
|
|
IN OUT PULONG AddressStringLength)
|
2004-08-05 18:17:37 +00:00
|
|
|
{
|
2006-05-10 17:47:44 +00:00
|
|
|
UNIMPLEMENTED;
|
|
|
|
return STATUS_NOT_IMPLEMENTED;
|
2004-08-05 18:17:37 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
2006-05-10 17:47:44 +00:00
|
|
|
* @implemented
|
|
|
|
*/
|
2004-09-13 20:25:26 +00:00
|
|
|
LPWSTR
|
2005-10-19 17:03:38 +00:00
|
|
|
NTAPI
|
2006-05-10 17:47:44 +00:00
|
|
|
RtlIpv4AddressToStringW(IN struct in_addr *Addr,
|
|
|
|
OUT PWCHAR S)
|
2004-08-05 18:17:37 +00:00
|
|
|
{
|
2006-05-10 17:47:44 +00:00
|
|
|
return S + swprintf(S, L"%u.%u.%u.%u", Addr->S_un.S_un_b.s_b1,
|
|
|
|
Addr->S_un.S_un_b.s_b2,
|
|
|
|
Addr->S_un.S_un_b.s_b3,
|
|
|
|
Addr->S_un.S_un_b.s_b4);
|
2004-08-05 18:17:37 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
2006-05-10 17:47:44 +00:00
|
|
|
* @unimplemented
|
|
|
|
*/
|
2004-08-05 18:17:37 +00:00
|
|
|
NTSTATUS
|
2005-10-19 17:03:38 +00:00
|
|
|
NTAPI
|
2006-05-10 17:47:44 +00:00
|
|
|
RtlIpv4AddressToStringExW(IN struct in_addr *Address,
|
|
|
|
IN USHORT Port,
|
|
|
|
OUT PWCHAR AddressString,
|
|
|
|
IN OUT PULONG AddressStringLength)
|
2004-08-05 18:17:37 +00:00
|
|
|
{
|
2006-05-10 17:47:44 +00:00
|
|
|
UNIMPLEMENTED;
|
|
|
|
return STATUS_NOT_IMPLEMENTED;
|
2004-08-05 18:17:37 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
2006-05-10 17:47:44 +00:00
|
|
|
* @unimplemented
|
|
|
|
*/
|
2004-08-05 18:17:37 +00:00
|
|
|
NTSTATUS
|
2005-10-19 17:03:38 +00:00
|
|
|
NTAPI
|
2006-05-10 17:47:44 +00:00
|
|
|
RtlIpv4StringToAddressA(IN PCHAR String,
|
|
|
|
IN BOOLEAN Strict,
|
|
|
|
OUT PCHAR *Terminator,
|
|
|
|
OUT struct in_addr *Addr)
|
2004-08-05 18:17:37 +00:00
|
|
|
{
|
2006-05-10 17:47:44 +00:00
|
|
|
UNIMPLEMENTED;
|
|
|
|
return STATUS_NOT_IMPLEMENTED;
|
2004-08-05 18:17:37 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* @unimplemented
|
|
|
|
*/
|
|
|
|
NTSTATUS
|
2005-10-19 17:03:38 +00:00
|
|
|
NTAPI
|
2006-05-10 17:47:44 +00:00
|
|
|
RtlIpv4StringToAddressExA(IN PCHAR AddressString,
|
|
|
|
IN BOOLEAN Strict,
|
|
|
|
OUT struct in_addr *Address,
|
|
|
|
IN PUSHORT Port)
|
2004-08-05 18:17:37 +00:00
|
|
|
{
|
2006-05-10 17:47:44 +00:00
|
|
|
UNIMPLEMENTED;
|
|
|
|
return STATUS_NOT_IMPLEMENTED;
|
2004-08-05 18:17:37 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* @unimplemented
|
|
|
|
*/
|
|
|
|
NTSTATUS
|
2005-10-19 17:03:38 +00:00
|
|
|
NTAPI
|
2006-05-10 17:47:44 +00:00
|
|
|
RtlIpv4StringToAddressW(IN PWCHAR String,
|
|
|
|
IN UCHAR Strict,
|
|
|
|
OUT PWCHAR Terminator,
|
|
|
|
OUT struct in_addr *Addr)
|
2004-08-05 18:17:37 +00:00
|
|
|
{
|
2006-05-10 17:47:44 +00:00
|
|
|
UNIMPLEMENTED;
|
|
|
|
return STATUS_NOT_IMPLEMENTED;
|
2004-08-05 18:17:37 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* @unimplemented
|
|
|
|
*/
|
|
|
|
NTSTATUS
|
2005-10-19 17:03:38 +00:00
|
|
|
NTAPI
|
2006-05-10 17:47:44 +00:00
|
|
|
RtlIpv4StringToAddressExW(IN PWCHAR AddressString,
|
|
|
|
IN BOOLEAN Strict,
|
|
|
|
OUT struct in_addr *Address,
|
|
|
|
OUT PUSHORT Port)
|
2004-08-05 18:17:37 +00:00
|
|
|
{
|
2006-05-10 17:47:44 +00:00
|
|
|
UNIMPLEMENTED;
|
|
|
|
return STATUS_NOT_IMPLEMENTED;
|
2004-08-05 18:17:37 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* @unimplemented
|
|
|
|
*/
|
|
|
|
NTSTATUS
|
2005-10-19 17:03:38 +00:00
|
|
|
NTAPI
|
2006-05-10 17:47:44 +00:00
|
|
|
RtlIpv6AddressToStringA(IN struct in6_addr *Addr,
|
|
|
|
OUT PCHAR S)
|
2004-08-05 18:17:37 +00:00
|
|
|
{
|
2006-05-10 17:47:44 +00:00
|
|
|
UNIMPLEMENTED;
|
|
|
|
return STATUS_NOT_IMPLEMENTED;
|
2004-08-05 18:17:37 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* @unimplemented
|
|
|
|
*/
|
|
|
|
NTSTATUS
|
2005-10-19 17:03:38 +00:00
|
|
|
NTAPI
|
2006-05-10 17:47:44 +00:00
|
|
|
RtlIpv6AddressToStringExA(IN struct in6_addr *Address,
|
|
|
|
IN ULONG ScopeId,
|
|
|
|
IN ULONG Port,
|
|
|
|
OUT PCHAR AddressString,
|
|
|
|
IN OUT PULONG AddressStringLength)
|
2004-08-05 18:17:37 +00:00
|
|
|
{
|
2006-05-10 17:47:44 +00:00
|
|
|
UNIMPLEMENTED;
|
|
|
|
return STATUS_NOT_IMPLEMENTED;
|
2004-08-05 18:17:37 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* @unimplemented
|
|
|
|
*/
|
|
|
|
NTSTATUS
|
2005-10-19 17:03:38 +00:00
|
|
|
NTAPI
|
2006-05-10 17:47:44 +00:00
|
|
|
RtlIpv6AddressToStringW(IN struct in6_addr *Addr,
|
|
|
|
OUT PWCHAR S)
|
2004-08-05 18:17:37 +00:00
|
|
|
{
|
2006-05-10 17:47:44 +00:00
|
|
|
UNIMPLEMENTED;
|
|
|
|
return STATUS_NOT_IMPLEMENTED;
|
2004-08-05 18:17:37 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* @unimplemented
|
|
|
|
*/
|
|
|
|
NTSTATUS
|
2005-10-19 17:03:38 +00:00
|
|
|
NTAPI
|
2006-05-10 17:47:44 +00:00
|
|
|
RtlIpv6AddressToStringExW(IN struct in6_addr *Address,
|
|
|
|
IN ULONG ScopeId,
|
|
|
|
IN USHORT Port,
|
|
|
|
IN OUT PWCHAR AddressString,
|
|
|
|
IN OUT PULONG AddressStringLength)
|
2004-08-05 18:17:37 +00:00
|
|
|
{
|
2006-05-10 17:47:44 +00:00
|
|
|
UNIMPLEMENTED;
|
|
|
|
return STATUS_NOT_IMPLEMENTED;
|
2004-08-05 18:17:37 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* @unimplemented
|
|
|
|
*/
|
|
|
|
NTSTATUS
|
2005-10-19 17:03:38 +00:00
|
|
|
NTAPI
|
2006-05-10 17:47:44 +00:00
|
|
|
RtlIpv6StringToAddressA(IN PCHAR Name,
|
|
|
|
OUT PCHAR *Terminator,
|
|
|
|
OUT struct in6_addr *Addr)
|
2004-08-05 18:17:37 +00:00
|
|
|
{
|
2005-12-04 03:24:11 +00:00
|
|
|
UNIMPLEMENTED;
|
|
|
|
return STATUS_NOT_IMPLEMENTED;
|
2004-08-05 18:17:37 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* @unimplemented
|
|
|
|
*/
|
|
|
|
NTSTATUS
|
2005-10-19 17:03:38 +00:00
|
|
|
NTAPI
|
2006-05-10 17:47:44 +00:00
|
|
|
RtlIpv6StringToAddressExA(IN PCHAR AddressString,
|
|
|
|
OUT struct in6_addr *Address,
|
|
|
|
OUT PULONG ScopeId,
|
|
|
|
OUT PUSHORT Port)
|
2004-08-05 18:17:37 +00:00
|
|
|
{
|
2005-12-04 03:24:11 +00:00
|
|
|
UNIMPLEMENTED;
|
|
|
|
return STATUS_NOT_IMPLEMENTED;
|
2004-08-05 18:17:37 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* @unimplemented
|
|
|
|
*/
|
|
|
|
NTSTATUS
|
2005-10-19 17:03:38 +00:00
|
|
|
NTAPI
|
2006-05-10 17:47:44 +00:00
|
|
|
RtlIpv6StringToAddressW(IN PWCHAR Name,
|
|
|
|
OUT PCHAR *Terminator,
|
|
|
|
OUT struct in6_addr *Addr)
|
2004-08-05 18:17:37 +00:00
|
|
|
{
|
2005-12-04 03:24:11 +00:00
|
|
|
UNIMPLEMENTED;
|
|
|
|
return STATUS_NOT_IMPLEMENTED;
|
2004-08-05 18:17:37 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* @unimplemented
|
|
|
|
*/
|
|
|
|
NTSTATUS
|
2005-10-19 17:03:38 +00:00
|
|
|
NTAPI
|
2006-05-10 17:47:44 +00:00
|
|
|
RtlIpv6StringToAddressExW(IN PWCHAR AddressName,
|
|
|
|
OUT struct in6_addr *Address,
|
|
|
|
OUT PULONG ScopeId,
|
|
|
|
OUT PUSHORT Port)
|
2004-08-05 18:17:37 +00:00
|
|
|
{
|
2005-12-04 03:24:11 +00:00
|
|
|
UNIMPLEMENTED;
|
|
|
|
return STATUS_NOT_IMPLEMENTED;
|
2004-08-05 18:17:37 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* EOF */
|