[Previous] [Contents] [Index] [Next]

Caution: This version of this document is no longer maintained. For the latest documentation, see http://www.qnx.com/developers/docs.

nic_config_t

Structure used to store device configuration information

Synopsis:

typedef struct _nic_config_t
    uint32t      revision;
    uint32t      flags;
    uint32t      mtu;
    uint32t      mru;
    uint32t      verbose;
    uint32t      lan;
    uint32t      permanent_address[8];
    uint32t      current_address[8];
    uint32t      mac_length;
    uint32t      connector;
    int32t       phy_addr;
    uint32t      media;
    int32t       media_rate;
    int32t       duplex;
    uint32t      bus_type;
    uint32t      vendor_id;
    uint32t      device_id;
    uint32t      device_index;
    uint32t      device_revision;
    uint32t      serial_number;
    uint32t      num_mem_windows;
    uint32t      num_io_windows;
    uint32t      num_irqs;
    uint32t      num_dma_channels;
    uint64t      mem_window_base[8];
    uint64t      mem_window_size[8];  
    uint64t      io_window_base[8];
    uint64t      io_window_size[8];
    uint64t      rom_base;
    uint64t      rom_size;
    uint32t      irq[8];
    uint32t      dma_channel[8];
    uint8t       device_description[64];
    uint8t       up_type[16];
    int32t       iftype;
    uint32t      priority;
} nic_config_t; 

Description:

The nic_config_t structure contains device configuration information and stores information parsed from the driver-option string.

The members are defined as follows:

revision
Should be set to NIC_CONFIG_REVISION.
flags
Valid values are defined by the nic_flags_t enumerated types in <hw/nicinfo.h>. The following flags are currently defined:
mtu
Maximum packet size that the device can accept for transmission (including the Ethernet header).
mru
Maximum packet size that the device can successfully receive from the medium (including the Ethernet header).
verbose
The current verbosity level. The higher the verbosity level, the more debug information the driver will emit to the system logger.
lan
The instance (LAN) number of the interface.
permanent_address[8]
The unique station address (MAC address) that the manufacturer assigns to this device (usually read from EEPROM by the driver).
current_address[8]
The station address (MAC address) that the device is currently operating with. This is usually, but not necessarily, the same as the device's permanent address.
mac_length
The length of the device's MAC address, in bytes. This length is six for an Ethernet device.
connector
The type of physical connector that's used to connect the device to the medium. This may be one of the nic_connector_types enumerated types, defined in <hw/nicinfo.h>. The following values are currently defined:
phy_addr
The address used to communicate with the PHY device, in order to access its internal registers.
media
Specifies the type of the medium over which the device communicates. This may be one of the nic_media_types enumerated types, defined in <hw/nicinfo.h>. The following types are currently defined:
media_rate
The current media rate, in Kbits per second, at which the device is operating. If the current operation rate is unknown, set this field to -1.
duplex
The current duplex at which the device is operating. A value of 0 means half-duplex; a value of 1 means full-duplex. If the current duplex setting is unknown, set this field to -1.
bus_type
The type of bus through which the device is connected to the host system. See the defined values in <drvr/common.h>.
vendor_id
Specifies the PCI Vendor ID for a PCI device that was assigned to the vendor of the device, which is readable from the PCI configuration space.
device_id
Specifies the PCI Device ID for a PCI device that was assigned by the vendor of the device, which is readable from the PCI configuration space.
device_index
For a PCI device, this is used to uniquely identify a particular instance of the device, in conjunction with vendor_id and device_id. Where there are multiple instances of a device in the system with identical Vendor and Device IDs, these devices are each assigned a unique number. The numbers that are assigned are sequential, beginning at zero. For a non-PCI device, this is an index that addresses an instance of the device in the system. The mapping from index to device is driver-dependent.
device_revision
For a PCI device, this is the device revision that is readable from the PCI configuration space. For other devices, the meaning of the revision number is driver-dependent.
serial_number
Specifies a driver-dependent serial number.
num_mem_windows
Specifies the number of memory-mapped apertures that are used to access the device.
num_io_windows
Specifies the number of I/O-mapped apertures that are used to access the device.
num_irqs
Specifies the number of interrupt vector numbers that the driver attaches to in order to receive interrupt events from the device.
num_dma_channels
Specifies the number of DMA channels used to transfer data between the device and memory.
mem_window_base[8]
This array contains the physical base-addresses of the device's memory-mapped apertures.
mem_window_size[8]
This array contains the sizes, in bytes, of the device's memory-mapped apertures.
io_window_base[8]
This array contains the base addresses, in I/O address space, of the device's I/O-mapped apertures.
io_window_size[8]
This array contains the sizes, in bytes, of the device's I/O-mapped apertures.
rom_base
If the device has a memory-mapped ROM associated with it, this specifies the physical address of the ROM.
rom_size
If the device has a memory-mapped ROM associated with it, this specifies the size, in bytes, of the ROM.
irq[8]
This array contains the interrupt-vector numbers that the driver attaches to in order to receive interrupt events from the device.
dma_channel[8]
This array contains the DMA channels that transfer data between the device and memory.
device_description[64]
This is a NULL-terminated user-readable string describing the device. It should describe the make and model of the device.
uptype[16]
This is a NULL-terminated string which describes the type of interface the device presents. For an Ethernet device, is should be set to en. This string indicates to higher-level software, how the data packets going to and from the driver will be formatted.
iftype
This is one of the interface types from <net/if_types.h>. For an Ethernet device, it should be set to IFT_ETHER.
priority
Specifies the priority at which the driver's event-handling thread should run. The default recommended value is 21.

Classification:

QNX Neutrino


[Previous] [Contents] [Index] [Next]