annotate packages/devs/eth/synth/ecosynth/current/doc/devs-eth-synth-ecosynth.html @ 352:1f5fe8f482d9

Only support I/O through the ethertap device if running a sufficiently recent Linux kernel
author bartv
date Wed, 25 Sep 2002 19:53:54 +0000
parents 7c1c8dc43ba1
children 74dbf4c3f2e1
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
332
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
1 <!-- Copyright (C) 2002 Red Hat, Inc. -->
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
2 <!-- This material may be distributed only subject to the terms -->
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
3 <!-- and conditions set forth in the Open Publication License, v1.0 -->
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
4 <!-- or later (the latest version is presently available at -->
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
5 <!-- http://www.opencontent.org/openpub/). -->
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
6 <!-- Distribution of the work or derivative of the work in any -->
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
7 <!-- standard (paper) book form is prohibited unless prior -->
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
8 <!-- permission is obtained from the copyright holder. -->
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
9 <HTML
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
10 ><HEAD
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
11 ><TITLE
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
12 >Synthetic Target Ethernet Driver</TITLE
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
13 ><meta name="MSSmartTagsPreventParsing" content="TRUE">
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
14 <META
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
15 NAME="GENERATOR"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
16 CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
17 "></HEAD
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
18 ><BODY
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
19 CLASS="REFENTRY"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
20 BGCOLOR="#FFFFFF"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
21 TEXT="#000000"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
22 LINK="#0000FF"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
23 VLINK="#840084"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
24 ALINK="#0000FF"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
25 ><H1
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
26 ><A
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
27 NAME="DEVS-ETH-SYNTH-ECOSYNTH">Synthetic Target Ethernet Driver</H1
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
28 ><DIV
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
29 CLASS="REFNAMEDIV"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
30 ><A
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
31 NAME="AEN4"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
32 ></A
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
33 ><H2
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
34 >Name</H2
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
35 >Synthetic Target Ethernet Support&nbsp;--&nbsp;Allow synthetic target applications to perform ethernet I/O</DIV
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
36 ><DIV
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
37 CLASS="REFSECT1"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
38 ><A
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
39 NAME="AEN7"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
40 ></A
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
41 ><H2
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
42 >Overview</H2
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
43 ><P
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
44 >The synthetic target ethernet package can provide up to four network
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
45 devices, <TT
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
46 CLASS="VARNAME"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
47 >eth0</TT
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
48 > to <TT
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
49 CLASS="VARNAME"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
50 >eth3</TT
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
51 >. These can
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
52 be used directly by the eCos application or, more commonly, by a
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
53 TCP/IP stack that is linked with the eCos application. Each eCos
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
54 device can be mapped on to a real Linux network device. For example,
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
55 if the Linux PC has two ethernet cards and <TT
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
56 CLASS="VARNAME"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
57 >eth1</TT
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
58 > is
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
59 not currently being used by Linux itself, then one of the eCos devices
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
60 can be mapped on to this Linux device. Alternatively, it is possible
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
61 to map some or all of the eCos devices on to the ethertap support
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
62 provided by the Linux kernel.
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
63 </P
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
64 ><P
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
65 >The ethernet package depends on the I/O auxiliary provided by the
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
66 synthetic target architectural HAL package. During initialization the
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
67 eCos application will attempt to instantiate the desired devices, by
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
68 sending a request to the auxiliary. This will load a Tcl script
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
69 <TT
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
70 CLASS="FILENAME"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
71 >ethernet.tcl</TT
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
72 > that is responsible for handling the
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
73 instantiation request and subsequent I/O operations, for example
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
74 transmitting an ethernet packet. However, some of the low-level I/O
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
75 operations cannot conveniently be done by a Tcl script so
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
76 <TT
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
77 CLASS="FILENAME"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
78 >ethernet.tcl</TT
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
79 > will actually run a separate program
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
80 <B
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
81 CLASS="COMMAND"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
82 >rawether</B
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
83 > to interact with the Linux network device.
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
84 </P
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
85 ><DIV
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
86 CLASS="INFORMALFIGURE"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
87 ><A
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
88 NAME="AEN17"><P
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
89 ></P
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
90 ><DIV
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
91 CLASS="MEDIAOBJECT"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
92 ><P
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
93 ><IMG
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
94 SRC="overview.gif"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
95 ALIGN="CENTER"></P
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
96 ></DIV
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
97 ><P
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
98 ></P
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
99 ></DIV
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
100 ><P
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
101 >On the target-side there are configuration options to control which
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
102 network devices should be present. For many applications a single
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
103 device will be sufficient, but if the final eCos application is
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
104 something like a network bridge then the package can support multiple
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
105 devices. On the host-side each eCos network device needs to be mapped
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
106 on to a Linux one, either a real ethernet device or an ethertap
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
107 device. This is handled by an entry in the target definition file:
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
108 </P
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
109 ><TABLE
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
110 BORDER="5"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
111 BGCOLOR="#E0E0F0"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
112 WIDTH="70%"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
113 ><TR
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
114 ><TD
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
115 ><PRE
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
116 CLASS="PROGRAMLISTING"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
117 >synth_device ethernet {
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
118 eth0 real eth1
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
119 eth1 ethertap tap3 00:01:02:03:FE:05
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
120 &#8230;
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
121 }</PRE
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
122 ></TD
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
123 ></TR
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
124 ></TABLE
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
125 ><P
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
126 >The ethernet package also comes with support for packet logging,
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
127 and provides various facilities for use by user Tcl scripts.
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
128 </P
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
129 ></DIV
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
130 ><DIV
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
131 CLASS="REFSECT1"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
132 ><A
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
133 NAME="DEVS-ETH-ECOSYNTH-INSTALL"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
134 ></A
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
135 ><H2
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
136 >Installation</H2
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
137 ><P
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
138 >Before a synthetic target eCos application can access ethernet devices
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
139 it is necessary to build and install host-side support. The relevant
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
140 code resides in the <TT
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
141 CLASS="FILENAME"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
142 >host</TT
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
143 >
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
144 subdirectory of the synthetic target ethernet package, and building it
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
145 involves the standard <B
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
146 CLASS="COMMAND"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
147 >configure</B
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
148 >,
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
149 <B
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
150 CLASS="COMMAND"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
151 >make</B
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
152 > and <B
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
153 CLASS="COMMAND"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
154 >make install</B
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
155 > steps.
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
156 The build involves a new executable <B
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
157 CLASS="COMMAND"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
158 >rawether</B
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
159 > which
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
160 must be able to access a raw Linux network device. This is achieved by
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
161 installing it suid root, so the <B
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
162 CLASS="COMMAND"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
163 >make install</B
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
164 > step
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
165 has to be run with superuser privileges.
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
166 </P
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
167 ><DIV
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
168 CLASS="CAUTION"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
169 ><P
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
170 ></P
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
171 ><TABLE
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
172 CLASS="CAUTION"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
173 BORDER="1"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
174 WIDTH="100%"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
175 ><TR
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
176 ><TD
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
177 ALIGN="CENTER"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
178 ><B
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
179 >Caution</B
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
180 ></TD
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
181 ></TR
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
182 ><TR
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
183 ><TD
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
184 ALIGN="LEFT"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
185 ><P
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
186 >Installing <B
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
187 CLASS="COMMAND"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
188 >rawether</B
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
189 > suid root introduces a
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
190 potential security problem. Although normally
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
191 <B
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
192 CLASS="COMMAND"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
193 >rawether</B
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
194 > is executed only by the I/O auxiliary,
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
195 theoretically it can be run by any program. Effectively it gives any
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
196 user the ability to monitor all ethernet traffic and to inject
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
197 arbitrary packets into the network. Also, as with any suid root
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
198 programs there may be as yet undiscovered exploits. Users and system
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
199 administrators should consider the risks before running <B
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
200 CLASS="COMMAND"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
201 >make
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
202 install</B
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
203 >.
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
204 </P
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
205 ></TD
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
206 ></TR
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
207 ></TABLE
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
208 ></DIV
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
209 ><P
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
210 >There are two main ways of building the host-side software. It is
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
211 possible to build both the generic host-side software and all
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
212 package-specific host-side software, including the ethernet support,
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
213 in a single build tree. This involves using the
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
214 <B
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
215 CLASS="COMMAND"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
216 >configure</B
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
217 > script at the toplevel of the eCos
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
218 repository. For more information on this, see the
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
219 <TT
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
220 CLASS="FILENAME"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
221 >README.host</TT
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
222 > file at the top of the repository.
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
223 Note that if you have an existing build tree which does not include
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
224 the synthetic target ethernet support then it will be necessary to
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
225 rerun the toplevel configure script: the search for appropriate
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
226 packages happens at configure time.
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
227 </P
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
228 ><P
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
229 >The alternative is to build just the host-side for this package.
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
230 This requires a separate build directory, building directly in the
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
231 source tree is disallowed. The <B
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
232 CLASS="COMMAND"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
233 >configure</B
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
234 > options
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
235 are much the same as for a build from the toplevel, and the
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
236 <TT
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
237 CLASS="FILENAME"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
238 >README.host</TT
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
239 > file can be consulted for more
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
240 details. It is essential that the ethernet support be configured with
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
241 the same <TT
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
242 CLASS="OPTION"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
243 >--prefix</TT
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
244 > option as other eCos host-side
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
245 software, especially the I/O auxiliary provided by the architectural
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
246 synthetic target HAL package, otherwise the I/O auxiliary will be
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
247 unable to locate the ethernet support.
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
248 </P
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
249 ></DIV
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
250 ><DIV
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
251 CLASS="REFSECT1"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
252 ><A
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
253 NAME="DEVS-ETH-ECOSYNTH-OPTIONS"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
254 ></A
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
255 ><H2
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
256 >Target-side Configuration Options</H2
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
257 ><P
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
258 >The target-side code can be configured to support up to four ethernet
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
259 devices, <TT
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
260 CLASS="VARNAME"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
261 >eth0</TT
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
262 > to <TT
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
263 CLASS="VARNAME"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
264 >eth3</TT
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
265 >. By
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
266 default <TT
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
267 CLASS="VARNAME"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
268 >eth0</TT
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
269 > is enabled if the configuration
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
270 includes a TCP/IP stack, otherwise it is disabled. The other three
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
271 devices are always disabled by default. If any of the devices are
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
272 enabled then there will also be the usual configuration options
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
273 related to building this package. Other options related to network
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
274 devices, for example whether or not to use DHCP, are provided by
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
275 the generic network device package.
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
276 </P
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
277 ></DIV
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
278 ><DIV
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
279 CLASS="REFSECT1"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
280 ><A
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
281 NAME="DEVS-ETH-ECOSYNTH-REAL"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
282 ></A
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
283 ><H2
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
284 >Real Ethernet</H2
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
285 ><P
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
286 >One obvious way of providing a synthetic target eCos application with
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
287 ethernet I/O is to use a real ethernet device in the PC: transmitted
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
288 packets go out on a real network, and packets on the network addressed
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
289 to the right MAC address are passed on to eCos. This way synthetic
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
290 target networking behaves just like networking on a real target with
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
291 ethernet hardware. For example, if there is a DHCP server anywhere on
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
292 the network then eCos will be able to contact it during networking
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
293 startup and get hold of IP address information.
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
294 </P
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
295 ><P
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
296 >Configuring the ethernet support to use a real ethernet device
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
297 requires a simple entry in the target definition file:
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
298 </P
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
299 ><TABLE
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
300 BORDER="5"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
301 BGCOLOR="#E0E0F0"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
302 WIDTH="70%"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
303 ><TR
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
304 ><TD
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
305 ><PRE
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
306 CLASS="PROGRAMLISTING"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
307 >synth_device ethernet {
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
308 &lt;eCos device&gt; real &lt;linux device&gt;
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
309 &#8230;
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
310 }</PRE
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
311 ></TD
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
312 ></TR
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
313 ></TABLE
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
314 ><P
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
315 >For example, to map the eCos network device <TT
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
316 CLASS="VARNAME"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
317 >eth0</TT
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
318 > to
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
319 the Linux device <TT
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
320 CLASS="VARNAME"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
321 >eth1</TT
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
322 >:
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
323 </P
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
324 ><TABLE
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
325 BORDER="5"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
326 BGCOLOR="#E0E0F0"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
327 WIDTH="70%"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
328 ><TR
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
329 ><TD
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
330 ><PRE
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
331 CLASS="PROGRAMLISTING"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
332 >synth_device ethernet {
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
333 eth0 real eth1
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
334 &#8230;
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
335 }</PRE
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
336 ></TD
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
337 ></TR
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
338 ></TABLE
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
339 ><P
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
340 >It is not possible for an ethernet device to be shared by both the
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
341 eCos TCP/IP stack and the Linux one: there would be no simple way to
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
342 work out which stack incoming packets are intended for. In theory
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
343 it might be possible to do some demultiplexing using distinct IP
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
344 addresses, but it would be impossible to support some functionality
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
345 such as DHCP. Therefore the <B
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
346 CLASS="COMMAND"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
347 >rawether</B
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
348 > program will
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
349 refuse to access any ethernet device already in use. On a typical
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
350 Linux system <TT
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
351 CLASS="VARNAME"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
352 >eth0</TT
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
353 > will be used for Linux
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
354 networking, and the PC will have to be equipped with additional
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
355 ethernet devices for use by eCos.
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
356 </P
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
357 ><P
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
358 >The <B
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
359 CLASS="COMMAND"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
360 >rawether</B
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
361 > program will access the hardware via
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
362 the appropriate Linux device driver, so it is important that the
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
363 system is set up such that the relevant module will be automatically
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
364 loaded or is already loaded. The details of this will depend on the
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
365 installed distribution and version, but typically it will involve an
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
366 entry in <TT
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
367 CLASS="FILENAME"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
368 >/etc/modules.conf</TT
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
369 >.
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
370 </P
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
371 ></DIV
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
372 ><DIV
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
373 CLASS="REFSECT1"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
374 ><A
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
375 NAME="DEVS-ETH-ECOSYNTH-ETHERTAP"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
376 ></A
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
377 ><H2
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
378 >Ethertap</H2
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
379 ><P
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
380 >The Linux kernel's ethertap facility provides a virtual network
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
381 interface. A Linux application, for example the
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
382 <B
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
383 CLASS="COMMAND"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
384 >rawether</B
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
385 > program, can open a special character
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
386 device <TT
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
387 CLASS="FILENAME"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
388 >/dev/net/tun</TT
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
389 >, perform various
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
390 <TT
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
391 CLASS="FUNCTION"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
392 >ioctl</TT
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
393 > calls, and then <TT
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
394 CLASS="FILENAME"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
395 >write</TT
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
396 >
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
397 and <TT
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
398 CLASS="FILENAME"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
399 >read</TT
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
400 > ethernet packets. When the device is
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
401 opened the Linux kernel automatically creates a new network interface,
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
402 for example <TT
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
403 CLASS="VARNAME"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
404 >tap0</TT
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
405 >. The Linux TCP/IP stack can be
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
406 made to use this network interface like any other interface, receiving
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
407 and transmitting ethernet packets. The net effect is a virtual network
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
408 connecting just the Linux and eCos TCP/IP stacks, with no other nodes
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
409 attached. By default all traffic remains inside this virtual network
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
410 and is never forwarded to a real network.
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
411 </P
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
412 ><P
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
413 >Support for the ethertap facility may or may not be provided
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
414 automatically, depending on your Linux distribution and version. If
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
415 your system does not have a device <TT
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
416 CLASS="FILENAME"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
417 >/dev/net/tun</TT
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
418 >
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
419 or a module <TT
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
420 CLASS="FILENAME"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
421 >tun.o</TT
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
422 > then the appropriate kernel
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
423 documentation should be consulted, for example
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
424 <TT
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
425 CLASS="FILENAME"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
426 >/usr/src/linux-2.4/Documentation/networking/tuntap.txt</TT
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
427 >.
352
1f5fe8f482d9 Only support I/O through the ethertap device if running a sufficiently
bartv
parents: 332
diff changeset
428 If you are using an old Linux kernel then the ethertap functionality
1f5fe8f482d9 Only support I/O through the ethertap device if running a sufficiently
bartv
parents: 332
diff changeset
429 may be missing completely. When the <B
1f5fe8f482d9 Only support I/O through the ethertap device if running a sufficiently
bartv
parents: 332
diff changeset
430 CLASS="COMMAND"
1f5fe8f482d9 Only support I/O through the ethertap device if running a sufficiently
bartv
parents: 332
diff changeset
431 >rawether</B
1f5fe8f482d9 Only support I/O through the ethertap device if running a sufficiently
bartv
parents: 332
diff changeset
432 >
1f5fe8f482d9 Only support I/O through the ethertap device if running a sufficiently
bartv
parents: 332
diff changeset
433 program is configured and built, the <B
1f5fe8f482d9 Only support I/O through the ethertap device if running a sufficiently
bartv
parents: 332
diff changeset
434 CLASS="COMMAND"
1f5fe8f482d9 Only support I/O through the ethertap device if running a sufficiently
bartv
parents: 332
diff changeset
435 >configure</B
1f5fe8f482d9 Only support I/O through the ethertap device if running a sufficiently
bartv
parents: 332
diff changeset
436 >
1f5fe8f482d9 Only support I/O through the ethertap device if running a sufficiently
bartv
parents: 332
diff changeset
437 script will check for a file <TT
1f5fe8f482d9 Only support I/O through the ethertap device if running a sufficiently
bartv
parents: 332
diff changeset
438 CLASS="FILENAME"
1f5fe8f482d9 Only support I/O through the ethertap device if running a sufficiently
bartv
parents: 332
diff changeset
439 >/usr/include/linux/if_tun.h</TT
1f5fe8f482d9 Only support I/O through the ethertap device if running a sufficiently
bartv
parents: 332
diff changeset
440 >. If that
1f5fe8f482d9 Only support I/O through the ethertap device if running a sufficiently
bartv
parents: 332
diff changeset
441 file is missing then <B
1f5fe8f482d9 Only support I/O through the ethertap device if running a sufficiently
bartv
parents: 332
diff changeset
442 CLASS="COMMAND"
1f5fe8f482d9 Only support I/O through the ethertap device if running a sufficiently
bartv
parents: 332
diff changeset
443 >rawether</B
1f5fe8f482d9 Only support I/O through the ethertap device if running a sufficiently
bartv
parents: 332
diff changeset
444 > will be built without
1f5fe8f482d9 Only support I/O through the ethertap device if running a sufficiently
bartv
parents: 332
diff changeset
445 ethertap functionality, and only real ethernet interfaces will be
1f5fe8f482d9 Only support I/O through the ethertap device if running a sufficiently
bartv
parents: 332
diff changeset
446 supported.
332
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
447 </P
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
448 ><P
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
449 >The target definition file is used to map eCos network devices on to
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
450 ethertap devices. The simplest usage is:
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
451 </P
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
452 ><TABLE
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
453 BORDER="5"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
454 BGCOLOR="#E0E0F0"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
455 WIDTH="70%"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
456 ><TR
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
457 ><TD
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
458 ><PRE
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
459 CLASS="PROGRAMLISTING"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
460 >synth_device ethernet {
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
461 eth0 ethertap
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
462 &#8230;
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
463 }</PRE
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
464 ></TD
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
465 ></TR
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
466 ></TABLE
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
467 ><P
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
468 >The Linux kernel will automatically allocate the next available tap
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
469 network interface. Usually this will be <TT
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
470 CLASS="VARNAME"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
471 >tap0</TT
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
472 > but if
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
473 other software is using the ethertap facility, for example to
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
474 implement a VPN, then a different number may be allocated. Usually it
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
475 will be better to specify the particular tap device that should be
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
476 used for each eCos device, for example:
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
477 </P
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
478 ><TABLE
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
479 BORDER="5"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
480 BGCOLOR="#E0E0F0"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
481 WIDTH="70%"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
482 ><TR
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
483 ><TD
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
484 ><PRE
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
485 CLASS="PROGRAMLISTING"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
486 >synth_device ethernet {
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
487 eth0 ethertap tap3
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
488 eth1 ethertap tap4
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
489 &#8230;
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
490 }</PRE
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
491 ></TD
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
492 ></TR
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
493 ></TABLE
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
494 ><P
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
495 >The user now knows exactly which eCos device is mapped onto which
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
496 Linux device, avoiding much potential confusion. Because the virtual
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
497 devices are emulated ethernet devices, they require MAC addresses.
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
498 There is no physical hardware to provide these addresses, so normally
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
499 MAC addresses will be invented. That means that each time the eCos
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
500 application is run it will have different MAC addresses, which makes
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
501 it more difficult to compare the results of different runs. To get
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
502 more deterministic behaviour it is possible to specify the MAC
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
503 addresses in the target definition file:
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
504 </P
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
505 ><TABLE
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
506 BORDER="5"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
507 BGCOLOR="#E0E0F0"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
508 WIDTH="70%"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
509 ><TR
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
510 ><TD
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
511 ><PRE
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
512 CLASS="PROGRAMLISTING"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
513 >synth_device ethernet {
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
514 eth0 ethertap tap3 00:01:02:03:FE:05
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
515 eth1 ethertap tap4 00:01:02:03:FE:06
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
516 &#8230;
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
517 }</PRE
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
518 ></TD
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
519 ></TR
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
520 ></TABLE
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
521 ><P
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
522 >During the initialization phase the eCos application will instantiate
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
523 the various network devices. This will cause the I/O auxiliary to load
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
524 the <TT
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
525 CLASS="FILENAME"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
526 >ethernet.tcl</TT
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
527 > script and spawn
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
528 <B
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
529 CLASS="COMMAND"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
530 >rawether</B
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
531 > processes, which in turn will
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
532 <TT
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
533 CLASS="FUNCTION"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
534 >open</TT
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
535 > <TT
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
536 CLASS="FILENAME"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
537 >/dev/net/tun</TT
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
538 > and
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
539 perform the appropriate <TT
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
540 CLASS="FILENAME"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
541 >ioctl</TT
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
542 > calls. On the Linux
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
543 side there will now be new network interfaces such as
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
544 <TT
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
545 CLASS="VARNAME"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
546 >tap3</TT
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
547 >, and these can be configured like any other
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
548 network interface using commands such as <B
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
549 CLASS="COMMAND"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
550 >ifconfig</B
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
551 >.
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
552 In addition, if the Linux system is set up with hotplug support then
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
553 it may be possible to arrange for the network interface to become
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
554 active automatically. On a Red Hat Linux system this would require
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
555 files such as
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
556 <TT
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
557 CLASS="FILENAME"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
558 >/etc/sysconfig/network-scripts/ifcfg-tap3</TT
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
559 >,
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
560 containing data like:
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
561 </P
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
562 ><TABLE
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
563 BORDER="5"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
564 BGCOLOR="#E0E0F0"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
565 WIDTH="70%"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
566 ><TR
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
567 ><TD
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
568 ><PRE
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
569 CLASS="PROGRAMLISTING"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
570 >DEVICE="tap3"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
571 BOOTPROTO="none"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
572 BROADCAST=10.2.2.255
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
573 IPADDR="10.2.2.1"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
574 NETMASK="255.255.255.0"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
575 NETWORK=10.2.2.0
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
576 ONBOOT="no"</PRE
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
577 ></TD
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
578 ></TR
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
579 ></TABLE
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
580 ><P
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
581 >This gives the Linux interface the address <TT
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
582 CLASS="LITERAL"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
583 >10.2.2.1</TT
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
584 >
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
585 on the network <TT
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
586 CLASS="LITERAL"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
587 >10.2.2.0</TT
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
588 >. The eCos network device
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
589 should be configured with a compatible address. One way of doing this
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
590 would be to enable <TT
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
591 CLASS="VARNAME"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
592 >CYGHWR_NET_DRIVER_ETH0_ADDRS</TT
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
593 >,
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
594 set <TT
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
595 CLASS="VARNAME"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
596 >CYGHWR_NET_DRIVER_ETH0_ADDRS_IP</TT
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
597 > to
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
598 <TT
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
599 CLASS="LITERAL"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
600 >10.2.2.2</TT
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
601 >, and similarly update the
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
602 <TT
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
603 CLASS="VARNAME"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
604 >NETMASK</TT
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
605 >, <TT
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
606 CLASS="VARNAME"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
607 >BROADCAST</TT
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
608 >,
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
609 <TT
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
610 CLASS="VARNAME"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
611 >GATEWAY</TT
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
612 > and <TT
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
613 CLASS="VARNAME"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
614 >SERVER</TT
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
615 > configuration
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
616 options.
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
617 </P
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
618 ><P
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
619 >It should be noted that the ethertap facility provides a virtual
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
620 network, and any packets transmitted by the eCos application will
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
621 not appear on a real network. Therefore usually there will no
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
622 accessible DHCP server, and eCos cannot use DHCP or BOOTP to obtain IP
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
623 address information. Instead the eCos configuration should use manual
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
624 or static addresses.
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
625 </P
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
626 ><P
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
627 >An alternative approach would be to set up the Linux box as a network
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
628 bridge, using commands like <B
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
629 CLASS="COMMAND"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
630 >brctl</B
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
631 > to connect the
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
632 virtual network interface <TT
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
633 CLASS="VARNAME"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
634 >tap3</TT
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
635 > to a physical
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
636 network interface such as <TT
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
637 CLASS="VARNAME"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
638 >eth0</TT
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
639 >. Any packets sent by
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
640 the eCos application will get forwarded automatically to the real
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
641 network, and some packets on the real network will get forwarded over
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
642 the virtual network to the eCos application. Note that the eCos
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
643 application might also get some packets that were not intended for it,
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
644 but usually those will just be discarded by the eCos TCP/IP stack. The
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
645 exact details of setting up a network bridge are left as an exercise
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
646 to the reader.
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
647 </P
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
648 ></DIV
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
649 ><DIV
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
650 CLASS="REFSECT1"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
651 ><A
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
652 NAME="DEVS-ETH-ECOSYNTH-LOGGING"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
653 ></A
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
654 ><H2
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
655 >Packet Logging</H2
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
656 ><P
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
657 >The ethernet support comes with support for logging the various
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
658 packets that are transferred, including a simple protocol analyser.
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
659 This generates simple text output using the filter mechanisms provided
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
660 by the I/O auxiliary, so it is possible to control the appearance and
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
661 visibility of different types of output. For example the user might
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
662 want to see IPv4 headers and all ICMPv4 and ARP operations, but not
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
663 TCP headers or any of the packet data.
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
664 </P
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
665 ><P
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
666 >The protocol analyser is not intended to be a fully functional
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
667 analyser with knowledge of many different TCP/IP protocols, advanced
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
668 search facilities, graphical traffic displays, and so on.
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
669 Functionality like that is already provided by other tools such as
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
670 <SPAN
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
671 CLASS="APPLICATION"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
672 >ethereal</SPAN
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
673 > and
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
674 <SPAN
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
675 CLASS="APPLICATION"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
676 >tcpdump</SPAN
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
677 >. Achieving similar levels of
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
678 functionality would require a lot of work, for very little gain. It is
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
679 still useful to have some protocol analysis functionality available
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
680 because the output will be interleaved with other output, for example
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
681 <TT
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
682 CLASS="FILENAME"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
683 >printf</TT
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
684 > calls from the application. That may make
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
685 it easier to understand the sequence of events.
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
686 </P
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
687 ><P
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
688 >One problem with logging ethernet traffic is that it can involve very
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
689 large amounts of data. If the application is expected to run for a
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
690 long time or is very I/O intensive then it is easy to end up with many
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
691 megabytes. When running in graphical mode all the logging data will be
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
692 held in memory, even data that is not currently visible. At some point
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
693 the system will begin to run low on memory and performance will
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
694 suffer. To avoid problems, the ethernet script maintains a flag that
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
695 controls whether or not packet logging is active. The default is to
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
696 run with logging disabled, but this can be changed in the target
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
697 definition file:
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
698 </P
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
699 ><TABLE
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
700 BORDER="5"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
701 BGCOLOR="#E0E0F0"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
702 WIDTH="70%"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
703 ><TR
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
704 ><TD
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
705 ><PRE
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
706 CLASS="PROGRAMLISTING"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
707 >synth_device ethernet {
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
708 &#8230;
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
709 logging 1
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
710 }</PRE
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
711 ></TD
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
712 ></TR
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
713 ></TABLE
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
714 ><P
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
715 >The ethernet script will add a toolbar button that allows this flag to
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
716 be changed at run-time, allowing the user to capture traffic for
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
717 certain periods of time while the application continues running.
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
718 </P
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
719 ><P
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
720 >The target definition file can contain the following entries for the
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
721 various packet logging filters:
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
722 </P
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
723 ><TABLE
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
724 BORDER="5"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
725 BGCOLOR="#E0E0F0"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
726 WIDTH="70%"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
727 ><TR
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
728 ><TD
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
729 ><PRE
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
730 CLASS="PROGRAMLISTING"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
731 >synth_device ethernet {
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
732 &#8230;
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
733 filter ether -hide 0 -background LightBlue -foreground "#000080"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
734 filter arp -hide 0 -background LightBlue -foreground "#000050"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
735 filter ipv4 -hide 0 -background LightBlue -foreground "#000040"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
736 filter ipv6 -hide 1 -background LightBlue -foreground "#000040"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
737 filter icmpv4 -hide 0 -background LightBlue -foreground "#000070"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
738 filter icmpv6 -hide 1 -background LightBlue -foreground "#000070"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
739 filter udp -hide 0 -background LightBlue -foreground "#000030"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
740 filter tcp -hide 0 -background LightBlue -foreground "#000020"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
741 filter hexdata -hide 1 -background LightBlue -foreground "#000080"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
742 filter asciidata -hide 1 -background LightBlue -foreground "#000080"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
743 }</PRE
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
744 ></TD
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
745 ></TR
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
746 ></TABLE
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
747 ><P
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
748 >All output will show the eCos network device, for example
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
749 <TT
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
750 CLASS="LITERAL"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
751 >eth0</TT
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
752 >, and the direction relative to the eCos
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
753 application. Some of the filters will show packet headers, for example
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
754 <TT
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
755 CLASS="LITERAL"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
756 >ether</TT
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
757 > gives details of the ethernet packet header
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
758 and <TT
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
759 CLASS="LITERAL"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
760 >tcp</TT
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
761 > gives information about TCP headers such as
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
762 whether or not the SYN flag is set. The TCP and UDP filters will also
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
763 show source and destination addresses, using numerical addresses and
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
764 if possible host names. However, host names will only be shown if the
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
765 host appears in <TT
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
766 CLASS="FILENAME"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
767 >/etc/hosts</TT
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
768 >: doing full DNS
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
769 lookups while the data is being captured would add significantly to
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
770 complexity and overhead. The <TT
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
771 CLASS="LITERAL"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
772 >hexdata</TT
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
773 > and
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
774 <TT
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
775 CLASS="LITERAL"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
776 >asciidata</TT
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
777 > filters show the remainder of the packets
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
778 after the ethernet, IP and TCP or UDP headers have been stripped.
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
779 </P
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
780 ><P
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
781 >Some of the filters will provide raw dumps of some of the packet data.
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
782 Showing up to 1500 bytes of data for each packet would be expensive,
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
783 and often the most interesting information is near the start of the
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
784 packet. Therefore it is possible to set a limit on the number of bytes
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
785 that will be shown using the target definition file. The default limit
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
786 is 64 bytes.
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
787 </P
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
788 ><TABLE
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
789 BORDER="5"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
790 BGCOLOR="#E0E0F0"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
791 WIDTH="70%"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
792 ><TR
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
793 ><TD
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
794 ><PRE
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
795 CLASS="PROGRAMLISTING"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
796 >synth_device ethernet {
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
797 &#8230;
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
798 max_show 128
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
799 }</PRE
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
800 ></TD
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
801 ></TR
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
802 ></TABLE
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
803 ></DIV
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
804 ><DIV
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
805 CLASS="REFSECT1"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
806 ><A
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
807 NAME="DEVS-ETH-ECOSYNTH-GUI"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
808 ></A
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
809 ><H2
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
810 >User Interface Additions</H2
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
811 ><P
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
812 >When running in graphical mode the ethernet script extends the user
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
813 interface in two ways: a button is added to the toolbar so that users
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
814 can enable or disable packet logging; and an entry is added to the
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
815 <SPAN
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
816 CLASS="GUIMENU"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
817 >Help</SPAN
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
818 > menu for the ethernet-specific documentation.
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
819 </P
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
820 ></DIV
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
821 ><DIV
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
822 CLASS="REFSECT1"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
823 ><A
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
824 NAME="DEVS-ETH-ECOSYNTH-ARGS"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
825 ></A
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
826 ><H2
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
827 >Command Line Arguments</H2
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
828 ><P
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
829 >The synthetic target ethernet support does not use any command line
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
830 arguments. All configuration is handled through the target definition
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
831 file.
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
832 </P
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
833 ></DIV
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
834 ><DIV
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
835 CLASS="REFSECT1"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
836 ><A
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
837 NAME="DEVS-ETH-ECOSYNTH-HOOKS"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
838 ></A
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
839 ><H2
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
840 >Hooks</H2
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
841 ><P
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
842 >The ethernet support defines two hooks that can be used by other
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
843 scripts, especially user scripts: <TT
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
844 CLASS="LITERAL"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
845 >ethernet_tx</TT
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
846 > and
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
847 <TT
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
848 CLASS="LITERAL"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
849 >ethernet_rx</TT
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
850 >. The tx hook is called whenever eCos
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
851 tries to transmit a packet. The rx hook is called whenever an incoming
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
852 packet is passed to the eCos application. Note that this may be a
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
853 little bit after the packet was actually received by the I/O auxiliary
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
854 since it can buffer some packets. Both hooks are called with two
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
855 arguments, the name of the network device and the packet being
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
856 transferred. Typical usage might look like:
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
857 </P
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
858 ><TABLE
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
859 BORDER="5"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
860 BGCOLOR="#E0E0F0"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
861 WIDTH="70%"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
862 ><TR
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
863 ><TD
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
864 ><PRE
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
865 CLASS="PROGRAMLISTING"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
866 > proc my_tx_hook { arg_list } {
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
867 set dev [lindex $arg_list 0]
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
868 incr ::my_ethernet_tx_packets($dev)
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
869 incr ::my_ethernet_tx_bytes($dev) [string length [lindex $arg_list 1]]
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
870 }
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
871 proc my_rx_hook { arg_list } {
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
872 set dev [lindex $arg_list 0]
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
873 incr ::my_ethernet_rx_packets($dev)
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
874 incr ::my_ethernet_rx_bytes($dev) [string length [lindex $arg_list 1]]
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
875 }
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
876 synth::hook_add "ethernet_tx" my_tx_hook
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
877 synth::hook_add "ethernet_rx" my_rx_hook</PRE
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
878 ></TD
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
879 ></TR
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
880 ></TABLE
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
881 ><P
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
882 >The global arrays <TT
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
883 CLASS="VARNAME"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
884 >my_ethernet_tx_packets</TT
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
885 > etc. will
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
886 now be updated whenever there is ethernet traffic. Other code,
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
887 probably running at regular intervals by use of the Tcl
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
888 <B
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
889 CLASS="COMMAND"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
890 >after</B
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
891 > procedure, can then use this information to
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
892 update a graphical monitor of some sort.
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
893 </P
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
894 ></DIV
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
895 ><DIV
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
896 CLASS="REFSECT1"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
897 ><A
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
898 NAME="DEVS-ETH-ECOSYNTH-TCL"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
899 ></A
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
900 ><H2
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
901 >Additional Tcl Procedures</H2
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
902 ><P
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
903 >The ethernet support provides one additional Tcl procedure that can be
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
904 used by other scripts;
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
905 </P
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
906 ><TABLE
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
907 BORDER="5"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
908 BGCOLOR="#E0E0F0"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
909 WIDTH="70%"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
910 ><TR
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
911 ><TD
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
912 ><PRE
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
913 CLASS="PROGRAMLISTING"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
914 >ethernet::devices_get_list </PRE
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
915 ></TD
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
916 ></TR
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
917 ></TABLE
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
918 ><P
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
919 >This procedure returns a list of the ethernet devices that have been
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
920 instantiated, for example <TT
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
921 CLASS="LITERAL"
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
922 >{eth0 eth1}</TT
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
923 >.
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
924 </P
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
925 ></DIV
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
926 ></BODY
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
927 ></HTML
7c1c8dc43ba1 Now witness the firepower of this fully armed and operational
bartv
parents:
diff changeset
928 >