wiki1653: Drivers_wiki_page (Version 7) | ||
Network Drivers#Core Networking supports three variety of drivers. These are:
The native and NetBSD drivers all hook directly into the stack in a similiar manner. io-net drivers interface through a "shim" layer which converts the io-net binary interface into the compatible io-pkt interface. We have a special driver (devnp-shim.so) which is automatically loaded up when you want to start an io-net driver. Differences between ported NetBSD drivers and native drivers#There's a fine line between what a "native" and ported driver is. If you do more than the initial "make it run" port, the feature set of a ported driver and a native driver won't really be any difference. From a source point of view, a ported driver has a very different layout than a "started from scratch" native Core Networking driver. The native driver source (under sys/dev_qnx) looks quite similar in terms of content and files to what an io-net driver looks like and have all of the source for a particular driver under one directory. The NetBSD driver source (under sys/dev) is quiet different in layout with source for a particular driver spread out under a specific driver directory, ic, pci, usb and other directories depending on the driver type and bus that it's on.
Differences between io-net drivers and other drivers#
How do I load / unload a driver?#Drivers can be loaded into the stack from the command line just as in io-net.
This command line invocation will work regardless of whether or not the driver is a Core Networking driver or an io-net style driver. The stack automatically detects the driver type and will load the devnp-shim.so binary in the event that the driver is an io-net driver. You need to make sure that all drivers are located in a directory that can be resolved by the LD_LIBRARY_PATH environment variable if you don't want to have to specify the fully qualified name of the device in the command line. You can also "mount" a driver in the standard way:
The standard way to remove a driver from the stack is ifconfig <iface> destroy
How can I troubleshoot a driver?#For native drivers and io-net drivers, the nicinfo utility is usually the first debug tool that's used (aside from ifconfig) when problems with networking occur. This will let you know whether or not the driver has properly negotiated at the link layer and whether or not it is sending and receiving packets.For NetBSD ported drivers that don't include nicinfo capabilities, you can use netstat -I <iface> to get very basic packet input / output information. Use ifconfig to get the basic device information. How do I port a NetBSD Driver#A rough and ready guide to how a driver was ported from NetBSD to Core Networking is available in the source tree under /trunk/sys/dev/doc. The NetBSD drivers make heavy use of libnbdrvr.so, the NetBSD porting library. This library abstracts out the NetBSD OS calls and replaces them with the appropriate Neutrino OS calls. While mostly complete, we're expecting that this library will need updates and tuning as time goes on, especially when we start porting more USB devices over (at this stage, USB support in the porting library is best characterized as "experimental". It works, but we haven't exercised it to a large degree). How do I write a new Core Networking Driver?#A tech note covering how to write a native Core Networking driver is available in the source tree under /trunk/sys/dev_qnx/doc. Sample driver code is also available under trunk/sys/dev_qnx/sample directory. Wired Drivers#Ported NetBSD Drivers#
Native Drivers#
Wireless Drivers#Ported NetBSD Drivers#
Native Drivers#Due to licensing restrictions, we will not be able to provide either source code or binaries on Foundry27. These will be included as part of the official GA release though (the difference being that you have to specifically agree to an EULA as part of the GA installation process). Customers requiring access to these drivers before the GA release should contact their sales reps for more information. The initial release of Core Networking will include official support for the following Wi-Fi chip sets
|
||