Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
(ARM).Porting TCP-IP programmer's guide.Ver 1.6.pdf
Скачиваний:
43
Добавлен:
23.08.2013
Размер:
2.64 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 must 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 are 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 3 TCP/IP API Functions.

You must also provide at least one network interface that conforms to the specification described in Network interfaces on page 3-14. The sample sources come with a sample Ethernet network interface driver.

The ARM TCP/IP stack and related applications, such as 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 0144B

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

2-3