Sylvain Rochet
2b3e020152
PPP, fixed some compiler warnings
...
Using -Wall -pedantic -Wparentheses -Wsequence-point
-Wswitch-default -Wextra -Wundef -Wshadow -Wpointer-arith
-Wbad-function-cast -Wc++-compat -Wwrite-strings -Wold-style-definition
-Wmissing-prototypes -Wredundant-decls -Wnested-externs -Wno-address
2014-12-24 15:16:03 +01:00
Sylvain Rochet
da19974e81
fixed bug #43235 , cleared compiler warnings when using gcc with -Wextra option
2014-10-12 19:54:43 +02:00
Sylvain Rochet
4fda366b67
PPP, added PPP notify phase support
...
PPP notify phase support, using compile-time PPP_NOTIFY_PHASE macro.
This can be used for example to set a LED pattern depending on the
current phase of the PPP session.
Callback example:
static void ppp_notify_phase_cb(ppp_pcb *pcb, u8_t phase, void *ctx) {
switch(phase) {
case PPP_PHASE_DEAD: /* Kept off */
case PPP_PHASE_MASTER:
/* LED Off */
break;
case PPP_PHASE_INITIALIZE: /* Session opened */
/* LED FastBlink */
break;
case PPP_PHASE_RUNNING: /* Session running */
/* LED On */
break;
default:
/* LED SlowBlink */
}
}
2013-04-30 15:16:09 +02:00
Sylvain Rochet
2350d941a5
PPP, added PPP_USE_PBUF_RAM compile time option
...
pbuf_type PPP is using for LCP, PAP, CHAP, EAP, IPCP and IP6CP packets.
Memory allocated must be single buffered for PPP to works, it requires pbuf
that are not going to be chained when allocated. This requires setting
PBUF_POOL_BUFSIZE to at least 512 bytes, which is quite huge for small systems.
Setting PPP_USE_PBUF_RAM to 1 makes PPP use memory from heap where continuous
buffers are required, allowing you to use a smaller PBUF_POOL_BUFSIZE.
2013-04-26 21:51:15 +02:00
Sylvain Rochet
2fa7e003b1
PPP, fixed LCP delayed up feature
...
LCP is stealing a bit from fsm->flags struct member for LCP delayed up feature.
Bit stealed used to be the 9th bit (0x100) but fsm->flags was reduced to u8_t to save memory,
we are now stealing the 8th bit (0x80).
2013-01-31 15:36:30 +01:00
Sylvain Rochet
de1375201f
PPP, "try" variable used in LCP might conflict with some buggy C++ compiler
2013-01-04 23:08:11 +01:00
Sylvain Rochet
13ba8810c7
PPP, fixed one more IAR warnings
2013-01-04 22:51:13 +01:00
Sylvain Rochet
e5a554f0b5
PPP, adding const pragma to FSM callbacks, saving about 350 bytes in .data segment
2012-10-13 18:54:25 +02:00
Sylvain Rochet
9e4aa79278
PPP, adding const pragma to struct protent, saving about 200 bytes in .data segment
2012-10-13 18:38:18 +02:00
Mark Lakata
0eb83f6ee6
PPP, IAR EWARM won't compile ppp-new due to keyword clash
...
The word "class" is reserved in IAR's EWARM compiler since it looks like c++.
This causes a failure to compile in the lcp code.
Arguably it is a bug in the compiler, but it is easy to work around with a
name change in the lcp.[ch] code. I fixed it by changing "class" to "class_".
2012-10-12 20:17:40 +02:00
Sylvain Rochet
045ee53468
PPP, using PBUF_POOL instead of PBUF_RAM pbufs for PPP negociation packets
...
PPP stack does not handle chained pbuf, but PPP negociation packets
are at most ~40 bytes long, so we are only checking if the payload
can fit into the allocated pbuf (p->tot_len == p->len).
2012-08-27 00:47:21 +02:00
Sylvain Rochet
e9b29184d0
PPP, renamed all functions using common names in utils.c that can conflict with lwIP user code during link operation
2012-08-21 20:21:38 +02:00
Sylvain Rochet
1ddebcc862
Moved PPP headers into include/netif/ppp/, fixing bug #37040 .
2012-08-18 22:40:19 +02:00
Sylvain Rochet
4ea5c1d973
improved persist mode, we now clear everything we can in the PPP control block structure, ensuring we start a new session from a clean state
2012-07-21 00:26:23 +02:00
Sylvain Rochet
b4df26a75d
some buggy compiler get confused with duplicated labels used in enum tcp_state and fsm.h, prepending PPP's ones
2012-07-09 22:04:09 +02:00
Sylvain Rochet
be9b23a082
fixed LCP Echo Request/Reply feature
2012-07-07 12:16:48 +02:00
Sylvain Rochet
90faecd86e
replaced u_int{8,16,32}_t to lwIP u{8,16,32}_t types
...
added padding to compiler generated bitfield, this is seen as best practice,
maybe it helps buggy compilers
2012-07-03 22:59:50 +02:00
Sylvain Rochet
25c6278000
fixed some endianess issues with PPPoS
2012-06-23 02:27:03 +02:00
Sylvain Rochet
6a11134a18
fixed PPPoS suppport compilation
2012-06-22 17:53:39 +02:00
Sylvain Rochet
e330983408
improved lcp_options structure size
2012-06-20 00:03:08 +02:00
Sylvain Rochet
c51c55b782
LCP and IPCP variable size improved
2012-06-19 23:25:57 +02:00
Sylvain Rochet
26250f1953
removed pcb->chap_mdtype_all
2012-06-19 23:14:31 +02:00
Sylvain Rochet
eadd56a376
replaced exit code (pcb->status) with ppp_ioctl()
2012-06-19 22:00:12 +02:00
Sylvain Rochet
a44b56dc61
pcb->nak_buffer replaced with a pbuf
2012-06-19 15:36:53 +02:00
Sylvain Rochet
be2d3b5886
moved back temporarily moved structure definitions from various headers to ppp.h during unit to ppp_pcb transition
2012-06-17 02:33:47 +02:00
Sylvain Rochet
cce5fbc7b1
fixed PPPoS xmit_accm ppp_pcb variable access
2012-06-16 03:58:48 +02:00
Sylvain Rochet
82a4d4ec65
LCP global variables moved to ppp_pcb as well as input/output buffers
2012-06-16 03:53:05 +02:00
Sylvain Rochet
708147625f
FSM global variables moved to ppp_pcb
2012-06-16 03:30:36 +02:00
Sylvain Rochet
f10ddea305
removed fsm->unit
2012-06-16 03:14:26 +02:00
Sylvain Rochet
4a8ff6d824
protent prototype switched from unit to ppp_pcb
2012-06-16 02:43:13 +02:00
Sylvain Rochet
4b7e3af77c
IPCP and LCP structures moved to ppp_pcb
2012-06-16 02:13:50 +02:00
Sylvain Rochet
19238a910c
global variables removed from chap support
2012-06-15 01:22:01 +02:00
Sylvain Rochet
51bfac71b0
auth.c functions now use ppp_pcb* as first argument
2012-06-14 00:08:56 +02:00
Sylvain Rochet
6e2722a6d3
started the unit to ppp_pcb replacement
2012-06-11 01:39:03 +02:00
Sylvain Rochet
fed76f29d0
added missing EAP_SUPPORT macro
2012-06-09 23:38:26 +02:00
Sylvain Rochet
444646b65e
renamed ppp_control to ppp_pcb, replaced unit number to ppp_pcb in all ppp.h declared functions
2012-06-09 23:06:45 +02:00
Sylvain Rochet
8bd508a73d
moved ppp_settings to ppp_control, improved PPP API to really allow multiple PPP sessions
2012-06-09 18:06:55 +02:00
Sylvain Rochet
f94ed922e5
moved exit status global variable to ppp_control
2012-06-09 16:43:12 +02:00
Sylvain Rochet
7a57d28db4
moved listen_time global variable to ppp_settings
2012-06-09 16:18:01 +02:00
Sylvain Rochet
42f672d85d
phase global variable moved to ppp_control structure
2012-06-09 15:39:16 +02:00
Sylvain Rochet
552589f098
removed multilink option when multilink support is not compiled
2012-06-09 14:14:06 +02:00
Sylvain Rochet
dc0e15a74e
we should reduce nak_buffer[] size
2012-06-04 22:22:37 +02:00
Sylvain Rochet
c549dba725
re-enabled LCP echo interval / echo fail
2012-06-04 16:25:16 +02:00
Sylvain Rochet
bea45b3c30
cleared IDE warnings
2012-06-04 00:59:24 +02:00
Sylvain Rochet
093c7b4386
cleaned depreacted __P() and __V() macros, removed the legacy varargs.h header
2012-06-04 00:34:28 +02:00
Sylvain Rochet
3bad9ff50a
ppp_impl.h is back!
2012-06-03 20:25:32 +02:00
Sylvain Rochet
0663421d01
re-added PPPoS code from the previous port, it builds, maybe it works
2012-06-03 20:05:40 +02:00
Sylvain Rochet
2f5f86d6fc
don't build any PPP file if PPP support is disabled
2012-06-03 16:38:26 +02:00
Sylvain Rochet
05817aa3b9
LQR (Link Quality Report) support is now optional
2012-06-03 14:02:25 +02:00
Sylvain Rochet
e1261c9620
removed all system headers except the strict minimum
2012-06-02 23:29:40 +02:00