Author: amunger
Date: Fri Jun 2 03:37:44 2006
New Revision: 22171
URL:
http://svn.reactos.ru/svn/reactos?rev=22171&view=rev
Log:
Merge ncpa and networking fixes from trunk.
Revisions: 21899-21900, 21912-21913, 21915, 21990, 21996, 22106, 22123
Added:
branches/ros-branch-0_3_0/reactos/dll/cpl/ncpa/fr.rc
- copied unchanged from r21915, trunk/reactos/dll/cpl/ncpa/fr.rc
Modified:
branches/ros-branch-0_3_0/reactos/dll/cpl/ncpa/Ja.rc
branches/ros-branch-0_3_0/reactos/dll/cpl/ncpa/cz.rc
branches/ros-branch-0_3_0/reactos/dll/cpl/ncpa/de.rc
branches/ros-branch-0_3_0/reactos/dll/cpl/ncpa/dk.rc
branches/ros-branch-0_3_0/reactos/dll/cpl/ncpa/en.rc
branches/ros-branch-0_3_0/reactos/dll/cpl/ncpa/es.rc
branches/ros-branch-0_3_0/reactos/dll/cpl/ncpa/hu.rc
branches/ros-branch-0_3_0/reactos/dll/cpl/ncpa/ncpa.rc
branches/ros-branch-0_3_0/reactos/dll/cpl/ncpa/nl.rc
branches/ros-branch-0_3_0/reactos/dll/cpl/ncpa/ru.rc
branches/ros-branch-0_3_0/reactos/dll/cpl/ncpa/sv.rc
branches/ros-branch-0_3_0/reactos/dll/cpl/ncpa/tcpip_properties.c
branches/ros-branch-0_3_0/reactos/drivers/network/tcpip/tcpip/dispatch.c
branches/ros-branch-0_3_0/reactos/drivers/network/wshtcpip/wshtcpip.c
branches/ros-branch-0_3_0/reactos/lib/drivers/ip/network/ip.c
branches/ros-branch-0_3_0/reactos/lib/drivers/ip/network/router.c
branches/ros-branch-0_3_0/reactos/lib/drivers/oskittcp/oskittcp/uipc_socket.c
Modified: branches/ros-branch-0_3_0/reactos/dll/cpl/ncpa/Ja.rc
URL:
http://svn.reactos.ru/svn/reactos/branches/ros-branch-0_3_0/reactos/dll/cpl…
==============================================================================
--- branches/ros-branch-0_3_0/reactos/dll/cpl/ncpa/Ja.rc (original)
+++ branches/ros-branch-0_3_0/reactos/dll/cpl/ncpa/Ja.rc Fri Jun 2 03:37:44 2006
@@ -21,7 +21,7 @@
EDITTEXT IDC_NETCARDNAME, 9, 21, 230, 12, WS_DISABLED | WS_BORDER | WS_TABSTOP
PUSHBUTTON "Ýè(&C)", IDC_CONFIGURE, 189, 38, 50, 14
LTEXT "±ÌÚ±Í`FbN
}[NªIÉÈÁÄ¢éR|[lgðgpµÄ¢Ü·:", -1, 9, 59, 217, 8
- LISTBOX IDC_COMPONENTSLIST, 9, 71, 230, 67, LBS_STANDARD
+ LISTBOX IDC_COMPONENTSLIST, 9, 71, 230, 55, LBS_STANDARD | LBS_NOINTEGRALHEIGHT
PUSHBUTTON "CXg[(&I)", IDC_INSTALL, 9, 130, 65, 14, WS_DISABLED |
WS_TABSTOP
PUSHBUTTON "í(&U)", IDC_UNINSTALL, 90, 130, 65, 14, WS_DISABLED |
WS_TABSTOP
PUSHBUTTON "vpeB(&P)", IDC_PROPERTIES, 174, 130, 65, 14
Modified: branches/ros-branch-0_3_0/reactos/dll/cpl/ncpa/cz.rc
URL:
http://svn.reactos.ru/svn/reactos/branches/ros-branch-0_3_0/reactos/dll/cpl…
==============================================================================
--- branches/ros-branch-0_3_0/reactos/dll/cpl/ncpa/cz.rc (original)
+++ branches/ros-branch-0_3_0/reactos/dll/cpl/ncpa/cz.rc Fri Jun 2 03:37:44 2006
@@ -21,7 +21,7 @@
EDITTEXT IDC_NETCARDNAME, 9, 21, 230, 12, WS_DISABLED | WS_BORDER | WS_TABSTOP
PUSHBUTTON "&Nastavit", IDC_CONFIGURE, 189, 38, 50, 14
LTEXT "Vybrané komponenty jsou pouívány tímto pøipojením:", -1, 9, 59, 217,
8
- LISTBOX IDC_COMPONENTSLIST, 9, 71, 230, 67, LBS_STANDARD
+ LISTBOX IDC_COMPONENTSLIST, 9, 71, 230, 55, LBS_STANDARD | LBS_NOINTEGRALHEIGHT
PUSHBUTTON "&Instalovat", IDC_INSTALL, 9, 130, 65, 14, WS_DISABLED |
WS_TABSTOP
PUSHBUTTON "&Odstranit", IDC_UNINSTALL, 90, 130, 65, 14, WS_DISABLED |
WS_TABSTOP
PUSHBUTTON "&Vlastnosti", IDC_PROPERTIES, 174, 130, 65, 14
Modified: branches/ros-branch-0_3_0/reactos/dll/cpl/ncpa/de.rc
URL:
http://svn.reactos.ru/svn/reactos/branches/ros-branch-0_3_0/reactos/dll/cpl…
==============================================================================
--- branches/ros-branch-0_3_0/reactos/dll/cpl/ncpa/de.rc (original)
+++ branches/ros-branch-0_3_0/reactos/dll/cpl/ncpa/de.rc Fri Jun 2 03:37:44 2006
@@ -21,7 +21,7 @@
EDITTEXT IDC_NETCARDNAME, 9, 21, 230, 12, WS_DISABLED | WS_BORDER | WS_TABSTOP
PUSHBUTTON "&Konfigurieren", IDC_CONFIGURE, 189, 38, 50, 14
LTEXT "Diese &Verbindung verwendet folgende Elemente:", -1, 9, 59, 217, 8
- LISTBOX IDC_COMPONENTSLIST, 9, 71, 230, 67, LBS_STANDARD
+ LISTBOX IDC_COMPONENTSLIST, 9, 71, 230, 55, LBS_STANDARD | LBS_NOINTEGRALHEIGHT
PUSHBUTTON "&Installieren", IDC_INSTALL, 9, 130, 65, 14, WS_DISABLED |
WS_TABSTOP
PUSHBUTTON "&Deinstallieren", IDC_UNINSTALL, 90, 130, 65, 14, WS_DISABLED
| WS_TABSTOP
PUSHBUTTON "&Eigenschaften", IDC_PROPERTIES, 174, 130, 65, 14
Modified: branches/ros-branch-0_3_0/reactos/dll/cpl/ncpa/dk.rc
URL:
http://svn.reactos.ru/svn/reactos/branches/ros-branch-0_3_0/reactos/dll/cpl…
==============================================================================
--- branches/ros-branch-0_3_0/reactos/dll/cpl/ncpa/dk.rc (original)
+++ branches/ros-branch-0_3_0/reactos/dll/cpl/ncpa/dk.rc Fri Jun 2 03:37:44 2006
@@ -21,7 +21,7 @@
EDITTEXT IDC_NETCARDNAME, 9, 21, 230, 12, WS_DISABLED | WS_BORDER | WS_TABSTOP
PUSHBUTTON "&Konfigure", IDC_CONFIGURE, 189, 38, 50, 14
LTEXT "Komponeter mærkeret med et flueben er brugt af den forbindelse:", -1,
9, 59, 217, 8
- LISTBOX IDC_COMPONENTSLIST, 9, 71, 230, 67, LBS_STANDARD
+ LISTBOX IDC_COMPONENTSLIST, 9, 71, 230, 55, LBS_STANDARD | LBS_NOINTEGRALHEIGHT
PUSHBUTTON "&Installere", IDC_INSTALL, 9, 133, 65, 14, WS_DISABLED |
WS_TABSTOP
PUSHBUTTON "&Afinstallere", IDC_UNINSTALL, 90, 133, 65, 14, WS_DISABLED |
WS_TABSTOP
PUSHBUTTON "&Egenskaber", IDC_PROPERTIES, 174, 133, 65, 14
Modified: branches/ros-branch-0_3_0/reactos/dll/cpl/ncpa/en.rc
URL:
http://svn.reactos.ru/svn/reactos/branches/ros-branch-0_3_0/reactos/dll/cpl…
==============================================================================
--- branches/ros-branch-0_3_0/reactos/dll/cpl/ncpa/en.rc (original)
+++ branches/ros-branch-0_3_0/reactos/dll/cpl/ncpa/en.rc Fri Jun 2 03:37:44 2006
@@ -21,7 +21,7 @@
EDITTEXT IDC_NETCARDNAME, 9, 21, 230, 12, WS_DISABLED | WS_BORDER | WS_TABSTOP
PUSHBUTTON "&Configure", IDC_CONFIGURE, 189, 38, 50, 14
LTEXT "Components checked are used by this connection:", -1, 9, 59, 217, 8
- LISTBOX IDC_COMPONENTSLIST, 9, 71, 230, 67, LBS_STANDARD
+ LISTBOX IDC_COMPONENTSLIST, 9, 71, 230, 55, LBS_STANDARD | LBS_NOINTEGRALHEIGHT
PUSHBUTTON "&Install", IDC_INSTALL, 9, 130, 65, 14, WS_DISABLED |
WS_TABSTOP
PUSHBUTTON "&Uninstall", IDC_UNINSTALL, 90, 130, 65, 14, WS_DISABLED |
WS_TABSTOP
PUSHBUTTON "&Properties", IDC_PROPERTIES, 174, 130, 65, 14
Modified: branches/ros-branch-0_3_0/reactos/dll/cpl/ncpa/es.rc
URL:
http://svn.reactos.ru/svn/reactos/branches/ros-branch-0_3_0/reactos/dll/cpl…
==============================================================================
--- branches/ros-branch-0_3_0/reactos/dll/cpl/ncpa/es.rc (original)
+++ branches/ros-branch-0_3_0/reactos/dll/cpl/ncpa/es.rc Fri Jun 2 03:37:44 2006
@@ -27,7 +27,7 @@
EDITTEXT IDC_NETCARDNAME, 9, 21, 230, 12, WS_DISABLED | WS_BORDER | WS_TABSTOP
PUSHBUTTON "&Configurar", IDC_CONFIGURE, 189, 38, 50, 14
LTEXT "Los componentes marcados son utilizados por esta conección:", -1, 9,
59, 217, 8
- LISTBOX IDC_COMPONENTSLIST, 9, 71, 230, 67, LBS_STANDARD
+ LISTBOX IDC_COMPONENTSLIST, 9, 71, 230, 55, LBS_STANDARD | LBS_NOINTEGRALHEIGHT
PUSHBUTTON "&Instalar", IDC_INSTALL, 9, 130, 65, 14, WS_DISABLED |
WS_TABSTOP
PUSHBUTTON "&Desinstalar", IDC_UNINSTALL, 90, 130, 65, 14, WS_DISABLED |
WS_TABSTOP
PUSHBUTTON "&Propiedades", IDC_PROPERTIES, 174, 130, 65, 14
Modified: branches/ros-branch-0_3_0/reactos/dll/cpl/ncpa/hu.rc
URL:
http://svn.reactos.ru/svn/reactos/branches/ros-branch-0_3_0/reactos/dll/cpl…
==============================================================================
--- branches/ros-branch-0_3_0/reactos/dll/cpl/ncpa/hu.rc (original)
+++ branches/ros-branch-0_3_0/reactos/dll/cpl/ncpa/hu.rc Fri Jun 2 03:37:44 2006
@@ -22,7 +22,7 @@
EDITTEXT IDC_NETCARDNAME, 9, 21, 230, 12, WS_DISABLED | WS_BORDER | WS_TABSTOP
PUSHBUTTON "&Beállítás", IDC_CONFIGURE, 189, 38, 50, 14
LTEXT "A megjelölt alkotóelemek vannak használatban ennél a kapcsolatnál:",
-1, 9, 59, 217, 8
- LISTBOX IDC_COMPONENTSLIST, 9, 71, 230, 67, LBS_STANDARD
+ LISTBOX IDC_COMPONENTSLIST, 9, 71, 230, 55, LBS_STANDARD | LBS_NOINTEGRALHEIGHT
PUSHBUTTON "&Telepítés", IDC_INSTALL, 9, 130, 65, 14, WS_DISABLED |
WS_TABSTOP
PUSHBUTTON "&Eltávolítás", IDC_UNINSTALL, 90, 130, 65, 14, WS_DISABLED |
WS_TABSTOP
PUSHBUTTON "&Tulajdonságok", IDC_PROPERTIES, 174, 130, 65, 14
Modified: branches/ros-branch-0_3_0/reactos/dll/cpl/ncpa/ncpa.rc
URL:
http://svn.reactos.ru/svn/reactos/branches/ros-branch-0_3_0/reactos/dll/cpl…
==============================================================================
--- branches/ros-branch-0_3_0/reactos/dll/cpl/ncpa/ncpa.rc (original)
+++ branches/ros-branch-0_3_0/reactos/dll/cpl/ncpa/ncpa.rc Fri Jun 2 03:37:44 2006
@@ -18,13 +18,18 @@
IDI_VERTICAL ICON "resources/VERTIC.ICO"
IDI_NETSTAT ICON "resources/NETCONN.ICO"
-#include "en.rc"
#include "cz.rc"
#include "de.rc"
#include "dk.rc"
+#include "en.rc"
+#include "es.rc"
+#include "fr.rc"
+#include "hu.rc"
+#include "Ja.rc"
#include "nl.rc"
+#include "ru.rc"
#include "sv.rc"
-#include "es.rc"
-#include "Ja.rc"
-#include "hu.rc"
-#include "ru.rc"
+
+
+
+
Modified: branches/ros-branch-0_3_0/reactos/dll/cpl/ncpa/nl.rc
URL:
http://svn.reactos.ru/svn/reactos/branches/ros-branch-0_3_0/reactos/dll/cpl…
==============================================================================
--- branches/ros-branch-0_3_0/reactos/dll/cpl/ncpa/nl.rc (original)
+++ branches/ros-branch-0_3_0/reactos/dll/cpl/ncpa/nl.rc Fri Jun 2 03:37:44 2006
@@ -21,7 +21,7 @@
EDITTEXT IDC_NETCARDNAME, 9, 21, 230, 12, WS_DISABLED | WS_BORDER | WS_TABSTOP
PUSHBUTTON "&Configureren", IDC_CONFIGURE, 189, 38, 50, 14
LTEXT "Components checked are used by this connection:", -1, 9, 59, 217, 8
- LISTBOX IDC_COMPONENTSLIST, 9, 71, 230, 67, LBS_STANDARD
+ LISTBOX IDC_COMPONENTSLIST, 9, 71, 230, 55, LBS_STANDARD | LBS_NOINTEGRALHEIGHT
PUSHBUTTON "&Installeren", IDC_INSTALL, 9, 130, 65, 14, WS_DISABLED |
WS_TABSTOP
PUSHBUTTON "&Verwijderen", IDC_UNINSTALL, 90, 130, 65, 14, WS_DISABLED |
WS_TABSTOP
PUSHBUTTON "&Eigenschappen", IDC_PROPERTIES, 174, 130, 65, 14
Modified: branches/ros-branch-0_3_0/reactos/dll/cpl/ncpa/ru.rc
URL:
http://svn.reactos.ru/svn/reactos/branches/ros-branch-0_3_0/reactos/dll/cpl…
==============================================================================
--- branches/ros-branch-0_3_0/reactos/dll/cpl/ncpa/ru.rc (original)
+++ branches/ros-branch-0_3_0/reactos/dll/cpl/ncpa/ru.rc Fri Jun 2 03:37:44 2006
@@ -21,7 +21,7 @@
EDITTEXT IDC_NETCARDNAME, 9, 21, 230, 12, WS_DISABLED | WS_BORDER | WS_TABSTOP
PUSHBUTTON "&Íàñòðîèòü", IDC_CONFIGURE, 189, 38, 50, 14
LTEXT "Îòìå÷åííûå êîìïîíåíòû èñïîëüçóþòñÿ ýòèì ïîäêëþ÷åíèåì:", -1, 9, 59, 217,
8
- LISTBOX IDC_COMPONENTSLIST, 9, 71, 230, 67, LBS_STANDARD
+ LISTBOX IDC_COMPONENTSLIST, 9, 71, 230, 55, LBS_STANDARD | LBS_NOINTEGRALHEIGHT
PUSHBUTTON "&Óñòàíîâèòü", IDC_INSTALL, 9, 130, 65, 14, WS_DISABLED |
WS_TABSTOP
PUSHBUTTON "&Óäàëèòü", IDC_UNINSTALL, 90, 130, 65, 14, WS_DISABLED |
WS_TABSTOP
PUSHBUTTON "&Ñâîéñòâà", IDC_PROPERTIES, 174, 130, 65, 14
Modified: branches/ros-branch-0_3_0/reactos/dll/cpl/ncpa/sv.rc
URL:
http://svn.reactos.ru/svn/reactos/branches/ros-branch-0_3_0/reactos/dll/cpl…
==============================================================================
--- branches/ros-branch-0_3_0/reactos/dll/cpl/ncpa/sv.rc (original)
+++ branches/ros-branch-0_3_0/reactos/dll/cpl/ncpa/sv.rc Fri Jun 2 03:37:44 2006
@@ -23,7 +23,7 @@
EDITTEXT IDC_NETCARDNAME, 9, 21, 230, 12, WS_DISABLED | WS_BORDER | WS_TABSTOP
PUSHBUTTON "&Konfigurera", IDC_CONFIGURE, 189, 38, 50, 14
LTEXT "Markerade komponenter används av denna anslutning:", -1, 9, 59, 217, 8
- LISTBOX IDC_COMPONENTSLIST, 9, 71, 230, 67, LBS_STANDARD
+ LISTBOX IDC_COMPONENTSLIST, 9, 71, 230, 55, LBS_STANDARD | LBS_NOINTEGRALHEIGHT
PUSHBUTTON "&Installera", IDC_INSTALL, 9, 130, 65, 14, WS_DISABLED |
WS_TABSTOP
PUSHBUTTON "&Avinstallera", IDC_UNINSTALL, 90, 130, 65, 14, WS_DISABLED |
WS_TABSTOP
PUSHBUTTON "&Egenskaper", IDC_PROPERTIES, 174, 130, 65, 14
Modified: branches/ros-branch-0_3_0/reactos/dll/cpl/ncpa/tcpip_properties.c
URL:
http://svn.reactos.ru/svn/reactos/branches/ros-branch-0_3_0/reactos/dll/cpl…
==============================================================================
--- branches/ros-branch-0_3_0/reactos/dll/cpl/ncpa/tcpip_properties.c (original)
+++ branches/ros-branch-0_3_0/reactos/dll/cpl/ncpa/tcpip_properties.c Fri Jun 2 03:37:44
2006
@@ -71,6 +71,7 @@
if (! Enabled) {
SendDlgItemMessage(Dlg, IDC_DNS1, IPM_CLEARADDRESS, 0, 0);
SendDlgItemMessage(Dlg, IDC_DNS2, IPM_CLEARADDRESS, 0, 0);
+
}
}
@@ -132,10 +133,13 @@
ValidateAndStore(HWND Dlg, PTCPIP_PROPERTIES_DATA DlgData)
{
DWORD IpAddress;
+ MIB_IPFORWARDROW RowToAdd = { 0 }, RowToRem = { 0 };
DlgData->DhcpEnabled = (BST_CHECKED ==
IsDlgButtonChecked(Dlg, IDC_USEDHCP));
if (! DlgData->DhcpEnabled) {
+ DhcpReleaseIpAddressLease( DlgData->AdapterIndex );
+
if (4 != SendMessageW(GetDlgItem(Dlg, IDC_IPADDR), IPM_GETADDRESS,
0, (LPARAM) &IpAddress)) {
ShowError(Dlg, IDS_ENTER_VALID_IPADDRESS);
@@ -156,11 +160,26 @@
} else {
DlgData->Gateway = htonl(IpAddress);
}
+ DhcpStaticRefreshParams
+ ( DlgData->AdapterIndex, DlgData->IpAddress, DlgData->SubnetMask );
+
+ RowToRem.dwForwardMask = 0;
+ RowToRem.dwForwardMetric1 = 1;
+ RowToRem.dwForwardNextHop = DlgData->OldGateway;
+
+ DeleteIpForwardEntry( &RowToRem );
+
+ RowToAdd.dwForwardMask = 0;
+ RowToAdd.dwForwardMetric1 = 1;
+ RowToAdd.dwForwardNextHop = DlgData->Gateway;
+
+ CreateIpForwardEntry( &RowToAdd );
ASSERT(BST_CHECKED == IsDlgButtonChecked(Dlg, IDC_FIXEDDNS));
} else {
DlgData->IpAddress = INADDR_NONE;
DlgData->SubnetMask = INADDR_NONE;
DlgData->Gateway = INADDR_NONE;
+ DhcpLeaseIpAddress( DlgData->AdapterIndex );
}
if (BST_CHECKED == IsDlgButtonChecked(Dlg, IDC_FIXEDDNS)) {
@@ -251,7 +270,8 @@
goto cleanup;
}
- MessageBox(NULL, TEXT("You need to reboot before the new parameters take
effect."), TEXT("Reboot required"), MB_OK | MB_ICONWARNING);
+ // arty ... Not needed anymore ... We update the address live now
+ //MessageBox(NULL, TEXT("You need to reboot before the new parameters take
effect."), TEXT("Reboot required"), MB_OK | MB_ICONWARNING);
ret = TRUE;
cleanup:
Modified: branches/ros-branch-0_3_0/reactos/drivers/network/tcpip/tcpip/dispatch.c
URL:
http://svn.reactos.ru/svn/reactos/branches/ros-branch-0_3_0/reactos/drivers…
==============================================================================
--- branches/ros-branch-0_3_0/reactos/drivers/network/tcpip/tcpip/dispatch.c (original)
+++ branches/ros-branch-0_3_0/reactos/drivers/network/tcpip/tcpip/dispatch.c Fri Jun 2
03:37:44 2006
@@ -1522,6 +1522,9 @@
IF->Unicast.Address.IPv4Address = IpAddrChange->Address;
IF->Netmask.Type = IP_ADDRESS_V4;
IF->Netmask.Address.IPv4Address = IpAddrChange->Netmask;
+ IF->Broadcast.Address.IPv4Address =
+ IF->Unicast.Address.IPv4Address |
+ ~IF->Netmask.Address.IPv4Address;
TI_DbgPrint(MID_TRACE,("New Unicast Address: %x\n",
IF->Unicast.Address.IPv4Address));
@@ -1548,6 +1551,7 @@
ForEachInterface(IF) {
if( IF->Index == *NteIndex ) {
+ IPRemoveInterfaceRoute( IF );
IF->Unicast.Type = IP_ADDRESS_V4;
IF->Unicast.Address.IPv4Address = 0;
IF->Netmask.Type = IP_ADDRESS_V4;
Modified: branches/ros-branch-0_3_0/reactos/drivers/network/wshtcpip/wshtcpip.c
URL:
http://svn.reactos.ru/svn/reactos/branches/ros-branch-0_3_0/reactos/drivers…
==============================================================================
--- branches/ros-branch-0_3_0/reactos/drivers/network/wshtcpip/wshtcpip.c (original)
+++ branches/ros-branch-0_3_0/reactos/drivers/network/wshtcpip/wshtcpip.c Fri Jun 2
03:37:44 2006
@@ -93,6 +93,11 @@
}
+/*
+Document from OSR how WSHGetSockaddrType works
+http://www.osronline.com/ddkx/network/37wshfun_5lyq.htm
+*/
+
INT
EXPORT
WSHGetSockaddrType(
@@ -100,10 +105,57 @@
IN DWORD SockaddrLength,
OUT PSOCKADDR_INFO SockaddrInfo)
{
- UNIMPLEMENTED
-
- return 0;
-}
+ PSOCKADDR_IN ipv4 = (PSOCKADDR_IN)Sockaddr;
+
+ if ((ipv4 != NULL)
+ && (SockaddrLength == sizeof(SOCKADDR_IN))
+ && (ipv4->sin_family == AF_INET)
+ && (SockaddrInfo != NULL))
+ {
+
+ switch (ntohl(ipv4->sin_addr.s_addr))
+ {
+ case INADDR_ANY:
+ SockaddrInfo->AddressInfo = SockaddrAddressInfoWildcard;
+ break;
+
+ case INADDR_BROADCAST:
+ SockaddrInfo->AddressInfo = SockaddrAddressInfoBroadcast;
+ break;
+
+ case INADDR_LOOPBACK:
+ SockaddrInfo->AddressInfo = SockaddrAddressInfoLoopback;
+ break;
+
+ default:
+ SockaddrInfo->AddressInfo = SockaddrAddressInfoNormal;
+ break;
+ }
+
+ SockaddrInfo->EndpointInfo = SockaddrEndpointInfoNormal;
+ if (ntohs(ipv4->sin_port) == 0)
+ SockaddrInfo->EndpointInfo = SockaddrEndpointInfoWildcard;
+ if (ntohs(ipv4->sin_port) < IPPORT_RESERVED)
+ SockaddrInfo->EndpointInfo = SockaddrEndpointInfoReserved;
+
+ return 0;
+ }
+
+ DPRINT1("FIXME WSHGetSockaddrType Unsupported Address Family or bad
parameters\n");
+ if (SockaddrInfo != NULL)
+ {
+ SockaddrInfo->AddressInfo = SockaddrAddressInfoNormal;
+ SockaddrInfo->EndpointInfo = SockaddrEndpointInfoNormal;
+ }
+
+ DPRINT1("Size of Address Family %d \n",SockaddrLength);
+
+ DPRINT1("FIXME WSHGetSockaddrType return Winsock error, but we do not return any
error\n");
+ return 0;
+}
+
+
+
INT
Modified: branches/ros-branch-0_3_0/reactos/lib/drivers/ip/network/ip.c
URL:
http://svn.reactos.ru/svn/reactos/branches/ros-branch-0_3_0/reactos/lib/dri…
==============================================================================
--- branches/ros-branch-0_3_0/reactos/lib/drivers/ip/network/ip.c (original)
+++ branches/ros-branch-0_3_0/reactos/lib/drivers/ip/network/ip.c Fri Jun 2 03:37:44
2006
@@ -305,14 +305,19 @@
TCPDisposeInterfaceData( IF->TCPContext );
IF->TCPContext = NULL;
+ TI_DbgPrint(DEBUG_IP,("Removing interface Addr %s\n",
A2S(&IF->Unicast)));
+ TI_DbgPrint(DEBUG_IP,(" Mask %s\n",
A2S(&IF->Netmask)));
+
AddrWidenAddress(&GeneralRoute,&IF->Unicast,&IF->Netmask);
+
RouterRemoveRoute(&GeneralRoute, &IF->Unicast);
/* Remove permanent NCE, but first we have to find it */
NCE = NBLocateNeighbor(&IF->Unicast);
if (NCE)
NBRemoveNeighbor(NCE);
-
+ else
+ TI_DbgPrint(DEBUG_IP, ("Could not delete IF route (0x%X)\n", IF));
}
VOID IPUnregisterInterface(
Modified: branches/ros-branch-0_3_0/reactos/lib/drivers/ip/network/router.c
URL:
http://svn.reactos.ru/svn/reactos/branches/ros-branch-0_3_0/reactos/lib/dri…
==============================================================================
--- branches/ros-branch-0_3_0/reactos/lib/drivers/ip/network/router.c (original)
+++ branches/ros-branch-0_3_0/reactos/lib/drivers/ip/network/router.c Fri Jun 2 03:37:44
2006
@@ -18,6 +18,30 @@
LIST_ENTRY FIBListHead;
KSPIN_LOCK FIBLock;
+void RouterDumpRoutes() {
+ PLIST_ENTRY CurrentEntry;
+ PLIST_ENTRY NextEntry;
+ PFIB_ENTRY Current;
+ PNEIGHBOR_CACHE_ENTRY NCE;
+
+ TI_DbgPrint(DEBUG_ROUTER,("Dumping Routes\n"));
+
+ CurrentEntry = FIBListHead.Flink;
+ while (CurrentEntry != &FIBListHead) {
+ NextEntry = CurrentEntry->Flink;
+ Current = CONTAINING_RECORD(CurrentEntry, FIB_ENTRY, ListEntry);
+
+ NCE = Current->Router;
+
+ TI_DbgPrint(DEBUG_ROUTER,("Examining FIBE %x\n", Current));
+ TI_DbgPrint(DEBUG_ROUTER,("... NetworkAddress %s\n",
A2S(&Current->NetworkAddress)));
+ TI_DbgPrint(DEBUG_ROUTER,("... NCE->Address . %s\n",
A2S(&NCE->Address)));
+
+ CurrentEntry = NextEntry;
+ }
+
+ TI_DbgPrint(DEBUG_ROUTER,("Dumping Routes ... Done\n"));
+}
VOID FreeFIB(
PVOID Object)
@@ -195,7 +219,7 @@
return NULL;
}
- INIT_TAG(Router, TAG('R','O','U','T'));
+ INIT_TAG(Router, TAG('R','O','U','T'));
RtlCopyMemory( &FIBE->NetworkAddress, NetworkAddress,
sizeof(FIBE->NetworkAddress) );
@@ -331,13 +355,17 @@
PNEIGHBOR_CACHE_ENTRY NCE;
TI_DbgPrint(DEBUG_ROUTER, ("Called\n"));
+ TI_DbgPrint(DEBUG_ROUTER, ("Deleting Route From: %s\n", A2S(Router)));
+ TI_DbgPrint(DEBUG_ROUTER, (" To: %s\n", A2S(Target)));
TcpipAcquireSpinLock(&FIBLock, &OldIrql);
- CurrentEntry = FIBListHead.Flink;
- while (CurrentEntry != &FIBListHead) {
- NextEntry = CurrentEntry->Flink;
- Current = CONTAINING_RECORD(CurrentEntry, FIB_ENTRY, ListEntry);
+ RouterDumpRoutes();
+
+ CurrentEntry = FIBListHead.Flink;
+ while (CurrentEntry != &FIBListHead) {
+ NextEntry = CurrentEntry->Flink;
+ Current = CONTAINING_RECORD(CurrentEntry, FIB_ENTRY, ListEntry);
NCE = Current->Router;
@@ -355,6 +383,8 @@
TI_DbgPrint(DEBUG_ROUTER, ("Deleting route\n"));
DestroyFIBE( Current );
}
+
+ RouterDumpRoutes();
TcpipReleaseSpinLock(&FIBLock, OldIrql);
@@ -384,8 +414,33 @@
* for providing this reference
*/
{
+ KIRQL OldIrql;
+ PFIB_ENTRY FIBE;
+ PLIST_ENTRY CurrentEntry;
+ PLIST_ENTRY NextEntry;
+ PFIB_ENTRY Current;
PNEIGHBOR_CACHE_ENTRY NCE;
- PFIB_ENTRY FIBE;
+
+ TcpipAcquireSpinLock(&FIBLock, &OldIrql);
+
+ CurrentEntry = FIBListHead.Flink;
+ while (CurrentEntry != &FIBListHead) {
+ NextEntry = CurrentEntry->Flink;
+ Current = CONTAINING_RECORD(CurrentEntry, FIB_ENTRY, ListEntry);
+
+ NCE = Current->Router;
+
+ if( AddrIsEqual(NetworkAddress, &Current->NetworkAddress) &&
+ AddrIsEqual(Netmask, &Current->Netmask) ) {
+ TI_DbgPrint(DEBUG_ROUTER,("Attempting to add duplicate route to %s\n",
A2S(NetworkAddress)));
+ TcpipReleaseSpinLock(&FIBLock, OldIrql);
+ return NULL;
+ }
+
+ CurrentEntry = NextEntry;
+ }
+
+ TcpipReleaseSpinLock(&FIBLock, OldIrql);
/* The NCE references RouterAddress. The NCE is referenced for us */
NCE = NBFindOrCreateNeighbor(Interface, RouterAddress);
Modified: branches/ros-branch-0_3_0/reactos/lib/drivers/oskittcp/oskittcp/uipc_socket.c
URL:
http://svn.reactos.ru/svn/reactos/branches/ros-branch-0_3_0/reactos/lib/dri…
==============================================================================
--- branches/ros-branch-0_3_0/reactos/lib/drivers/oskittcp/oskittcp/uipc_socket.c
(original)
+++ branches/ros-branch-0_3_0/reactos/lib/drivers/oskittcp/oskittcp/uipc_socket.c Fri Jun
2 03:37:44 2006
@@ -827,6 +827,19 @@
register struct socket *so;
register int how;
{
+ if (so == NULL)
+ {
+ register struct protosw *pr = NULL;
+
+ how++;
+ if (how & FREAD)
+ sorflush(so);
+ if (how & FWRITE)
+ return ((*pr->pr_usrreq)(so, PRU_SHUTDOWN,
+ (struct mbuf *)0, (struct mbuf *)0, (struct mbuf *)0));
+ return (0);
+ }
+
register struct protosw *pr = so->so_proto;
how++;