annotate packages/net/ppp/current/doc/ppp.sgml @ 1586:e0d88dc6a92f

Added PPP network support.
author nickg
date Wed, 14 Apr 2004 15:08:56 +0000
parents
children a9676dbe50b5
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1586
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1 <!-- {{{ Banner -->
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
2
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
3 <!-- =============================================================== -->
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
4 <!-- -->
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
5 <!-- ppp.sgml -->
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
6 <!-- -->
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
7 <!-- eCos PPP code -->
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
8 <!-- -->
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
9 <!-- =============================================================== -->
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
10 <!-- ####COPYRIGHTBEGIN#### -->
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
11 <!-- -->
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
12 <!-- =============================================================== -->
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
13 <!-- Copyright (C) 2003, 2004 eCosCentric Ltd. -->
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
14 <!-- This material may be distributed only subject to the terms -->
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
15 <!-- and conditions set forth in the Open Publication License, v1.0 -->
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
16 <!-- or later (the latest version is presently available at -->
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
17 <!-- http://www.opencontent.org/openpub/) -->
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
18 <!-- =============================================================== -->
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
19 <!-- -->
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
20 <!-- ####COPYRIGHTEND#### -->
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
21 <!-- =============================================================== -->
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
22 <!-- #####DESCRIPTIONBEGIN#### -->
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
23 <!-- -->
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
24 <!-- ####DESCRIPTIONEND#### -->
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
25 <!-- =============================================================== -->
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
26
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
27 <!-- }}} -->
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
28
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
29
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
30 <part id="ppp">
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
31 <title><productname>eCos</productname> PPP User Guide</title>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
32
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
33 <partintro>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
34 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
35 This package provides support for PPP (Point-to-Point Protocol) in the
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
36 <productname>eCos</productname> FreeBSD TCP/IP networking stack.
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
37 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
38 </partintro>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
39
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
40 <!-- {{{ Features -->
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
41
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
42 <chapter id="ppp-features">
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
43 <title>Features</title>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
44 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
45 The <productname>eCos</productname> PPP implementation provides the
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
46 following features:
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
47 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
48 <itemizedlist>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
49
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
50 <listitem>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
51 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
52 PPP line protocol including VJ compression.
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
53 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
54 </listitem>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
55
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
56 <listitem>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
57 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
58 LCP, IPCP and CCP control protocols.
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
59 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
60 </listitem>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
61
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
62 <listitem>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
63 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
64 PAP and CHAP authentication.
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
65 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
66 </listitem>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
67
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
68 <listitem>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
69 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
70 CHAT subset connection scripting.
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
71 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
72 </listitem>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
73
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
74 <listitem>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
75 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
76 Modem control line support.
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
77 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
78 </listitem>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
79
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
80 </itemizedlist>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
81 </chapter>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
82
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
83 <!-- }}} -->
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
84 <!-- {{{ Using -->
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
85
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
86 <chapter id="ppp-using">
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
87 <title>Using PPP</title>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
88 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
89 Before going into detail, let's look at a simple example of how the
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
90 <productname>eCos</productname> PPP package is used. Consider the
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
91 following example:
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
92 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
93
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
94 <programlisting width=72>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
95 static void ppp_up(void)
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
96 {
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
97 cyg_ppp_options_t options;
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
98 cyg_ppp_handle_t ppp_handle;
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
99
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
100 // Bring up the TCP/IP network
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
101 init_all_network_interfaces();
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
102
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
103 // Initialize the options
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
104 cyg_ppp_options_init( &amp;options );
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
105
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
106 // Start up PPP
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
107 ppp_handle = cyg_ppp_up( "/dev/ser0", &amp;options );
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
108
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
109 // Wait for it to get running
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
110 if( cyg_ppp_wait_up( ppp_handle ) == 0 )
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
111 {
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
112 // Make use of PPP
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
113 use_ppp();
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
114
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
115 // Bring PPP link down
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
116 cyg_ppp_down( ppp_handle );
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
117
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
118 // Wait for connection to go down.
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
119 cyg_ppp_wait_down( ppp_handle );
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
120 }
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
121 }
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
122 </programlisting>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
123
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
124 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
125 This is a simple example of how to bring up a simple PPP connection to
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
126 another computer over a directly connected serial line. The other end
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
127 is assumed to already be running PPP on the line and waiting for a
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
128 connection.
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
129 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
130
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
131 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
132 The first thing this code does is to call
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
133 <function>init_all_network_interfaces()</function> to bring up the
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
134 TCP/IP stack and initialize any other network interfaces. It then
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
135 calls <function>cyg_ppp_options_init()</function> to initialize the
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
136 PPP options structure to the defaults. As it happens, the default
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
137 options are exactly what we want for this example, so we don't need to
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
138 make any further changes. We go straight on to bring the PPP interface
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
139 up by calling <function>cyg_ppp_up()</function>. The arguments to this
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
140 function give the name of the serial device to use, in this case
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
141 <literal>"/dev/ser0"</literal>, and a pointer to the options.
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
142 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
143
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
144 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
145 When <function>cyg_ppp_up()</function> returns, it passes back a
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
146 handle to the PPP connection which is to be used in other calls. The
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
147 PPP link will not necessarily have been fully initialized at this
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
148 time. There is a certain amount of negotiation that goes on between
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
149 the ends of a PPP link before it is ready to pass packets. An
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
150 application can wait until the link is ready by calling
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
151 <function>cyg_ppp_wait_up()</function>, which returns
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
152 zero if the link is up and running, or
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
153 <literal>-1</literal> if it has gone down or failed to come up.
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
154 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
155
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
156 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
157 After a successful return from <function>cyg_ppp_wait_up()</function>,
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
158 the application may make use of the PPP connection. This is
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
159 represented here by the call to <function>use_ppp()</function> but
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
160 it may, of course, be accessed by any thread. While the connection is
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
161 up the application may use the standard socket calls to make or accept
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
162 network connections and transfer data in the normal way.
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
163 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
164
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
165 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
166 Once the application has finished with the PPP link, it can bring it
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
167 down by calling <function>cyg_ppp_down()</function>. As with bringing
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
168 the connection up, this call is asynchronous, it simply informs the
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
169 PPP subsystem to start bringing the link down. The application can
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
170 wait for the link to go down fully by calling
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
171 <function>cyg_ppp_wait_down()</function>.
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
172 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
173
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
174 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
175 That example showed how to use PPP to connect to a local peer. PPP is
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
176 more often used to connect via a modem to a remote server, such as an
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
177 ISP. The following example shows how this works:
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
178 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
179
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
180 <programlisting width=72>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
181
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
182 static char *isp_script[] =
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
183 {
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
184 "ABORT" , "BUSY" ,
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
185 "ABORT" , "NO CARRIER" ,
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
186 "ABORT" , "ERROR" ,
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
187 "" , "ATZ" ,
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
188 "OK" , "AT S7=45 S0=0 L1 V1 X4 &amp;C1 E1 Q0" ,
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
189 "OK" , "ATD" CYGPKG_PPP_DEFAULT_DIALUP_NUMBER ,
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
190 "ogin:--ogin:" , CYGPKG_PPP_AUTH_DEFAULT_USER ,
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
191 "assword:" , CYGPKG_PPP_AUTH_DEFAULT_PASSWD ,
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
192 "otocol:" , "ppp" ,
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
193 "HELLO" , "\\c" ,
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
194 0
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
195 };
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
196
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
197 static void ppp_up(void)
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
198 {
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
199 cyg_ppp_options_t options;
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
200 cyg_ppp_handle_t ppp_handle;
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
201
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
202 // Bring up the TCP/IP network
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
203 init_all_network_interfaces();
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
204
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
205 // Initialize the options
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
206 cyg_ppp_options_init( &amp;options );
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
207
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
208 options.script = isp_script;
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
209 options.modem = 1;
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
210
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
211 // Start up PPP
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
212 ppp_handle = cyg_ppp_up( "/dev/ser0", &amp;options );
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
213
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
214 // Wait for it to get running
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
215 if( cyg_ppp_wait_up( ppp_handle ) == 0 )
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
216 {
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
217 // Make use of PPP
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
218 use_ppp();
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
219
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
220 // Bring PPP link down
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
221 cyg_ppp_down( ppp_handle );
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
222
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
223 // Wait for connection to go down.
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
224 cyg_ppp_wait_down( ppp_handle );
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
225 }
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
226 }
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
227 </programlisting>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
228
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
229 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
230 The majority of this code is exactly the same as the previous
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
231 example. The main difference is in the setting of a couple of options
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
232 before calling <function>cyg_ppp_up()</function>. The
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
233 <structfield>script</structfield> option is set to point to a CHAT
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
234 script to manage the setup of the connection. The
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
235 <structfield>modem</structfield> option is set to cause the PPP system
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
236 to make use of the modem control lines.
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
237 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
238
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
239 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
240 During the PPP bring-up a call will be made to
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
241 <function>cyg_ppp_chat()</function> to run the CHAT script (see <xref
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
242 linkend="ppp-chat">). In the example this script sets up various modem
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
243 options and then dials a number supplied as part of the PPP package
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
244 configuration (see <xref linkend="ppp-config">). When the connection
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
245 has been established, the script log on to the server, using a name
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
246 and password also supplied by the configuration, and then starts PPP
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
247 on the remote end. If this script succeeds the PPP connection will be
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
248 brought up and will then function as expected.
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
249 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
250
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
251 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
252 The <structfield>modem</structfield> option causes the PPP system to
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
253 make use of the modem control lines. In particular it waits for
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
254 <literal>Carrier Detect</literal> to be asserted, and will bring the
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
255 link down if it is lost. See <xref linkend="ppp-options-init">
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
256 for more details.
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
257 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
258
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
259 </chapter>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
260
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
261 <!-- }}} -->
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
262 <!-- {{{ Interface -->
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
263
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
264 <chapter id="ppp-interface">
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
265 <title>PPP Interface</title>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
266
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
267 <!-- {{{ cyg_ppp_options_init -->
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
268
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
269 <refentry id="ppp-options-init">
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
270
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
271 <refmeta>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
272 <refentrytitle>cyg_ppp_options_init()</refentrytitle>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
273 </refmeta>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
274
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
275 <refnamediv>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
276 <refname>cyg_ppp_options_init</refname>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
277 <refpurpose>Initialize PPP link options</refpurpose>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
278 </refnamediv>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
279
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
280 <refsynopsisdiv>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
281 <funcsynopsis>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
282 <funcsynopsisinfo>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
283 #include &lt;cyg/ppp/ppp.h&gt;
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
284 </funcsynopsisinfo>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
285 <funcprototype>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
286 <funcdef>cyg_int32 <function>cyg_ppp_options_init</function></funcdef>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
287 <paramdef>cyg_ppp_options_t <parameter>*options</parameter></paramdef>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
288 </funcprototype>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
289 </funcsynopsis>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
290 </refsynopsisdiv>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
291
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
292 <refsect1><title id="ppp-options-init-description">Description</title>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
293 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
294 This function initializes the PPP options, pointed to by the
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
295 <parameter>options</parameter> parameter, to the default state. Once
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
296 the defaults have been initialized, application code may adjust them
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
297 by assigning new values to the the fields of the
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
298 <structname>cyg_ppp_options_t</structname> structure.
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
299 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
300
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
301 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
302 This function returns zero if the options were initialized
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
303 successfully. It returns -1 if the <parameter>options</parameter>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
304 argument is NULL, or the options could not be initialized.
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
305 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
306
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
307 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
308 The option fields, their functions and default values are as follows:
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
309 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
310
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
311 <variablelist>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
312
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
313 <varlistentry>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
314 <term>debug</term>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
315 <listitem>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
316 <para> If set to 1 this enables the reporting of debug messages
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
317 from the PPP system. These will be generated using
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
318 <function>diag_printf()</function> and will appear on the standard
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
319 debug channel. Note that <function>diag_printf()</function>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
320 disables interrupts during output: this may cause the PPP link
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
321 device to overrun and miss characters. It is quite possible for
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
322 this option to cause errors and even make the PPP link fail
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
323 completely. Consequently, this option should be used with care.
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
324 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
325 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
326 Default value: 0
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
327 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
328 </listitem>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
329 </varlistentry>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
330
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
331 <varlistentry>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
332 <term>kdebugflag</term>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
333 <listitem>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
334 <para> This five bit field enables low level debugging messages from
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
335 the PPP device layer in the TCP/IP stack. As with the
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
336 <structfield>debug</structfield> option, this may result in missed
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
337 characters and cause errors. The bits of the field have the
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
338 following meanings:
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
339 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
340 <informaltable frame="all">
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
341 <tgroup cols="3" colsep="1" rowsep="1" align="left">
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
342 <thead>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
343 <row>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
344 <entry>Bit</entry>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
345 <entry>BSD Name</entry>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
346 <entry>Description</entry>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
347 </row>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
348 </thead>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
349 <tbody>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
350 <row>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
351 <entry>0x01</entry>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
352 <entry>SC_DEBUG</entry>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
353 <entry>Enable debug messages</entry>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
354 </row>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
355 <row>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
356 <entry>0x02</entry>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
357 <entry>SC_LOG_INPKT</entry>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
358 <entry>Log contents of good packets received</entry>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
359 </row>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
360 <row>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
361 <entry>0x04</entry>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
362 <entry>SC_LOG_OUTPKT</entry>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
363 <entry>Log contents of packets sent</entry>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
364 </row>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
365 <row>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
366 <entry>0x08</entry>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
367 <entry>SC_LOG_RAWIN</entry>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
368 <entry>Log all characters received</entry>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
369 </row>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
370 <row>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
371 <entry>0x10</entry>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
372 <entry>SC_LOG_FLUSH</entry>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
373 <entry>Log all characters flushed</entry>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
374 </row>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
375 </tbody>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
376 </tgroup>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
377 </informaltable>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
378 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
379 Default value: 0
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
380 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
381 </listitem>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
382 </varlistentry>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
383
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
384 <varlistentry>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
385 <term>default_route</term>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
386 <listitem>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
387 <para> If set to 1 this option causes the PPP subsystem to install
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
388 a default route in the TCP/IP stack's routing tables using the
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
389 peer as the gateway. This entry will be removed when the PPP link
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
390 is broken. If there is already an existing working network
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
391 connection, such as an ethernet device, then there may already be
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
392 a default route established. If this is the case, then this option
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
393 will have no effect.
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
394 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
395 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
396 Default value: 1
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
397 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
398 </listitem>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
399 </varlistentry>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
400
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
401 <varlistentry>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
402 <term>modem</term>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
403 <listitem>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
404 <para> If this option is set to 1, then the modem lines will be
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
405 used during the connection. Specifically, the PPP subsystem will
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
406 wait until the <literal>carrier detect</literal> signal is
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
407 asserted before bringing up the PPP link, and will take the PPP
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
408 link down if this signal is de-asserted.
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
409 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
410 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
411 Default value: 0
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
412 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
413 </listitem>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
414 </varlistentry>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
415
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
416 <varlistentry>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
417 <term>flowctl</term>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
418 <listitem>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
419 <para> This option is used to specify the mechanism used to
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
420 control data flow across the serial line. It can take one of the
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
421 following values:
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
422 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
423 <variablelist>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
424 <varlistentry>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
425 <term><literal>CYG_PPP_FLOWCTL_DEFAULT</literal></term>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
426 <listitem>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
427 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
428 The flow control mechanism is not changed and is left at
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
429 whatever value was set before bringing PPP up. This allows
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
430 a non-standard flow control mechanism to be used, or for it to
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
431 be chosen and set by some other means.
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
432 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
433 </listitem>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
434 </varlistentry>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
435 <varlistentry>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
436 <term><literal>CYG_PPP_FLOWCTL_NONE</literal></term>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
437 <listitem>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
438 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
439 Flow control is turned off. It is not recommended that this
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
440 option be used unless the baud rate is set low or the two
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
441 communicating machines are particularly fast.
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
442 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
443 </listitem>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
444 </varlistentry>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
445 <varlistentry>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
446 <term><literal>CYG_PPP_FLOWCTL_HARDWARE</literal></term>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
447 <listitem>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
448 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
449 Use hardware flow control via the RTS/CTS lines. This is the
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
450 most effective flow control mechanism and should always be
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
451 used if available. Availability of this mechanism depends on
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
452 whether the serial device hardware has the ability to control
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
453 these lines, whether they have been connected to the socket
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
454 pins and whether the device driver has the necessary support.
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
455 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
456 </listitem>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
457 </varlistentry>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
458 <varlistentry>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
459 <term><literal>CYG_PPP_FLOWCTL_SOFTWARE</literal></term>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
460 <listitem>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
461 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
462 Use software flow control by embedding XON/XOFF characters in
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
463 the data stream. This is somewhat less effective that hardware
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
464 flow control since it is subject to the propagation time of
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
465 the serial cable and the latency of the communicating
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
466 devices. Since it does not rely on any hardware support, this
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
467 flow control mechanism is always available.
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
468 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
469 </listitem>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
470 </varlistentry>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
471 </variablelist>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
472 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
473 Default value: CYG_PPP_FLOWCTL_HARDWARE
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
474 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
475 </listitem>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
476 </varlistentry>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
477
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
478 <varlistentry>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
479 <term>refuse_pap</term>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
480 <listitem>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
481 <para> If this option is set to 1, then the PPP subsystem will not
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
482 agree to authenticate itself to the peer with PAP. When dialling
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
483 in to a remote server it is normal to authenticate the
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
484 client. There are three ways this can be done, using a
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
485 straightforward login mechanism via the CHAT script, with the
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
486 Password Authentication Protocol (PAP), or with the Challenge
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
487 Handshake Authentication Protocol (CHAP). For PAP to work the
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
488 <structfield>user</structfield> and
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
489 <structfield>passwd</structfield> options must be set to the
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
490 expected values. If they are not, then this option should be set
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
491 to force CHAP authentication.
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
492 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
493 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
494 Default value: 0
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
495 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
496 </listitem>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
497 </varlistentry>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
498
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
499 <varlistentry>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
500 <term>refuse_chap</term>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
501 <listitem>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
502 <para> If this option is set to 1, then the PPP subsystem will not
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
503 agree to authenticate itself to the peer with CHAP. CHAP
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
504 authentication will only work if the
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
505 <structfield>passwd</structfield> option has been set to the
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
506 required CHAP secret for the destination server. Otherwise this
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
507 option should be disabled.
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
508 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
509 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
510 If both <structfield>refuse_pap</structfield> and
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
511 <structfield>refuse_chap</structfield> are set, then either no
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
512 authentication will be carried out, or it is the responsibility of
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
513 the <command>chat</command> script to do it. If the peer does not
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
514 require any authentication, then the setting of these options is
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
515 irrelevant.
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
516 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
517 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
518 Default value: 0
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
519 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
520 </listitem>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
521 </varlistentry>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
522
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
523 <varlistentry>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
524 <term>baud</term>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
525 <listitem>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
526 <para> This option is set to the baud rate at which the serial
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
527 connection should be run. The default value is the rate at which
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
528 modems conventionally operate. This field is an instance of the
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
529 <type>cyg_serial_baud_rate_t</type> enum defined in the
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
530 <literal>serialio.h</literal> header and may only take one of the
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
531 baud rate constants defined in there.
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
532 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
533 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
534 Default value: <literal>CYGNUM_SERIAL_BAUD_115200</literal>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
535 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
536 </listitem>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
537 </varlistentry>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
538
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
539 <varlistentry>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
540 <term>idle_time_limit</term>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
541 <listitem>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
542 <para> This is the number of seconds that the PPP connection may
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
543 be idle before it is shut down automatically.
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
544 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
545 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
546 Default value: 60
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
547 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
548 </listitem>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
549 </varlistentry>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
550
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
551 <varlistentry>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
552 <term>maxconnect</term>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
553 <listitem>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
554 <para> This causes the connection to terminate when it has been up
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
555 for this number of seconds. The default value of zero means that
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
556 the connection will stay up indefinitely, until either end
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
557 explicitly brings it down, or the link is lost.
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
558 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
559 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
560 Default value: 0
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
561 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
562 </listitem>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
563 </varlistentry>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
564
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
565 <varlistentry>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
566 <term>our_address</term>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
567 <listitem>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
568 <para> This is the IP address, in network byte order, to be
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
569 attached to the local end of the PPP connection. The default value
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
570 of <literal>INADDR_ANY</literal> causes the local address to be
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
571 obtained from the peer.
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
572 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
573 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
574 Default value: <literal>INADDR_ANY</literal>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
575 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
576 </listitem>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
577 </varlistentry>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
578
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
579 <varlistentry>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
580 <term>his_address</term>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
581 <listitem>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
582 <para> This is the IP address, in network byte order, to be
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
583 attached to the remote end of the PPP connection. The default
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
584 value of <literal>INADDR_ANY</literal> causes the remote address
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
585 to be obtained from the peer.
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
586 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
587 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
588 Default value: <literal>INADDR_ANY</literal>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
589 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
590 </listitem>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
591 </varlistentry>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
592
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
593 <varlistentry>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
594 <term>script</term>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
595 <listitem>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
596 <para> This is a pointer to a CHAT script suitable for passing to
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
597 <function>cyg_ppp_chat()</function>. See <xref linkend="ppp-chat">
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
598 for details of the format and contents of this script.
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
599 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
600 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
601 Default value: <literal>NULL</literal>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
602 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
603 </listitem>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
604 </varlistentry>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
605
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
606 <varlistentry>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
607 <term>user</term>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
608 <listitem>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
609 <para> This array contains the user name to be used for PAP
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
610 authentication. This field is not used for CHAP authentication. By
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
611 default the value of this option is set from the
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
612 <literal>CYGPKG_PPP_AUTH_DEFAULT_USER</literal> configuration
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
613 option.
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
614 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
615 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
616 Default value: <literal>CYGPKG_PPP_AUTH_DEFAULT_USER</literal>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
617 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
618 </listitem>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
619 </varlistentry>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
620
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
621 <varlistentry>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
622 <term>passwd</term>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
623 <listitem>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
624 <para> This array contains the password to be used for PAP
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
625 authentication, or the secret to be used during CHAP
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
626 authentication. By default the value of this option is set from
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
627 the <literal>CYGPKG_PPP_AUTH_DEFAULT_PASSWD</literal>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
628 configuration option.
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
629 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
630 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
631 Default value: <literal>CYGPKG_PPP_AUTH_DEFAULT_PASSWD</literal>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
632 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
633 </listitem>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
634 </varlistentry>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
635
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
636 </variablelist>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
637
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
638 </refsect1>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
639
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
640 </refentry>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
641
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
642 <!-- }}} -->
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
643 <!-- {{{ cyg_ppp_up -->
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
644
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
645 <refentry id="ppp-up">
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
646
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
647 <refmeta>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
648 <refentrytitle>cyg_ppp_up()</refentrytitle>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
649 </refmeta>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
650
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
651 <refnamediv>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
652 <refname>cyg_ppp_up</refname>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
653 <refpurpose>Bring PPP connection up</refpurpose>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
654 </refnamediv>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
655
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
656 <refsynopsisdiv>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
657 <funcsynopsis>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
658 <funcsynopsisinfo>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
659 #include &lt;cyg/ppp/ppp.h&gt;
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
660 </funcsynopsisinfo>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
661 <funcprototype>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
662 <funcdef>cyg_ppp_handle_t <function>cyg_ppp_up</function></funcdef>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
663 <paramdef>char <parameter>*devnam</parameter></paramdef>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
664 <paramdef>const cyg_ppp_options_t <parameter>*options</parameter></paramdef>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
665 </funcprototype>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
666 </funcsynopsis>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
667 </refsynopsisdiv>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
668
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
669 <refsect1><title id="ppp-up-description">Description</title>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
670 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
671 This function starts up a PPP connection. The
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
672 <parameter>devnam</parameter> argument is the name of the device to be
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
673 used for the connection, typically <literal>"/dev/ser0"</literal> or
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
674 <literal>"/dev/ser1"</literal>. The <structfield>options</structfield>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
675 argument should point to an initialized
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
676 <structname>cyg_ppp_options_t</structname> object.
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
677 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
678
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
679 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
680 The return value will either be zero, indicating a failure, or a
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
681 <type>cyg_ppp_handle_t</type> object that may be used as an argument
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
682 to other PPP functions.
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
683 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
684
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
685 <note>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
686 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
687 Although the PPP API is designed to permit several simultaneous
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
688 connections to co-exist, at present only one PPP connection is
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
689 actually implemented. Any attempt to create a second connection while
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
690 there is already one open will fail.
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
691 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
692 </note>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
693
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
694 </refsect1>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
695
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
696 </refentry>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
697
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
698 <!-- }}} -->
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
699 <!-- {{{ cyg_ppp_down -->
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
700
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
701 <refentry id="ppp-down">
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
702
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
703 <refmeta>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
704 <refentrytitle>cyg_ppp_down()</refentrytitle>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
705 </refmeta>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
706
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
707 <refnamediv>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
708 <refname>cyg_ppp_down</refname>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
709 <refpurpose>Bring PPP connection down</refpurpose>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
710 </refnamediv>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
711
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
712 <refsynopsisdiv>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
713 <funcsynopsis>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
714 <funcsynopsisinfo>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
715 #include &lt;cyg/ppp/ppp.h&gt;
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
716 </funcsynopsisinfo>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
717 <funcprototype>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
718 <funcdef>cyg_int32 <function>cyg_ppp_down</function></funcdef>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
719 <paramdef>cyg_ppp_handle_t <parameter>handle</parameter></paramdef>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
720 </funcprototype>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
721 </funcsynopsis>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
722 </refsynopsisdiv>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
723
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
724 <refsect1><title id="ppp-down-description">Description</title>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
725 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
726 This function brings the PPP connection down. The
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
727 <parameter>handle</parameter> argument is the result of a successful
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
728 call to <function>cyg_ppp_up()</function>. This function only signals
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
729 to the PPP subsystem that the link should be brought down. The link
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
730 will be terminated asynchronously. If the application needs to wait
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
731 for the link to terminate, then it should call
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
732 <function>cyg_ppp_wait_down()</function> after calling
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
733 <function>cyg_ppp_down()</function>.
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
734 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
735
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
736 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
737 The function returns zero if it was able to start the termination of
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
738 the PPP connection successfully. It will return -1 if the connection
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
739 is not running, or if it could not otherwise start the termination.
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
740 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
741
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
742 </refsect1>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
743
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
744 </refentry>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
745
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
746 <!-- }}} -->
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
747 <!-- {{{ cyg_ppp_wait_up -->
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
748
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
749 <refentry id="ppp-wait-up">
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
750
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
751 <refmeta>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
752 <refentrytitle>cyg_ppp_wait_up()</refentrytitle>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
753 </refmeta>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
754
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
755 <refnamediv>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
756 <refname>cyg_ppp_wait_up</refname>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
757 <refpurpose>Wait for PPP connection to come up</refpurpose>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
758 </refnamediv>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
759
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
760 <refsynopsisdiv>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
761 <funcsynopsis>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
762 <funcsynopsisinfo>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
763 #include &lt;cyg/ppp/ppp.h&gt;
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
764 </funcsynopsisinfo>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
765 <funcprototype>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
766 <funcdef>cyg_int32 <function>cyg_ppp_wait_up</function></funcdef>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
767 <paramdef>cyg_ppp_handle_t <parameter>handle</parameter></paramdef>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
768 </funcprototype>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
769 </funcsynopsis>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
770 </refsynopsisdiv>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
771
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
772 <refsect1><title id="ppp-wait-up-description">Description</title>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
773 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
774 This function waits until the PPP connection is running and then
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
775 returns. This is needed because the actual bring up of the connection
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
776 happens mostly after the call to <function>cyg_ppp_up()</function>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
777 returns, and may take some time to complete, especially if dialling a
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
778 remote server.
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
779 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
780
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
781 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
782 The result of this call will be zero when the connection is running,
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
783 or -1 if the connection failed to start for some reason. If the
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
784 connection is already running when this call is made it will return
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
785 immediately with a zero result. If the connection is not in the
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
786 process of coming up, or has failed, or has terminated, then a result
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
787 of -1 will be returned immediately. Thus this function may also be
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
788 used to test that the connection is still running at any point.
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
789 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
790
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
791 </refsect1>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
792
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
793 </refentry>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
794
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
795 <!-- }}} -->
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
796 <!-- {{{ cyg_ppp_wait_down -->
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
797
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
798 <refentry id="ppp-wait-down">
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
799
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
800 <refmeta>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
801 <refentrytitle>cyg_ppp_wait_down()</refentrytitle>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
802 </refmeta>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
803
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
804 <refnamediv>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
805 <refname>cyg_ppp_wait_down</refname>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
806 <refpurpose>Wait for PPP connection to terminate</refpurpose>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
807 </refnamediv>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
808
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
809 <refsynopsisdiv>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
810 <funcsynopsis>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
811 <funcsynopsisinfo>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
812 #include &lt;cyg/ppp/ppp.h&gt;
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
813 </funcsynopsisinfo>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
814 <funcprototype>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
815 <funcdef>void <function>cyg_ppp_wait_down</function></funcdef>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
816 <paramdef>cyg_ppp_handle_t <parameter>handle</parameter></paramdef>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
817 </funcprototype>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
818 </funcsynopsis>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
819 </refsynopsisdiv>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
820
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
821 <refsect1><title id="ppp-wait-down-description">Description</title>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
822 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
823 This function waits for the PPP connection to terminate. The link may
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
824 be terminated with a call to <function>cyg_ppp_down()</function>, by
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
825 the remote end, or by the telephone line being dropped or lost.
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
826 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
827
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
828 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
829 This function has no return value. If the PPP connection is not
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
830 running, or has terminated, it will return. Applications should use
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
831 <function>cyg_ppp_wait_up()</function> to test the link state.
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
832 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
833
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
834 </refsect1>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
835
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
836 </refentry>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
837
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
838 <!-- }}} -->
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
839 <!-- {{{ cyg_ppp_chat -->
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
840
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
841 <refentry id="ppp-chat-fn">
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
842
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
843 <refmeta>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
844 <refentrytitle>cyg_ppp_chat()</refentrytitle>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
845 </refmeta>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
846
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
847 <refnamediv>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
848 <refname>cyg_ppp_chat</refname>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
849 <refpurpose>Execute chat script</refpurpose>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
850 </refnamediv>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
851
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
852 <refsynopsisdiv>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
853 <funcsynopsis>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
854 <funcsynopsisinfo>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
855 #include &lt;cyg/ppp/ppp.h&gt;
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
856 </funcsynopsisinfo>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
857 <funcprototype>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
858 <funcdef>cyg_int32 <function>cyg_ppp_chat</function></funcdef>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
859 <paramdef>const char <parameter>*devname</parameter></paramdef>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
860 <paramdef>const char <parameter>*script[]</parameter></paramdef>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
861 </funcprototype>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
862 </funcsynopsis>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
863 </refsynopsisdiv>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
864
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
865 <refsect1><title id="ppp-chat-description">Description</title>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
866 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
867 This function implements a subset of the automated conversational
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
868 scripting as defined by the <command>chat</command> program. The first
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
869 argument is the name of the serial device to be used, typically
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
870 <literal>"/dev/ser0"</literal> or <literal>"/dev/ser1"</literal>. The
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
871 <parameter>script</parameter> argument is a pointer to a zero
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
872 terminated array of strings that comprise the chat script. See <xref
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
873 linkend="ppp-using"> for an example script, and <xref
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
874 linkend="ppp-chat"> for full detail of the script used.
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
875 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
876
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
877 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
878 Under normal use this function is called from the PPP subsystem if the
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
879 <structname>cyg_ppp_options_t</structname>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
880 <structfield>script</structfield> field is set to a
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
881 non-<literal>NULL</literal> value. This function should only be used
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
882 directly if the application needs to undertake special processing
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
883 between running the chat script, and bringing up the PPP connections.
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
884 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
885
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
886 </refsect1>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
887
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
888 </refentry>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
889
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
890 <!-- }}} -->
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
891
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
892
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
893 <!--IOCTLs???? -->
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
894
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
895 </chapter>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
896
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
897 <!-- }}} -->
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
898 <!-- {{{ Install and Config -->
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
899
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
900 <chapter id="ppp-config">
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
901 <title>Installing and Configuring PPP</title>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
902
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
903 <sect1 id="ppp-config-include">
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
904 <title>Including PPP in a Configuration</title>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
905
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
906 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
907 PPP is contained entirely within a single
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
908 <productname>eCos</productname> package. So to include PPP in a
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
909 configuration all you need to do is add that package.
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
910 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
911
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
912 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
913 In the GUI configuration tool use the
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
914 <command>Build->Packages</command> menu item, find the "PPP Support"
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
915 package in the left-hand pane and use the <command>Add</command> button
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
916 to add it to the list of packages in use in the right-hand pane.
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
917 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
918
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
919 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
920 In the command-line tool <command>ecosconfig</command>, you can use the
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
921 following command during the configuration phase to add the PPP package:
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
922 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
923
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
924 <programlisting width=72>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
925
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
926 $ ecosconfig add ppp
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
927
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
928 </programlisting>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
929
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
930 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
931 In addition to the PPP package you will also need to have the
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
932 <literal>"Network"</literal> package and the <literal>"Serial Device
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
933 Drivers"</literal> package in the configuration. The dependencies and
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
934 requirements of the networking package are such that it is strongly
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
935 recommended that you start with the <literal>net</literal> template.
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
936 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
937
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
938 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
939 See the <productname>eCos</productname> User Guide for full details on
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
940 how to configure and build <productname>eCos</productname>.
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
941 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
942
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
943 </sect1>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
944
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
945
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
946 <sect1 id="ppp-config-config">
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
947 <title>Configuring PPP</title>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
948 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
949 The PPP package contains a number of configuration options that may be
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
950 changed to affect its behaviour.
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
951
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
952 <variablelist>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
953
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
954 <varlistentry>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
955 <term>CYGNUM_PPP_PPPD_THREAD_PRIORITY</term>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
956 <listitem>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
957 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
958 The PPP system contains two threads, One is used for receiving
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
959 data from the link and processing control packets. The other is
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
960 used to transmit data asynchronously to the link when it cannot be
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
961 completed synchronously. The receive thread runs at the priority
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
962 given here, and the transmit thread runs at the next lower
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
963 priority. The exact priority needed here depends on the
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
964 importance of the PPP subsystem relative to the rest of the
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
965 system. The default is to put it in the middle of the priority
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
966 range to provide reasonable response without impacting genuine
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
967 high priority threads.
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
968 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
969 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
970 Default value: <literal>CYGNUM_KERNEL_SCHED_PRIORITIES/2</literal>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
971 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
972 </listitem>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
973 </varlistentry>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
974
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
975 <varlistentry>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
976 <term>CYGPKG_PPP_DEBUG_WARN_ONLY</term>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
977 <listitem>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
978 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
979 The runtime <varname>debug</varname> option enables logging of
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
980 high level debug messages. Too many of these can interfere with
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
981 the PPP device and may result in missed messages. This is because
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
982 these messages are emitted via the diag_printf() mechanism, which
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
983 disables interrupts while it prints. By default, therefore, we
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
984 only report errors and warnings, and not all events. Setting this
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
985 option to zero will enable the logging of all events.
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
986 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
987 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
988 Default value: <literal>1</literal>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
989 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
990 </listitem>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
991 </varlistentry>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
992
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
993 <varlistentry>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
994 <term>CYGPKG_PPP_AUTH_DEFAULT_USER</term>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
995 <listitem>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
996 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
997 This option gives the default value for the user name used to
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
998 initialize the <structfield>user</structfield> field in the PPP
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
999 options.
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1000 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1001 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1002 Default value: <literal>"eCos"</literal>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1003 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1004 </listitem>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1005 </varlistentry>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1006
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1007 <varlistentry>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1008 <term>CYGPKG_PPP_AUTH_DEFAULT_PASSWD</term>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1009 <listitem>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1010 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1011 This option gives the default value for the password used to
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1012 initialize the <structfield>passwd</structfield> field in the PPP
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1013 options.
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1014 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1015 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1016 Default value: <literal>"secret"</literal>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1017 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1018 </listitem>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1019 </varlistentry>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1020
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1021 <varlistentry>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1022 <term>CYGPKG_PPP_DEFAULT_DIALUP_NUMBER</term>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1023 <listitem>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1024 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1025 This option provides a default dialup number for use in
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1026 <command>chat</command> scripts. This value is not used anywhere
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1027 in the PPP package, but is provided to complete the information
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1028 needed, alongside the user name and password, for accessing a
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1029 typical dialup server.
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1030 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1031 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1032 Default value: <literal>"5551234"</literal>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1033 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1034 </listitem>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1035 </varlistentry>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1036
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1037 <varlistentry>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1038 <term>CYGPKG_PPP_PAP</term>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1039 <listitem>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1040 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1041 This component enables the inclusion of PAP authentication
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1042 support.
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1043 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1044 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1045 Default value: 1
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1046 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1047 </listitem>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1048 </varlistentry>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1049
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1050 <varlistentry>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1051 <term>CYGPKG_PPP_CHAP</term>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1052 <listitem>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1053 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1054 This component enables the inclusion of CHAT authentication
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1055 support.
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1056 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1057 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1058 Default value: 1
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1059 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1060 </listitem>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1061 </varlistentry>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1062
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1063 <varlistentry>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1064 <term>CYGPKG_PPP_COMPRESSION</term>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1065 <listitem>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1066 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1067 This component provides control over PPP compression
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1068 features. WARNING: at present there are problems with this option,
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1069 and and in any case the compression code needs to allocate large
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1070 amounts of memory. Hence this option is currently disabled and
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1071 should remain so.
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1072 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1073 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1074 Default value: 0
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1075 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1076 </listitem>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1077 </varlistentry>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1078
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1079 <varlistentry>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1080 <term>PPP_BSDCOMP</term>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1081 <listitem>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1082 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1083 This option enables inclusion of BSD compression into the PPP
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1084 protocol.
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1085 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1086 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1087 Default value: 0
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1088 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1089 </listitem>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1090 </varlistentry>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1091
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1092 <varlistentry>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1093 <term>PPP_DEFLATE</term>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1094 <listitem>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1095 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1096 This option enables inclusion of ZLIB compression into the PPP
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1097 protocol.
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1098 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1099 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1100 Default value: 0
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1101 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1102 </listitem>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1103 </varlistentry>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1104
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1105 <varlistentry>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1106 <term>CYGPKG_PPP_CHAT</term>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1107 <listitem>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1108 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1109 This component enables the inclusion of a simple scripting system
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1110 to bring up PPP connections. It implements a subset of the
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1111 <command>chat</command> scripting language.
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1112 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1113 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1114 Default value: 1
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1115 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1116 </listitem>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1117 </varlistentry>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1118
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1119 <varlistentry>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1120 <term>CYGNUM_PPP_CHAT_ABORTS_MAX</term>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1121 <listitem>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1122 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1123 This option defines the maximum number of <literal>ABORT</literal>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1124 strings that the CHAT system will store.
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1125 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1126 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1127 Default value: 10
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1128 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1129 </listitem>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1130 </varlistentry>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1131
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1132 <varlistentry>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1133 <term>CYGNUM_PPP_CHAT_ABORTS_SIZE</term>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1134 <listitem>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1135 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1136 This option defines the maximum size of each
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1137 <literal>ABORT</literal> strings that the <command>chat</command>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1138 system will store.
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1139 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1140 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1141 Default value: 20
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1142 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1143 </listitem>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1144 </varlistentry>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1145
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1146 <varlistentry>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1147 <term>CYGNUM_PPP_CHAT_STRING_LENGTH</term>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1148 <listitem>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1149 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1150 This option defines the maximum size of any expect or reply
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1151 strings that the <command>chat</command> system will be given.
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1152 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1153 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1154 Default value: 256
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1155 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1156 </listitem>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1157 </varlistentry>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1158
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1159 <varlistentry>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1160 <term>CYGPKG_PPP_TEST_DEVICE</term>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1161 <listitem>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1162 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1163 This option defines the serial device to be used for PPP test
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1164 programs.
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1165 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1166 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1167 Default value: <literal>"/dev/ser0"</literal>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1168 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1169 </listitem>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1170 </varlistentry>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1171
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1172 <varlistentry>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1173 <term>CYGPKG_PPP_TESTS_AUTOMATE</term>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1174 <listitem>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1175 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1176 This option enables automated testing features in certain test
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1177 programs. These programs will interact with a test server at the
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1178 remote end of the serial link to run a variety of tests in
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1179 different conditions. Without this option most tests default to
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1180 running a single test instance and are suitable for being run by
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1181 hand for debugging purposes.
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1182 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1183 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1184 Default value: 0
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1185 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1186 </listitem>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1187 </varlistentry>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1188
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1189 <varlistentry>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1190 <term>CYGDAT_PPP_TEST_BAUD_RATES</term>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1191 <listitem>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1192 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1193 This option supplies a list of baud rates at which certain tests
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1194 will run if the <literal>CYGPKG_PPP_TESTS_AUTOMATE</literal>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1195 option is set.
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1196 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1197 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1198 Default value: <literal>"CYGNUM_SERIAL_BAUD_19200,CYGNUM_SERIAL_BAUD_38400,CYGNUM_SERIAL_BAUD_57600,CYGNUM_SERIAL_BAUD_115200"</literal>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1199 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1200 </listitem>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1201 </varlistentry>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1202
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1203 </variablelist>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1204
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1205
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1206 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1207
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1208 </sect1>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1209
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1210
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1211 </chapter>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1212
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1213 <!-- }}} -->
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1214 <!-- {{{ Chat -->
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1215
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1216 <chapter id="ppp-chat">
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1217 <title>CHAT Scripts</title>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1218 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1219 The automated conversational scripting supported by the
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1220 <productname>eCos</productname> PPP package is a subset of the
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1221 scripting language provided by the <command>chat</command> command
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1222 found on most UNIX and Linux systems.
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1223 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1224
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1225 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1226 Unlike the <command>chat</command> command, the
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1227 <productname>eCos</productname> <function>cyg_ppp_chat()</function>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1228 function takes as a parameter a zero-terminated array of pointers to
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1229 strings. In most programs this will be defined by means of an
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1230 initializer for a static array, although there is nothing to stop the
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1231 application constructing it at runtime. A simple script would be
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1232 defined like this:
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1233 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1234
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1235 <programlisting width=72>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1236
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1237 static char *chat_script[] =
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1238 {
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1239 "ABORT" , "BUSY" ,
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1240 "ABORT" , "NO CARRIER" ,
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1241 "" , "ATD5551234" ,
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1242 "ogin:--ogin:" , "ppp" ,
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1243 "ssword:" , "hithere" ,
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1244 0
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1245 };
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1246
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1247 </programlisting>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1248
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1249 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1250 The following sections have been abstracted from the public domain
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1251 documentation for the <command>chat</command> command.
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1252 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1253
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1254
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1255 <sect1 id="ppp-chat-script">
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1256 <title>Chat Script</title>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1257 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1258 A script consists of one or more "expect-send" pairs of
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1259 strings, separated by spaces, with an optional "subexpect-
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1260 subsend" string pair, separated by a dash as in the following
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1261 example:
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1262 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1263
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1264 <programlisting width=72>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1265
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1266 "ogin:--ogin:" , "ppp" ,
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1267 "ssword:" , "hello2u2" ,
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1268 0
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1269
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1270 </programlisting>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1271
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1272 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1273 This script fragment indicates that the
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1274 <function>cyg_ppp_chat()</function> function should expect the
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1275 string "ogin:". If it fails to receive a login prompt within
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1276 the time interval allotted, it is to send a carriage return
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1277 to the remote and then expect the string "ogin:" again. If
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1278 the first "ogin:" is received then the carriage return is not
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1279 generated.
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1280 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1281 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1282 Once it received the login prompt the
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1283 <function>cyg_ppp_chat()</function> function will send the
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1284 string "ppp" and then expect the prompt "ssword:". When it
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1285 receives the prompt for the password, it will send the password
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1286 "hello2u2".
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1287 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1288 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1289 A carriage return is normally sent following the reply string.
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1290 It is not expected in the "expect" string unless it is
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1291 specifically requested by using the "\r" character sequence.
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1292 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1293 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1294 The expect sequence should contain only what is needed to
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1295 identify the string. It should not contain variable
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1296 information. It is generally not acceptable to look for time
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1297 strings, network identification strings, or other variable
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1298 pieces of data as an expect string.
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1299 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1300 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1301 To help correct for characters which may be corrupted during
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1302 the initial sequence, look for the string "ogin:" rather than
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1303 "login:". It is possible that the leading "l" character may be
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1304 received in error and you may never find the string even though
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1305 it was sent by the system. For this reason, scripts look for
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1306 "ogin:" rather than "login:" and "ssword:" rather than
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1307 "password:".
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1308 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1309 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1310 A very simple script might look like this:
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1311 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1312 <programlisting width=72>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1313
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1314 "ogin:" , "ppp" ,
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1315 "ssword:" , " hello2u2" ,
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1316 0
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1317
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1318 </programlisting>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1319
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1320 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1321 In other words, expect "....ogin:", send "ppp", expect "...ssword:",
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1322 send "hello2u2".
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1323 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1324 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1325 In actual practice, simple scripts are rare. At the very least,
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1326 you should include sub-expect sequences should the original
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1327 string not be received. For example, consider the following
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1328 script:
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1329 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1330 <programlisting width=72>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1331
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1332 "ogin:--ogin:" , "ppp" ,
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1333 "ssword:" , "hello2u2",
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1334 0
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1335
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1336 </programlisting>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1337 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1338 This would be a better script than the simple one used earlier.
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1339 This would look for the same "login:" prompt, however, if one
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1340 was not received, a single return sequence is sent and then it
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1341 will look for "login:" again. Should line noise obscure the
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1342 first login prompt then sending the empty line will usually
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1343 generate a login prompt again.
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1344 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1345
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1346 </sect1>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1347
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1348 <sect1 id="ppp-chat-abort">
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1349 <title>ABORT Strings</title>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1350
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1351 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1352 Many modems will report the status of the call as a
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1353 string. These strings may be CONNECTED or NO CARRIER or
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1354 BUSY. It is often desirable to terminate the script should the
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1355 modem fail to connect to the remote. The difficulty is that a
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1356 script would not know exactly which modem string it may
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1357 receive. On one attempt, it may receive BUSY while the next
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1358 time it may receive NO CARRIER.
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1359 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1360 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1361 These "abort" strings may be specified in the script using
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1362 the ABORT sequence. It is written in the script as in the
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1363 following example:
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1364 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1365 <programlisting width=72>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1366
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1367 "ABORT" , "BUSY" ,
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1368 "ABORT" , "NO CARRIER" ,
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1369 "" , "ATZ" ,
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1370 "OK" , "ATDT5551212" ,
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1371 "CONNECT" , ...
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1372
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1373 </programlisting>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1374
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1375 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1376 This sequence will expect nothing; and then send the string
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1377 ATZ. The expected response to this is the string OK. When it
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1378 receives OK, it sends the string ATDT5551212 to dial the
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1379 telephone. The expected string is CONNECT. If the string
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1380 CONNECT is received the remainder of the script is
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1381 executed. However, should the modem find a busy telephone, it
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1382 will send the string BUSY. This will cause the string to match
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1383 the abort character sequence. The script will then fail because
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1384 it found a match to the abort string. If it received the string
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1385 NO CARRIER, it will abort for the same reason. Either string
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1386 may be received. Either string will terminate the chat script.
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1387 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1388
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1389 </sect1>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1390
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1391 <sect1 id="ppp-chat-timeout">
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1392 <title>TIMEOUT</title>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1393 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1394 The initial timeout value is 45 seconds.
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1395 To change the timeout value for the next expect string,
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1396 the following example may be used:
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1397 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1398 <programlisting width=72>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1399
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1400 "" , "ATZ" ,
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1401 "OK" , "ATDT5551212" ,
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1402 "CONNECT" , "\\c" ,
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1403 "TIMEOUT" , "10" ,
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1404 "ogin:--ogin:" , "ppp" ,
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1405 "TIMEOUT" , "5" ,
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1406 "assword:" , "hello2u2" ,
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1407 0
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1408
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1409 </programlisting>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1410 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1411 This will change the timeout to 10 seconds when it expects the
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1412 login: prompt. The timeout is then changed to 5 seconds when
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1413 it looks for the password prompt.
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1414 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1415 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1416 The timeout, once changed, remains in effect until it is
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1417 changed again.
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1418 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1419
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1420 </sect1>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1421
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1422 <sect1 id="ppp-chat-eot">
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1423 <title>Sending EOT</title>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1424 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1425 The special reply string of EOT indicates that the chat
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1426 program should send an EOT character to the remote. This
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1427 is normally the End-of-file character sequence. A return
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1428 character is not sent following the EOT. The EOT sequence
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1429 may be embedded into the send string using the sequence
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1430 "\x04" (i.e. a Control-D character).
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1431 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1432 </sect1>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1433
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1434 <sect1 id="ppp-chat-escape">
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1435 <title>Escape Sequences</title>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1436 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1437 Most standard <command>chat</command> escape sequences can be replaced
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1438 with standard C string escapes such as '\r', '\n', '\t'
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1439 etc. Additional escape sequences may be embedded in the expect or
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1440 reply strings by introducing them with <emphasis>two</emphasis>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1441 backslashes.
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1442 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1443
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1444 <variablelist>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1445
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1446 <varlistentry>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1447 <term>\\c</term>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1448 <listitem>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1449 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1450 Suppresses the newline at the end of the reply string. This is the
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1451 only method to send a string without a trailing return character. It
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1452 must be at the end of the send string. For example, the sequence
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1453 "hello\\c" will simply send the characters h, e, l, l, o. (not valid
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1454 in expect strings.)
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1455 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1456 </listitem>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1457 </varlistentry>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1458
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1459 </variablelist>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1460
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1461 </sect1>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1462
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1463 </chapter>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1464
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1465 <!-- }}} -->
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1466 <!-- {{{ Drivers -->
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1467
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1468 <chapter id="ppp-drivers">
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1469 <title>PPP Enabled Device Drivers</title>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1470 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1471 For PPP to function fully over a serial device, its driver must
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1472 implement certain features. At present not all
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1473 <productname>eCos</productname> serial drivers implement these
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1474 features. A driver indicates that it supports a certain feature by
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1475 including an <literal>"implements"</literal> line in its CDL for the
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1476 following interfaces:
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1477 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1478
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1479 <variablelist>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1480
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1481 <varlistentry>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1482 <term><literal>CYGINT_IO_SERIAL_FLOW_CONTROL_HW</literal></term>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1483 <listitem>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1484 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1485 This interface indicates that the driver implements hardware flow
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1486 control using the RTS and CTS lines. When data is being transferred
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1487 over high speed data lines, it is essential that flow control be used
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1488 to prevent buffer overrun.
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1489 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1490 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1491 The PPP subsystem functions best with hardware flow control. If this
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1492 is not available, then it can be configured to use software flow
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1493 control. Since software flow control is implemented by the device
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1494 independent part of the serial device infrastructure, it is available
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1495 for all serial devices. However, this will have an effect on the
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1496 performance and reliability of the PPP link.
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1497 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1498 </listitem>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1499 </varlistentry>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1500
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1501
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1502 <varlistentry>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1503 <term><literal>CYGINT_IO_SERIAL_LINE_STATUS_HW</literal></term>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1504 <listitem>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1505 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1506 This interface indicates that the driver implements a callback
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1507 interface for indicating the status of various RS232 control lines. Of
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1508 particular interest here is the ability to detect changes in the
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1509 Carrier Detect (CD) line. Not all drivers that implement this
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1510 interface can indicate CD status.
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1511 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1512 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1513 This functionality is only needed if it is important that the link be
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1514 dropped immediately a telephone connection fails. Without it, a
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1515 connection will only be dropped after it times out. This may be
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1516 acceptable in many situations.
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1517 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1518 </listitem>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1519 </varlistentry>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1520
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1521 </variablelist>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1522
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1523 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1524 At the time of writing, the serial device drivers for the following
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1525 platforms implement some or all of the required functionality:
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1526 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1527
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1528 <itemizedlist>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1529
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1530 <listitem>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1531 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1532 All drivers that use the generic 16x5x driver implement all functions:
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1533 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1534 <itemizedlist>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1535 <listitem><para>ARM CerfPDA</para></listitem>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1536 <listitem><para>ARM IQ80321</para></listitem>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1537 <listitem><para>ARM PID</para></listitem>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1538 <listitem><para>ARM IOP310</para></listitem>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1539 <listitem><para>i386 PC</para></listitem>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1540 <listitem><para>MIPS Atlas</para></listitem>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1541 <listitem><para>MIPS Ref4955</para></listitem>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1542 <listitem><para>SH3 SE77x9</para></listitem>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1543 </itemizedlist>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1544 </listitem>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1545
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1546 <listitem>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1547 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1548 The following drivers implement flow control but either do not support
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1549 line status callbacks, or do not report CD changes:
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1550 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1551 <itemizedlist>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1552 <listitem><para>SH4 SCIF</para></listitem>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1553 <listitem><para>A&amp;M AdderI</para></listitem>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1554 <listitem><para>A&amp;M AdderII</para></listitem>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1555 </itemizedlist>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1556 </listitem>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1557
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1558 <listitem>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1559 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1560 All other drivers can support software flow control only.
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1561 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1562 </listitem>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1563
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1564 </itemizedlist>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1565
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1566
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1567 </chapter>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1568
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1569 <!-- }}} -->
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1570 <!-- {{{ Tests -->
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1571
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1572 <chapter id="ppp-tests">
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1573 <title>Testing</title>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1574
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1575
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1576 <sect1>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1577 <title>Test Programs</title>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1578
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1579 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1580 There are a number of test programs supplied with the PPP
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1581 subsystem. By default all of these tests use the device configured by
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1582 <literal>CYGPKG_PPP_TEST_DEVICE</literal> as the PPP link device.
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1583 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1584
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1585 <variablelist>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1586
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1587 <varlistentry>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1588 <term><literal>ppp_up</literal></term>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1589 <listitem>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1590 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1591 This test just brings up the PPP link on
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1592 <literal>CYGPKG_PPP_TEST_DEVICE</literal> and waits until the remote end brings
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1593 it back down. No modem lines are used and the program expects a PPP
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1594 connection to be waiting on the other end of the line. Typically the
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1595 remote end will test the link using <command>ping</command> or access
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1596 the HTTP system monitor if it is present.
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1597 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1598 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1599 If <literal>CYGPKG_PPP_TESTS_AUTOMATE</literal> is set, then this test
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1600 attempts to bring PPP up at each of the baud rates specified in
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1601 <literal>CYGDAT_PPP_TEST_BAUD_RATES</literal>. If it is not set then
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1602 it will just bring the connection up at 115200 baud.
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1603 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1604 </listitem>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1605 </varlistentry>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1606
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1607 <varlistentry>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1608 <term><literal>ppp_updown</literal></term>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1609 <listitem>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1610 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1611 This test brings the PPP link up on
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1612 <literal>CYGPKG_PPP_TEST_DEVICE</literal> and attempts to
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1613 <command>ping</command> the remote end of the link. Once the pings
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1614 have finished, the link is then brought down.
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1615 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1616 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1617 If <literal>CYGPKG_PPP_TESTS_AUTOMATE</literal> is set, then this test
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1618 attempts to bring PPP up at each of the baud rates specified in
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1619 <literal>CYGDAT_PPP_TEST_BAUD_RATES</literal>. If it is not set then
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1620 it will just bring the connection up at 115200 baud.
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1621 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1622 </listitem>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1623 </varlistentry>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1624
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1625 <varlistentry>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1626 <term><literal>chat</literal></term>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1627 <listitem>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1628 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1629 This test does not bring the PPP link up but simply executes a chat
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1630 script. It expects a server at the remote end of the link to supply
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1631 the correct responses.
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1632 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1633 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1634 This program expects the <command>test_server.sh</command> script to
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1635 be running on the remote end and attempts several different tests,
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1636 expecting a variety of different responses for each.
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1637 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1638 </listitem>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1639 </varlistentry>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1640
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1641 <varlistentry>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1642 <term><literal>ppp_auth</literal></term>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1643 <listitem>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1644 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1645 This test attempts to bring up the PPP link under a variety of
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1646 different authentication conditions. This includes checking that both
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1647 PAP and CHAP authentication work, and that the connection is rejected
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1648 when the incorrect authentication protcol or secrets are used.
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1649 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1650 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1651 This test expects the <command>test_server.sh</command> script to be
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1652 running on the remote end. For this test to work the <filename>/etc/ppp/pap-secrets</filename> file on the remote
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1653 end should contain the following two lines:
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1654 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1655 <programlisting width=72>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1656 eCos * secret *
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1657 eCosPAP * secretPAP *
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1658 </programlisting>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1659 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1660 The <filename>/etc/ppp/chap-secrets</filename> file should contain:
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1661 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1662 <programlisting width=72>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1663 eCos * secret *
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1664 eCosCHAP * secretCHAP *
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1665 </programlisting>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1666 </listitem>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1667 </varlistentry>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1668
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1669 <varlistentry>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1670 <term><literal>isp</literal></term>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1671 <listitem>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1672 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1673 This test expects the serial test device to be connected to a Hayes
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1674 compatible modem. The test dials the telephone number given in
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1675 <literal>CYGPKG_PPP_DEFAULT_DIALUP_NUMBER</literal> and attempts to
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1676 log on to an ISP using the user name and password supplied in
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1677 <literal>CYGPKG_PPP_AUTH_DEFAULT_USER</literal> and
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1678 <literal>CYGPKG_PPP_AUTH_DEFAULT_PASSWD</literal>. Once the PPP
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1679 connection has been made, the program then attempts to ping a number
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1680 of well known addresses.
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1681 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1682 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1683 Since this test is designed to interact with an ISP, it does not run
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1684 within the automated testing system.
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1685 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1686 </listitem>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1687 </varlistentry>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1688
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1689 <varlistentry>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1690 <term><literal>tcp_echo</literal></term>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1691 <listitem>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1692 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1693 This is a version of the standard network <command>tcp_echo</command>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1694 test that brings up the PPP connection before waiting for the
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1695 <command>tcp_sink</command> and <command>tcp_source</command> programs
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1696 to connect. It is expected that at least one of these programs will
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1697 connect via the PPP link. However, if another network interface is
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1698 present, such as an ethernet device, then one may connect via that
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1699 interface.
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1700 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1701 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1702 While this test is supported by the <command>test_server.sh</command>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1703 script, it runs for such a long time that it should not normally be
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1704 used during automated testing.
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1705 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1706 </listitem>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1707 </varlistentry>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1708
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1709 <varlistentry>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1710 <term><literal>nc_test_slave</literal></term>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1711 <listitem>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1712 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1713 This is a version of the standard network
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1714 <command>nc_test_slave</command> test that brings up the PPP
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1715 connection before waiting for the <command>nc_test_master</command>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1716 program to connect. It is expected that the master will connect via
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1717 the PPP link.
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1718 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1719 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1720 While this test is supported by the <command>test_server.sh</command>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1721 script, it runs for such a long time that it should not normally be
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1722 used during automated testing.
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1723 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1724 </listitem>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1725 </varlistentry>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1726
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1727 </variablelist>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1728
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1729 </sect1>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1730
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1731 <sect1 id="ppp-test-script">
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1732 <title>Test Script</title>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1733
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1734 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1735 The PPP package additionally contains a shell script
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1736 (<command>test_server.sh</command>) that may be used to operate the
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1737 remote end of a PPP test link.
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1738 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1739
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1740 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1741 The script may be invoked with the following arguments:
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1742 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1743
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1744 <variablelist>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1745
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1746 <varlistentry>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1747 <term><literal>--dev=&lt;devname&gt;</literal></term>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1748 <listitem>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1749 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1750 This mandatory option gives the name of the device to be used for the
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1751 PPP link. Typically <literal>"/dev/ttyS0"</literal> or
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1752 <literal>"/dev/ttyS1"</literal>.
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1753 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1754 </listitem>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1755 </varlistentry>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1756
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1757 <varlistentry>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1758 <term><literal>--myip=&lt;ipaddress&gt;</literal></term>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1759 <listitem>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1760 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1761 This mandatory option gives the IP address to be attached to this end
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1762 of the PPP link.
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1763 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1764 </listitem>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1765 </varlistentry>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1766
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1767 <varlistentry>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1768 <term><literal>--hisip=&lt;ipaddress&gt;</literal></term>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1769 <listitem>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1770 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1771 This mandatory option gives the IP address to be attached to the
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1772 remote (test target) end of the PPP link.
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1773 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1774 </listitem>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1775 </varlistentry>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1776
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1777 <varlistentry>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1778 <term><literal>--baud=&lt;baud_rate&gt;</literal></term>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1779 <listitem>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1780 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1781 This option gives the baud rate at which the PPP link is to be run. If
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1782 absent then the link will run at the value set for
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1783 <literal>--redboot-baud</literal>.
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1784 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1785 </listitem>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1786 </varlistentry>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1787
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1788 <varlistentry>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1789 <term><literal>--redboot</literal></term>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1790 <listitem>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1791 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1792 If this option is present then the script will look for a
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1793 <literal>"RedBoot&gt;"</literal> prompt between test runs. This is
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1794 necessary if the serial device being used for testing is also used by
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1795 RedBoot.
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1796 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1797 </listitem>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1798 </varlistentry>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1799
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1800 <varlistentry>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1801 <term><literal>--redboot-baud=&lt;baud_rate&gt;</literal></term>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1802 <listitem>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1803 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1804 This option gives the baud rate at which the search for the RedBoot
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1805 prompt will be made. If absent then the link will run at 38400 baud.
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1806 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1807 </listitem>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1808 </varlistentry>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1809
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1810 <varlistentry>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1811 <term><literal>--debug</literal></term>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1812 <listitem>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1813 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1814 If this option is present, then the script will print out some
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1815 additional debug messages while it runs.
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1816 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1817 </listitem>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1818 </varlistentry>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1819
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1820 </variablelist>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1821
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1822 <para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1823 This script operates as follows: If the <literal>--redboot</literal>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1824 option is set it sets the device baud rate to the RedBoot baud rate
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1825 and waits until a <literal>"RedBoot&gt;"</literal> prompt is encountered.
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1826 It then sets the baud rate to the value given by the
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1827 <literal>--baud</literal> option and reads lines from the device until
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1828 a recognizable test announce string is read. It then executes an
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1829 appropriate set of commands to satisfy the test. This usually means
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1830 bringing up the PPP link by running <command>pppd</command> and maybe
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1831 executing various commands. It then either terminates the link itself,
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1832 or waits for the target to terminate it. It then goes back to looking
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1833 for another test announce string. If a string of the form
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1834 <literal>"BAUD:XXX"</literal> is received then the baud rate is
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1835 changed depending on the <literal>XXX</literal> value. If a
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1836 <literal>"FINISH"</literal> string is received it returns to waiting
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1837 for a <literal>"RedBoot>"</literal> prompt. The script repeats this
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1838 process until it is terminated with a signal.
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1839 </para>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1840
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1841 </sect1>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1842
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1843 </chapter>
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1844
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1845 <!-- }}} -->
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1846
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1847
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1848 </part>