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

TCP/IP Porting

2.2Portable and nonportable files

There are two types of files provided in the distribution:

portable files that can be compiled and used on any target system without modification

nonportable or port-dependent files that must be modified or replaced for different target systems.

2.2.1Portable files

Portable files are the IP and TCP stack source files that should not need to be modified in the course of a normal port. If you need to modify one of these files, discuss it with ARM technical support staff first, as we may be able to suggest an alternative.

These files can be found in the \inet and \tcp directories under your installation directory.

2.2.2Nonportable files

All other files in the sample package contain nonportable glue layer code that must be modified, replaced, or omitted.

The support functions required for basic operation of the stack are covered in Chapter 4 TCP/IP API Functions.

You must also provide at least one network interface that conforms to the specification described in Network interfaces on page 4-15. The example sources come with example PPP and Ethernet network interface drivers.

The ARM TCP/IP stack and related applications, such as FTP, DHCP, and SNMP, generally have one C file and one include file containing all the nonportable code for that module. These files have the generic name moduleport.x, where module is the module name (for example, tcp or http), and x is either .c or .h. For example, the TCP directory has the files tcpport.c and tcpport.h.

The ipport.h file is kept with your application code, allowing different applications to use different TCP/IP stack configurations. All other source files in the TCP directory are intended to be fully portable.

ARM DUI 0079B

Copyright © 1998 and 1999 ARM Limited. All rights reserved.

2-3