;-------------------------------------------------------------------------------
;INX_COPYRIGHT_1
;INX_COPYRIGHT_2
;
;Module Name:
;    netkvm.inf
;
; VirtIO Ethernet Adapter
;
;-------------------------------------------------------------------------------

[version]
Signature   = "$Windows NT$"
Class       = Net
CatalogFile = netkvm.cat
ClassGUID   = {4d36e972-e325-11ce-bfc1-08002be10318}
Provider=%VENDOR%
DriverVer=01/01/2008,0.0.0.1 ; this line will be replaced with stampinf
DriverPackageType = PlugAndPlay
DriverPackageDisplayName = %kvmnet6.DeviceDesc%

[Manufacturer]
%VENDOR% = NetKVM, NT$ARCH$

[NetKVM.NT$ARCH$]
%kvmnet6.DeviceDesc%    = kvmnet6.ndi, PCI\VEN_1AF4&DEV_1000&SUBSYS_0001_INX_SUBSYS_VENDOR_ID&REV_00, PCI\VEN_1AF4&DEV_1000
%kvmnet6.DeviceDesc%    = kvmnet6.ndi, PCI\VEN_1AF4&DEV_1041&SUBSYS_1100_INX_SUBSYS_VENDOR_ID&REV_01, PCI\VEN_1AF4&DEV_1041

[kvmnet6.ndi.hw]
AddReg          = kvmnet6.EnableMSI

[kvmnet6.EnableMSI]
;HKR, "Interrupt Management",, 0x00000010
;HKR, "Interrupt Management\MessageSignaledInterruptProperties",, 0x00000010
HKR, "Interrupt Management\MessageSignaledInterruptProperties", MSISupported, 0x00010001, 1
HKR, "Interrupt Management\MessageSignaledInterruptProperties", MessageNumberLimit, 0x00010001, 2048
;HKR, "Interrupt Management\Affinity Policy",, 0x00000010
HKR, "Interrupt Management\Affinity Policy", DevicePolicy, 0x00010001, 0
HKR, "Interrupt Management\Affinity Policy", DevicePriority, 0x00010001, 2

[kvmnet6.ndi]
Characteristics = 0x84 ; NCF_PHYSICAL  | NCF_HAS_UI
BusType     = 5 ; PCI
AddReg          = kvmnet6.Reg, Parameters
CopyFiles       = kvmnet6.CopyFiles
*IfType         = 6
*MediaType      = 0     ; NdisMedium802_3
*PhysicalMediaType = 0      ; NdisPhysicalMediumUnspecified

[kvmnet6.ndi.Services]
AddService      = netkvm, 2, kvmnet6.Service, kvmnet6.EventLog

;----------------------------------------------------------------------------- 
; Red Hat ParaVirtualized Miniport Common 
;----------------------------------------------------------------------------- 
[Parameters]

HKR, Ndi\Params\Priority,           ParamDesc,  0,          %Priority%
HKR, Ndi\Params\Priority,           Default,    0,          "1"
HKR, Ndi\Params\Priority,           type,       0,          "enum"
HKR, Ndi\Params\Priority\enum,      "1",        0,          %Enable%
HKR, Ndi\Params\Priority\enum,      "0",        0,          %Disable%

HKR, Ndi\Params\*PriorityVLANTag,           ParamDesc,  0,          %PriorityVlanTag%
HKR, Ndi\Params\*PriorityVLANTag,           Default,    0,          "3"
HKR, Ndi\Params\*PriorityVLANTag,           type,       0,          "enum"
HKR, Ndi\Params\*PriorityVLANTag\enum,      "3",        0,          %Priority_Vlan%
HKR, Ndi\Params\*PriorityVLANTag\enum,      "2",        0,          %VLan%
HKR, Ndi\Params\*PriorityVLANTag\enum,      "1",        0,          %PriorityOnly%
HKR, Ndi\Params\*PriorityVLANTag\enum,      "0",        0,          %Disable%

HKR, Ndi\params\VlanID,         ParamDesc,  0,          %VLan_ID%
HKR, Ndi\params\VlanID,         type,       0,          "int"
HKR, Ndi\params\VlanID,         default,    0,          "0"
HKR, Ndi\params\VlanID,         min,        0,          "0"
HKR, Ndi\params\VlanID,         max,        0,          "4095"

HKR, Ndi\Params\DoLog,              ParamDesc,  0,          %EnableLogging%
HKR, Ndi\Params\DoLog,              Default,    0,          "1"
HKR, Ndi\Params\DoLog,              type,       0,          "enum"
HKR, Ndi\Params\DoLog\enum,         "1",        0,          %Enable%
HKR, Ndi\Params\DoLog\enum,         "0",        0,          %Disable%

HKR, Ndi\params\DebugLevel,         ParamDesc,  0,          %DebugLevel%
HKR, Ndi\params\DebugLevel,         type,       0,          "int"
HKR, Ndi\params\DebugLevel,         default,    0,          "0"
HKR, Ndi\params\DebugLevel,         min,        0,          "0"
HKR, Ndi\params\DebugLevel,         max,        0,          "8"
HKR, Ndi\params\DebugLevel,         step,       0,          "1"

HKR, Ndi\params\*JumboPacket,       ParamDesc,  0,          %JumboPacket%
HKR, Ndi\params\*JumboPacket,       type,       0,          "long"
HKR, Ndi\params\*JumboPacket,       default,    0,          "1514"
HKR, Ndi\params\*JumboPacket,       min,        0,          "590"
HKR, Ndi\params\*JumboPacket,       max,        0,          "65500"
HKR, Ndi\params\*JumboPacket,       step,       0,          "1"

HKR, Ndi\params\TxCapacity,         ParamDesc,  0,          %TxCapacity%
HKR, Ndi\params\TxCapacity,         type,       0,          "enum"
HKR, Ndi\params\TxCapacity,         default,    0,          "1024"
HKR, Ndi\Params\TxCapacity\enum,    "16",       0,          %String_16%
HKR, Ndi\Params\TxCapacity\enum,    "32",       0,          %String_32%
HKR, Ndi\Params\TxCapacity\enum,    "64",       0,          %String_64%
HKR, Ndi\Params\TxCapacity\enum,    "128",      0,          %String_128%
HKR, Ndi\Params\TxCapacity\enum,    "256",      0,          %String_256%
HKR, Ndi\Params\TxCapacity\enum,    "512",      0,          %String_512%
HKR, Ndi\Params\TxCapacity\enum,    "1024",     0,          %String_1024%

HKR, Ndi\params\RxCapacity,         ParamDesc,  0,          %RxCapacity%
HKR, Ndi\params\RxCapacity,         type,       0,          "enum"
HKR, Ndi\params\RxCapacity,         default,    0,          "256"
HKR, Ndi\Params\RxCapacity\enum,    "16",       0,          %String_16%
HKR, Ndi\Params\RxCapacity\enum,    "32",       0,          %String_32%
HKR, Ndi\Params\RxCapacity\enum,    "64",       0,          %String_64%
HKR, Ndi\Params\RxCapacity\enum,    "128",      0,          %String_128%
HKR, Ndi\Params\RxCapacity\enum,    "256",      0,          %String_256%
HKR, Ndi\Params\RxCapacity\enum,    "512",      0,          %String_512%
HKR, Ndi\Params\RxCapacity\enum,    "1024",     0,          %String_1024%

HKR, Ndi\params\NetworkAddress,     ParamDesc,  0,          %NetworkAddress%
HKR, Ndi\params\NetworkAddress,     type,       0,          "edit"
HKR, Ndi\params\NetworkAddress,     Optional,   0,          "1"

HKR, Ndi\Params\OffLoad.TxChecksum, ParamDesc,  0,          %OffLoad.TxChecksum%
HKR, Ndi\Params\OffLoad.TxChecksum, Default,    0,          "31"
HKR, Ndi\Params\OffLoad.TxChecksum, type,       0,          "enum"
HKR, Ndi\Params\OffLoad.TxChecksum\enum,    "31",       0,  %All%
HKR, Ndi\Params\OffLoad.TxChecksum\enum,    "27",       0,  %TCPUDPAll%
HKR, Ndi\Params\OffLoad.TxChecksum\enum,    "3",        0,  %TCPUDPv4%
HKR, Ndi\Params\OffLoad.TxChecksum\enum,    "1",        0,  %TCPv4%
HKR, Ndi\Params\OffLoad.TxChecksum\enum,    "0",        0,  %Disable%

HKR, Ndi\Params\OffLoad.TxLSO,      ParamDesc,  0,          %OffLoad.TxLSO%
HKR, Ndi\Params\OffLoad.TxLSO,      Default,    0,          "2"
HKR, Ndi\Params\OffLoad.TxLSO,      type,       0,          "enum"
HKR, Ndi\Params\OffLoad.TxLSO\enum, "2",        0,          %Maximal%
HKR, Ndi\Params\OffLoad.TxLSO\enum, "1",        0,          %IPv4%
HKR, Ndi\Params\OffLoad.TxLSO\enum, "0",        0,          %Disable%

HKR, Ndi\Params\OffLoad.RxCS,       ParamDesc,  0,          %OffLoad.RxCS%
HKR, Ndi\Params\OffLoad.RxCS,       Default,    0,          "31"
HKR, Ndi\Params\OffLoad.RxCS,       type,       0,          "enum"
HKR, Ndi\Params\OffLoad.RxCS\enum,  "31",       0,          %All%
HKR, Ndi\Params\OffLoad.RxCS\enum,  "27",       0,          %TCPUDPAll%
HKR, Ndi\Params\OffLoad.RxCS\enum,  "3",        0,          %TCPUDPv4%
HKR, Ndi\Params\OffLoad.RxCS\enum,  "1",        0,          %TCPv4%
HKR, Ndi\Params\OffLoad.RxCS\enum,  "0",        0,          %Disable%

HKR, Ndi\Params\*IPChecksumOffloadIPv4,     ParamDesc,  0,      %Std.IPChecksumOffloadv4%
HKR, Ndi\Params\*IPChecksumOffloadIPv4,     Default,    0,      "3"
HKR, Ndi\Params\*IPChecksumOffloadIPv4,     type,       0,      "enum"
HKR, Ndi\Params\*IPChecksumOffloadIPv4\enum,    "3",    0,      %TxRx%
HKR, Ndi\Params\*IPChecksumOffloadIPv4\enum,    "2",    0,      %Rx%
HKR, Ndi\Params\*IPChecksumOffloadIPv4\enum,    "1",    0,      %Tx%
HKR, Ndi\Params\*IPChecksumOffloadIPv4\enum,    "0",    0,      %Disable%

HKR, Ndi\Params\*LsoV2IPv4,                 ParamDesc,  0,      %Std.LsoV2IPv4%
HKR, Ndi\Params\*LsoV2IPv4,                 Default,    0,      "1"
HKR, Ndi\Params\*LsoV2IPv4,                 type,       0,      "enum"
HKR, Ndi\Params\*LsoV2IPv4\enum,            "1",        0,      %Enable%
HKR, Ndi\Params\*LsoV2IPv4\enum,            "0",        0,      %Disable%

HKR, Ndi\Params\*LsoV2IPv6,                 ParamDesc,  0,      %Std.LsoV2IPv6%
HKR, Ndi\Params\*LsoV2IPv6,                 Default,    0,      "1"
HKR, Ndi\Params\*LsoV2IPv6,                 type,       0,      "enum"
HKR, Ndi\Params\*LsoV2IPv6\enum,            "1",        0,      %Enable%
HKR, Ndi\Params\*LsoV2IPv6\enum,            "0",        0,      %Disable%

HKR, Ndi\Params\*UDPChecksumOffloadIPv4,    ParamDesc,  0,      %Std.UDPChecksumOffloadIPv4%
HKR, Ndi\Params\*UDPChecksumOffloadIPv4,    Default,    0,      "3"
HKR, Ndi\Params\*UDPChecksumOffloadIPv4,    type,       0,      "enum"
HKR, Ndi\Params\*UDPChecksumOffloadIPv4\enum,   "3",    0,      %TxRx%
HKR, Ndi\Params\*UDPChecksumOffloadIPv4\enum,   "2",    0,      %Rx%
HKR, Ndi\Params\*UDPChecksumOffloadIPv4\enum,   "1",    0,      %Tx%
HKR, Ndi\Params\*UDPChecksumOffloadIPv4\enum,   "0",    0,      %Disable%

HKR, Ndi\Params\*TCPChecksumOffloadIPv4,    ParamDesc,  0,      %Std.TCPChecksumOffloadIPv4%
HKR, Ndi\Params\*TCPChecksumOffloadIPv4,    Default,    0,      "3"
HKR, Ndi\Params\*TCPChecksumOffloadIPv4,    type,       0,      "enum"
HKR, Ndi\Params\*TCPChecksumOffloadIPv4\enum,   "3",    0,      %TxRx%
HKR, Ndi\Params\*TCPChecksumOffloadIPv4\enum,   "2",    0,      %Rx%
HKR, Ndi\Params\*TCPChecksumOffloadIPv4\enum,   "1",    0,      %Tx%
HKR, Ndi\Params\*TCPChecksumOffloadIPv4\enum,   "0",    0,      %Disable%

HKR, Ndi\Params\*TCPChecksumOffloadIPv6,    ParamDesc,  0,      %Std.TCPChecksumOffloadIPv6%
HKR, Ndi\Params\*TCPChecksumOffloadIPv6,    Default,    0,      "3"
HKR, Ndi\Params\*TCPChecksumOffloadIPv6,    type,       0,      "enum"
HKR, Ndi\Params\*TCPChecksumOffloadIPv6\enum,   "3",    0,      %TxRx%
HKR, Ndi\Params\*TCPChecksumOffloadIPv6\enum,   "2",    0,      %Rx%
HKR, Ndi\Params\*TCPChecksumOffloadIPv6\enum,   "1",    0,      %Tx%
HKR, Ndi\Params\*TCPChecksumOffloadIPv6\enum,   "0",    0,      %Disable%

HKR, Ndi\Params\*UDPChecksumOffloadIPv6,    ParamDesc,  0,      %Std.UDPChecksumOffloadIPv6%
HKR, Ndi\Params\*UDPChecksumOffloadIPv6,    Default,    0,      "3"
HKR, Ndi\Params\*UDPChecksumOffloadIPv6,    type,       0,      "enum"
HKR, Ndi\Params\*UDPChecksumOffloadIPv6\enum,   "3",    0,      %TxRx%
HKR, Ndi\Params\*UDPChecksumOffloadIPv6\enum,   "2",    0,      %Rx%
HKR, Ndi\Params\*UDPChecksumOffloadIPv6\enum,   "1",    0,      %Tx%
HKR, Ndi\Params\*UDPChecksumOffloadIPv6\enum,   "0",    0,      %Disable%

[kvmnet6.CopyFiles]
netkvm.sys,,,2

[kvmnet6.Service]
DisplayName     = %kvmnet6.Service.DispName%
ServiceType     = 1 ;%SERVICE_KERNEL_DRIVER%
StartType       = 3 ;%SERVICE_DEMAND_START%
ErrorControl    = 1 ;%SERVICE_ERROR_NORMAL%
ServiceBinary   = %12%\netkvm.sys
LoadOrderGroup  = NDIS
AddReg          = TextModeFlags.Reg

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

[kvmnet6.AddEventLog.Reg]
HKR, , EventMessageFile, 0x00020000, "%%SystemRoot%%\System32\netevent.dll"
HKR, , TypesSupported,   0x00010001, 7

[TextModeFlags.Reg]
HKR,,TextModeFlags,0x00010001, 0x0001
HKR,Parameters,DisableMSI,,"0"
HKR,Parameters,EarlyDebug,,"3"

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

[SourceDisksFiles]
netkvm.sys  = 1,,

[DestinationDirs]
kvmnet6.CopyFiles = 12

[Strings]
VENDOR = "INX_COMPANY"
kvmnet6.DeviceDesc        = "INX_PREFIX_VENDORVirtIO Ethernet Adapter"
kvmnet6.Service.DispName    = "INX_PREFIX_VENDORVirtIO Ethernet Adapter Service"
DiskId1 = "INX_PREFIX_VENDORVirtIO Ethernet Adapter Driver Disk #1"
NetworkAddress = "Assign MAC"
Priority = "Init.Do802.1PQ"
JumboPacket = "Jumbo Packet"
TxCapacity = "Init.MaxTxBuffers"
RxCapacity = "Init.MaxRxBuffers"
Offload.TxChecksum = "Offload.Tx.Checksum"
Offload.TxLSO = "Offload.Tx.LSO"
Offload.RxCS = "Offload.Rx.Checksum"
EnableLogging = "Logging.Enable"
DebugLevel = "Logging.Level"
Tx = "Tx Enabled";
Rx = "Rx Enabled";
TxRx = "Rx & Tx Enabled";
Std.LsoV2IPv4 = "Large Send Offload V2 (IPv4)"
Std.LsoV2IPv6 = "Large Send Offload V2 (IPv6)"
Std.UDPChecksumOffloadIPv4 = "UDP Checksum Offload (IPv4)"
Std.TCPChecksumOffloadIPv4 = "TCP Checksum Offload (IPv4)"
Std.UDPChecksumOffloadIPv6 = "UDP Checksum Offload (IPv6)"
Std.TCPChecksumOffloadIPv6 = "TCP Checksum Offload (IPv6)"
Std.IPChecksumOffloadv4 = "IPv4 Checksum Offload"
Disable = "Disabled"
Enable  = "Enabled"
Enable* = "Enabled*"
String_16 = "16"
String_32 = "32"
String_64 = "64"
String_128 = "128"
String_256 = "256"
String_512 = "512"
String_1024 = "1024"
PriorityVlanTag = "Priority and VLAN tagging"
PriorityOnly = "Priority"
VLan = "VLan"
VLan_ID = "VLan ID"
Priority_Vlan = "All"
10M = "10M"
100M = "100M"
1G   = "1G"
10G = "10G"
TCPv4 = "TCP(v4)"
TCPUDPv4 = "TCP/UDP(v4)"
TCPUDPAll = "TCP/UDP(v4,v6)"
All = "All"
IPv4 = "IPv4"
Maximal = "Maximal"

[kvmnet6.Reg] 
HKR,    ,                         BusNumber,           0, "0"
HKR, Ndi,                         Service,             0, "netkvm"
HKR, Ndi\Interfaces,              UpperRange,          0, "ndis5"
HKR, Ndi\Interfaces,              LowerRange,          0, "ethernet"
 
