亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? devs-eth-synth-ecosynth.html

?? ecos 文檔
?? HTML
?? 第 1 頁 / 共 2 頁
字號:
<!-- 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
>Synthetic Target Ethernet Driver</TITLE
><meta name="MSSmartTagsPreventParsing" content="TRUE">
<META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
"><LINK
REL="HOME"
TITLE="eCos Reference Manual"
HREF="ecos-ref.html"><LINK
REL="UP"
TITLE="Synthetic Target Ethernet Driver"
HREF="devs-eth-synth-ecosynth-ref.html"><LINK
REL="PREVIOUS"
TITLE="Synthetic Target Ethernet Driver"
HREF="devs-eth-synth-ecosynth-ref.html"><LINK
REL="NEXT"
TITLE="Synthetic Target Watchdog Device"
HREF="devs-watchdog-synth-ref.html"></HEAD
><BODY
CLASS="REFENTRY"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
SUMMARY="Header navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>eCos Reference Manual</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="devs-eth-synth-ecosynth-ref.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="devs-watchdog-synth-ref.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><H1
><A
NAME="DEVS-ETH-SYNTH-ECOSYNTH">Synthetic Target Ethernet Driver</H1
><DIV
CLASS="REFNAMEDIV"
><A
NAME="AEN18905"
></A
><H2
>Name</H2
>Synthetic Target Ethernet Support&nbsp;--&nbsp;Allow synthetic target applications to perform ethernet I/O</DIV
><DIV
CLASS="REFSECT1"
><A
NAME="AEN18908"
></A
><H2
>Overview</H2
><P
>The synthetic target ethernet package can provide up to four network
devices, <TT
CLASS="VARNAME"
>eth0</TT
> to <TT
CLASS="VARNAME"
>eth3</TT
>. These can
be used directly by the eCos application or, more commonly, by a
TCP/IP stack that is linked with the eCos application. Each eCos
device can be mapped on to a real Linux network device. For example,
if the Linux PC has two ethernet cards and <TT
CLASS="VARNAME"
>eth1</TT
> is
not currently being used by Linux itself, then one of the eCos devices
can be mapped on to this Linux device. Alternatively, it is possible
to map some or all of the eCos devices on to the ethertap support
provided by the Linux kernel.
    </P
><P
>The ethernet package depends on the I/O auxiliary provided by the
synthetic target architectural HAL package. During initialization the
eCos application will attempt to instantiate the desired devices, by
sending a request to the auxiliary. This will load a Tcl script
<TT
CLASS="FILENAME"
>ethernet.tcl</TT
> that is responsible for handling the
instantiation request and subsequent I/O operations, for example
transmitting an ethernet packet. However, some of the low-level I/O
operations cannot conveniently be done by a Tcl script so
<TT
CLASS="FILENAME"
>ethernet.tcl</TT
> will actually run a separate program
<B
CLASS="COMMAND"
>rawether</B
> to interact with the Linux network device. 
    </P
><DIV
CLASS="INFORMALFIGURE"
><A
NAME="AEN18918"><P
></P
><DIV
CLASS="MEDIAOBJECT"
><P
><IMG
SRC="overview.gif"
ALIGN="CENTER"></P
></DIV
><P
></P
></DIV
><P
>On the target-side there are configuration options to control which
network devices should be present. For many applications a single
device will be sufficient, but if the final eCos application is
something like a network bridge then the package can support multiple
devices. On the host-side each eCos network device needs to be mapped
on to a Linux one, either a real ethernet device or an ethertap
device. This is handled by an entry in the target definition file:
    </P
><TABLE
BORDER="5"
BGCOLOR="#E0E0F0"
WIDTH="70%"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
>synth_device ethernet {
    eth0 real eth1
    eth1 ethertap tap3 00:01:02:03:FE:05
    &#8230;
}</PRE
></TD
></TR
></TABLE
><P
>The ethernet package also comes with support for packet logging,
and provides various facilities for use by user Tcl scripts.
    </P
></DIV
><DIV
CLASS="REFSECT1"
><A
NAME="DEVS-ETH-ECOSYNTH-INSTALL"
></A
><H2
>Installation</H2
><P
>Before a synthetic target eCos application can access ethernet devices
it is necessary to build and install host-side support. The relevant
code resides in the <TT
CLASS="FILENAME"
>host</TT
>
subdirectory of the synthetic target ethernet package, and building it
involves the standard <B
CLASS="COMMAND"
>configure</B
>,
<B
CLASS="COMMAND"
>make</B
> and <B
CLASS="COMMAND"
>make install</B
> steps.
The build involves a new executable <B
CLASS="COMMAND"
>rawether</B
> which
must be able to access a raw Linux network device. This is achieved by
installing it suid root, so the <B
CLASS="COMMAND"
>make install</B
> step
has to be run with superuser privileges.
    </P
><DIV
CLASS="CAUTION"
><P
></P
><TABLE
CLASS="CAUTION"
BORDER="1"
WIDTH="100%"
><TR
><TD
ALIGN="CENTER"
><B
>Caution</B
></TD
></TR
><TR
><TD
ALIGN="LEFT"
><P
>Installing <B
CLASS="COMMAND"
>rawether</B
> suid root introduces a
potential security problem. Although normally
<B
CLASS="COMMAND"
>rawether</B
> is executed only by the I/O auxiliary,
theoretically it can be run by any program. Effectively it gives any
user the ability to monitor all ethernet traffic and to inject
arbitrary packets into the network. Also, as with any suid root
programs there may be as yet undiscovered exploits. Users and system
administrators should consider the risks before running <B
CLASS="COMMAND"
>make
install</B
>. 
    </P
></TD
></TR
></TABLE
></DIV
><P
>There are two main ways of building the host-side software. It is
possible to build both the generic host-side software and all
package-specific host-side software, including the ethernet support,
in a single build tree. This involves using the
<B
CLASS="COMMAND"
>configure</B
> script at the toplevel of the eCos
repository. For more information on this, see the
<TT
CLASS="FILENAME"
>README.host</TT
> file at the top of the repository.
Note that if you have an existing build tree which does not include
the synthetic target ethernet support then it will be necessary to
rerun the toplevel configure script: the search for appropriate
packages happens at configure time.
    </P
><P
>The alternative is to build just the host-side for this package.
This requires a separate build directory, building directly in the
source tree is disallowed. The <B
CLASS="COMMAND"
>configure</B
> options
are much the same as for a build from the toplevel, and the
<TT
CLASS="FILENAME"
>README.host</TT
> file can be consulted for more
details. It is essential that the ethernet support be configured with
the same <TT
CLASS="OPTION"
>--prefix</TT
> option as other eCos host-side
software, especially the I/O auxiliary provided by the architectural
synthetic target HAL package, otherwise the I/O auxiliary will be
unable to locate the ethernet support.
    </P
></DIV
><DIV
CLASS="REFSECT1"
><A
NAME="DEVS-ETH-ECOSYNTH-OPTIONS"
></A
><H2
>Target-side Configuration Options</H2
><P
>The target-side code can be configured to support up to four ethernet
devices, <TT
CLASS="VARNAME"
>eth0</TT
> to <TT
CLASS="VARNAME"
>eth3</TT
>. By
default <TT
CLASS="VARNAME"
>eth0</TT
> is enabled if the configuration
includes a TCP/IP stack, otherwise it is disabled. The other three
devices are always disabled by default. If any of the devices are
enabled then there will also be the usual configuration options
related to building this package. Other options related to network
devices, for example whether or not to use DHCP, are provided by
the generic network device package.
    </P
></DIV
><DIV
CLASS="REFSECT1"
><A
NAME="DEVS-ETH-ECOSYNTH-REAL"
></A
><H2
>Real Ethernet</H2
><P
>One obvious way of providing a synthetic target eCos application with
ethernet I/O is to use a real ethernet device in the PC: transmitted
packets go out on a real network, and packets on the network addressed
to the right MAC address are passed on to eCos. This way synthetic
target networking behaves just like networking on a real target with
ethernet hardware. For example, if there is a DHCP server anywhere on
the network then eCos will be able to contact it during networking
startup and get hold of IP address information.
    </P
><P
>Configuring the ethernet support to use a real ethernet device
requires a simple entry in the target definition file:
    </P
><TABLE
BORDER="5"
BGCOLOR="#E0E0F0"
WIDTH="70%"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
>synth_device ethernet {
    &lt;eCos device&gt; real &lt;linux device&gt;
    &#8230;
}</PRE
></TD
></TR
></TABLE
><P
>For example, to map the eCos network device <TT
CLASS="VARNAME"
>eth0</TT
> to
the Linux device <TT
CLASS="VARNAME"
>eth1</TT
>:
    </P
><TABLE
BORDER="5"
BGCOLOR="#E0E0F0"
WIDTH="70%"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
>synth_device ethernet {
    eth0 real eth1
    &#8230;
}</PRE
></TD
></TR
></TABLE
><P
>It is not possible for an ethernet device to be shared by both the
eCos TCP/IP stack and the Linux one: there would be no simple way to
work out which stack incoming packets are intended for. In theory
it might be possible to do some demultiplexing using distinct IP
addresses, but it would be impossible to support some functionality
such as DHCP. Therefore the <B
CLASS="COMMAND"
>rawether</B
> program will
refuse to access any ethernet device already in use. On a typical
Linux system <TT
CLASS="VARNAME"
>eth0</TT
> will be used for Linux
networking, and the PC will have to be equipped with additional
ethernet devices for use by eCos.
    </P
><P
>The <B
CLASS="COMMAND"
>rawether</B
> program will access the hardware via
the appropriate Linux device driver, so it is important that the
system is set up such that the relevant module will be automatically
loaded or is already loaded. The details of this will depend on the
installed distribution and version, but typically it will involve an
entry in <TT
CLASS="FILENAME"
>/etc/modules.conf</TT
>.
    </P
></DIV
><DIV
CLASS="REFSECT1"
><A
NAME="DEVS-ETH-ECOSYNTH-ETHERTAP"
></A
><H2
>Ethertap</H2
><P
>The Linux kernel's ethertap facility provides a virtual network
interface. A Linux application, for example the
<B
CLASS="COMMAND"
>rawether</B
> program, can open a special character
device <TT
CLASS="FILENAME"
>/dev/net/tun</TT
>, perform various
<TT
CLASS="FUNCTION"
>ioctl</TT
> calls, and then <TT
CLASS="FILENAME"
>write</TT
>
and <TT
CLASS="FILENAME"
>read</TT
> ethernet packets. When the device is
opened the Linux kernel automatically creates a new network interface,
for example <TT
CLASS="VARNAME"
>tap0</TT
>. The Linux TCP/IP stack can be
made to use this network interface like any other interface, receiving
and transmitting ethernet packets. The net effect is a virtual network
connecting just the Linux and eCos TCP/IP stacks, with no other nodes
attached. By default all traffic remains inside this virtual network
and is never forwarded to a real network.
    </P
><P
>Support for the ethertap facility may or may not be provided
automatically, depending on your Linux distribution and version. If
your system does not have a device <TT
CLASS="FILENAME"
>/dev/net/tun</TT
>
or a module <TT
CLASS="FILENAME"
>tun.o</TT
> then the appropriate kernel
documentation should be consulted, for example
<TT
CLASS="FILENAME"
>/usr/src/linux-2.4/Documentation/networking/tuntap.txt</TT
>.
If you are using an old Linux kernel then the ethertap functionality
may be missing completely. When the <B
CLASS="COMMAND"
>rawether</B
>
program is configured and built, the <B
CLASS="COMMAND"
>configure</B
>
script will check for a file <TT
CLASS="FILENAME"
>/usr/include/linux/if_tun.h</TT
>. If that
file is missing then <B
CLASS="COMMAND"
>rawether</B
> will be built without
ethertap functionality, and only real ethernet interfaces will be
supported.
    </P
><P
>The target definition file is used to map eCos network devices on to
ethertap devices. The simplest usage is:
    </P
><TABLE
BORDER="5"
BGCOLOR="#E0E0F0"
WIDTH="70%"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
>synth_device ethernet {
    eth0 ethertap
    &#8230;
}</PRE
></TD
></TR
></TABLE
><P
>The Linux kernel will automatically allocate the next available tap

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美精品乱码久久久久久按摩| 在线视频亚洲一区| 欧美日韩国产123区| 最新日韩在线视频| 成人高清视频在线| 99精品久久免费看蜜臀剧情介绍| 欧美激情一区三区| 国产精品99久久久久| 久久久久久久性| 看片的网站亚洲| 欧美日韩激情在线| 日韩高清不卡一区二区三区| 91精品国产综合久久久久久| 青娱乐精品在线视频| 欧美日韩一卡二卡三卡| 亚洲女厕所小便bbb| 色欲综合视频天天天| 亚洲精品日韩一| 欧美日韩亚洲综合一区| 午夜精品久久久久久久久久 | 亚洲欧美国产三级| 97久久超碰国产精品| 尤物av一区二区| 粉嫩av一区二区三区| 中文在线免费一区三区高中清不卡| 成人精品视频.| 亚洲免费av高清| 欧美剧在线免费观看网站| 一区二区在线观看免费 | 国产欧美日本一区二区三区| 国产经典欧美精品| 中文字幕综合网| 欧美日韩国产在线观看| 看电视剧不卡顿的网站| 国产欧美精品一区二区三区四区 | 亚洲高清在线视频| 欧美一区日本一区韩国一区| 久久国产三级精品| 国产精品理伦片| 69堂精品视频| 成人精品gif动图一区| 亚洲永久免费视频| 精品久久久久久久久久久久久久久 | 欧美撒尿777hd撒尿| 久久精品国产亚洲一区二区三区| 国产精品毛片大码女人| 欧美日韩国产一级二级| 国产一区二区三区黄视频 | youjizz久久| 日本在线不卡视频一二三区| 国产精品网站导航| 欧美日韩在线不卡| 日韩中文字幕av电影| 中文字幕欧美激情| 91精品国产色综合久久ai换脸| 国产精品一卡二卡| 中文字幕在线不卡国产视频| 日韩欧美一区二区视频| 色天使色偷偷av一区二区| 亚洲一区二区三区精品在线| 精品成人佐山爱一区二区| 一本大道久久a久久综合 | 日韩理论片网站| 懂色av中文字幕一区二区三区| 五月综合激情婷婷六月色窝| 欧美激情一区二区三区全黄| 日韩欧美色综合| 欧美在线一二三四区| 成人国产精品免费观看动漫| 久久精品国产精品亚洲红杏| 亚洲在线免费播放| 国产精品久久久久久久浪潮网站| 91精品国产91热久久久做人人 | 91在线播放网址| 国产另类ts人妖一区二区| 国产一区二区三区黄视频| 国产美女精品在线| 国产美女在线观看一区| 国产不卡在线视频| 国产91清纯白嫩初高中在线观看| 国产精品一二三在| 国产成人亚洲综合a∨婷婷| 国产一区二区三区黄视频| 国产精品911| 99久久婷婷国产| 欧美在线短视频| 91精品在线一区二区| 欧美一区二区播放| 久久人人97超碰com| 久久蜜桃av一区精品变态类天堂 | 欧美xxxx老人做受| 久久精品视频一区二区三区| 中文字幕国产一区| 亚洲美女偷拍久久| 五月天一区二区三区| 经典三级视频一区| voyeur盗摄精品| 欧美在线制服丝袜| 欧美v日韩v国产v| 亚洲国产精品二十页| 国产精品电影一区二区三区| 亚洲国产精品精华液网站 | 久久精品理论片| 懂色一区二区三区免费观看| 福利电影一区二区| 一本到不卡精品视频在线观看| 欧美性一二三区| 亚洲精品在线免费观看视频| 久久久久久久电影| 中文字幕精品一区二区精品绿巨人| 国产精品无码永久免费888| 亚洲天堂成人网| 日韩va欧美va亚洲va久久| 韩国精品久久久| 粉嫩绯色av一区二区在线观看| 国产成人免费在线视频| 99视频一区二区| 欧美剧在线免费观看网站| 久久女同性恋中文字幕| 亚洲免费观看视频| 精品一区二区在线看| 成人av在线资源| 日韩一区二区高清| 亚洲少妇最新在线视频| 另类综合日韩欧美亚洲| 91免费看片在线观看| 日韩一区二区三区三四区视频在线观看 | 高清久久久久久| 91丝袜美腿高跟国产极品老师 | 国产精品美日韩| 日韩高清一区在线| 成人国产精品免费观看视频| 欧美一区二区视频免费观看| 国产精品久久99| 久久99在线观看| 欧美三级中文字| 中文字幕欧美区| 久久狠狠亚洲综合| 欧美日韩免费视频| 国产精品入口麻豆原神| 日韩综合一区二区| 日本高清成人免费播放| 国产日韩欧美精品在线| 日韩av电影免费观看高清完整版在线观看 | 91精品国产全国免费观看 | 久久精品免费在线观看| 美女久久久精品| 欧美视频你懂的| 亚洲人成在线播放网站岛国| 国产成人综合视频| 久久久久久97三级| 国产制服丝袜一区| 日韩欧美不卡在线观看视频| 亚洲一区二区三区四区五区中文| 91在线观看污| 国产精品免费免费| 国产一区二区在线视频| 欧美一区二区三区视频免费| 亚洲日本在线观看| 国产成人午夜电影网| 久久久99精品免费观看| 久久狠狠亚洲综合| 26uuu久久天堂性欧美| 久久爱www久久做| 欧美蜜桃一区二区三区| 三级久久三级久久| 555www色欧美视频| 丝袜美腿成人在线| 欧美日本一区二区三区四区| 午夜欧美在线一二页| 欧美日韩在线观看一区二区| 一级特黄大欧美久久久| 91视频com| 亚洲一区二区精品3399| 欧美日韩一级二级| 奇米精品一区二区三区在线观看一 | 裸体歌舞表演一区二区| 日韩一区二区三区视频在线观看| 美腿丝袜亚洲色图| 日韩精品一区二区三区视频 | 成人黄色免费短视频| 中文字幕一区二区不卡| 懂色av一区二区夜夜嗨| 久久久久国产精品人| 国产aⅴ综合色| 亚洲人成影院在线观看| 欧美日韩一级黄| 美女国产一区二区三区| 日本一区二区高清| 色婷婷久久久综合中文字幕| 一个色综合网站| 日韩一区二区三区电影在线观看| 国产资源精品在线观看| 国产精品久久久久久久第一福利 | 精品一区二区日韩| 国产精品视频yy9299一区| 在线视频中文字幕一区二区| 免费成人美女在线观看.| 国产日韩欧美高清| 色综合色狠狠综合色|