History log of /seL4-camkes-master/projects/lwip/src/include/netif/ppp/ppp.h
Revision Date Author Comments
# c3d8b1ca 23-Jul-2018 Simon Goldschmidt <goldsimon@gmx.de>

add 'extern "C" {}' for cplusplus in ppp headers


# dde55c6c 05-Nov-2016 Sylvain Rochet <gradator@gradator.net>

PPP, IPCP: fix reset state before reconnecting

Commit 7df5496e7b revealed a regression introduced in commit 5a71509353
which broke IPCP reset state.

ask_for_local was set to 0 if ouraddr initial value is 0, if
ask_for_local was false go->ouraddr was cleared in reset callback,
commit 5a71509353 breaks it by removing this clearing. This regression
was silent because the whole ppp pcb runtime data was cleared before
reconnecting until commit 7df5496e7b which removed this giant clearing.

Fix it by reintroducing ask_for_local boolean value, with proper initial
value following what unused function ip_check_options do.

Fixes: 7df5496e7b ("PPP, rework initial/reconnect cleanup")
Fixes: 5a71509353 ("PPP, CORE, IPCP: removed useless ask_for_local boolean")


# f185104a 07-Aug-2016 Sylvain Rochet <gradator@gradator.net>

PPP: revamp PPP state order

Master state is almost exactly the same thing as dead state, move it
next to dead state. Holdoff state is actually the state just before
initialize, move it before initialize.

The goal is to be able to use > running or => terminate condition to
check a currently running disconnection phase, which is not possible
today without excluding master and holdoff states.


# 5d4c1432 18-Jul-2016 Dirk Ziegelmeier <dirk@ziegelmeier.net>

Fix bug #48436: Naming clash for timers.c (with FreeRTOS)
Rename timers.* to timeouts.*


# 28aaf2ca 02-Jul-2016 Sylvain Rochet <gradator@gradator.net>

PPP: introduce ppp_set_neg_pcomp, ppp_set_neg_accomp, ppp_set_neg_asyncmap, ppp_set_asyncmap

We are now able to add as many macros as necessary to change the PPP
configuration. Those are various usually used PPP options.


# 40e9eae7 02-Jul-2016 Sylvain Rochet <gradator@gradator.net>

PPP: improve various comments on options


# e7069d6e 02-Jul-2016 Sylvain Rochet <gradator@gradator.net>

PPP: introduce ppp_set_passive and ppp_set_silent

There is two passive modes for PPPoS, passive more, for which we will
try to connect and then listen silently, and silent mode, for which we
will listen silently from the beginning.

Introduce ppp_set_passive and ppp_set_silent so the mode can be chosen
before connecting/listening.


# f21aede0 02-Jul-2016 Sylvain Rochet <gradator@gradator.net>

PPP: don't build ppp_set_auth if no authenticator are enabled

For our few users which might disable all authenticators to save some
flash, ensure that everything using authentication is build out.


# 50b5b4c4 02-Jul-2016 Sylvain Rochet <gradator@gradator.net>

PPP, PPPAPI: remove useless pppapi_set_auth function

Setting PPP authentication most only be done when the PPP PCB is in the
dead phase (i.e. disconnected). This is safe to access the PPP PCB
members while the session is down, therefore providing a thread-safe
function of it is meaningless and it might even be misleading.

All our new ppp_set_* functions do not have their equivalent
pppapi_set_* functions and they are not going to have them. At least
we make ppp_set_auth consistent with all others ppp_set_*, so that it
doesn't look like special.


# b9b36084 02-Jul-2016 Sylvain Rochet <gradator@gradator.net>

PPP: introduce ppp_set_mppe

Helper function to setup MPPE (Microsoft Point to Point Encryption) for
a PPP link. Allows enabling/disabled MPPE itself, enabling/disabling
stateless support, and whether we are willing to negotiate 40-bit
and/or 128-bit encryptions.


# ddac5b18 26-Jun-2016 Sylvain Rochet <gradator@gradator.net>

PPP: introduce ppp_set_listen_time

Wait for up to the specified milliseconds for a valid PPP packet from
the peer. At the end of this time, or when a valid PPP packet is
received from the peer, we commence negotiation by sending our first
LCP packet.

This is useful because PPP does not deal properly when both peers
are sending the first LCP packet in the exact same time, which causes
delays because they both wait for a reply for their own packet.


# 96296947 26-Jun-2016 Sylvain Rochet <gradator@gradator.net>

PPP: introduce ppp_set_auth_required macro

PPP auth required flag is currently hardcoded to true if PPP is
acting as a server and set to false if PPP is acting as a client.

This is probably the most wanted behavior, but since we now have the
ability to change that at runtime, allow users to do it.

It means we can now have a server which asks the client to authenticate
or vice versa. This is pretty unusual thought. What we don't support
yet is mutual authentication with a different set of user and password
per direction which is even less usual.


# 9015c284 26-Jun-2016 Sylvain Rochet <gradator@gradator.net>

PPP, DNS: introduce ppp_set_usepeerdns macro

PPP use peer DNS setting is currently hardcoded to true if PPP is
acting as a client and set to false if PPP is actinf as a server.

This is probably the most wanted behavior, but since we now have the
ability to change that at runtime, allow users to do it.

We don't have a way to have a different default configuration if the
PPP PCB is going to be used as a client or as a server, therefore the
default configuration should be fine for both of them. Since enabling
peer DNS by default is dangerous for server mode, the default is now
not to ask for DNS servers and it should now be explicitely enabled
if needed, update the documentation accordingly.


# 3d684cda 26-Jun-2016 Sylvain Rochet <gradator@gradator.net>

PPP, PPPoS, SERVER: remove useless struct ppp_addrs* argument from pppos_listen

Now that we have helpers to set those members externaly, pppos_listen
struct ppp_addrs* argument does not add any value. In addition it
was not a well chosen design choice because the user needed to keep a
copy of struct ppp_addrs when listening again for a new connection.


# 71ca26b2 26-Jun-2016 Sylvain Rochet <gradator@gradator.net>

PPP, add configuration macros to set IPCP our, his, and DNS IPv4 addresses

Mostly for PPP server support, but not limited too, we need a way to
configure static IPv4 addresses for our side (our), peer side (his),
and two DNS server addresses if peer asks for them.


# 224d5a9f 23-Jun-2016 Sylvain Rochet <gradator@gradator.net>

PPP, fix comment about opt.h (moved to ppp_opts.h)

PPP defines were moved from opt.h to ppp_opts.h but comments
referencing opt.h in PPP were not updated.


# 7df5496e 19-Jun-2016 Sylvain Rochet <gradator@gradator.net>

PPP, rework initial/reconnect cleanup

Our previous way of doing it was to clear everything except a small part
of the ppp_pcb structure and then populate the structure with default
values using protocols init functions.

But it means the user is currently not allowed to change the default
configuration except the few flags and values that are currently
available in the ppp_settings structure.

Instead of adding more and more fields to the ppp_settings structure,
actually making them duplicate of already existing structure members
of ppp_pcb, but unfortunately cleaned, we carefully checked that
everything is properly cleaned during protocol lowerdown/close and
replaced our giant memset to selective memset of the few ppp_pcb
members that are not properly cleaned.


# b9389c6e 10-May-2016 Sylvain Rochet <gradator@gradator.net>

PPP: remove sio.h from included files

PPP is not using the SIO API anymore for quite a while. Remove now
useless sio.h from included files.


# 2b5250dd 25-Apr-2016 Dirk Ziegelmeier <dirk@ziegelmeier.net>

Fix bug #47507: PPP API does not support LWIP_MPU_COMPATIBLE
I'd be glad if someone would test it :-)
Sylvain, if you don't like this patch feel free to revert it


# 76d25bef 21-Apr-2016 Dirk Ziegelmeier <dirk@ziegelmeier.net>

Work on task #13907 PPP cleanups: Move PPP options from opt.h to dedicated ppp_opts.h file


# 6185bf6f 19-Jan-2016 Sylvain Rochet <gradator@gradator.net>

PPP: CCP: don't drop output packets if CCP negotiated that we don't compress on our side

CCP might negotiate to not compress if peers cannot agree on a
compressor, therefore if the null compressor is chosen we must pass
packets as is instead of dropping them.

Reported-by: Stephan Linz <linz@li-pro.net>
Fixes: 987f6237c4 "PPP, MPPE, drop input/output packets if we couldn't find the chosen decompressor/compressor"
Signed-off-by: Sylvain Rochet <gradator@gradator.net>


# 78e1b9b7 01-May-2015 Sylvain Rochet <gradator@gradator.net>

PPP, don't store the name by which the peer authenticated itself to us if multilink support is disabled

pcb->peer_authname is only used by multilink support (which we don't
support), don't store the useless peer authname.


# 5989c188 21-Apr-2015 Sylvain Rochet <gradator@gradator.net>

PPP, removed useless padding in bitfields

Most of them were wrong actually. We have to use unsigned int because
C90 only allows int types for bitfields, so we are stuck to 32-bit
bitfields in most cases.


# b302cad4 19-Apr-2015 Sylvain Rochet <gradator@gradator.net>

PPP, VJ, CCP: rework to fix protocol order

We need to do VJ compression before CCP/MPPE compression and VJ
decompression after CCP/MPPE decompression. This leads to a massive
rewrite of how we currently handled VJ only in the PPPoS lower protocol
handler.

Moved VJ structures from pppos to ppp_pcb because we need them back in
PPP core. This is a bit unfortunate because that's not necessary for
PPPoE or PPPoL2TP, but, hey!. Fixed CCP+MPPE+VJ order.


# 71d085bd 19-Apr-2015 Sylvain Rochet <gradator@gradator.net>

PPP, CCP, added data packet configuration in ppp_pcb


# f94efab6 18-Apr-2015 Sylvain Rochet <gradator@gradator.net>

PPP, CCP, added MPPE user configuration flags


# fc7e327d 18-Apr-2015 Sylvain Rochet <gradator@gradator.net>

PPP, MSCHAP, CCP, MPPE: reworked key passing from CCP to MPPE

Removed mutiple copies of keys by pre-setting MPPE keys during MSCHAP
negotiation.

Improved MPPE init so we don't need to pass a buffer formatted in a
special way to MPPE, this is necessary for pppd to talk to the kernel,
we don't need that here.


# 40991b93 18-Apr-2015 Sylvain Rochet <gradator@gradator.net>

PPP, CCP, reworked ppp_pcb ccp_localstate and all_rejected fields


# 2a005c2f 18-Apr-2015 Sylvain Rochet <gradator@gradator.net>

PPP, MPPE, moved MPPE global variables from MSCHAP to ppp_pcb


# c51ed84f 18-Apr-2015 Sylvain Rochet <gradator@gradator.net>

PPP, MPPE, added ppp_mppe_state comp and decomp to ppp.h


# b553df86 17-Apr-2015 Sylvain Rochet <gradator@gradator.net>

PPP, CCP, deflate, BSD compress, predictor 1 & 2 are now optional at compile time


# ce7e31cd 09-Apr-2015 sg <goldsimon@gmx.de>

task #12722 (improve IPv4/v6 address handling): renamed ip_addr_t to ip4_addr_t, renamed ipX_addr_t to ip_addr_t and added IP version;
ip_addr_t is used for all generic IP addresses for the API, ip(4/6)_addr_t are only used internally or when initializing netifs or when calling version-related functions


# 0bfe435c 28-Mar-2015 Sylvain Rochet <gradator@gradator.net>

PPP, MPPE, updated polarssl ARC4 for lwIP


# 9fbe9009 19-Mar-2015 Sylvain Rochet <gradator@gradator.net>

PPP, MPPE, replaced #ifdef MPPE to #if MPPE_SUPPORT


# 73f1511a 19-Mar-2015 Sylvain Rochet <gradator@gradator.net>

PPP, CORE, removed auth fields from struct ppp_pcb if auth is disabled


# 59379323 18-Mar-2015 Sylvain Rochet <gradator@gradator.net>

PPP, CCP, various fix if MPPE is enabled


# 2a6104ab 18-Mar-2015 Sylvain Rochet <gradator@gradator.net>

PPP, CCP, added ccp.h in ppp.h


# 7174578a 17-Mar-2015 Sylvain Rochet <gradator@gradator.net>

PPP, CCP, moved CCP global variables to ppp_pcb (ppp.h)


# 50336aae 13-Mar-2015 Sylvain Rochet <gradator@gradator.net>

PPP, ppp->last_xmit is only used in PPPoS, moved to PPPoS

Only PPPoS need to keep track of last transmitted packet for HDLC flag,
removed from PPPoE and PPPoL2TP and moved to PPPoS.


# 02598d1e 10-Mar-2015 Sylvain Rochet <gradator@gradator.net>

PPP, PPPoS, moved pcomp and accomp only used by PPPoS to PPPoS


# 31aea3c9 10-Mar-2015 Sylvain Rochet <gradator@gradator.net>

PPP, PPPoS, moved vj_enabled flag from PPP CORE to PPPoS

Now that we have flags in PPPoS, moved vj_enabled only used for PPPoS to
PPPoS.


# 99bcce78 08-Mar-2015 Sylvain Rochet <gradator@gradator.net>

PPP, IPCP, removed proxy ARP support


# b3c7e948 07-Mar-2015 Sylvain Rochet <gradator@gradator.net>

PPP, removed now useless struct ppp_addrs from ppp_pcb

Saved a few bytes of useless copy.


# b3218d45 07-Mar-2015 Sylvain Rochet <gradator@gradator.net>

PPP, make DNS a little more optional if LWIP_DNS is unset


# 2731976a 01-Mar-2015 Sylvain Rochet <gradator@gradator.net>

PPP, renamed ppp_open to ppp_connect

Makes it clear we are initiating the PPP session with ppp_connect
(i.e. acting as a PPP client) so there is no confusion possible
between ppp_connect and ppp_listen.


# 371bc91d 28-Feb-2015 Sylvain Rochet <gradator@gradator.net>

PPP, SERVER: added PPPoS server support

New function: ppp_listen(), listen for an incoming PPP connection.


# 3686110e 28-Feb-2015 Sylvain Rochet <gradator@gradator.net>

PPP, SERVER: statically define our name for authentication purposes

We don't need that in RAM nor a pointer to a string, a static
define is fine for embedded devices, saved ~257 bytes of RAM.


# 587e0e3e 27-Feb-2015 Sylvain Rochet <gradator@gradator.net>

PPP, CORE, beautified ppp_set_auth()

Beautified, added PPPAUTHTYPE_MSCHAP_V2 choice support.


# 2315f32c 27-Feb-2015 Sylvain Rochet <gradator@gradator.net>

PPP, CORE, cleaned struct ppp_settings coding style


# 5a715093 27-Feb-2015 Sylvain Rochet <gradator@gradator.net>

PPP, CORE, IPCP: removed useless ask_for_local boolean

We don't need ask_for_local boolean, this is only useful for setup which
can determine the local IP address from the system hostname, which is
probably meaningless for embedded devices (and probably any devices).

It was actually only set by ip_check_options() which is commented out in
lwIP because we don't parse a config file nor check PPP configuration
(user is responsible about writing a configuration which is logical ;-).
Furthermore ask_for_local boolean never set actually had the wrong
default for PPP server setups.


# 4bcddd72 24-Feb-2015 Sylvain Rochet <gradator@gradator.net>

PPP, CORE, cleaned ppp_close() function

Calling new_phase() instead of assigning pcb->phase directly.
Removed redundant call to link status callback.


# 00bb70a6 24-Feb-2015 Sylvain Rochet <gradator@gradator.net>

PPP, CORE, functions ppp_set_netif_statuscallback() and ppp_set_netif_linkcallback() replaced with defines

PPP is now pointerful for a while, we don't need anymore accessor functions
for the unique PPP local and static control block. Replaced
ppp_set_netif_statuscallback() and ppp_set_netif_linkcallback() functions to
defines.

Removed pppapi_do_ppp_set_netif_statuscallback() and
pppapi_do_ppp_set_netif_linkcallback(), they were useless because
netif_set_status_callback() and netif_set_link_callback() can be
safely called while PPP status is in dead (= non open) state
and even before the PPP session is actually created at all.


# b0b72400 22-Feb-2015 Sylvain Rochet <gradator@gradator.net>

PPP, PPPoS, moved advise about modem from pppos_create() to ppp_open()

pppos_create() can be called whether the modem is ready to process the
PPP session since pppos_create() does not start the PPP session anymore,
moved the advise from pppos_create() to ppp_open().


# 4be7fcca 22-Feb-2015 Sylvain Rochet <gradator@gradator.net>

PPP, CORE, ppp_close() and ppp_sighup() ended up sharing almost everything, merged

Merged ppp_sighup() to ppp_close() using an optional argument "nocarrier"
on ppp_close().


# a1c5415f 21-Feb-2015 Sylvain Rochet <gradator@gradator.net>

PPP, CORE, disable VJ is PPP IPV4 is compiled out

VJ compression is only supported for PPP IPv4, compile out VJ support
if PPP IPv4 is not compiled.


# 00e8988b 21-Feb-2015 Sylvain Rochet <gradator@gradator.net>

PPP, IPv4 support is now optional

New compile time option: PPP_IPV4_SUPPORT

PPP IPv4 support can now be compiled out.


# d6e1b861 21-Feb-2015 Sylvain Rochet <gradator@gradator.net>

PPP, CORE, improved, re-ordered and re-numbered IOCTL commands


# dc2e7000 21-Feb-2015 Sylvain Rochet <gradator@gradator.net>

PPP, CORE, using u8_t on ioctl command instead of int

We don't need an int here, all commands are between 0 and 255.


# 59b659b0 21-Feb-2015 Sylvain Rochet <gradator@gradator.net>

PPP, CORE, compile out auth support if none of auth protocols are enabled

Added macro PPP_AUTH_SUPPORT, if none of auth protocols are enabled
(PAP, CHAP, EAP) we reduce PPP memory usage by compiling out all
struct fields and source code used for authentication.


# f57d4818 20-Feb-2015 Sylvain Rochet <gradator@gradator.net>

PPP, using PPP netif->num number instead of ppp->num

Saved 2 bytes of RAM if debug is enabled, we are now using the
netif->num number instead of using our own ppp->num


# 6b4db944 20-Feb-2015 Sylvain Rochet <gradator@gradator.net>

PPP, using err_t return code instead of PPPERR_

Standardised PPP API to follow lwIP already used return codes.
PPPERR_ are now used only on link status callback.


# 0a761d23 20-Feb-2015 Sylvain Rochet <gradator@gradator.net>

PPP, using err_t return type on ppp_ioctl()


# 985de035 19-Feb-2015 Sylvain Rochet <gradator@gradator.net>

PPP, CORE, now using const callbacks struct from lower level protocols

Saving some RAM by using callbacks struct in rodata for required
callbacks called by PPP core to PPP low level protocols.


# 1ae3808e 17-Feb-2015 Sylvain Rochet <gradator@gradator.net>

PPP, CORE, prepared for lower protocols callbacks returning state

Until now, callbacks used void return, preparing callbacks to return
PPPERR_ status.


# 69469496 16-Feb-2015 Sylvain Rochet <gradator@gradator.net>

PPP, PPPoS, moved out_accm from PPP core to PPPoS

Last PPPoS variable in PPP core moved to PPPoS.


# baaa2592 16-Feb-2015 Sylvain Rochet <gradator@gradator.net>

PPP, PPPoS, removed xmit_accm, almost duplicate of out_accm

xmit_accm was meant to be a user configurable asyncmap, it was actually
broken since the introduction of ppp_new by the way we now reset the PPP
initial state, looks like no one until now is needing it anymore. If
necessary we will reintroduce this feature later properly instead of a
dirty and ugly hack into the PPP code.


# 34210901 16-Feb-2015 Sylvain Rochet <gradator@gradator.net>

PPP, PPPoS, moved ppp.rx to pppos.rx

PPP rx control block moved to PPPoS


# e6465a6f 15-Feb-2015 Sylvain Rochet <gradator@gradator.net>

PPP, PPPoS, moved VJ from PPP core to PPPoS

VJ is only available for PPPoS, moved VJ from PPP CORE to PPPoS.


# 4aa9244b 15-Feb-2015 Sylvain Rochet <gradator@gradator.net>

PPP, PPPoS moved fd from ppp_pcb to pppos_pcb

Moved fd from ppp_pcb to pppos_pcb.

However PPP ioctl PPPCTLG_FD is temporarily disabled until I found a
better solution.


# 9c15ffbb 15-Feb-2015 Sylvain Rochet <gradator@gradator.net>

PPP: Moved PPPoS from ppp.c to pppos.c

Started removing from PPP core most of low level protocol PPPoS
handling to separate files, using the new low level PPP callbacks.


# 09b44858 15-Feb-2015 Sylvain Rochet <gradator@gradator.net>

PPP, generalized callbacks calls from PPP core, removed all PPPoE and PPPoL2TP references

Almost there, removed all PPPoE and PPPoL2TP references from PPP core,
using the generic callbacks interface everywhere.


# ee85aacc 15-Feb-2015 Sylvain Rochet <gradator@gradator.net>

PPP, removed low level create functions from PPP core

ppp_over_ethernet_create() moved from ppp.c to pppoe.c
ppp_over_l2tp_create() moved from ppp.c to pppol2tp.c


# 0afc34f6 15-Feb-2015 Sylvain Rochet <gradator@gradator.net>

PPP, moved ppp_write and ppp_netif_output low level protocols functions to respective low level protocol files

Moved ppp_write_over_ethernet() and ppp_netif_output_over_ethernet() to pppoe.c
Moved ppp_write_over_l2tp() and ppp_netif_output_over_l2tp() to pppol2tp.c


# 45bfccfd 15-Feb-2015 Sylvain Rochet <gradator@gradator.net>

PPP, prepare new callbacks for low level protocols

New callbacks: write and netif_output


# f8501478 15-Feb-2015 Sylvain Rochet <gradator@gradator.net>

PPP: prepared callbacks from PPP core to low level protocols

New PPP callback from PPP core to low level protocols, first
step about removing named calls to low level protocols from PPP core.


# a5582e09 15-Feb-2015 Sylvain Rochet <gradator@gradator.net>

PPP: re-order functions in the common sense API order

Re-order ppp.[ch] functions in the order functions should be called from
user application. Moved create functions, which actually return a PPP
control block before functions needing a PPP control block.


# 74fd2dc9 14-Feb-2015 Sylvain Rochet <gradator@gradator.net>

PPP: moved ppp_new() to low level protocol init for PPPoE and PPPoL2TP

First step of a rework of how low level protocols are using the
PPP core. Low level protocols are now going to use the core instead
of core using the low level protocols.

Final goal: separate PPP core code from low level protocols.


# 7b681bc9 14-Feb-2015 Sylvain Rochet <gradator@gradator.net>

PPP: re-order functions in the common sense API order

Re-order ppp.[ch] functions in the order functions should be called from
user application. Moved create functions, which actually return a PPP
control block before functions needing a PPP control block.


# c8c0dc2f 14-Feb-2015 Sylvain Rochet <gradator@gradator.net>

PPP: using a macro for ppp_set_default() instead of a function

This function is only calling netif_set_default(), a macro
is adequate.


# 17c6be6a 14-Feb-2015 Sylvain Rochet <gradator@gradator.net>

PPP: removed ppp_delete(), merged with ppp_free()

The only benefit of ppp_delete() call was about having a persistent
netif interface. netif was moved out of PPP pcb so we don't need
ppp_delete() anymore, second step in simplifying the weird
new/open/free/delete PPP API.


# 318e752f 14-Feb-2015 Sylvain Rochet <gradator@gradator.net>

PPP: removed ppp_new(), merged with ppp_over_X_create()

The only benefit of ppp_new() call was about having a persistent netif
interface. netif was moved out of PPP pcb so we don't need ppp_new()
anymore, first step in simplifying the weird new/open/free/delete PPP
API.


# 3dcfd7ba 14-Feb-2015 Sylvain Rochet <gradator@gradator.net>

PPP: moved netif out of PPP control block

Users might want to share a netif control block between an Ethernet
interface and a PPPoS interface (I want actually) in case PPP is just
used as redundancy if Ethernet is down (eg. PPPoS GPRS fail over).

Moved netif out of PPP control block in a similar way it is currently
done for Ethernet interfaces. Furthermore, this is a first step on
removing the "new/create/free/delete" API which is awful but currently
necessary to handle fail over from PPPoX to another PPPoX (eg. from PPoE
on xDSL to PPPoS on GPRS fail over) without free()ing the netif which
might be used on udp_sendto() or L2TP VPN links.


# e39d0123 24-Dec-2014 Sylvain Rochet <gradator@gradator.net>

PPP, from PPPD upstream, separate IPv6 handling for sifup/sifdown

The current code is buggy regarding handling of link state when using
both IPCP and IPv6CP: if IPv6CP has been set up and if during IPCP
negociation, ipcp_up() fails, it will incorrectly take the interface
down. The simple solution here is to change the platform code to do the
same as on Solaris: separate IPv6CP up/down state handling with sif6up()
and sif6down(), so that we really know when the interface is allowed to
go down.

(Based from pppd commit b04d2dc6df5c6b5650fea44250d58757ee3dac4a)


# 7d077a22 24-Dec-2014 Sylvain Rochet <gradator@gradator.net>

PPP,SLIP include lwip/sio.h after lwip/sys.h to prevent functions prototype collision

User port may redefine sio_* functions, we must ensure we are loading
user functions prototypes before loading default prototypes.


# b30faa57 24-Dec-2014 Sylvain Rochet <gradator@gradator.net>

PPP, moved ppp_init() from public API (ppp.h) to private API (ppp_impl.h)

ppp_init() is called by lwip_init(), users don't need to init PPP by themselves


# 482a18e6 24-Dec-2014 Sylvain Rochet <gradator@gradator.net>

PPP, added const modifier on auth strings


# 2b3e0201 24-Dec-2014 Sylvain Rochet <gradator@gradator.net>

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


# 60f920df 12-Oct-2014 Sylvain Rochet <gradator@gradator.net>

fixed bug #43235, checking for non-existent preprocessor macros is non-standard, added predefinition for all affected macros


# 08dd32d3 04-Apr-2014 Sylvain Rochet <gradator@gradator.net>

PPP, most PPP headers are using u_long, u_int, u_short and u_char types, moved typedef of those types before we include any PPP header


# 4fda366b 30-Apr-2013 Sylvain Rochet <gradator@gradator.net>

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 */
}
}


# cf3162cf 26-Apr-2013 Sylvain Rochet <gradator@gradator.net>

PPP, moved PPP_INPROC_MULTITHREADED compile time option from ppp.h to opt.h


# 25f9f558 26-Apr-2013 Sylvain Rochet <gradator@gradator.net>

PPP, removed PPP_INPROC_OWNTHREAD feature, which almost only make things harder

I consider to remove the PPP_INPROC_OWNTHREAD crap in ppp-new,
as said in bugs #37278 and #37353.

1. It requires the ppp_input_thread() function to be modified to match
user system, like some did by adding the vTaskDelete(NULL); FreeRTOS
call at the end of the function, for example.

This is a tiny-tiny fonction that should be, in my opinion, on the user
port, like the Ethernet input thread we see in many Ethernet port.

2. It is actually not that thread safe.

2.1. pcb->phase IS modified by the lwIP core thread so it should at
least be set to volatile, otherwise the pcb->phase copy may live
indefinitely in CPU register. It works because of the sio_read()
function call which without doubt flush pcb->phase copy from CPU
register. I dont want to set ppp_pcb struct to volatile for obvious
performance reasons.

2.2. This function assume PCB still exists whatever is happening, which
is not the case after you called ppp_delete() function outside of this
thread. If sio_read() is blocking waiting data and pcb destroyed, it is
going to read a deallocated pcb which luckily should still have
pcb->phase set to 0 (=PHASE_DEAD) due to preallocated "control block"
structures of lwIP. Even with sio_read_abort(), there might be timings
issue due to a lack of a synchronization mechanism.

3. I dislike the sys_msleep(1), it means that systems should have at
least a 11 chr buffer at 115200/10 byte/s, and bigger with higher serial
speed, for example with 3G/HSDPA modems accessed through SPI, at 20
Mbits/s this is a ~2000 bytes buffer required to keep incoming data
during this sleep, I don't see why we require systems to do so,
sio_read() should obviously be a blocking call. I cannot easily
remove this sleep because some systems might have wrongfully used this
call as a CPU idle feature with a non blocking sio_read() call.


# a1555e06 22-Apr-2013 Sylvain Rochet <gradator@gradator.net>

PPP, added ppp_free()

Free the control block, clean everything except the PPP PCB itself
and the netif, it allows you to change the underlying PPP protocol
(eg. from PPPoE to PPPoS to switch from DSL to GPRS) without losing
your PPP and netif handlers.


# 44b52741 22-Apr-2013 Sylvain Rochet <gradator@gradator.net>

PPP, slight API change, great code factorisation

Created new ppp_over_X_create() functions which only prepare the PPP session without starting it
Removed ppp_reopen() and all of its sub ppp_over_X_reopen()
Removed PPPoL2TP reconnect() function, merged to connect()
Added ppp_open() able to start or restart any session


# d03d2e6d 22-Apr-2013 Sylvain Rochet <gradator@gradator.net>

PPP, added ppp_addrs() macro to get the pointer of the ppp->addrs struct


# 6751ac49 09-Dec-2012 Sylvain Rochet <gradator@gradator.net>

PPP, moved FSM configuration to ppp_settings struct


# 6764957d 09-Dec-2012 Sylvain Rochet <gradator@gradator.net>

PPP, moved EAP configuration to ppp_settings struct


# c719ba7b 09-Dec-2012 Sylvain Rochet <gradator@gradator.net>

PPP, moved PAP configuration to ppp_settings struct


# defef222 09-Dec-2012 Sylvain Rochet <gradator@gradator.net>

PPP, improved PAP and CHAP timeout/request/maxrequests configuration values


# e81f0925 27-Sep-2012 Sylvain Rochet <gradator@gradator.net>

PPP, changed all the code enclosed between PPP_SERVER #if macro to our PPP PCB structure, making it easier to support PPP server in the future


# af56eebc 01-Sep-2012 Sylvain Rochet <gradator@gradator.net>

PPP, cleaned MTU,MRU variables


# fbbde125 01-Sep-2012 Sylvain Rochet <gradator@gradator.net>

PPP, removed unnecessary ethif from ppp_pcb


# dbaefd61 01-Sep-2012 Sylvain Rochet <gradator@gradator.net>

PPP, cleaned persist and holdoff features


# 1ddebcc8 18-Aug-2012 Sylvain Rochet <gradator@gradator.net>

Moved PPP headers into include/netif/ppp/, fixing bug #37040.