Network.CreateNetworkInterface Method(String, String, Bool, IPv4AddressNetMaskPair, NetworkInterface.SpeedDuplexType, String, UInt32, UInt32, Bool, String, String, UInt32, UInt32, String, UInt32, UInt32, NetworkInterface.InterruptType, UInt32, UInt32, UInt32, UInt32, UInt32, UInt32, UInt32, UInt32)

Creates an RTX64 network interface.

Namespace:  IntervalZero.RTX64.Config
Assembly:  IntervalZero.RTX64 (in IntervalZero.RTX64.dll) Version: 4.0.0.0 (File version: 4.5.0)

Syntax
public IConfigNetworkInterfaceCreateNetworkInterface(
	string name,
	string driver,
	bool supportTCPIP,
	IPv4AddressNetMaskPair[] IPConfigurations,
        NetworkInterface.SpeedDuplexType speedDuplex,
	string deviceInstanceID = "",
	uint receiveIdealProcessor = 0,
	uint interruptIdealProcessor = 0,
	bool linkStatus = true,
	string gateway = "0.0.0.0",
	string pciBusLocation = "0;0;0",
	uint interruptPriority = 64,
	uint mtu = 1500,
	string ipv6Address = "Auto",
        uint ipv6Prefix = 64,
	uint receivePriority = 63,
	NetworkInterface.InterruptType interrupt = NetworkInterface.InterruptType.DEVICE_DEFAULT,
	uint numReceiveBuffers = 256,
	uint numTransmitBuffers = 256,                                  
	uint maxPacketSize = NetworkInterface.MAXPACKETSIZE_DEFAULT_VALUE,
	uint defaultReceiveQueue = NetworkInterface.DEFAULTQUEUE_DEFAULT_VALUE,
	uint numberOfReceiveQueues = NetworkInterface.NUMBEROFRECEIVEQUEUES_DEFAULT_VALUE,
	uint numberOfTransmitQueues = NetworkInterface.NUMBEROFXMITQUEUES_DEFAULT_VALUE,
	uint transmitCompletePriority = NetworkInterface.XMITCOMPLETEPRIORITY_DEFAULT_VALUE,
	uint transmitCompleteIdealProc = NetworkInterface.XMITCOMPLETEIDEALPROCESSOR_DEFAULT_VALUE)
)

Parameters

name

Specifies the unique name of the interface within the RT-TCP/IP stack instance.

driver

Specifies the name of the Real-time network device (Rtnd) driver for this interface, which is either the file name of the RTDLL implementing the driver or the full pathname to the RTDLL implementing the driver. In either case, the suffix .rtdll must be included.

supportTCPIP

Determines whether the interface supports TCP/IP.

IPConfigurations

Specifies an array of IPv4 addresses and netmasks assigned to this interface. If the interface has no IPv4 addresses, set element 0 of this array to specify IPv4 address 0.0.0.0 and netmask 0.0.0.0, and also set member CountIPv4Configurations to 1.

speedDuplex

The method used to establish the Ethernet link. See NetworkInterface.SpeedDuplexType for more information.

receiveIdealProcessor

Specifies the ideal processor for receive processing.

interruptIdealProcessor

Specifies the ideal processor for interrupt processing.

linkStatus

Specifies whether link status is enabled.

gateway

Specifies the gateway for this interface. This parameter is optional. If this parameter is not given, the interface has no gateway.

pciBusLocation

Specifies the PCI bus location of the RTX64-owned NIC for this interface in the form "bus;device;function", where bus, device, and function are each non-negative integers. If there is only one network interface configured to use the NIC driver specified in member Driver, this member can be set to "0;0;0" instead of the actual PCI bus location of the NIC. If multiple network interfaces are configured to use the same NIC driver, all of them must have the correct PCI bus location specified in this member. This NIC must be owned by RTX64, otherwise APIs that take this structure as input will fail.

interruptPriority

Specifies the interrupt priority for the interface. This must be a valid RTX64 priority, an integer in the range 0 to 127. This parameter is optional.

mtu

Specifies the Maximum Transmission Unit (MTU) size, in bytes, for the interface. This value must be within the range 1500 bytes to 9000 bytes. This parameter is optional. If not given, it defaults to the stack-wide MTU, which defaults to 1500.

ipv6Address

Specifies the IPv6 address. Parameter ipv6addr must be either a valid IPv6 address or the keyword auto, which means to enable IPv6 auto-configuration of the address and network prefix. This parameter is optional. If not given, the interface has no IPv6 address.

ipv6Prefix

Specifies the IPv6 network prefix. This parameter is optional. If not given, it defaults to 64.

receivePriority

Specifies the RT-TCP/IP stack's receive thread priority. This must be a valid RTX64 priority in the range 0 to 127. This parameter is optional. If not given, it defaults to 63.

interrupt

Specifies the type of interrupt that this interface uses. This parameter is optional. If not given, it defaults to InterruptType.MSIX.

numReceiveBuffers

Specifies the number of receive buffers used by the interface. The minimum value for this member is 64. The maximum value for this member is hardware dependent. This parameter is optional. If not given, it defaults to 64. See Device-Specific Interface Values for the device-specific defaults and value ranges for this property.

numTransmitBuffers

Specifies the number of transmit buffers used by the interface. The minimum value for this member is 64. The maximum value for this member is hardware dependent. This parameter is optional. If not given, it defaults to 64. See Device-Specific Interface Values for the device-specific defaults and value ranges for this property.

deviceInstanceID

Specifies the device Instance ID of the device used by the interface. This parameter is optional. If not given, it defaults to the empty string. The value of the parameter does not affect the behavior of this network interface in any way, but it tells the RTX64 Control Panel which device to associate with this network interface in the Control Panel GUI. Therefore, if this parameter is set to any non-empty string value, that value must specify the device Instance ID of a device that has been converted to RTX64. If this parameter is a non-empty string, its value must be unique among all RTX64 network interfaces, otherwise an exception will be thrown.

Return Value

Type: IConfigNetworkInterface
A reference to the newly created NetworkInterface object.

Remarks

You can add an interface with the same DeviceInstanceID as an existing interface as long as the existing interface is disabled. If you were to then enable the first interface, it may result in error code RT_ERROR_DEVICE_INSTANCE_ID_INVALID, which indicates there is already an enabled interface with the same DeviceInstanceID.

The same is true when adding an interface with the same PCIBusLocation as an existing interface, only this would result in error code RT_ERROR_PCI_BUS_LOCATION_INVALID when the other enabled interface with the same PCIBusLocation was detected.

Implements

CreateNetworkInterface(String, String, Bool, IPv4AddressNetMaskPair, NetworkInterface.SpeedDuplexType, String, UInt32, UInt32, Bool, String, String, UInt32, UInt32, String, UInt32, UInt32, NetworkInterface.InterruptType, UInt32, UInt32, UInt32, UInt32, UInt32, UInt32, UInt32, UInt32)
Exceptions
ExceptionCondition
RTX64Exception Throws an instance of RTX64Exception if an interface with the same name or PCI bus location already exists.
See Also