sdk-core
v2026.11.05
PS2 SDK - core tier (build-critical EE/IOP modules)
Toggle main menu visibility
Loading...
Searching...
No Matches
ppp_opts.h
Go to the documentation of this file.
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
32
#ifndef LWIP_PPP_OPTS_H
33
#define LWIP_PPP_OPTS_H
34
35
#include "
lwip/opt.h
"
36
40
#ifndef PPP_SUPPORT
41
#define PPP_SUPPORT 0
42
#endif
43
47
#ifndef PPPOE_SUPPORT
48
#define PPPOE_SUPPORT 0
49
#endif
50
54
#ifndef PPPOE_SCNAME_SUPPORT
55
#define PPPOE_SCNAME_SUPPORT 0
56
#endif
57
61
#ifndef PPPOL2TP_SUPPORT
62
#define PPPOL2TP_SUPPORT 0
63
#endif
64
68
#ifndef PPPOL2TP_AUTH_SUPPORT
69
#define PPPOL2TP_AUTH_SUPPORT PPPOL2TP_SUPPORT
70
#endif
71
75
#ifndef PPPOS_SUPPORT
76
#define PPPOS_SUPPORT PPP_SUPPORT
77
#endif
78
82
#ifndef LWIP_PPP_API
83
#define LWIP_PPP_API (PPP_SUPPORT && (NO_SYS == 0))
84
#endif
85
86
#if PPP_SUPPORT
87
92
#ifndef MEMP_NUM_PPP_PCB
93
#define MEMP_NUM_PPP_PCB 1
94
#endif
95
101
#ifndef PPP_NUM_TIMEOUTS_PER_PCB
102
#define PPP_NUM_TIMEOUTS_PER_PCB (2 + PPP_IPV4_SUPPORT + PPP_IPV6_SUPPORT + CCP_SUPPORT)
103
#endif
104
105
/* The number of sys_timeouts required for the PPP module */
106
#define PPP_NUM_TIMEOUTS (PPP_SUPPORT * PPP_NUM_TIMEOUTS_PER_PCB * MEMP_NUM_PPP_PCB)
107
112
#ifndef MEMP_NUM_PPPOS_INTERFACES
113
#define MEMP_NUM_PPPOS_INTERFACES MEMP_NUM_PPP_PCB
114
#endif
115
120
#ifndef MEMP_NUM_PPPOE_INTERFACES
121
#define MEMP_NUM_PPPOE_INTERFACES 1
122
#endif
123
128
#ifndef MEMP_NUM_PPPOL2TP_INTERFACES
129
#define MEMP_NUM_PPPOL2TP_INTERFACES 1
130
#endif
131
135
#ifndef MEMP_NUM_PPP_API_MSG
136
#define MEMP_NUM_PPP_API_MSG 5
137
#endif
138
142
#ifndef PPP_DEBUG
143
#define PPP_DEBUG LWIP_DBG_OFF
144
#endif
145
151
#ifndef PPP_INPROC_IRQ_SAFE
152
#define PPP_INPROC_IRQ_SAFE 0
153
#endif
154
160
#ifndef PRINTPKT_SUPPORT
161
#define PRINTPKT_SUPPORT 0
162
#endif
163
167
#ifndef PPP_IPV4_SUPPORT
168
#define PPP_IPV4_SUPPORT (LWIP_IPV4)
169
#endif
170
174
#ifndef PPP_IPV6_SUPPORT
175
#define PPP_IPV6_SUPPORT (LWIP_IPV6)
176
#endif
177
187
#ifndef PPP_NOTIFY_PHASE
188
#define PPP_NOTIFY_PHASE 0
189
#endif
190
194
#ifndef PPP_FCS_TABLE
195
#define PPP_FCS_TABLE 1
196
#endif
197
201
#ifndef PAP_SUPPORT
202
#define PAP_SUPPORT 0
203
#endif
204
208
#ifndef CHAP_SUPPORT
209
#define CHAP_SUPPORT 0
210
#endif
211
215
#ifndef MSCHAP_SUPPORT
216
#define MSCHAP_SUPPORT 0
217
#endif
218
#if MSCHAP_SUPPORT
219
/* MSCHAP requires CHAP support */
220
#undef CHAP_SUPPORT
221
#define CHAP_SUPPORT 1
222
#endif
/* MSCHAP_SUPPORT */
223
227
#ifndef EAP_SUPPORT
228
#define EAP_SUPPORT 0
229
#endif
230
234
#ifndef CCP_SUPPORT
235
#define CCP_SUPPORT 0
236
#endif
237
241
#ifndef MPPE_SUPPORT
242
#define MPPE_SUPPORT 0
243
#endif
244
#if MPPE_SUPPORT
245
/* MPPE requires CCP support */
246
#undef CCP_SUPPORT
247
#define CCP_SUPPORT 1
248
/* MPPE requires MSCHAP support */
249
#undef MSCHAP_SUPPORT
250
#define MSCHAP_SUPPORT 1
251
/* MSCHAP requires CHAP support */
252
#undef CHAP_SUPPORT
253
#define CHAP_SUPPORT 1
254
#endif
/* MPPE_SUPPORT */
255
259
#ifndef CBCP_SUPPORT
260
#define CBCP_SUPPORT 0
261
#endif
262
266
#ifndef ECP_SUPPORT
267
#define ECP_SUPPORT 0
268
#endif
269
273
#ifndef DEMAND_SUPPORT
274
#define DEMAND_SUPPORT 0
275
#endif
276
280
#ifndef LQR_SUPPORT
281
#define LQR_SUPPORT 0
282
#endif
283
289
#ifndef PPP_SERVER
290
#define PPP_SERVER 0
291
#endif
292
293
#if PPP_SERVER
294
/*
295
* PPP_OUR_NAME: Our name for authentication purposes
296
*/
297
#ifndef PPP_OUR_NAME
298
#define PPP_OUR_NAME "lwIP"
299
#endif
300
#endif
/* PPP_SERVER */
301
307
#ifndef VJ_SUPPORT
308
#define VJ_SUPPORT 0
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
320
#ifndef PPP_MD5_RANDM
321
#define PPP_MD5_RANDM (CHAP_SUPPORT || EAP_SUPPORT || PPPOL2TP_AUTH_SUPPORT)
322
#endif
323
345
349
#ifndef LWIP_USE_EXTERNAL_POLARSSL
350
#define LWIP_USE_EXTERNAL_POLARSSL 0
351
#endif
352
356
#ifndef LWIP_USE_EXTERNAL_MBEDTLS
357
#define LWIP_USE_EXTERNAL_MBEDTLS 0
358
#endif
359
360
/*
361
* PPP Timeouts
362
*/
363
367
#ifndef FSM_DEFTIMEOUT
368
#define FSM_DEFTIMEOUT 6
369
#endif
370
374
#ifndef FSM_DEFMAXTERMREQS
375
#define FSM_DEFMAXTERMREQS 2
376
#endif
377
381
#ifndef FSM_DEFMAXCONFREQS
382
#define FSM_DEFMAXCONFREQS 10
383
#endif
384
388
#ifndef FSM_DEFMAXNAKLOOPS
389
#define FSM_DEFMAXNAKLOOPS 5
390
#endif
391
395
#ifndef UPAP_DEFTIMEOUT
396
#define UPAP_DEFTIMEOUT 6
397
#endif
398
402
#ifndef UPAP_DEFTRANSMITS
403
#define UPAP_DEFTRANSMITS 10
404
#endif
405
406
#if PPP_SERVER
410
#ifndef UPAP_DEFREQTIME
411
#define UPAP_DEFREQTIME 30
412
#endif
413
#endif
/* PPP_SERVER */
414
418
#ifndef CHAP_DEFTIMEOUT
419
#define CHAP_DEFTIMEOUT 6
420
#endif
421
425
#ifndef CHAP_DEFTRANSMITS
426
#define CHAP_DEFTRANSMITS 10
427
#endif
428
429
#if PPP_SERVER
433
#ifndef CHAP_DEFRECHALLENGETIME
434
#define CHAP_DEFRECHALLENGETIME 0
435
#endif
436
#endif
/* PPP_SERVER */
437
441
#ifndef EAP_DEFREQTIME
442
#define EAP_DEFREQTIME 6
443
#endif
444
448
#ifndef EAP_DEFALLOWREQ
449
#define EAP_DEFALLOWREQ 10
450
#endif
451
452
#if PPP_SERVER
456
#ifndef EAP_DEFTIMEOUT
457
#define EAP_DEFTIMEOUT 6
458
#endif
459
463
#ifndef EAP_DEFTRANSMITS
464
#define EAP_DEFTRANSMITS 10
465
#endif
466
#endif
/* PPP_SERVER */
467
472
#ifndef LCP_DEFLOOPBACKFAIL
473
#define LCP_DEFLOOPBACKFAIL 10
474
#endif
475
479
#ifndef LCP_ECHOINTERVAL
480
#define LCP_ECHOINTERVAL 0
481
#endif
482
486
#ifndef LCP_MAXECHOFAILS
487
#define LCP_MAXECHOFAILS 3
488
#endif
489
493
#ifndef PPP_MAXIDLEFLAG
494
#define PPP_MAXIDLEFLAG 100
495
#endif
496
500
507
#ifndef PPP_MRU
508
#define PPP_MRU 1500
509
#endif
510
521
#ifndef PPP_MAXMRU
522
#define PPP_MAXMRU 1500
523
#endif
524
530
#ifndef PPP_MINMRU
531
#define PPP_MINMRU 128
532
#endif
533
539
#if PPPOL2TP_SUPPORT
540
#ifndef PPPOL2TP_DEFMRU
541
#define PPPOL2TP_DEFMRU 1450
542
#endif
543
#endif
/* PPPOL2TP_SUPPORT */
544
548
#ifndef MAXNAMELEN
549
#define MAXNAMELEN 256
550
#endif
551
555
#ifndef MAXSECRETLEN
556
#define MAXSECRETLEN 256
557
#endif
558
559
/* ------------------------------------------------------------------------- */
560
561
/*
562
* Build triggers for embedded PolarSSL
563
*/
564
#if !LWIP_USE_EXTERNAL_POLARSSL && !LWIP_USE_EXTERNAL_MBEDTLS
565
566
/* CHAP, EAP, L2TP AUTH and MD5 Random require MD5 support */
567
#if CHAP_SUPPORT || EAP_SUPPORT || PPPOL2TP_AUTH_SUPPORT || PPP_MD5_RANDM
568
#define LWIP_INCLUDED_POLARSSL_MD5 1
569
#endif
/* CHAP_SUPPORT || EAP_SUPPORT || PPPOL2TP_AUTH_SUPPORT || PPP_MD5_RANDM */
570
571
#if MSCHAP_SUPPORT
572
573
/* MSCHAP require MD4 support */
574
#define LWIP_INCLUDED_POLARSSL_MD4 1
575
/* MSCHAP require SHA1 support */
576
#define LWIP_INCLUDED_POLARSSL_SHA1 1
577
/* MSCHAP require DES support */
578
#define LWIP_INCLUDED_POLARSSL_DES 1
579
580
/* MS-CHAP support is required for MPPE */
581
#if MPPE_SUPPORT
582
/* MPPE require ARC4 support */
583
#define LWIP_INCLUDED_POLARSSL_ARC4 1
584
#endif
/* MPPE_SUPPORT */
585
586
#endif
/* MSCHAP_SUPPORT */
587
588
#endif
/* !LWIP_USE_EXTERNAL_POLARSSL && !LWIP_USE_EXTERNAL_MBEDTLS */
589
590
/* Default value if unset */
591
#ifndef LWIP_INCLUDED_POLARSSL_MD4
592
#define LWIP_INCLUDED_POLARSSL_MD4 0
593
#endif
/* LWIP_INCLUDED_POLARSSL_MD4 */
594
#ifndef LWIP_INCLUDED_POLARSSL_MD5
595
#define LWIP_INCLUDED_POLARSSL_MD5 0
596
#endif
/* LWIP_INCLUDED_POLARSSL_MD5 */
597
#ifndef LWIP_INCLUDED_POLARSSL_SHA1
598
#define LWIP_INCLUDED_POLARSSL_SHA1 0
599
#endif
/* LWIP_INCLUDED_POLARSSL_SHA1 */
600
#ifndef LWIP_INCLUDED_POLARSSL_DES
601
#define LWIP_INCLUDED_POLARSSL_DES 0
602
#endif
/* LWIP_INCLUDED_POLARSSL_DES */
603
#ifndef LWIP_INCLUDED_POLARSSL_ARC4
604
#define LWIP_INCLUDED_POLARSSL_ARC4 0
605
#endif
/* LWIP_INCLUDED_POLARSSL_ARC4 */
606
607
#endif
/* PPP_SUPPORT */
608
609
/* Default value if unset */
610
#ifndef PPP_NUM_TIMEOUTS
611
#define PPP_NUM_TIMEOUTS 0
612
#endif
/* PPP_NUM_TIMEOUTS */
613
614
#endif
/* LWIP_PPP_OPTS_H */
opt.h
core
ps2ip
include
lwip_include
netif
ppp
ppp_opts.h
Generated by
1.18.0