Disabled Unix-centric non necessary include files
Changed some include paths
Removed all printf() I put there and there for debugging.
It builds with the avr32 gcc toolchain, meaning we removed
all the pppd code requiring a unix base.
However, as of now, the notify() function is empty, so it requires
some work if someone want to use it.
The notify feature allows someone to be able to follow the
state of the PPP stack (auth ok, ipcp up, initialise, ...), this
is like the callback feature set by pppOverEthernetOpen() and others,
but with more details.
Removed all the used Linux ioctl(), sys_linux.c is entirely disabled.
Replaced unecessary functions to set up a PPP link to null fonctions,
however all stuff necessary to shutdown a PPP link should be done.
Some utils functions related to I/O files are disabled too.
ECP and CCP support only set PPP attributes into the PPP kernel support,
they are now compile-time options and are disabled by default and
obviously not supported (yet? :p)
OpenBSD DES require more than 70 kB of static memory.
The GNU libcrypt DES, for information, require more than 131 kB,
so this is probably the case with all non memory optimised DES.
PolarSSL only required 132 bytes of stack with some kB of .rodata
precomputed tables :-)
I personally don't need MS CHAP v1 or MS CHAP v2, and that was not
supported in the previous PPP port, so there is no regression,
I feel comfortable about removing those hard to port stuff.
If someone want to do the MS CHAP port, he first have to find or
do a small memory footprint DES implementation.
About multilink support.
Multilink uses Samba TDB (Trivial Database Library), which
we cannot port, for the above reason.
We have to choose between doing a memory-shared TDB-clone,
or dropping multilink support at all.
PPPoE works, PPPoS code is not ported at all.
I am using the RP-PPPoE server to do my tests using the following
configuration:
$ cat /etc/ppp/pppoe-server-options
debug
login
lcp-echo-interval 10
lcp-echo-failure 10
ms-dns 192.168.4.130
ms-dns 192.168.4.231
netmask 255.255.255.0
defaultroute
noipdefault
usepeerdns
$ cat /etc/ppp/allip
192.168.4.1-200
$ pppoe-server -C isp -L 192.168.4.254 -p /etc/ppp/allip -I tap0
Plus the usual auth-lines in /etc/ppp/pap-secrets and
/etc/ppp/chap-secrets .
And the unix port minimal "echo" project slightly modified to use
the "tcpip" API, so with threads, which I am going to commit with
NO_SYS as a -Dmacro.
It still use some of the linux'ism, such as syslog() and crypt(),
I do not want to drop the syslog() supports at the moment, this is
pretty useful to debug, and we may just convert the way the syslog() is
done to provide a trace feature to our PPP users, as a compile-time
option.