Comtrol eCos User Manual

Page 732

Advertising
background image

Introduction

address for the host/peripheral combination, corresponding to the connection to the real network, and it is this
address which should be supplied during

initialization

.

In a more complicated scenario, there is a TCP/IP stack running inside the peripheral.

This involves the USB-ethernet package providing a service both to the host and to the eCos TCP/IP stack. It
achieves the latter by acting as an eCos network device. Typically, the TCP/IP stack will be configured to act as a
network bridge. The USB peripheral needs to examine the packets arriving over the real network. Some of these
packets will be intended for the host, while others will be intended for the peripheral itself. To distinguish between
these two scenarios, two distinct MAC addresses are needed: one for the host, and one for the peripheral. Similarly,
packets sent by the host may have to be forwarded via the real network, or they may be intended for the TCP/IP
stack inside the peripheral. Packets generated inside the peripheral’s TCP/IP stack may need to be sent via the
real network or over the USB bus. The network bridge software will have to take care of all these possibilities.
Unusually for a network bridge, one of the network segments being bridged will only ever have one machine
attached.

There are other possible usage scenarios. For example, the peripheral might not be attached to a real network at
all. Instead it could be the USB host that acts as a network bridge, allowing a TCP/IP stack inside the peripheral
to communicate with the outside world. The various details will depend on the exact type of peripheral being
developed.

628

Advertising