usb虚拟网卡

1. USB Gadget functions configurable through configfs

1.1. RNDIS

Microsoft Windows XP bundles the "Remote NDIS" (RNDIS) protocol,                                                                                   

and Microsoft provides redistributable binary RNDIS drivers for                                                                                    

older versions of Windows.                                                                                                                           

To make MS-Windows work with this, use Documentation/usb/linux.inf                                                                                   

as the "driver info file".  For versions of MS-Windows older than                                                                                   

XP, you'll need to download drivers from Microsoft's website; a URL                                                                                  

is given in comments found in that info file.

 

1.2. CDC ECM

The "Communication Device Class" (CDC) Ethernet Control Model.                                                                                  

That protocol is often avoided with pure Ethernet adapters, in                                                                                  

favor of simpler vendor-specific hardware, but is widely                                                                                        

supported by firmware for smart network devices

 

1.3. CDC ECM subset

On hardware that can't implement the full protocol,                                                                                             

a simple CDC subset is used, placing fewer demands on USB.

 

1.4. CDC NCM

NCM is an advanced protocol for Ethernet encapsulation, allows                                                                                  

grouping of several ethernet frames into one USB transfer and                                                                                   

different alignment possibilities.

 

1.5. EEM

CDC EEM is a newer USB standard that is somewhat simpler than CDC ECM                                                                           

and therefore can be supported by more hardware.  Technically ECM and                                                                           

EEM are designed for different applications.  The ECM model extends                                                                             

the network interface to the target (e.g. a USB cable modem), and the                                                                           

EEM model is for mobile devices to communicate with hosts using                                                                                 

ethernet over USB.  For Linux gadgets, however, the interface with                                                                              

the host is the same (a usbX device), so the differences are minimal

 

 

2. USB Gadget precomposed configurations

2.1. NCM

This driver implements USB CDC NCM subclass standard. NCM is                                                                                    

an advanced protocol for Ethernet encapsulation, allows grouping                                                                                

of several ethernet frames into one USB transfer and different                                                                                  

alignment possibilities.

 

2.2. Ethernet Gadget

This driver implements Ethernet style communication, in one of                                                                                  

several ways:                                                                                                                                   

                                                                                                                                                 

 - The "Communication Device Class" (CDC) Ethernet Control Model.                                                                               

That protocol is often avoided with pure Ethernet adapters, in                                                                               

favor of simpler vendor-specific hardware, but is widely                                                                                     

 supported by firmware for smart network devices.                                                                                             

                                                                                                                                             

- On hardware can't implement that protocol, a simple CDC subset                                                                               

is used, placing fewer demands on USB.                                                                                                       

                                                                                                                                             

- CDC Ethernet Emulation Model (EEM) is a newer standard that has                                                                              

a simpler interface that can be used by more USB hardware.                                                                                   

                                                                                                                                             

RNDIS support is an additional option, more demanding than subset.                                                                              

                                                                                                                                             

Within the USB device, this gadget driver exposes a network device                                                                              

"usbX", where X depends on what other networking devices you have.                                                                              

Treat it like a two-node Ethernet link:  host, and gadget.                                                                                         

                                                                                                                                                   

The Linux-USB host-side "usbnet" driver interoperates with this                                                                                   

driver, so that deep I/O queues can be supported.  On 2.4 kernels,                                                                              

use "CDCEther" instead, if you're using the CDC option. That CDC

mode should also interoperate with standard CDC Ethernet class                                                                                   

drivers on other host operating systems.

 

usb虚拟网卡_第1张图片

 

 

你可能感兴趣的:(USB开发,USB,Linux,Driver,usb)