require 'hives.pl';

print &setupMSTCP;

sub setupMSTCP
{
       local( $tcpKey );

       $tcpKey= 'System\CurrentControlSet\Services\VxD\MSTCP';

       &cKeyLM( $tcpKey ) || return 0;

       &setLM( $tcpKey,'nodeType',$REG_SZ,'0' ) || return 0;

       &setLM( $tcpKey,'EnableDNS',$REG_SZ,'0' ) || return 0;

       &setLM( $tcpKey,'LMHostFile',$REG_SZ,'C:\HOSTS' ) || return 0;

       &cKeyLM( $tcpWinsock= $tcpKey . '\Parameters\Winsock' ) || return 0;

       &setLM( $tcpWinsock,'HelperDllName',$REG_SZ,'%windir%\system\wsock32.dll' ) || return 0;
       &setLM( $tcpWinsock,'MaxSockAddrLength',$REG_BINARY,pack( "L",0x00000010 ) ) || return 0;
       &setLM( $tcpWinsock,'MinSockAddrLength',$REG_BINARY,pack( "L",0x00000010 ) ) || return 0;

       &cKeyLM( $tcpProvider= $tcpKey . '\ServiceProvider' ) || return 0;

       &setLM( $tcpProvider,'LocalPriority',$REG_BINARY,pack( "L",0x000001f3 ) ) || return 0;
       &setLM( $tcpProvider,'HostsPriority',$REG_BINARY,pack( "L",0x000001f4 ) ) || return 0;
       &setLM( $tcpProvider,'DnsPriority',  $REG_BINARY,pack( "L",0x000007d0 ) ) || return 0;
       &setLM( $tcpProvider,'NetBtPriority',$REG_BINARY,pack( "L",0x000001f5 ) ) || return 0;

       &setLM( $tcpProvider,'Class',$REG_BINARY,pack( "L",0x00000008 ) ) || return 0;

       &setLM( $tcpProvider,'ProviderPath',$REG_SZ,'%windir%\system\wsock32.dll' );
}





