⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 usbseth-netdev.html

📁 有关ecos2。0介绍了实时嵌入式的结构以及线程调度的实现和内存的管理等
💻 HTML
字号:
<!-- Copyright (C) 2003 Red Hat, Inc.                                --><!-- This material may be distributed only subject to the terms      --><!-- and conditions set forth in the Open Publication License, v1.0  --><!-- or later (the latest version is presently available at          --><!-- http://www.opencontent.org/openpub/).                           --><!-- Distribution of the work or derivative of the work in any       --><!-- standard (paper) book form is prohibited unless prior           --><!-- permission is obtained from the copyright holder.               --><HTML><HEAD><TITLE>Network Device for the eCos TCP/IP Stack</TITLE><meta name="MSSmartTagsPreventParsing" content="TRUE"><METANAME="GENERATOR"CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+"><LINKREL="HOME"TITLE="eCos Reference Manual"HREF="ecos-ref.html"><LINKREL="UP"TITLE="eCos Support for Developing USB-ethernet Peripherals"HREF="io-usb-slave-eth.html"><LINKREL="PREVIOUS"TITLE="USB-ethernet State Handling"HREF="usbseth-control.html"><LINKREL="NEXT"TITLE="Example Host-side Device Driver"HREF="usbseth-host.html"></HEAD><BODYCLASS="REFENTRY"BGCOLOR="#FFFFFF"TEXT="#000000"LINK="#0000FF"VLINK="#840084"ALINK="#0000FF"><DIVCLASS="NAVHEADER"><TABLESUMMARY="Header navigation table"WIDTH="100%"BORDER="0"CELLPADDING="0"CELLSPACING="0"><TR><THCOLSPAN="3"ALIGN="center">eCos Reference Manual</TH></TR><TR><TDWIDTH="10%"ALIGN="left"VALIGN="bottom"><AHREF="usbseth-control.html"ACCESSKEY="P">Prev</A></TD><TDWIDTH="80%"ALIGN="center"VALIGN="bottom"></TD><TDWIDTH="10%"ALIGN="right"VALIGN="bottom"><AHREF="usbseth-host.html"ACCESSKEY="N">Next</A></TD></TR></TABLE><HRALIGN="LEFT"WIDTH="100%"></DIV><H1><ANAME="USBSETH-NETDEV">Network Device for the eCos TCP/IP Stack</H1><DIVCLASS="REFNAMEDIV"><ANAME="AEN17572"></A><H2>Name</H2>Network Device&nbsp;--&nbsp;USB-ethernet support for the eCos TCP/IP Stack</DIV><DIVCLASS="REFSECT1"><ANAME="AEN17575"></A><H2>Description</H2><P>If the USB peripheral involves running the eCos TCP/IP stack and thatstack needs to use USB-ethernet as a transport layer (or as one of thetransports), then the USB-ethernet package can provide a suitablenetwork device driver. It is still necessary for higher-level code toperform appropriate initialization by calling <AHREF="usbseth-init.html"><TTCLASS="FUNCTION">usbs_eth_init</TT></A>, butafter that it will be the TCP/IP stack rather than application codethat transmits or receives ethernet frames.</P><P>Not all peripherals involving the USB-ethernet package will require aTCP/IP stack. Hence the provision of the network device is controlledby a configuration option <TTCLASS="LITERAL">CYGPKG_USBS_ETHDRV</TT>. Bydefault this will be enabled if the TCP/IP package<TTCLASS="LITERAL">CYGPKG_NET</TT> is loaded, and disabled otherwise. </P><P>There are a number of other configuration options related to thenetwork device. <TTCLASS="LITERAL">CYGFUN_USBS_ETHDRV_STATISTICS</TT>determines whether or not the package will maintain statistics, mainlyintended for SNMP: by default this will be enabled if the SNMP supportpackage <TTCLASS="LITERAL">CYGPKG_SNMPAGENT</TT> is loaded, and disabledotherwise. The name of the ethernet device is controlled by<TTCLASS="LITERAL">CYGDATA_USBS_ETHDRV_NAME</TT>, and has a default valueof either <TTCLASS="LITERAL">eth0</TT> or <TTCLASS="LITERAL">eth1</TT>depending on whether or not there is another network device driverpresent in the configuration.</P><P>Usually eCos network device drivers default to using DHCP forobtaining necessary information such as IP addresses. This is notappropriate for USB-ethernet devices. On the host-side theUSB-ethernet network device will not exist until the USB peripheralhas been plugged in and communication has been established. Thereforeany DHCP daemon on the host would not be listening on that networkdevice at the point that eCos requests its IP and other information. Arelated issue is that the use of DHCP would imply the presence of aDHCP daemon on every affected host machine, as opposed to a singledaemon (plus backups) for the network as a whole. For these reasonsthe USB-ethernet package precludes the use of DHCP as a way of settingthe IP address, instead requiring alternatives such as manualconfiguration.</P></DIV><DIVCLASS="NAVFOOTER"><HRALIGN="LEFT"WIDTH="100%"><TABLESUMMARY="Footer navigation table"WIDTH="100%"BORDER="0"CELLPADDING="0"CELLSPACING="0"><TR><TDWIDTH="33%"ALIGN="left"VALIGN="top"><AHREF="usbseth-control.html"ACCESSKEY="P">Prev</A></TD><TDWIDTH="34%"ALIGN="center"VALIGN="top"><AHREF="ecos-ref.html"ACCESSKEY="H">Home</A></TD><TDWIDTH="33%"ALIGN="right"VALIGN="top"><AHREF="usbseth-host.html"ACCESSKEY="N">Next</A></TD></TR><TR><TDWIDTH="33%"ALIGN="left"VALIGN="top">USB-ethernet State Handling</TD><TDWIDTH="34%"ALIGN="center"VALIGN="top"><AHREF="io-usb-slave-eth.html"ACCESSKEY="U">Up</A></TD><TDWIDTH="33%"ALIGN="right"VALIGN="top">Example Host-side Device Driver</TD></TR></TABLE></DIV></BODY></HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -