Targetside configuration options, Real ethernet, Caution – Comtrol eCos User Manual

Page 804: Target-side configuration options

Advertising
background image

Synthetic Target Ethernet Driver

Caution

Installing rawether suid root introduces a potential security problem. Although normally
rawether is executed only by the I/O auxiliary, theoretically it can be run by any program.
Effectively it gives any user the ability to monitor all ethernet traffic and to inject arbitrary
packets into the network. Also, as with any suid root programs there may be as yet undis-
covered exploits. Users and system administrators should consider the risks before running
make install.

There are two main ways of building the host-side software. It is possible to build both the generic host-side
software and all package-specific host-side software, including the ethernet support, in a single build tree. This
involves using the configure script at the toplevel of the eCos repository. For more information on this, see the

README.host

file at the top of the repository. Note that if you have an existing build tree which does not include

the synthetic target ethernet support then it will be necessary to rerun the toplevel configure script: the search for
appropriate packages happens at configure time.

The alternative is to build just the host-side for this package. This requires a separate build directory, building
directly in the source tree is disallowed. The configure options are much the same as for a build from the toplevel,
and the

README.host

file can be consulted for more details. It is essential that the ethernet support be configured

with the same

--prefix

option as other eCos host-side software, especially the I/O auxiliary provided by the

architectural synthetic target HAL package, otherwise the I/O auxiliary will be unable to locate the ethernet support.

Target-side Configuration Options

The target-side code can be configured to support up to four ethernet devices,

eth0

to

eth3

. By default

eth0

is

enabled if the configuration includes a TCP/IP stack, otherwise it is disabled. The other three devices are always
disabled by default. If any of the devices are enabled then there will also be the usual configuration options related
to building this package. Other options related to network devices, for example whether or not to use DHCP, are
provided by the generic network device package.

Real Ethernet

One obvious way of providing a synthetic target eCos application with ethernet I/O is to use a real ethernet device
in the PC: transmitted packets go out on a real network, and packets on the network addressed to the right MAC
address are passed on to eCos. This way synthetic target networking behaves just like networking on a real target
with ethernet hardware. For example, if there is a DHCP server anywhere on the network then eCos will be able to
contact it during networking startup and get hold of IP address information.

Configuring the ethernet support to use a real ethernet device requires a simple entry in the target definition file:

synth_device ethernet {

<

eCos device

>

real

<

linux device

>

...

}

For example, to map the eCos network device

eth0

to the Linux device

eth1

:

synth_device ethernet {

eth0 real eth1

...

700

Advertising