Porting PPP Programmer’s Guide

Version 1.6


Table of Contents

Preface
About this book
Intended audience
Using this book
Typographical conventions
Further reading
Feedback
Feedback on ARM PPP
Feedback on this book
1. Introduction
1.1. A typical embedded networking stack
1.1.1. The ARM portable stack
1.2. What is PPP?
1.2.1. Protocols
1.3. ARM PPP requirements
1.3.1. Line management functions
1.3.2. Static memory
1.3.3. Dynamic memory
1.3.4. Periodic clock tick
1.4. Sample package directory and programs
1.4.1. Sample programs
2. PPP Porting
2.1. Overview of the porting procedure
2.2. Porting PPP
2.2.1. Source files
2.2.2. Compiling PPP
2.2.3. Entry points and support calls
2.3. Testing PPP
2.3.1. Loopback
2.3.2. Client connection
2.3.3. Server connection
2.3.4. Abrupt disconnect
2.3.5. Multilink test
3. PPP API Functions
3.1. Overview of user-provided PPP functions
3.2. User-provided PPP functions
3.2.1. _ALLOC() functions
3.2.2. ConPrintf()
3.2.3. _FREE() functions
3.2.4. get_secret()
3.2.5. ppp_port_init()
3.3. Serial line drivers
3.3.1. ln_connect()
3.3.2. ln_getc()
3.3.3. ln_hangup()
3.3.4. ln_putc()
3.3.5. ln_speed()
3.3.6. ln_state()
3.3.7. ln_write()
3.4. PPP entry points
3.4.1. lcp_lowerdown()
3.4.2. lcp_lowerup()
3.4.3. ppp_input()
3.4.4. ppp_timeisup()
3.4.5. prep_ppp()
4. Modem Functions
4.1. dialer.c
4.1.1. dial()
4.1.2. dial_check()
4.1.3. dialer_status()
4.1.4. modem_cmd()
4.1.5. modem_connect()
4.1.6. modem_getc()
4.1.7. modem_gets()
4.1.8. modem_hangup()
4.1.9. modem_init()
4.1.10. modem_lstate()
4.1.11. modem_putc()
4.1.12. modem_reset()
4.1.13. modem_speed()
4.1.14. modem_state()
4.1.15. modem_write()
4.1.16. modem_no_carrier()
4.2. login.c
4.2.1. do_script()
4.2.2. login()
4.2.3. log_input()
4.2.4. log_output()
4.2.5. logserver()
4.3. mdmport.c
4.3.1. dial_delay()
4.3.2. hangup()
4.3.3. modem_clr_dtr() and modem_set_dtr()
4.3.4. modem_DCD()
4.3.5. modem_portstat()
A. Testing the PPP stack
A.1. Setting up the PC
A.2. Build and networking considerations
A.3. Connecting to the Integrator board
A.4. Routing
Glossary

Proprietary Notice

ARM, the ARM Powered logo, Thumb, and StrongARM are registered trademarks of ARM Limited.

The ARM logo, AMBA, PrimeCell, Angel, ARMulator, EmbeddedICE, ModelGen, MultiICE, ARM7TDMI, ARM7TDMI-S, ARM9TDMI, TDMI, and STRONG are trademarks of ARM Limited.

Portions of source code are provided under the copyright of the respective owners, and are acknowledged in the appropriate source files:

Copyright © 1998-2000 by InterNiche Technologies Inc.

Copyright © 1984, 1985, 1986 by the Massachusetts Institute of Technology.

Copyright © 1982, 1985, 1986 by the Regents of the University of California. All Rights Reserved. Redistribution and use in source and binary forms are permitted provided that the above copyright notice and this paragraph are duplicated in all such forms and that any documentation, advertising materials, and other materials related to such distribution and use acknowledge that the software was developed by the University of California, Berkeley. The name of the University may not be used to endorse or promote products derived from this software without specific prior written permission.

Copyright © 1988, 1989 by Carnegie Mellon University. All Rights Reserved. Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation, and that the name of CMU not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission.

All other products or services mentioned herein may be trademarks of their respective owners.

Neither the whole or any part of the information contained in, or the product described in, this document may be adapted or reproduced in any material form except with prior written permission of the copyright holder.

The product described in this document is subject to continuous development and improvements. All particulars of the product and its use contained in this document are given by ARM in good faith. However, all warranties implied or expressed, including but not limited to implied warranties of merchantability, or fitness for purpose, are excluded.

This document is intended only to assist the reader in the use of the product. ARM Ltd shall not be liable for any loss or damage arising from the use of any information in this document, or any error or omission in such information, or any incorrect use of the product.

Revision History
Revision ASept 2000First release of indepenedent PPP guide (ARM DUI 0143) for software version 1.6
Revision BJune 2001Second release
Copyright © 1998-2001 ARM Limited. All rights reserved.ARM DUI 0143B
Non-Confidential