;
; CDC ECM driver
;

[Version]
Signature="$WINDOWS NT$"
Class=Net
ClassGUID={4d36e972-e325-11ce-bfc1-08002be10318}
Provider=%PROVIDER%
DriverVer=01/12/2011,4.3.36.3512
CatalogFile=ips_polsat_drivers.cat

; ================= Device Install section =====================

[ips_polsat_cdc_ecm]
%Dev.1A8D.2003.06%=DevInstall, USBCDCECM\VID_1A8D&PID_2003&MI_06
%Dev.1A8D.2005.04%=DevInstall, USBCDCECM\VID_1A8D&PID_2005&MI_04

[ips_polsat_cdc_ecm.NTx86]
%Dev.1A8D.2003.06%=DevInstall, USBCDCECM\VID_1A8D&PID_2003&MI_06
%Dev.1A8D.2005.04%=DevInstall, USBCDCECM\VID_1A8D&PID_2005&MI_04

[ips_polsat_cdc_ecm.NTamd64]
%Dev.1A8D.2003.06%=DevInstall, USBCDCECM\VID_1A8D&PID_2003&MI_06
%Dev.1A8D.2005.04%=DevInstall, USBCDCECM\VID_1A8D&PID_2005&MI_04



;-------------------------------------------------------------------------------
; Virtual Ethernet Adapter
;
[DevInstall]
CopyFiles       = DevInstall.CopyFiles
AddReg          = DevInstall.Reg, DevInstall.Reg.ParamsPromiscuous,DevInstall.Reg.ParamsZeroLenPacket
AddProperty     = cdc_ecm_AddProperty
*IfType         = 160 ; IF_TYPE_USB
*MediaType      = NdisMedium802_3;
*PhysicalMediaType = NdisPhysicalMediumUnspecified; 
Characteristics = 0x84 ; NCF_HAS_UI | NCF_PHYSICAL
BusType         = 15 ; if you specify NCF_PHYSICAL, you must specify bustype

[DevInstall.CopyFiles]
ips_polsat_cdc_ecm.sys,,,%COPYFLG_NO_VERSION_DIALOG%

[DevInstall.Services]
AddService = %cdc_ecm.SvcName%, %SPSVCINST_ASSOCSERVICE%, DevInstall.Service, DevInstall.EventLog

;-----------------------------------------------------------------------------
; Driver and Service Section
;

[DevInstall.Service]
;DisplayName     = %cdc_ecm.SvcDesc%
ServiceType     = 1 ;%SERVICE_KERNEL_DRIVER%
StartType       = 3 ;%SERVICE_DEMAND_START%
ErrorControl    = 1 ;%SERVICE_ERROR_NORMAL%
ServiceBinary   = %12%\ips_polsat_cdc_ecm.sys
LoadOrderGroup  = NDIS
AddReg          = DevInstall.Service.Reg

[DevInstall.Service.Reg]
HKR,           , TextModeFlags, %FLG_ADDREG_TYPE_DWORD%, 0x0001
HKR, Parameters, Provider,      %FLG_ADDREG_TYPE_SZ%,    ips_polsat
HKR, Parameters, DebugLevel,    %FLG_ADDREG_TYPE_DWORD%, 2

[DevInstall.EventLog]
AddReg = DevInstall.AddEventLog.Reg

[DevInstall.AddEventLog.Reg]
HKR, , EventMessageFile, %FLG_ADDREG_EXPAND_SZ%, "%%SystemRoot%%\System32\netevent.dll"
HKR, , TypesSupported,   %FLG_ADDREG_TYPE_DWORD%, 7

[cdc_ecm_AddProperty]
{a45c254e-df1c-4efd-8020-67d146a850e0},14,18,,"Cyfrowy Polsat HSPA Network Device"

;-----------------------------------------------------------------------------
;
[DevInstall.Reg]
HKR,    ,                         BusNumber,           0, "0"
HKR, Ndi,                         Service,             0, "%cdc_ecm.SvcName%"
HKR, Ndi\Interfaces,              UpperRange,          0, "ndis5"
HKR, Ndi\Interfaces,              LowerRange,          0, "ethernet"

[DevInstall.Reg.ParamsPromiscuous]
;
;    Should the physical NIC be set to Promiscuous mode
;
HKR, Ndi\Params\Promiscuous,     ParamDesc, , %Promiscuous%
HKR, Ndi\Params\Promiscuous,     Default,  ,"0"
HKR, Ndi\Params\Promiscuous,     type, ,      enum
HKR, Ndi\Params\Promiscuous\enum,"1",  ,     %EnableStr%
HKR, Ndi\Params\Promiscuous\enum,"0",  ,     %DisableStr%

[DevInstall.Reg.ParamsZeroLenPacket]
;
; Enable/Disable Zero-length packets
;
HKR, Ndi\Params\Zlp,     ParamDesc, , %Zlp%
HKR, Ndi\Params\Zlp,     Default,  ,"1"
HKR, Ndi\Params\Zlp,     type, ,      enum
HKR, Ndi\Params\Zlp\enum,"1",  ,     %EnableStr%
HKR, Ndi\Params\Zlp\enum,"0",  ,     %DisableStr%

;
;--- DevInstall WDF Coinstaller installation ------
;
[DestinationDirs]
cdc_ecm_CoInstaller_CopyFiles = 11

[DevInstall.CoInstallers]
AddReg=cdc_ecm_CoInstaller_AddReg
CopyFiles=cdc_ecm_CoInstaller_CopyFiles

[cdc_ecm_CoInstaller_AddReg]
HKR,,CoInstallers32,%FLG_ADDREG_TYPE_MULTI_SZ%, "WdfCoInstaller01009.dll,WdfCoInstaller"

[cdc_ecm_CoInstaller_CopyFiles]
WdfCoInstaller01009.dll,,,%COPYFLG_NO_OVERWRITE%

[SourceDisksFiles.x86]
WdfCoInstaller01009.dll=1,"\x86" ; make sure the number matches with SourceDisksNames

[SourceDisksFiles.amd64]
WdfCoInstaller01009.dll=1,"\amd64" ; make sure the number matches with SourceDisksNames

[DevInstall.Wdf]
KmdfService = %cdc_ecm.SvcName%, cdc_ecm_wdfsect

[cdc_ecm_wdfsect]
KmdfLibraryVersion = 1.9

;---------------------------------------------------------------;
; Uninstall

[Uninstall]
DelFiles=DevInstall.CopyFiles

[Uninstall.Services]
DelService=%cdc_ecm.SvcName%,0x00000204 ; SPSVCINST_DELETEEVENTLOGENTRY||SPSVCINST_STOPSERVICE        = 0x00000200

;-----------------------------------------------------------------------------

[Manufacturer]
%MANUFACTURER%=ips_polsat_cdc_ecm,NTx86,NTamd64

[SourceDisksNames]
1 = %DISKID%,,,""

[SourceDisksFiles.x86]
ips_polsat_cdc_ecm.sys=1,"\x86"

[SourceDisksFiles.amd64]
ips_polsat_cdc_ecm.sys=1,"\amd64"

[DestinationDirs]
DevInstall.CopyFiles = 12

;-----------------------------------------------------------------------------
; Localizable Strings
;
[Strings]
PROVIDER                    = "IPS"
MANUFACTURER                = "IPS"
DISKID                      = "Cyfrowy Polsat HSPA Device Installation Disk #1"

Dev.1A8D.2003.06 = "Cyfrowy Polsat HSPA Network Device"
Dev.1A8D.2005.04 = "Cyfrowy Polsat HSPA Network Device"


cdc_ecm.SvcDesc             = "Cyfrowy Polsat HSPA CDC-ECM driver"
cdc_ecm.SvcName             = "ips_polsat_cdc_ecm"

Promiscuous					= "Set the physical NIC to promiscuous mode"
Zlp							= "Send Zero-Length Packet"
DisableStr			        = "Disable"
EnableStr			        = "Enable"

KSCATEGORY_BUS_ENUMERATOR=         "{4D36E978-E325-11CE-BFC1-08002BE10318}"

SPSVCINST_TAGTOFRONT                 = 0x00000001
SPSVCINST_ASSOCSERVICE               = 0x00000002
SPSVCINST_DELETEEVENTLOGENTRY        = 0x00000004
SPSVCINST_NOCLOBBER_DISPLAYNAME      = 0x00000008
SPSVCINST_NOCLOBBER_STARTTYPE        = 0x00000010
SPSVCINST_NOCLOBBER_ERRORCONTROL     = 0x00000020
SPSVCINST_NOCLOBBER_LOADORDERGROUP   = 0x00000040
SPSVCINST_NOCLOBBER_DEPENDENCIES     = 0x00000080
SPSVCINST_NOCLOBBER_DESCRIPTION      = 0x00000100
SPSVCINST_STOPSERVICE                = 0x00000200

FLG_ADDREG_KEYONLY          = 0x00000010
FLG_ADDREG_TYPE_MULTI_SZ    = 0x00010000
FLG_ADDREG_TYPE_DWORD       = 0x00010001
FLG_ADDREG_TYPE_BIN         = 0x00000001
FLG_ADDREG_TYPE_SZ          = 0x00000000
FLG_ADDREG_EXPAND_SZ        = 0x00020000

COPYFLG_WARN_IF_SKIP        = 0x00000001
COPYFLG_NOSKIP              = 0x00000002
COPYFLG_NOVERSIONCHECK      = 0x00000004
COPYFLG_FORCE_FILE_IN_USE   = 0x00000008
COPYFLG_NO_OVERWRITE        = 0x00000010
COPYFLG_NO_VERSION_DIALOG   = 0x00000020
COPYFLG_OVERWRITE_OLDER_ONLY= 0x00000040
COPYFLG_REPLACEONLY         = 0x00000400
COPYFLG_NODECOMP            = 0x00000800
COPYFLG_REPLACE_BOOT_FILE   = 0x00001000
COPYFLG_NOPRUNE             = 0x00002000
COPYFLG_IN_USE_RENAME       = 0x00004000

SERVICE_ERROR_CRITICAL        = 0x00000003
SERVICE_ERROR_IGNORE          = 0x00000000
SERVICE_ERROR_NORMAL          = 0x00000001
SERVICE_ERROR_SEVERE          = 0x00000002
SERVICE_AUTO_START            = 0x00000002
SERVICE_BOOT_START            = 0x00000000
SERVICE_DEMAND_START          = 0x00000003
SERVICE_DISABLED              = 0x00000004
SERVICE_INTERACTIVE_PROCESS   = 0x00000100
SERVICE_SYSTEM_START          = 0x00000001
SERVICE_ADAPTER               = 0x00000004
SERVICE_FILE_SYSTEM_DRIVER    = 0x00000002
SERVICE_KERNEL_DRIVER         = 0x00000001
SERVICE_RECOGNIZER_DRIVER     = 0x00000008
SERVICE_WIN32_OWN_PROCESS     = 0x00000010
SERVICE_WIN32_SHARE_PROCESS   = 0x00000020

SELECTIVE_SUSPEND_IDLE_TIMEOUT = 0x0
