Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
(ARM).Porting TCP-IP programmer's guide.Ver 1.6.pdf
Скачиваний:
45
Добавлен:
23.08.2013
Размер:
2.64 Mб
Скачать

Introduction

1.3Sample package directories

The ARM TCP/IP distribution contains the following directories:

install_directory\armthumb

Code common to ARM and Thumb architectures.

install_directory\docs

Documentation.

install_directory\inet

IP, UDP, and related sources (excluding TCP and sockets), including startup, interface, and buffer management code.

install_directory\integrator

Code specific to the Integrator/AP development card fitted with an ARM7TDMI processor and an Intel PRO/100+ Server Adapter.

install_directory\tcp

TCP and sockets source files.

install_directory\chargen

Demonstration of a simple server.

install_directory\loopback

MAC and PPP loopback benchmark code.

install_directory\maildemo

A simple client that uses SMTP to send an email message.

install_directory\menus

Menuing system, useful for debugging.

install_directory\emailer

Source code for the Email Alerter embedded SMTP client. This package allows an embedded system to send email messages.

install_directory\misclib

Miscellaneous support routines required by the stack.

install_directory\uHAL

HAL and PCI libraries and header files from the ARM Firmware Suite. These libraries provide the low-level board support for the Integrator/AP platform.

ARM DUI 0144B

Copyright © 1998-2001 ARM Limited. All rights reserved.

1-7

Introduction

1.4Sample programs

The sample code compiles with ADS 1.0.1. Unless you are familiar with TCP/IP and are comfortable working with complex networking code, it is recommended that you compile the sample programs and experiment with them before you port your application. Instructions for compiling sample programs are in Appendix C Sample Applications.

1-8

Copyright © 1998-2001 ARM Limited. All rights reserved.

ARM DUI 0144B

Chapter 2

TCP/IP Porting

This chapter discusses porting the TCP/IP stack to a new environment. It is assumed that the stack is being ported to a small, embedded system with a network interface and that ADS 1.0 is available. This chapter contains the following sections:

Porting procedure on page 2-2

Portable and nonportable files on page 2-3

Creating the IP port file on page 2-4

Coding the glue layer on page 2-14

Specifying IP addresses on page 2-18

Testing the TCP/IP port on page 2-20.

ARM DUI 0144B

Copyright © 1998-2001 ARM Limited. All rights reserved.

2-1

TCP/IP Porting

2.1Porting procedure

To create a working version of the TCP/IP stack on your target system:

1.Copy the portable source files into your development environment (see Portable and nonportable files on page 2-3).

2.Create a version of ipport.h (see Creating the IP port file on page 2-4) and compile the portable sources.

3.Write and compile the necessary code for the glue layers (see Coding the glue layer on page 2-14).

4.Specify the IP address information (see Specifying IP addresses on page 2-18).

5.Add your own code to use the stack.

6.Build a target system image, test, and debug (see Testing the TCP/IP port on page 2-20).

2-2

Copyright © 1998-2001 ARM Limited. All rights reserved.

ARM DUI 0144B