
- •Preface
- •About this book
- •Intended audience
- •Using this book
- •Typographical conventions
- •Further reading
- •Feedback
- •Feedback on ARM TCP/IP
- •Feedback on this book
- •Introduction
- •1.1 A typical embedded networking stack
- •1.2 What is PPP?
- •1.3 ARM TCP/IP requirements
- •1.3.1 Memory requirements
- •1.3.2 CPU requirements
- •1.3.3 Operating system requirements
- •1.4 ARM PPP requirements
- •1.4.1 Line management functions
- •1.4.2 Static memory
- •1.4.3 Dynamic memory
- •1.4.4 Periodic clock tick
- •1.5 Example package directories
- •1.6 Sample programs
- •TCP/IP Porting
- •2.1 Porting procedure
- •2.2 Portable and nonportable files
- •2.2.1 Portable files
- •2.2.2 Nonportable files
- •2.3 Creating the IP port file
- •2.3.1 Standard macros and definitions
- •2.3.2 CPU architecture
- •2.3.4 Debugging aids
- •2.3.5 Timers and multitasking
- •2.3.6 Stack features and options
- •2.4 Coding the glue layer
- •2.4.1 Task control
- •2.5 Specifying IP addresses
- •2.5.1 Porting programmer IP issues
- •2.5.2 End user IP issues
- •2.6 Testing the TCP/IP port
- •PPP Porting
- •3.1 Porting procedure
- •3.2 Porting PPP
- •3.2.1 Source files
- •3.2.2 Compiling PPP
- •3.2.3 Entry points and support calls
- •3.3 Testing PPP
- •3.3.1 Loopback
- •3.3.2 Client connection
- •3.3.3 Server connection
- •3.3.4 Abrupt disconnect
- •3.3.5 Multilink test
- •TCP/IP API Functions
- •4.2.1 cksum()
- •4.2.2 dprintf() and initmsg()
- •4.2.3 dtrap()
- •4.2.4 ENTER_CRIT_SECTION() and EXIT_CRIT_SECTION()
- •4.2.5 LOCK_NET_RESOURCE() and UNLOCK_NET_RESOURCE()
- •4.2.6 npalloc()
- •4.2.7 npfree()
- •4.2.8 panic()
- •4.2.9 prep_ifaces()
- •4.2.10 tcp_sleep()
- •4.2.11 tcp_wakeup()
- •4.3 Network interfaces
- •4.3.1 The NET structure
- •4.3.2 n_close()
- •4.3.3 n_init()
- •4.3.4 n_reg_type()
- •4.3.5 n_stats()
- •4.3.6 pkt_send()
- •4.3.7 raw_send()
- •PPP API Functions
- •5.2.1 _ALLOC() functions
- •5.2.2 ConPrintf()
- •5.2.3 _FREE() functions
- •5.2.4 get_secret()
- •5.2.5 ppp_port_init()
- •5.3 Serial line drivers
- •5.3.1 ln_connect()
- •5.3.2 ln_getc()
- •5.3.3 ln_hangup()
- •5.3.4 ln_putc()
- •5.3.5 ln_speed()
- •5.3.6 ln_state()
- •5.3.7 ln_write()
- •5.4 PPP entry points
- •5.4.1 lcp_lowerdown()
- •5.4.2 lcp_lowerup()
- •5.4.3 ppp_input()
- •5.4.4 ppp_timeisup()
- •5.4.5 prep_ppp()
- •Modem Functions
- •6.1 dialer.c
- •6.1.1 dial()
- •6.1.2 dial_check()
- •6.1.3 dialer_status()
- •6.1.4 modem_cmd()
- •6.1.5 modem_connect()
- •6.1.6 modem_getc()
- •6.1.7 modem_gets()
- •6.1.8 modem_hangup()
- •6.1.9 modem_init()
- •6.1.10 modem_lstate()
- •6.1.11 modem_putc()
- •6.1.12 modem_reset()
- •6.1.13 modem_speed()
- •6.1.14 modem_state()
- •6.1.15 modem_write()
- •6.2 login.c
- •6.2.1 do_script()
- •6.2.2 login()
- •6.2.3 log_input()
- •6.2.4 log_output()
- •6.2.5 logserver()
- •6.3 mdmport.c
- •6.3.1 dial_delay()
- •6.3.2 hangup()
- •6.3.3 modem_clr_dtr() and modem_set_dtr()
- •6.3.4 modem_DCD()
- •6.3.5 modem_portstat()
- •DHCP Client Functions
- •7.1 DHCP client functions
- •7.1.1 dhc_init()
- •7.1.2 dhc_discover()
- •7.1.3 dhc_set_callback()
- •7.1.4 dhc_halt()
- •7.1.5 dhc_second()
- •Low-overhead UDP Functions
- •8.1 UDP functions
- •8.1.1 udp_alloc()
- •8.1.2 udp_close()
- •8.1.3 udp_open()
- •8.1.4 udp_send()
- •8.1.5 udp_socket()
- •Sockets
- •9.1 ARM implementation of sockets
- •9.2 Socket API reference
- •9.2.1 t_accept()
- •9.2.2 t_bind()
- •9.2.3 t_connect()
- •9.2.4 t_errno()
- •9.2.5 t_getpeername()
- •9.2.6 t_getsockname()
- •9.2.7 t_getsockopt()
- •9.2.8 t_listen()
- •9.2.9 t_recv() and t_recvfrom()
- •9.2.10 t_select()
- •9.2.11 t_send() and t_sendto()
- •9.2.12 t_setsockopt()
- •9.2.13 t_shutdown()
- •9.2.14 t_socket()
- •9.2.15 t_socketclose()
- •ARM-specific Functions
- •10.1 ARM directories
- •10.1.1 armthumb
- •10.2 cksum.s
- •10.3 clock.c
- •10.3.1 clock_init()
- •10.3.2 clock_c()
- •10.4 delay.s
- •10.5 dtrap.s
- •10.6 except.s
- •10.7.1 ENTER_CRIT_SECTION() and EXIT_CRIT_SECTION()
- •10.7.2 irqDispatch()
- •10.7.3 irq_Enable() and irq_Disable()
- •10.7.4 irqInit()
- •10.8 lswap.s
- •10.10 olicom.c
- •10.11 pcmcia.c
- •10.12 stack.s
- •10.13 uart.c description
- •10.14 uart.c ring buffer management functions
- •10.14.1 ring_add()
- •10.14.2 ring_avail()
- •10.14.3 ring_new()
- •10.14.4 ring_remove()
- •10.14.5 ring_space()
- •10.15 uart.c interface functions
- •10.15.1 uart_getc()
- •10.15.2 uart_DCD()
- •10.15.3 uart_delay()
- •10.15.4 uart_do_irq()
- •10.15.5 uart_init()
- •10.15.6 uart_irq()
- •10.15.7 uart_putc()
- •10.15.8 uart_ready()
- •10.15.9 uart_reset()
- •10.15.10 uart_setup()
- •10.15.11 uart_stats()
- •10.16 uart.c debug TTY interface functions
- •10.16.1 dputchar()
- •10.16.2 getch()
- •10.16.3 kbhit()
- •Miscellaneous Library Functions
- •11.1 app_ping.c
- •11.2 in_utils.c
- •11.2.1 con_page()
- •11.2.2 hexdump()
- •11.2.3 nextarg()
- •11.2.4 ns_printf()
- •11.2.5 panic()
- •11.2.6 print_eth()
- •11.2.7 print_ipad()
- •11.2.8 print_uptime()
- •11.2.11 sysuptime()
- •11.2.12 uslash()
- •11.3 memman.c
- •11.4 menus.c, menulib.c, and nrmenus.c
- •11.5 nextcarg.c
- •11.5.1 nextcarg()
- •11.6 nvfsio.c
- •11.6.1 Overview
- •11.6.2 nv_fclose()
- •11.6.3 nv_fgets()
- •11.6.4 nv_fopen()
- •11.6.5 nv_fprintf()
- •11.6.6 nv_fwrite()
- •11.6.7 nv_initialize()
- •11.6.8 nv_writeflash()
- •11.7 nvparms.c
- •11.8 parseip.c
- •11.8.1 parseip()
- •11.9 reshost.c
- •11.9.1 in_reshost()
- •11.10 strilib.c
- •11.11 strlib.c
- •11.12 tcp_echo.c
- •11.13 ttyio.c
- •11.14 udp_echo.c
- •11.15 userpass.c
- •11.15.1 add_user()
- •11.15.2 check_permit()
- •Example Applications
- •12.1 Overview of the examples
- •12.1.1 Requirements
- •12.1.2 Building projects
- •12.1.3 Running the examples
- •12.2 Example descriptions
- •12.2.1 chargen
- •12.2.2 loopback
- •12.2.3 maildemo
- •12.2.4 menus
- •Error Codes
- •A.1 ENP_ error codes
- •A.2 Socket error codes

Appendix A
Error Codes
This appendix contains a list of both the standard ENP_ error codes you may encounter while porting (see Chapter 4 TCP/IP API Functions and Chapter 8 Low-overhead UDP Functions) and the socket error codes (see Chapter 9 Sockets).
This chapter contains the following sections:
•ENP_ error codes on page A-2
•Socket error codes on page A-3.
ARM DUI 0079B |
Copyright © 1998 and 1999 ARM Limited. All rights reserved. |
A-1 |

Error Codes
A.1 ENP_ error codes
The error codes listed in Table A-1 are used throughout the stack. Success is zero, definite errors are negative numbers, and indeterminate conditions are positive numbers. These codes are provided in ipport.h. You can modify them to wrap around an existing system.
Note
If you define errors with non-negative values, the stack will not work.
These error codes are typically returned by functions that return an integer. See the function specifications (Chapter 4 TCP/IP API Functions and Chapter 8 Low-overhead UDP Functions) for information on specific functions.
Table A-1 ENP_ error codes
Error type |
Error code |
Return |
Description |
|
(defined in ipport.h) |
value |
|||
|
|
|||
|
|
|
|
|
No errors: |
SUCCESS |
0 |
Success |
|
|
OK |
0 |
Success |
|
|
|
|
|
|
Programming errors: |
ENP_PARAM |
–10 |
Bad parameter |
|
|
ENP_LOGIC |
–11 |
Illogical sequence of events |
|
|
|
|
|
|
System errors: |
ENP_NOMEM |
–20 |
malloc() or calloc() failed |
|
|
ENP_NOBUFFER |
–21 |
Ran out of free packets |
|
|
ENP_RESOURCE |
–22 |
Ran out of queue-able resources OR full queue |
|
|
SEND_DROPPED |
|
|
|
|
|
|
|
|
Net errors: |
ENP_SENDERR |
–30 |
Send to net failed at a lower layer |
|
|
ENP_NOARPREP |
–31 |
No ARP reply for a given host |
|
|
ENP_BAD_HEADER |
–32 |
Bad header at the upper layer (for callbacks) |
|
|
ENP_NO_ROUTE |
–33 |
Cannot find a reasonable next IP hop |
|
|
|
|
|
|
Nonfatal/success: |
ENP_SEND_PENDING |
1 |
ARP is holding the packet while awaiting a response |
|
|
ARP_WAITING |
|
from the target host |
|
|
ENP_NOT_MINE |
2 |
The packet was of no interest (callback reply only) |
|
|
|
|
|
A-2 |
Copyright © 1998 and 1999 ARM Limited. All rights reserved. |
ARM DUI 0079B |

Error Codes
A.2 Socket error codes
Table A-2 lists the sockets errors that may be encountered when implementing ARM sockets. They are a subset of the standard Berkeley errors. See the function specifications in Chapter 9 Sockets for information on specific functions.
|
|
Table A-2 Socket error codes |
|
|
|
|
|
Error code |
Return |
Description |
|
value |
|||
|
|
||
|
|
|
|
ENOBUFS |
1 |
Insufficient packet buffers available to complete the |
|
|
|
operation |
|
|
|
|
|
ETIMEDOUT |
2 |
The operation could not be completed within the time |
|
|
|
limit |
|
|
|
|
|
EISCONN |
3 |
A connection is already established, so a new one cannot |
|
|
|
be established at this time |
|
|
|
|
|
EOPNOTSUPP |
4 |
The requested operation, protocol, or format is not |
|
|
|
supported |
|
|
|
|
|
ECONNABORTED |
5 |
The connection or connection attempt was aborted |
|
|
|
|
|
EWOULDBLOCK |
6 |
The requested operation would have to block in order to |
|
|
|
complete and the socket has been marked as nonblocking |
|
|
|
|
|
ECONNREFUSED |
7 |
The attempted connection has been refused by the remote |
|
|
|
host |
|
|
|
|
|
ECONNRESET |
8 |
The connection associated with this socket has been reset |
|
|
|
|
|
ENOTCONN |
9 |
The requested operation cannot be completed because the |
|
|
|
socket is not in the connected state |
|
|
|
|
|
EALREADY |
10 |
The requested operation cannot be performed because a |
|
|
|
similar operation is already in progress on this socket |
|
|
|
|
|
EINVAL |
11 |
The requested operation is invalid in the current socket |
|
|
|
state, or one or more of the arguments for the request is |
|
|
|
invalid |
|
|
|
|
|
EMSGSIZE |
12 |
The datagram is too large to be sent |
|
|
|
|
|
EPIPE |
13 |
Cannot send using this socket because it has been |
|
|
|
shutdown for writing |
|
|
|
|
|
EDESTADDRREQ |
14 |
An address must be specified for t_connect() to |
|
|
|
connect to |
|
|
|
|
ARM DUI 0079B |
Copyright © 1998 and 1999 ARM Limited. All rights reserved. |
A-3 |

Error Codes
|
|
Table A-2 Socket error codes (continued) |
|
|
|
|
|
Error code |
Return |
Description |
|
value |
|||
|
|
||
|
|
|
|
ESHUTDOWN |
15 |
The operation could not be completed because the socket |
|
|
|
has been shutdown |
|
|
|
|
|
ENOPROTOOPT |
16 |
The option that you have requested or tried to set using |
|
|
|
t_setsockopt() or t_getsockopt() has not |
|
|
|
been recognized |
|
|
|
|
|
EHAVEOOB |
17 |
There is Out Of Band data waiting on the socket |
|
|
|
|
|
ENOMEM |
18 |
The socket sub-system could not allocate enough memory |
|
|
|
to complete the requested operation |
|
|
|
|
|
EADDRNOTAVAIL |
19 |
The requested address is not available |
|
|
|
|
|
EADDRINUSE |
20 |
The requested address is already in use |
|
|
|
|
|
EAFNOSUPPORT |
21 |
The only address/protocol family supported is AF_INET |
|
|
|
|
|
EINPROGRESS |
22 |
The connect request failed because a previous connect |
|
|
|
was already in progress |
|
|
|
|
A-4 |
Copyright © 1998 and 1999 ARM Limited. All rights reserved. |
ARM DUI 0079B |

Index
The items in this index are listed in alphabetical order, with symbols and numerics appearing at the end. The references given are to page numbers.
A |
|
|
B |
|
|
|
CHAP |
1-4, 1-6, 3-10 |
|
|
|
|
|
|
|
|
CHAP_SUPPORT |
3-6, 3-7 |
|
Abrupt disconnect |
3-10 |
Big build option |
12-3 |
chargen demo 12-5 |
|||||
add_user() 11-36, 11-37 |
blocklist() |
11-16 |
|
check_permit() 11-37 |
|||||
app_ping.c 11-3 |
|
Building projects |
12-2 |
cksum() |
4-4, 10-5 |
|
|||
Arm build option |
12-3 |
Arm |
12-3 |
|
cksum.s |
4-4, 10-3, 10-5 |
|||
ARM directories |
10-3 |
Big |
12-3 |
|
cksum() 10-5 |
|
|||
\armthumb 2-5, 2-10, 4-2, 5-2, 10-3 |
Debug |
12-3 |
|
Client connection 3-9 |
|||||
\pid7tdm |
2-10, 4-2, 5-2, 10-3, 12-4 |
Ether |
|
12-3 |
|
clock_c() 10-6 |
|
||
ARM PPP requirements 1-12 |
Little |
|
12-3 |
|
clock() |
2-8 |
|
||
dynamic memory 1-15 |
make clean 12-3 |
clock.c |
2-8, 10-3, 10-6 |
||||||
line management functions 1-12 |
make clobber |
12-3 |
clock_c() 10-6 |
|
|||||
periodic clock tick 1-15 |
makefile 12-3 |
clock_init() 10-6 |
|||||||
static memory |
1-13 |
PPP |
12-3 |
|
Code space 1-13 |
|
|||
ARM TCP/IP requirements 1-7 |
Release 12-3 |
|
Compile switches |
3-6 |
|||||
CPU 1-9 |
|
|
Thumb |
12-3 |
|
Compiling PPP |
|
||
memory |
1-7 |
|
using makefiles 12-2 |
include file 3-5 |
|
||||
operating system 1-11 |
|
|
|
|
setting options |
3-6 |
|||
armsd 2-6, 12-5 |
|
C |
|
|
|
ConPrintf() 3-3, 5-5 |
|||
armsd.ini 10-8, 12-5 |
|
|
|
con_page() 11-5 |
|
||||
armthumb.h |
10-3 |
|
|
|
|
|
Critical section 2-13 |
||
Auto-answer |
5-20 |
calloc() |
4-9, 5-3, 5-6, 11-16 |
Crossover 3-9 |
|
||||
|
|
|
ccksum.c |
4-4 |
|
cticks 1-15, 2-8 |
|
ARM DUI 0079B |
Copyright © 1998 and 1999 ARM Limited. All rights reserved. |
Index-1 |

Index
D |
|
|
|
dial_delay() 6-25 |
|
|
FD_ZERO() 9-17 |
|
||||
|
|
|
|
dial() 6-3, 6-7 |
|
|
Flash |
11-19, 11-20, 11-21, 11-22, |
||||
Data Terminal Ready (DTR) 6-27 |
Domain Name Service (DNS) |
11-29 |
|
11-23, 11-24, 11-26, 11-27 |
||||||||
Debug build option 12-3 |
Dotted-quad notation 11-28, 11-29 |
FLASHBASE |
11-19, 11-25, 11-26 |
|||||||||
Debugging aids 2-6 |
do_script() 6-19 |
|
|
FLASHFIRM |
11-19 |
|
||||||
dprintf() |
2-7 |
dprintf() |
2-7, 4-5, 10-30, 11-6, 11-9, |
fopen() |
11-22 |
|
|
|||||
dtrap() |
2-6 |
11-16, 11-34 |
|
|
fprintf() |
11-23 |
|
|
||||
initmsg() |
2-7 |
dputchar() 10-31, 11-34 |
|
free() |
4-10, 5-6, 11-16 |
|
||||||
NPDEBUG 2-7 |
dtrap() |
2-6, 4-6, 10-8, 11-9 |
|
FSM |
1-4, 1-5 |
|
|
|||||
Default router |
dtrap.s |
10-3, 10-8 |
|
|
fsm_callbacks 3-4 |
|
||||||
setting |
2-14 |
dtrap() 10-8 |
|
|
fsm.h |
3-4 |
|
|
||||
delay() |
10-7 |
Dynamic memory |
1-12 |
|
Fully-qualified domain name 11-29 |
|||||||
delay.s |
10-3, 10-7 |
|
|
|
|
fwrite() |
11-24 |
|
|
|||
Demonstration projects |
E |
|
|
|
|
|
|
|
|
|||
chargen |
12-5 |
|
|
|
G |
|
|
|
|
|||
loopback |
12-5 |
ENP_ error codes |
A-2 |
|
|
|
|
|
||||
maildemo |
12-5, 12-6 |
|
|
|
|
|
|
|||||
menus |
12-5, 12-6 |
ENTER_CRIT_SECTION() 4-7, |
getch() |
10-32 |
|
|
||||||
DHCP |
3-10, 5-9 |
10-10 |
|
|
get_secret() 3-6, 5-7 |
|
||||||
DHCP client functions 7-2 |
Entry points 5-18 |
|
|
Glue layer |
|
|
||||||
dhc_discover() 7-3 |
Entry points and support calls |
3-8 |
TCP |
2-12 |
|
|
||||||
dhc_halt() |
7-3, 7-5 |
errno 9-2, 9-7, 9-18 |
|
Glue layer coding 2-10 |
|
|||||||
dhc_init() 7-2 |
Error codes A-2, A-3 |
|
task control |
2-10 |
|
|||||||
dhc_second() 7-2, 7-6 |
Ether build option |
12-3 |
|
|
|
|
|
|
||||
dhc_set_callback() 7-5 |
EWOULDBLOCK |
9-15, 9-21, A-3 |
H |
|
|
|
|
|||||
dhcpclnt.c |
7-2 |
Example applications |
|
|
|
|
|
|||||
dhcputil.c |
7-2 |
building projects 12-2 |
|
|
|
|
|
|
||||
dhc_discover() 7-3 |
descriptions 12-5 |
|
hangup() 6-26 |
|
|
|||||||
dhc_halt() |
7-3, 7-5 |
overview 12-2 |
|
|
hexdump() 11-6 |
|
||||||
dhc_init() 7-2 |
requirements 12-2 |
|
htonl() |
2-5 |
|
|
||||||
dhc_second() |
7-2, 7-6 |
Example package directories |
1-16 |
htons() |
2-5 |
|
|
|||||
dhc_set_callback() 7-5 |
exceptfds 9-16 |
|
|
|
|
|
|
|
||||
dialer_status() 6-5 |
except.s |
10-3, 10-9, 10-11 |
|
I |
|
|
|
|
||||
dialer.c |
5-21, 6-2, 10-22 |
irqHandler() 10-9 |
|
|
|
|
|
|||||
dialer_status() 6-5 |
EXIT_CRITICAL_SECTION(). 2-13 |
|
|
|
|
|
||||||
dial_check() 6-4 |
EXIT_CRIT_SECTION() 4-7, 10-10 |
ifPhysAddress |
4-21 |
|
||||||||
dial() |
6-3 |
|
|
|
|
ifppp.c |
5-4 |
|
|
|||
modem_cmd() 6-6 |
F |
|
|
|
INCLUDE_FLASHFS |
11-19, 11-27 |
||||||
modem_connect() 6-7 |
|
|
|
INICHE_LIBS (macro) |
11-32 |
|||||||
modem_getc() 6-8 |
|
|
|
|
initmsg() 2-7, 4-5 |
|
||||||
modem_gets() 6-9 |
FBUFLEN 11-23 |
|
|
in_reshost() 11-29 |
|
|||||||
modem_hangup() 6-10 |
FD_CLR() 9-17 |
|
|
in_utils.c 11-4 |
|
|
||||||
modem_init() 6-11 |
FD_ISSET() 9-17 |
|
|
con_page() 11-5 |
|
|||||||
modem_lstate() 6-12 |
fd_set structures |
|
|
hexdump() |
11-6 |
|
||||||
modem_putc() 6-13 |
FD_CLR() 9-17 |
|
nextarg() 11-7 |
|
||||||||
modem_speed() 6-15 |
FD_ISSET() 9-17 |
|
ns_printf() 11-8 |
|
||||||||
modem_state() 6-16 |
FD_SET() 9-17 |
|
panic() 11-9 |
|
||||||||
modem_write() 6-17 |
FD_ZERO() 9-17 |
|
print_eth() 11-10 |
|
||||||||
dial_check() |
6-4 |
FD_SET() 9-17 |
|
|
print_ipad() |
11-11 |
|
Index-2 |
Copyright © 1998 and 1999 ARM Limited. All rights reserved. |
ARM DUI 0079B |

Index
print_uptime() 11-12 |
stristr() |
11-31 |
lolevel.h |
10-3 |
|
||||||||
std_in() 11-13 |
|
strncmp() |
11-31 |
loopback demo 3-9, 12-5 |
|||||||||
std_out() 11-14 |
|
strnicmp() |
11-31 |
lswap() |
2-5, 10-12 |
||||||||
sysuptime() |
11-14 |
strstr() |
11-31 |
lswap.s |
10-3, 10-12 |
||||||||
uslash() |
11-15 |
|
i595_badpacketrx() 10-33 |
|
|
|
|
|
|||||
in_utils.h 11-32 |
|
i595_bringup() 10-33 |
M |
|
|
|
|
||||||
IP |
|
2-14 |
|
i595_packetgone() 10-33 |
|
|
|
|
|||||
addresses |
|
i595_promiscmode() 10-33 |
|
|
|
|
|
||||||
end user |
2-15 |
|
i595_rxpackets() 10-33 |
macloop.c |
2-11, 2-14 |
||||||||
loopback address |
3-9 |
i595_takedown() 10-33 |
maildemo demo |
12-5, 12-6 |
|||||||||
next generation of |
2-14 |
i595_txchain() 10-33 |
main.c |
2-10, 12-6 |
|||||||||
porting programmer 2-14 |
i595_txstart() |
10-33 |
make 12-2 |
|
|
||||||||
IPCP 1-4, 1-5 |
|
|
|
|
|
|
make clean |
12-3 |
|
||||
ipport.c |
2-10, 3-8, 4-2, 5-2, 5-23, 10-14 |
K |
|
|
|
make clobber 12-3 |
|||||||
ipport.h |
1-7, 1-15, 2-2, 2-3, 2-4, 2-10, |
|
|
|
makedefs |
12-2 |
|
||||||
5-2, 9-18, 11-19, 11-32, 12-4, |
|
|
|
|
makefile |
3-3, 3-5, 12-2, 12-3, 12-4 |
|||||||
12-6 |
|
|
|
kbhit() |
10-32 |
malloc() |
|
4-9 |
|
||||
CPU architecture |
2-5 |
|
|
|
|
MAXMRU |
5-3 |
|
|||||
creating |
2-4 |
|
|
L |
|
|
|
MAXNETS |
4-15 |
||||
debugging aids 2-6 |
|
|
|
MAX_USERLENGTH 11-36 |
|||||||||
definitions in |
2-4, 2-8, 2-9, 2-10, |
|
|
|
|
mdmport.c |
6-24 |
|
|||||
2-13, 3-3, 4-2, 4-5, 4-8, 4-9, 4-10, |
LB_XOVER |
3-7, 3-9 |
dial_delay() 6-25 |
||||||||||
10-6, 10-24, 11-16, 12-4 |
LCP 1-4, 1-5 |
|
hangup() |
6-26 |
|||||||||
errors defined in |
9-2, 9-4, 9-5, 9-6, |
lcp_lowerdown() 3-10, 5-19, 6-4, 6-10 |
modem_clr_dtr() 6-27 |
||||||||||
9-8, 9-9, 9-10, 9-13, 9-14, 9-20, |
lcp_lowerup() 5-20 |
modem_DCD() 6-28 |
|||||||||||
9-22, 9-25, A-2 |
lcp.c 3-4 |
|
|
modem_portstat() 6-29 |
|||||||||
pre-emption and protection 2-6 |
libport.h |
11-19, 11-25 |
modem_reset() 6-14 |
||||||||||
stack |
2-8 |
|
|
listopts.h |
10-3 |
modem_set_dtr() 6-27 |
|||||||
standard macros and definitions 2-4 |
Little build option 12-3 |
MD5 3-6 |
|
|
|||||||||
timers and multitasking 2-8 |
ln_connect() |
5-10, 5-11, 5-13, 5-16 |
memman.c |
4-9, 4-10, 11-16 |
|||||||||
IPv6 2-14 |
|
|
|
ln_getc() 5-12 |
blocklist() 11-16 |
||||||||
ip_addr |
11-28, 11-29 |
ln_hangup() 5-13, 5-16, 5-19, 6-3, 6-6, |
npalloc() |
11-16 |
|||||||||
irqDispatch() 10-10 |
|
6-8, 6-9, 6-12 |
npfree() |
11-16 |
|||||||||
irqHandler() |
10-9 |
|
ln_putc() |
3-9, 5-14, 5-17, 5-19, 5-20 |
menulib.c |
11-17 |
|
||||||
irqInit() |
10-11 |
|
|
ln_speed() 5-15 |
menus demo 11-3, 11-13, 12-5, 12-6 |
||||||||
irqStackSetup() |
10-16 |
ln_state() 5-16 |
menus.c |
|
11-17 |
|
|||||||
irq_Disable() 10-10 |
|
ln_write() 5-17 |
MIB-II 4-20 |
|
|||||||||
irq_Enable() 10-10 |
|
LOCAL_RAND 3-7 |
mmu.s |
10-3, 10-13 |
|||||||||
irq.c 2-13, 10-3, 10-9, 10-10 |
LOCK_NET_RESOURCE() 2-13, 4-8 |
SetupAbort() |
10-13 |
||||||||||
ENTER_CRIT_SECTION() 10-10 |
login() |
6-19, 6-20 |
Modem functions |
6-1, 7-1 |
|||||||||
EXIT_CRIT_SECTION() 10-10 |
login.c |
6-18 |
|
dialer.c |
6-2 |
|
|||||||
irqDispatch() |
10-10 |
do_script() 6-19 |
login.c |
6-18 |
|
||||||||
irqInit() |
10-11 |
|
login() |
6-20 |
mdmport.c 6-24 |
||||||||
irq_Disable() 10-10 |
logserver() |
6-23 |
modem_clr_dtr() 6-27 |
||||||||||
irq_Enable() 10-10 |
log_input() 6-21 |
modem_cmd() 6-3, 6-6 |
|||||||||||
ISDN 1-12 |
|
|
|
log_output() 6-22 |
modem_connect() 6-7 |
||||||||
istring.c |
|
|
|
|
logserver() |
6-19, 6-23 |
modem_DCD() 6-28 |
||||||
strcmp() |
11-31 |
|
log_input() 6-21 |
modem_getc() 6-8 |
|||||||||
stricmp() |
11-31 |
|
log_output() |
6-22 |
modem_gets() 6-9 |
ARM DUI 0079B |
Copyright © 1998 and 1999 ARM Limited. All rights reserved. |
Index-3 |

Index
modem_hangup() 6-10, 6-26 |
ntohl() |
2-5 |
Out-of-band 9-16, 9-18 |
modem_init() 6-11, 10-27 |
ntohs() |
2-5 |
|
modem_lstate() 6-12 |
NUMNVFILES 11-19 |
P |
|
modem_portstat() 6-5, 6-29 |
NUM_NETUSERS 11-36 |
||
modem_putc() 6-13 |
nvfsio.c |
11-19, 11-23, 11-27 |
|
modem_reset() 6-10, 6-14 |
nv_fclose() 11-20 |
panic() |
4-11, 11-9 |
|||||||||
modem_set_dtr() 6-27 |
nv_fgets() 11-21 |
PAP 1-4 |
|
|
|
|||||||
modem_speed() 6-15 |
nv_fprintf() 11-23 |
PAP_SUPPORT 3-7 |
||||||||||
modem_state() 6-16 |
nv_fwrite() 11-24 |
parseip.c |
11-28 |
|
||||||||
modem_write() 6-17 |
nv_initialize() 11-25 |
parse_ipad() 11-28 |
||||||||||
MSG_DONTROUTE 9-19 |
nv_writeflash() 11-22, 11-26 |
pcmcia_find_tuple() 10-15 |
||||||||||
MSG_OOB 9-18 |
|
nvfsio.h 11-25 |
|
pcmcia_irq() 10-15 |
||||||||
Multilink test |
3-10 |
|
NVFSIZE |
11-19, 11-24 |
pcmcia_mapio() 10-15 |
|||||||
Multitasking |
2-10 |
|
nvparms.c |
11-27 |
pcmcia_setup() 10-15 |
|||||||
|
|
|
|
|
NVRAMSIZE |
11-25, 11-26 |
pcmcia.c |
10-4, 10-14, 10-15 |
||||
N |
|
|
|
|
nvsio.c 11-23 |
|
pcmcia_find_tuple() 10-15 |
|||||
|
|
|
|
NVTAG_PATTERN 11-25 |
pcmcia_irq() 10-15 |
|||||||
|
|
|
|
|
nv_fclose() 11-20 |
pcmcia_mapio() 10-15 |
||||||
NATIVE_PRINTF 12-4 |
nv_fgets() 11-21 |
pcmcia_setup() 10-15 |
||||||||||
NET structure |
4-16 |
|
nv_fopen() 11-20, 11-23, 11-24 |
vadem_dump() 10-15 |
||||||||
netbuf.h |
4-24 |
|
|
nv_fprintf() 11-23 |
pcmcia.h |
10-4 |
|
|||||
netexit() |
11-9 |
|
nv_fwrite() 11-24 |
pcmia_setup() 10-14 |
||||||||
Network byte order |
10-12 |
nv_get_parms() 11-25 |
pcmif.h |
10-4 |
|
|
||||||
Network interfaces |
4-15 |
nv_initialize() |
11-19, 11-25 |
pid7tdm.h |
10-4 |
|
||||||
n_close() 4-19 |
|
nv_writeflash() |
11-19, 11-20, 11-22, |
pid7t.h |
10-4 |
|
|
|||||
n_init() 4-20 |
|
11-26 |
|
ping 11-3 |
|
|
||||||
n_reg_type() 4-22 |
n_close() 4-19 |
|
pkt_send() 4-24 |
|
||||||||
n_stats() 4-23 |
|
n_defgw 2-14 |
|
Portable files |
2-3 |
|
||||||
pkt_send() 4-24 |
|
n_init() 2-14, 4-20 |
Port-independent source files 3-4 |
|||||||||
raw_send() 4-27 |
|
n_ipaddr 2-14 |
|
Porting PPP |
|
|
||||||
Network interfacesNET structure 4-16 |
n_mib 4-25, 4-28 |
compiling |
3-5 |
|
||||||||
Network resource locks 2-13 |
n_reg_type() 4-20, 4-22 |
entry points and support calls 3-8 |
||||||||||
NET_RESID 4-8 |
|
n_stats() |
4-23 |
|
source files |
3-4 |
||||||
net.h 4-15, 4-16, 4-17, 4-21 |
|
|
|
PPP |
|
|
|
|
||||
net[ ] structure |
|
|
O |
|
|
include file |
3-5 |
|||||
driver-specific 4-17 |
|
|
options |
3-6 |
|
|||||||
IP addressing information 4-17 |
|
|
|
porting |
3-3 |
|
||||||
MIB information |
4-17 |
olicom_card_handler() 10-14 |
testing |
3-9 |
|
|
||||||
nextarg() |
11-7 |
|
olicom_close() 10-14 |
PPP build option |
12-3 |
|||||||
nextcarg.c |
11-18 |
|
olicom_pkt_send() 10-14 |
PPP entry points |
5-18 |
|||||||
nextcarg() |
11-18 |
olicom_stats() 10-14 |
lcp_lowerdown() 5-19 |
|||||||||
nisa.h 10-3 |
|
|
olicom.c |
4-18, 4-21, 10-3, 10-14 |
lcp_lowerup() 5-20 |
|||||||
Non-portable files 2-3 |
olicom_card_handler() 10-14 |
ppp_input() 5-21 |
||||||||||
npalloc() |
4-9, 11-16 |
olicom_close() 10-14 |
ppp_timeisup() 5-22 |
|||||||||
NPDEBUG |
2-7 |
|
olicom_pkt_send() 10-14 |
prep_ppp() 5-23 |
||||||||
npfree() |
4-10, 11-16 |
olicom_stats() 10-14 |
PPP functions |
5-2 |
||||||||
nptypes.h |
3-5 |
|
prep_olicom() 10-14 |
ConPrintf() |
5-5 |
|||||||
nrmenus.c |
11-17 |
|
olicom.h |
10-4 |
|
get_secret() 5-7 |
||||||
ns_printf() |
11-8, 11-14 |
Optional compile switches 2-9 |
ppp_port_init() |
5-9 |
Index-4 |
Copyright © 1998 and 1999 ARM Limited. All rights reserved. |
ARM DUI 0079B |

Index
_ALLOC() functions 5-3 |
rps.h |
10-4 |
splnet() 2-13 |
|
_FREE() functions 5-6 |
runtest |
12-5 |
splx() |
2-13 |
PPPB_ALLOC() 5-6 |
rvcdq |
4-20 |
srand() |
3-7 |
PPPB_FREE() 5-6 |
RXQ_RESID 4-8 |
Stack |
2-8 |
|
pppclose() 6-10 |
|
|
stack.s |
10-4, 10-11, 10-16 |
PPPS_ALLOC() 5-6 |
|
S |
|
|
|
|
|
|
irqStackSetup() |
10-16 |
||||||
PPPS_FREE() 5-6 |
|
|
|
|
|
|
|
startup.c |
|
10-14 |
10-14 |
|||||
PPPT_ALLOC() 5-6 |
|
|
|
|
|
|
|
|
ip_startup code |
|||||||
PPPT_FREE() 5-6 |
|
Sample programs |
|
1-13, 1-18 |
Static memory |
1-12 |
||||||||||
ppp_input() 5-12 |
|
send_next_from_q() 4-25 |
Static variables |
3-3 |
||||||||||||
ppp_port_init() 3-3, 3-8, 5-9, 5-10 |
Serial line drivers |
|
5-10 |
stdio.h |
2-4 |
|
|
|
||||||||
ppp_port.c |
3-2, 3-4, 3-8, 6-11 |
ln_connect() 5-11 |
std_in() 11-13 |
|
|
|||||||||||
ppp_port.h |
3-2, 3-4, 3-5, 3-6, 5-3, 5-4 |
ln_getc() 5-12 |
|
|
std_out() 11-14 |
|
||||||||||
ppp_timeisup() 3-8, 5-21, 5-22 |
ln_hangup() 5-13 |
strcat() |
11-32 |
|
|
|||||||||||
ppp.h |
5-4 |
|
|
ln_putc() 5-14 |
|
|
strchr() |
11-32 |
|
|
||||||
ppp.zip |
1-17 |
|
ln_speed() 5-15 |
strcmp() |
|
11-31, 11-32 |
||||||||||
Pre-emption and protection |
2-6, 2-12 |
ln_state() 5-16 |
|
strcpy() |
11-32 |
|
|
|||||||||
critical sections 2-13 |
|
ln_write() 5-17 |
|
stricmp() |
11-31 |
|
||||||||||
network resource locks |
2-13 |
Server connection |
|
3-10 |
strilib.c |
11-31 |
|
|
||||||||
prep_ifaces() 3-8, 4-12, 4-20, 4-21, |
SetupAbort() |
10-13 |
stristr() |
11-31 |
|
|
||||||||||
10-14 |
|
SignalPktDemux() |
|
2-11 |
strlen() |
11-32 |
|
|
||||||||
prep_olicom() 10-14 |
|
sleep_chan() 2-12 |
|
strlib.c |
11-32 |
|
|
|||||||||
prep_ppp() |
3-8, 5-9, 5-23 |
|
sleep() |
2-12 |
|
|
|
|
strncmp() |
11-31, 11-32 |
||||||
printf() |
4-5 |
|
slip_rxbyte() 5-12 |
|
strncpy() |
11-32 |
|
|||||||||
print_eth() 11-10 |
|
Socket |
9-4 |
|
|
|
|
|
strnicmp() |
11-31 |
|
|||||
print_ipad() 11-11 |
|
Socket error codes |
|
A-3 |
strstr() |
11-31, 11-32 |
||||||||||
print_uptime() 11-12 |
|
Socket functions |
|
|
|
struct net |
4-15 |
|
||||||||
process.pl |
1-9, 12-5 |
|
t_accept() |
9-4 |
|
|
st16c552.h |
10-4 |
|
|||||||
|
|
|
|
t_bind() |
9-5 |
|
|
|
Subnet mask |
|
|
|||||
R |
|
|
|
t_connect() 9-6 |
|
setting |
2-14 |
|
||||||||
|
|
|
t_errno() |
|
9-7 |
|
|
9-8 |
Superloop |
|
2-10 |
|
||||
|
|
|
|
t_getpeername() |
sysuptime() |
11-14 |
||||||||||
rand() |
3-7 |
|
|
t_getsockname() |
9-9 |
sys_np.c |
5-22 |
|
|
|||||||
raw_send() 4-27 |
|
t_getsockopt() |
|
9-10 |
|
|
|
|
|
|
||||||
readfds |
9-16 |
|
t_listen() |
|
9-13 |
|
|
T |
|
|
|
|
|
|||
reg_type 4-20 |
|
t_recvfrom() |
9-14 |
|
|
|
|
|
||||||||
Release build option 12-3 |
|
t_recv() |
9-14 |
|
|
|
|
|
|
|
|
|
||||
Requirements |
|
t_select() |
|
9-16 |
|
|
Task control 2-10 |
|
||||||||
example applications 12-2 |
t_sendto() |
9-18 |
|
multitasking method 2-11 |
||||||||||||
reshost.c 11-29 |
|
t_send() |
9-18 |
|
|
|
superloop method 2-11 |
|||||||||
in_reshost() 11-29 |
|
t_setsockopt() |
|
9-20 |
tcpip.zip |
1-16 |
|
|
||||||||
results.txt |
12-5 |
|
t_shutdown() |
9-22 |
tcpport.c |
2-10, 2-12 |
||||||||||
RH_BLOCK 11-29 |
|
t_socketclose() |
|
9-25 |
tcpport.h |
9-2, 9-11 |
||||||||||
RH_VERBOSE 11-29 |
|
t_socket() 9-23 |
|
tcp_echo.c 11-33 |
|
|||||||||||
ring_add() 10-19 |
|
Sockets |
9-1 |
|
|
|
|
tcp_sleep() |
4-13, 4-14 |
|||||||
ring_avail() 10-19 |
|
API reference |
|
9-3 |
tcp_wakeup() |
4-13, 4-14 |
||||||||||
ring_new() 10-20 |
|
implementation |
|
9-2 |
TCP/IP |
|
|
|
|
|
||||||
ring_remove() 10-21 |
|
socket.h |
9-11, 9-21, 9-23, 9-24 |
testing |
2-16 |
|
||||||||||
ring_space() 10-21 |
|
Source files |
|
3-4 |
|
|
|
TCP/IP functions |
4-2 |
ARM DUI 0079B |
Copyright © 1998 and 1999 ARM Limited. All rights reserved. |
Index-5 |

Index
cksum() |
4-4 |
t_socketclose() 9-25 |
udp_open() |
8-4 |
dprintf() |
4-5 |
t_socket() 9-2, 9-23 |
udp_send() |
8-5 |
dtrap() |
4-6 |
|
udp_socket() |
8-6 |
ENTER_CRIT_SECTION() 4-7 |
U |
|
udp_alloc() 8-2 |
||||||
EXIT_CRIT_SECTION() 4-7 |
|
udp_close() 8-3 |
|||||||
initmsg() |
4-5 |
|
|
|
|
udp_echo.c 11-35 |
|||
LOCK_NET_RESOURCE() 4-8 |
uart_DCD() 10-24 |
udp_open() 8-4 |
|||||||
npalloc() |
4-9 |
|
|
uart_delay() 10-24 |
udp_open.c 8-4 |
||||
npfree() |
4-10 |
|
|
uart_do_irq() 10-25 |
udp_send() 8-5 |
||||
panic() 4-11 |
|
|
uart_getc() 10-23 |
udp_socket() 8-6 |
|||||
prep_ifaces() 4-12 |
uart_init() 10-26 |
udp.c |
8-2 |
||||||
tcp_sleep() 4-13 |
|
uart_irq() 10-26 |
UNIX kernels 2-13 |
||||||
tcp_wakeup() 4-14 |
uart_putc() 6-13 |
UNLOCK_NET_RESOURCE() 2-13, |
|||||||
UNLOCK_NET_RESOURCE() |
uart_ready() 6-13, 10-27 |
|
4-8 |
|
|||||
4-8 |
|
|
|
|
uart_reset() |
6-14, 10-28 |
UPAP 1-6 |
||
TERMREQ |
3-10 |
|
uart_setup() 10-29 |
userpass.c 11-36 |
|||||
Testing 2-16 |
|
|
|
uart_stats() |
6-5, 10-30 |
add_user() 11-36 |
|||
Testing PPP |
|
|
|
|
uart.c 2-7, 10-4, 12-4, 12-6 |
check_permit() 11-37 |
|||
abrupt disconnect |
3-10 |
debug TTY interface functions |
userpass.h 11-36, 11-37 |
||||||
client connection |
3-9 |
10-31 |
use_ppp() 3-3 |
||||||
loopback |
3-9 |
|
|
description 10-17 |
uslash() |
11-15 |
|||
multilink test |
3-10 |
interface functions 10-22 |
|
|
|
||||
server connection |
3-10 |
ring buffer management functions |
V |
|
|
||||
Thumb build option |
12-3 |
10-18 |
|
|
|||||
Timers and multitasking 2-8 |
uart.c debug TTY interface functions |
|
|
|
|||||
tk_yield() 2-11, 4-14, 6-4 |
dputchar() 10-31 |
vadem_dump() 10-15 |
|||||||
TPS 1-15 |
|
|
|
|
getch() |
10-32 |
VJC, VJ compression 3-6, 3-10 |
||
ttyio.c 2-7, 4-5, 10-31, 11-34, 12-6 |
kbhit() |
10-32 |
|
|
|
||||
t_accept() 9-4 |
|
|
uart.c interface functions |
W |
|
|
|||
t_bind() 9-5 |
|
|
|
uart_DCD() 10-24 |
|
|
|||
t_connect() |
9-6 |
|
|
uart_delay() 10-24 |
|
|
|
||
t_errno() 9-4, 9-7, 9-9, 9-13, 9-14, |
uart_do_irq() 10-25 |
wakeup_chan() 2-12 |
|||||||
9-18, 9-25 |
|
|
uart_getc() 10-23 |
wakeup() |
2-12 |
||||
t_getpeername() |
9-8 |
uart_init() 10-26 |
writefds |
9-16 |
|||||
t_getsockname() |
9-9 |
uart_irq() 10-26 |
|
|
|
||||
t_getsockopt() |
9-10 |
|
uart_ready() 10-27 |
Y |
|
|
|||
t_listen() 9-13 |
|
|
uart_reset() 10-28 |
|
|
||||
t_recvfrom() |
|
9-14 |
|
uart_setup() 10-29 |
|
|
|
||
t_recv() 9-14 |
|
|
|
uart_stats() 10-30 |
YIELD() |
6-13, 6-25 |
|||
t_select() 9-16 |
|
|
uart.c ring buffer management functions |
|
|
|
|||
fd_set structures |
9-17 |
ring_add() 10-19 |
Directories |
||||||
t_sendto() 9-18 |
|
|
ring_avail() 10-19 |
||||||
t_send() 9-18 |
|
|
|
ring_new() 10-20 |
|
|
|
||
flags 9-18 |
|
|
|
ring_remove() 10-21 |
\armthumb 1-16, 2-5, 2-10, 4-2, 5-2, |
||||
t_send() flags |
|
|
|
ring_space() 10-21 |
|
10-3 |
|||
MSG_DONTROUTE 9-19 |
uart.h 10-4 |
\chargen |
1-16 |
||||||
MSG_OOB 9-18 |
UDP functions 8-2 |
\crypt |
1-17 |
||||||
t_setsockopt() |
9-20 |
|
udp_alloc() 8-2 |
\docs |
1-16 |
||||
t_shutdown() |
9-22 |
|
udp_close() 8-3 |
\inet |
1-16, 2-3, 10-5, 11-3 |
Index-6 |
Copyright © 1998 and 1999 ARM Limited. All rights reserved. |
ARM DUI 0079B |

Index
\loopback 1-16 \maildemo 1-16 \menus 1-16 \misclib 11-1 \modem 1-17, 6-1
\pid7tdm 1-16, 2-10, 4-2, 5-2, 6-1, 10-3, 12-4
\ppp 1-17 \tcp 1-16, 2-3
Numerics
82595.c 10-3, 10-14, 10-33 i595_badpacketrx() 10-33 i595_bringup() 10-33 i595_packetgone() 10-33 i595_promiscmode() 10-33 i595_rxpackets() 10-33 i595_takedown() 10-33 i595_txchain() 10-33 i595_txstart() 10-33
82595.h 10-3 _ALLOC() functions 5-3 _FREE() functions 5-6 _NPPP
defining 3-3
Symbols
___weak 10-10
ARM DUI 0079B |
Copyright © 1998 and 1999 ARM Limited. All rights reserved. |
Index-7 |