BadVPN – Blame information for rev 1
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
1 | office | 1 | /* |
2 | * Redistribution and use in source and binary forms, with or without modification, |
||
3 | * are permitted provided that the following conditions are met: |
||
4 | * |
||
5 | * 1. Redistributions of source code must retain the above copyright notice, |
||
6 | * this list of conditions and the following disclaimer. |
||
7 | * 2. Redistributions in binary form must reproduce the above copyright notice, |
||
8 | * this list of conditions and the following disclaimer in the documentation |
||
9 | * and/or other materials provided with the distribution. |
||
10 | * 3. The name of the author may not be used to endorse or promote products |
||
11 | * derived from this software without specific prior written permission. |
||
12 | * |
||
13 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED |
||
14 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |
||
15 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT |
||
16 | * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, |
||
17 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT |
||
18 | * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
||
19 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
||
20 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING |
||
21 | * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY |
||
22 | * OF SUCH DAMAGE. |
||
23 | * |
||
24 | * This file is part of the lwIP TCP/IP stack. |
||
25 | * |
||
26 | */ |
||
27 | |||
28 | #ifndef LWIP_PPP_OPTS_H |
||
29 | #define LWIP_PPP_OPTS_H |
||
30 | |||
31 | #include "lwip/opt.h" |
||
32 | |||
33 | /** |
||
34 | * PPP_SUPPORT==1: Enable PPP. |
||
35 | */ |
||
36 | #ifndef PPP_SUPPORT |
||
37 | #define PPP_SUPPORT 0 |
||
38 | #endif |
||
39 | |||
40 | /** |
||
41 | * PPPOE_SUPPORT==1: Enable PPP Over Ethernet |
||
42 | */ |
||
43 | #ifndef PPPOE_SUPPORT |
||
44 | #define PPPOE_SUPPORT 0 |
||
45 | #endif |
||
46 | |||
47 | /** |
||
48 | * PPPOL2TP_SUPPORT==1: Enable PPP Over L2TP |
||
49 | */ |
||
50 | #ifndef PPPOL2TP_SUPPORT |
||
51 | #define PPPOL2TP_SUPPORT 0 |
||
52 | #endif |
||
53 | |||
54 | /** |
||
55 | * PPPOL2TP_AUTH_SUPPORT==1: Enable PPP Over L2TP Auth (enable MD5 support) |
||
56 | */ |
||
57 | #ifndef PPPOL2TP_AUTH_SUPPORT |
||
58 | #define PPPOL2TP_AUTH_SUPPORT PPPOL2TP_SUPPORT |
||
59 | #endif |
||
60 | |||
61 | /** |
||
62 | * PPPOS_SUPPORT==1: Enable PPP Over Serial |
||
63 | */ |
||
64 | #ifndef PPPOS_SUPPORT |
||
65 | #define PPPOS_SUPPORT PPP_SUPPORT |
||
66 | #endif |
||
67 | |||
68 | /** |
||
69 | * LWIP_PPP_API==1: Enable PPP API (in pppapi.c) |
||
70 | */ |
||
71 | #ifndef LWIP_PPP_API |
||
72 | #define LWIP_PPP_API (PPP_SUPPORT && (NO_SYS == 0)) |
||
73 | #endif |
||
74 | |||
75 | /** |
||
76 | * MEMP_NUM_PPP_PCB: the number of simultaneously active PPP |
||
77 | * connections (requires the PPP_SUPPORT option) |
||
78 | */ |
||
79 | #ifndef MEMP_NUM_PPP_PCB |
||
80 | #define MEMP_NUM_PPP_PCB 1 |
||
81 | #endif |
||
82 | |||
83 | /** |
||
84 | * PPP_NUM_TIMEOUTS_PER_PCB: the number of sys_timeouts running in parallel per |
||
85 | * ppp_pcb. This is a conservative default which needs to be checked... |
||
86 | */ |
||
87 | #ifndef PPP_NUM_TIMEOUTS_PER_PCB |
||
88 | #define PPP_NUM_TIMEOUTS_PER_PCB 6 |
||
89 | #endif |
||
90 | |||
91 | /* The number of sys_timeouts required for the PPP module */ |
||
92 | #define PPP_NUM_TIMEOUTS (PPP_SUPPORT * PPP_NUM_TIMEOUTS_PER_PCB * MEMP_NUM_PPP_PCB) |
||
93 | |||
94 | #if PPP_SUPPORT |
||
95 | |||
96 | /** |
||
97 | * MEMP_NUM_PPPOS_INTERFACES: the number of concurrently active PPPoS |
||
98 | * interfaces (only used with PPPOS_SUPPORT==1) |
||
99 | */ |
||
100 | #ifndef MEMP_NUM_PPPOS_INTERFACES |
||
101 | #define MEMP_NUM_PPPOS_INTERFACES MEMP_NUM_PPP_PCB |
||
102 | #endif |
||
103 | |||
104 | /** |
||
105 | * MEMP_NUM_PPPOE_INTERFACES: the number of concurrently active PPPoE |
||
106 | * interfaces (only used with PPPOE_SUPPORT==1) |
||
107 | */ |
||
108 | #ifndef MEMP_NUM_PPPOE_INTERFACES |
||
109 | #define MEMP_NUM_PPPOE_INTERFACES 1 |
||
110 | #endif |
||
111 | |||
112 | /** |
||
113 | * MEMP_NUM_PPPOL2TP_INTERFACES: the number of concurrently active PPPoL2TP |
||
114 | * interfaces (only used with PPPOL2TP_SUPPORT==1) |
||
115 | */ |
||
116 | #ifndef MEMP_NUM_PPPOL2TP_INTERFACES |
||
117 | #define MEMP_NUM_PPPOL2TP_INTERFACES 1 |
||
118 | #endif |
||
119 | |||
120 | /** |
||
121 | * MEMP_NUM_PPP_API_MSG: Number of concurrent PPP API messages (in pppapi.c) |
||
122 | */ |
||
123 | #ifndef MEMP_NUM_PPP_API_MSG |
||
124 | #define MEMP_NUM_PPP_API_MSG 5 |
||
125 | #endif |
||
126 | |||
127 | /** |
||
128 | * PPP_DEBUG: Enable debugging for PPP. |
||
129 | */ |
||
130 | #ifndef PPP_DEBUG |
||
131 | #define PPP_DEBUG LWIP_DBG_OFF |
||
132 | #endif |
||
133 | |||
134 | /** |
||
135 | * PPP_INPROC_IRQ_SAFE==1 call pppos_input() using tcpip_callback(). |
||
136 | * |
||
137 | * Please read the "PPPoS input path" chapter in the PPP documentation about this option. |
||
138 | */ |
||
139 | #ifndef PPP_INPROC_IRQ_SAFE |
||
140 | #define PPP_INPROC_IRQ_SAFE 0 |
||
141 | #endif |
||
142 | |||
143 | /** |
||
144 | * PRINTPKT_SUPPORT==1: Enable PPP print packet support |
||
145 | * |
||
146 | * Mandatory for debugging, it displays exchanged packet content in debug trace. |
||
147 | */ |
||
148 | #ifndef PRINTPKT_SUPPORT |
||
149 | #define PRINTPKT_SUPPORT 0 |
||
150 | #endif |
||
151 | |||
152 | /** |
||
153 | * PPP_IPV4_SUPPORT==1: Enable PPP IPv4 support |
||
154 | */ |
||
155 | #ifndef PPP_IPV4_SUPPORT |
||
156 | #define PPP_IPV4_SUPPORT (LWIP_IPV4) |
||
157 | #endif |
||
158 | |||
159 | /** |
||
160 | * PPP_IPV6_SUPPORT==1: Enable PPP IPv6 support |
||
161 | */ |
||
162 | #ifndef PPP_IPV6_SUPPORT |
||
163 | #define PPP_IPV6_SUPPORT (LWIP_IPV6) |
||
164 | #endif |
||
165 | |||
166 | /** |
||
167 | * PPP_NOTIFY_PHASE==1: Support PPP notify phase support |
||
168 | * |
||
169 | * PPP notify phase support allows you to set a callback which is |
||
170 | * called on change of the internal PPP state machine. |
||
171 | * |
||
172 | * This can be used for example to set a LED pattern depending on the |
||
173 | * current phase of the PPP session. |
||
174 | */ |
||
175 | #ifndef PPP_NOTIFY_PHASE |
||
176 | #define PPP_NOTIFY_PHASE 0 |
||
177 | #endif |
||
178 | |||
179 | /** |
||
180 | * pbuf_type PPP is using for LCP, PAP, CHAP, EAP, CCP, IPCP and IP6CP packets. |
||
181 | * |
||
182 | * Memory allocated must be single buffered for PPP to works, it requires pbuf |
||
183 | * that are not going to be chained when allocated. This requires setting |
||
184 | * PBUF_POOL_BUFSIZE to at least 512 bytes, which is quite huge for small systems. |
||
185 | * |
||
186 | * Setting PPP_USE_PBUF_RAM to 1 makes PPP use memory from heap where continuous |
||
187 | * buffers are required, allowing you to use a smaller PBUF_POOL_BUFSIZE. |
||
188 | */ |
||
189 | #ifndef PPP_USE_PBUF_RAM |
||
190 | #define PPP_USE_PBUF_RAM 0 |
||
191 | #endif |
||
192 | |||
193 | /** |
||
194 | * PPP_FCS_TABLE: Keep a 256*2 byte table to speed up FCS calculation for PPPoS |
||
195 | */ |
||
196 | #ifndef PPP_FCS_TABLE |
||
197 | #define PPP_FCS_TABLE 1 |
||
198 | #endif |
||
199 | |||
200 | /** |
||
201 | * PAP_SUPPORT==1: Support PAP. |
||
202 | */ |
||
203 | #ifndef PAP_SUPPORT |
||
204 | #define PAP_SUPPORT 0 |
||
205 | #endif |
||
206 | |||
207 | /** |
||
208 | * CHAP_SUPPORT==1: Support CHAP. |
||
209 | */ |
||
210 | #ifndef CHAP_SUPPORT |
||
211 | #define CHAP_SUPPORT 0 |
||
212 | #endif |
||
213 | |||
214 | /** |
||
215 | * MSCHAP_SUPPORT==1: Support MSCHAP. |
||
216 | */ |
||
217 | #ifndef MSCHAP_SUPPORT |
||
218 | #define MSCHAP_SUPPORT 0 |
||
219 | #endif |
||
220 | #if MSCHAP_SUPPORT |
||
221 | /* MSCHAP requires CHAP support */ |
||
222 | #undef CHAP_SUPPORT |
||
223 | #define CHAP_SUPPORT 1 |
||
224 | #endif /* MSCHAP_SUPPORT */ |
||
225 | |||
226 | /** |
||
227 | * EAP_SUPPORT==1: Support EAP. |
||
228 | */ |
||
229 | #ifndef EAP_SUPPORT |
||
230 | #define EAP_SUPPORT 0 |
||
231 | #endif |
||
232 | |||
233 | /** |
||
234 | * CCP_SUPPORT==1: Support CCP. |
||
235 | */ |
||
236 | #ifndef CCP_SUPPORT |
||
237 | #define CCP_SUPPORT 0 |
||
238 | #endif |
||
239 | |||
240 | /** |
||
241 | * MPPE_SUPPORT==1: Support MPPE. |
||
242 | */ |
||
243 | #ifndef MPPE_SUPPORT |
||
244 | #define MPPE_SUPPORT 0 |
||
245 | #endif |
||
246 | #if MPPE_SUPPORT |
||
247 | /* MPPE requires CCP support */ |
||
248 | #undef CCP_SUPPORT |
||
249 | #define CCP_SUPPORT 1 |
||
250 | /* MPPE requires MSCHAP support */ |
||
251 | #undef MSCHAP_SUPPORT |
||
252 | #define MSCHAP_SUPPORT 1 |
||
253 | /* MSCHAP requires CHAP support */ |
||
254 | #undef CHAP_SUPPORT |
||
255 | #define CHAP_SUPPORT 1 |
||
256 | #endif /* MPPE_SUPPORT */ |
||
257 | |||
258 | /** |
||
259 | * CBCP_SUPPORT==1: Support CBCP. CURRENTLY NOT SUPPORTED! DO NOT SET! |
||
260 | */ |
||
261 | #ifndef CBCP_SUPPORT |
||
262 | #define CBCP_SUPPORT 0 |
||
263 | #endif |
||
264 | |||
265 | /** |
||
266 | * ECP_SUPPORT==1: Support ECP. CURRENTLY NOT SUPPORTED! DO NOT SET! |
||
267 | */ |
||
268 | #ifndef ECP_SUPPORT |
||
269 | #define ECP_SUPPORT 0 |
||
270 | #endif |
||
271 | |||
272 | /** |
||
273 | * DEMAND_SUPPORT==1: Support dial on demand. CURRENTLY NOT SUPPORTED! DO NOT SET! |
||
274 | */ |
||
275 | #ifndef DEMAND_SUPPORT |
||
276 | #define DEMAND_SUPPORT 0 |
||
277 | #endif |
||
278 | |||
279 | /** |
||
280 | * LQR_SUPPORT==1: Support Link Quality Report. Do nothing except exchanging some LCP packets. |
||
281 | */ |
||
282 | #ifndef LQR_SUPPORT |
||
283 | #define LQR_SUPPORT 0 |
||
284 | #endif |
||
285 | |||
286 | /** |
||
287 | * PPP_SERVER==1: Enable PPP server support (waiting for incoming PPP session). |
||
288 | * |
||
289 | * Currently only supported for PPPoS. |
||
290 | */ |
||
291 | #ifndef PPP_SERVER |
||
292 | #define PPP_SERVER 0 |
||
293 | #endif |
||
294 | |||
295 | #if PPP_SERVER |
||
296 | /* |
||
297 | * PPP_OUR_NAME: Our name for authentication purposes |
||
298 | */ |
||
299 | #ifndef PPP_OUR_NAME |
||
300 | #define PPP_OUR_NAME "lwIP" |
||
301 | #endif |
||
302 | #endif /* PPP_SERVER */ |
||
303 | |||
304 | /** |
||
305 | * VJ_SUPPORT==1: Support VJ header compression. |
||
306 | */ |
||
307 | #ifndef VJ_SUPPORT |
||
308 | #define VJ_SUPPORT 1 |
||
309 | #endif |
||
310 | /* VJ compression is only supported for TCP over IPv4 over PPPoS. */ |
||
311 | #if !PPPOS_SUPPORT || !PPP_IPV4_SUPPORT || !LWIP_TCP |
||
312 | #undef VJ_SUPPORT |
||
313 | #define VJ_SUPPORT 0 |
||
314 | #endif /* !PPPOS_SUPPORT */ |
||
315 | |||
316 | /** |
||
317 | * PPP_MD5_RANDM==1: Use MD5 for better randomness. |
||
318 | * Enabled by default if CHAP, EAP, or L2TP AUTH support is enabled. |
||
319 | */ |
||
320 | #ifndef PPP_MD5_RANDM |
||
321 | #define PPP_MD5_RANDM (CHAP_SUPPORT || EAP_SUPPORT || PPPOL2TP_AUTH_SUPPORT) |
||
322 | #endif |
||
323 | |||
324 | /** |
||
325 | * PolarSSL embedded library |
||
326 | * |
||
327 | * |
||
328 | * lwIP contains some files fetched from the latest BSD release of |
||
329 | * the PolarSSL project (PolarSSL 0.10.1-bsd) for ciphers and encryption |
||
330 | * methods we need for lwIP PPP support. |
||
331 | * |
||
332 | * The PolarSSL files were cleaned to contain only the necessary struct |
||
333 | * fields and functions needed for lwIP. |
||
334 | * |
||
335 | * The PolarSSL API was not changed at all, so if you are already using |
||
336 | * PolarSSL you can choose to skip the compilation of the included PolarSSL |
||
337 | * library into lwIP. |
||
338 | * |
||
339 | * If you are not using the embedded copy you must include external |
||
340 | * libraries into your arch/cc.h port file. |
||
341 | * |
||
342 | * Beware of the stack requirements which can be a lot larger if you are not |
||
343 | * using our cleaned PolarSSL library. |
||
344 | */ |
||
345 | |||
346 | /** |
||
347 | * LWIP_USE_EXTERNAL_POLARSSL: Use external PolarSSL library |
||
348 | */ |
||
349 | #ifndef LWIP_USE_EXTERNAL_POLARSSL |
||
350 | #define LWIP_USE_EXTERNAL_POLARSSL 0 |
||
351 | #endif |
||
352 | |||
353 | /** |
||
354 | * LWIP_USE_EXTERNAL_MBEDTLS: Use external mbed TLS library |
||
355 | */ |
||
356 | #ifndef LWIP_USE_EXTERNAL_MBEDTLS |
||
357 | #define LWIP_USE_EXTERNAL_MBEDTLS 0 |
||
358 | #endif |
||
359 | |||
360 | /* |
||
361 | * PPP Timeouts |
||
362 | */ |
||
363 | |||
364 | /** |
||
365 | * FSM_DEFTIMEOUT: Timeout time in seconds |
||
366 | */ |
||
367 | #ifndef FSM_DEFTIMEOUT |
||
368 | #define FSM_DEFTIMEOUT 6 |
||
369 | #endif |
||
370 | |||
371 | /** |
||
372 | * FSM_DEFMAXTERMREQS: Maximum Terminate-Request transmissions |
||
373 | */ |
||
374 | #ifndef FSM_DEFMAXTERMREQS |
||
375 | #define FSM_DEFMAXTERMREQS 2 |
||
376 | #endif |
||
377 | |||
378 | /** |
||
379 | * FSM_DEFMAXCONFREQS: Maximum Configure-Request transmissions |
||
380 | */ |
||
381 | #ifndef FSM_DEFMAXCONFREQS |
||
382 | #define FSM_DEFMAXCONFREQS 10 |
||
383 | #endif |
||
384 | |||
385 | /** |
||
386 | * FSM_DEFMAXNAKLOOPS: Maximum number of nak loops |
||
387 | */ |
||
388 | #ifndef FSM_DEFMAXNAKLOOPS |
||
389 | #define FSM_DEFMAXNAKLOOPS 5 |
||
390 | #endif |
||
391 | |||
392 | /** |
||
393 | * UPAP_DEFTIMEOUT: Timeout (seconds) for retransmitting req |
||
394 | */ |
||
395 | #ifndef UPAP_DEFTIMEOUT |
||
396 | #define UPAP_DEFTIMEOUT 6 |
||
397 | #endif |
||
398 | |||
399 | /** |
||
400 | * UPAP_DEFTRANSMITS: Maximum number of auth-reqs to send |
||
401 | */ |
||
402 | #ifndef UPAP_DEFTRANSMITS |
||
403 | #define UPAP_DEFTRANSMITS 10 |
||
404 | #endif |
||
405 | |||
406 | #if PPP_SERVER |
||
407 | /** |
||
408 | * UPAP_DEFREQTIME: Time to wait for auth-req from peer |
||
409 | */ |
||
410 | #ifndef UPAP_DEFREQTIME |
||
411 | #define UPAP_DEFREQTIME 30 |
||
412 | #endif |
||
413 | #endif /* PPP_SERVER */ |
||
414 | |||
415 | /** |
||
416 | * CHAP_DEFTIMEOUT: Timeout (seconds) for retransmitting req |
||
417 | */ |
||
418 | #ifndef CHAP_DEFTIMEOUT |
||
419 | #define CHAP_DEFTIMEOUT 6 |
||
420 | #endif |
||
421 | |||
422 | /** |
||
423 | * CHAP_DEFTRANSMITS: max # times to send challenge |
||
424 | */ |
||
425 | #ifndef CHAP_DEFTRANSMITS |
||
426 | #define CHAP_DEFTRANSMITS 10 |
||
427 | #endif |
||
428 | |||
429 | #if PPP_SERVER |
||
430 | /** |
||
431 | * CHAP_DEFRECHALLENGETIME: If this option is > 0, rechallenge the peer every n seconds |
||
432 | */ |
||
433 | #ifndef CHAP_DEFRECHALLENGETIME |
||
434 | #define CHAP_DEFRECHALLENGETIME 0 |
||
435 | #endif |
||
436 | #endif /* PPP_SERVER */ |
||
437 | |||
438 | /** |
||
439 | * EAP_DEFREQTIME: Time to wait for peer request |
||
440 | */ |
||
441 | #ifndef EAP_DEFREQTIME |
||
442 | #define EAP_DEFREQTIME 6 |
||
443 | #endif |
||
444 | |||
445 | /** |
||
446 | * EAP_DEFALLOWREQ: max # times to accept requests |
||
447 | */ |
||
448 | #ifndef EAP_DEFALLOWREQ |
||
449 | #define EAP_DEFALLOWREQ 10 |
||
450 | #endif |
||
451 | |||
452 | #if PPP_SERVER |
||
453 | /** |
||
454 | * EAP_DEFTIMEOUT: Timeout (seconds) for rexmit |
||
455 | */ |
||
456 | #ifndef EAP_DEFTIMEOUT |
||
457 | #define EAP_DEFTIMEOUT 6 |
||
458 | #endif |
||
459 | |||
460 | /** |
||
461 | * EAP_DEFTRANSMITS: max # times to transmit |
||
462 | */ |
||
463 | #ifndef EAP_DEFTRANSMITS |
||
464 | #define EAP_DEFTRANSMITS 10 |
||
465 | #endif |
||
466 | #endif /* PPP_SERVER */ |
||
467 | |||
468 | /** |
||
469 | * LCP_DEFLOOPBACKFAIL: Default number of times we receive our magic number from the peer |
||
470 | * before deciding the link is looped-back. |
||
471 | */ |
||
472 | #ifndef LCP_DEFLOOPBACKFAIL |
||
473 | #define LCP_DEFLOOPBACKFAIL 10 |
||
474 | #endif |
||
475 | |||
476 | /** |
||
477 | * LCP_ECHOINTERVAL: Interval in seconds between keepalive echo requests, 0 to disable. |
||
478 | */ |
||
479 | #ifndef LCP_ECHOINTERVAL |
||
480 | #define LCP_ECHOINTERVAL 0 |
||
481 | #endif |
||
482 | |||
483 | /** |
||
484 | * LCP_MAXECHOFAILS: Number of unanswered echo requests before failure. |
||
485 | */ |
||
486 | #ifndef LCP_MAXECHOFAILS |
||
487 | #define LCP_MAXECHOFAILS 3 |
||
488 | #endif |
||
489 | |||
490 | /** |
||
491 | * PPP_MAXIDLEFLAG: Max Xmit idle time (in ms) before resend flag char. |
||
492 | */ |
||
493 | #ifndef PPP_MAXIDLEFLAG |
||
494 | #define PPP_MAXIDLEFLAG 100 |
||
495 | #endif |
||
496 | |||
497 | /** |
||
498 | * PPP Packet sizes |
||
499 | */ |
||
500 | |||
501 | /** |
||
502 | * PPP_MRU: Default MRU |
||
503 | */ |
||
504 | #ifndef PPP_MRU |
||
505 | #define PPP_MRU 1500 |
||
506 | #endif |
||
507 | |||
508 | /** |
||
509 | * PPP_DEFMRU: Default MRU to try |
||
510 | */ |
||
511 | #ifndef PPP_DEFMRU |
||
512 | #define PPP_DEFMRU 1500 |
||
513 | #endif |
||
514 | |||
515 | /** |
||
516 | * PPP_MAXMRU: Normally limit MRU to this (pppd default = 16384) |
||
517 | */ |
||
518 | #ifndef PPP_MAXMRU |
||
519 | #define PPP_MAXMRU 1500 |
||
520 | #endif |
||
521 | |||
522 | /** |
||
523 | * PPP_MINMRU: No MRUs below this |
||
524 | */ |
||
525 | #ifndef PPP_MINMRU |
||
526 | #define PPP_MINMRU 128 |
||
527 | #endif |
||
528 | |||
529 | /** |
||
530 | * PPPOL2TP_DEFMRU: Default MTU and MRU for L2TP |
||
531 | * Default = 1500 - PPPoE(6) - PPP Protocol(2) - IPv4 header(20) - UDP Header(8) |
||
532 | * - L2TP Header(6) - HDLC Header(2) - PPP Protocol(2) - MPPE Header(2) - PPP Protocol(2) |
||
533 | */ |
||
534 | #if PPPOL2TP_SUPPORT |
||
535 | #ifndef PPPOL2TP_DEFMRU |
||
536 | #define PPPOL2TP_DEFMRU 1450 |
||
537 | #endif |
||
538 | #endif /* PPPOL2TP_SUPPORT */ |
||
539 | |||
540 | /** |
||
541 | * MAXNAMELEN: max length of hostname or name for auth |
||
542 | */ |
||
543 | #ifndef MAXNAMELEN |
||
544 | #define MAXNAMELEN 256 |
||
545 | #endif |
||
546 | |||
547 | /** |
||
548 | * MAXSECRETLEN: max length of password or secret |
||
549 | */ |
||
550 | #ifndef MAXSECRETLEN |
||
551 | #define MAXSECRETLEN 256 |
||
552 | #endif |
||
553 | |||
554 | /* ------------------------------------------------------------------------- */ |
||
555 | |||
556 | /* |
||
557 | * Build triggers for embedded PolarSSL |
||
558 | */ |
||
559 | #if !LWIP_USE_EXTERNAL_POLARSSL && !LWIP_USE_EXTERNAL_MBEDTLS |
||
560 | |||
561 | /* CHAP, EAP, L2TP AUTH and MD5 Random require MD5 support */ |
||
562 | #if CHAP_SUPPORT || EAP_SUPPORT || PPPOL2TP_AUTH_SUPPORT || PPP_MD5_RANDM |
||
563 | #define LWIP_INCLUDED_POLARSSL_MD5 1 |
||
564 | #endif /* CHAP_SUPPORT || EAP_SUPPORT || PPPOL2TP_AUTH_SUPPORT || PPP_MD5_RANDM */ |
||
565 | |||
566 | #if MSCHAP_SUPPORT |
||
567 | |||
568 | /* MSCHAP require MD4 support */ |
||
569 | #define LWIP_INCLUDED_POLARSSL_MD4 1 |
||
570 | /* MSCHAP require SHA1 support */ |
||
571 | #define LWIP_INCLUDED_POLARSSL_SHA1 1 |
||
572 | /* MSCHAP require DES support */ |
||
573 | #define LWIP_INCLUDED_POLARSSL_DES 1 |
||
574 | |||
575 | /* MS-CHAP support is required for MPPE */ |
||
576 | #if MPPE_SUPPORT |
||
577 | /* MPPE require ARC4 support */ |
||
578 | #define LWIP_INCLUDED_POLARSSL_ARC4 1 |
||
579 | #endif /* MPPE_SUPPORT */ |
||
580 | |||
581 | #endif /* MSCHAP_SUPPORT */ |
||
582 | |||
583 | #endif /* !LWIP_USE_EXTERNAL_POLARSSL && !LWIP_USE_EXTERNAL_MBEDTLS */ |
||
584 | |||
585 | /* Default value if unset */ |
||
586 | #ifndef LWIP_INCLUDED_POLARSSL_MD4 |
||
587 | #define LWIP_INCLUDED_POLARSSL_MD4 0 |
||
588 | #endif /* LWIP_INCLUDED_POLARSSL_MD4 */ |
||
589 | #ifndef LWIP_INCLUDED_POLARSSL_MD5 |
||
590 | #define LWIP_INCLUDED_POLARSSL_MD5 0 |
||
591 | #endif /* LWIP_INCLUDED_POLARSSL_MD5 */ |
||
592 | #ifndef LWIP_INCLUDED_POLARSSL_SHA1 |
||
593 | #define LWIP_INCLUDED_POLARSSL_SHA1 0 |
||
594 | #endif /* LWIP_INCLUDED_POLARSSL_SHA1 */ |
||
595 | #ifndef LWIP_INCLUDED_POLARSSL_DES |
||
596 | #define LWIP_INCLUDED_POLARSSL_DES 0 |
||
597 | #endif /* LWIP_INCLUDED_POLARSSL_DES */ |
||
598 | #ifndef LWIP_INCLUDED_POLARSSL_ARC4 |
||
599 | #define LWIP_INCLUDED_POLARSSL_ARC4 0 |
||
600 | #endif /* LWIP_INCLUDED_POLARSSL_ARC4 */ |
||
601 | |||
602 | #endif /* PPP_SUPPORT */ |
||
603 | |||
604 | #endif /* LWIP_PPP_OPTS_H */ |