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

PPP API Functions

5.4.4ppp_timeisup()

This function drives the internal PPP timers.

Syntax

void ppp_timeisup(void)

Return value

None.

Usage

The ppp_timeisup() function is provided in sys_np.c and must be called every second by the system.

Note

Because the ppp_timeisup() function may perform a considerable amount of work, it should not be called:

from an ISR

while interrupts are disabled

from a time-critical section of code.

5-22

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

ARM DUI 0079B

PPP API Functions

5.4.5prep_ppp()

This is the first PPP function called from the IP initialization logic.

Syntax

int prep_ppp(int firstnet)

where:

firstnet is the index of the first interface to initialize for PPP.

Return value

Returns the index of the next available nets[ ] entry.

Usage

The prep_ppp() function must be called from prep_ifaces() in the ipport.c file to bind PPP to the TCP/IP stack. This function sets the number of interfaces (nets[ ]) to be used for PPP and maps one PPP unit (usually a serial link) to each interface. See

The NET structure on page 4-16.

ARM DUI 0079B

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

5-23

PPP API Functions

5-24

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

ARM DUI 0079B