mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2025-04-09 21:44:21 +00:00
make it build with avr32-gcc
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.
This commit is contained in:
parent
28b9dd50ff
commit
5531bca078
@ -80,16 +80,20 @@
|
||||
#include <string.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#if 0
|
||||
#include <sys/socket.h>
|
||||
#include <utmp.h>
|
||||
#endif
|
||||
#include <fcntl.h>
|
||||
#if defined(_PATH_LASTLOG) && defined(__linux__)
|
||||
#include <lastlog.h>
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
#include <netdb.h>
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef HAS_SHADOW
|
||||
@ -759,8 +763,6 @@ link_established(unit)
|
||||
int i;
|
||||
struct protent *protp;
|
||||
|
||||
printf("AUTH: link_established() called");
|
||||
|
||||
/*
|
||||
* Tell higher-level protocols that LCP is up.
|
||||
*/
|
||||
@ -1525,18 +1527,18 @@ auth_reset(unit)
|
||||
}
|
||||
|
||||
#if PAP_SUPPORT
|
||||
printf("neg_upap: %d\n", ao->neg_upap);
|
||||
PPPDEBUG(LOG_DEBUG, ("neg_upap: %d\n", ao->neg_upap) );
|
||||
#endif /* PAP_SUPPORT */
|
||||
#if CHAP_SUPPORT
|
||||
printf("neg_chap: %d\n", ao->neg_chap);
|
||||
printf("neg_chap_md5: %d\n", !!(ao->chap_mdtype&MDTYPE_MD5) );
|
||||
PPPDEBUG(LOG_DEBUG, ("neg_chap: %d\n", ao->neg_chap) );
|
||||
PPPDEBUG(LOG_DEBUG, ("neg_chap_md5: %d\n", !!(ao->chap_mdtype&MDTYPE_MD5)) );
|
||||
#if MSCHAP_SUPPORT
|
||||
printf("neg_chap_ms: %d\n", !!(ao->chap_mdtype&MDTYPE_MICROSOFT) );
|
||||
printf("neg_chap_ms2: %d\n", !!(ao->chap_mdtype&MDTYPE_MICROSOFT_V2) );
|
||||
PPPDEBUG(LOG_DEBUG, ("neg_chap_ms: %d\n", !!(ao->chap_mdtype&MDTYPE_MICROSOFT)) );
|
||||
PPPDEBUG(LOG_DEBUG, ("neg_chap_ms2: %d\n", !!(ao->chap_mdtype&MDTYPE_MICROSOFT_V2)) );
|
||||
#endif /* MSCHAP_SUPPORT */
|
||||
#endif /* CHAP_SUPPORT */
|
||||
#if EAP_SUPPORT
|
||||
printf("neg_eap: %d\n", ao->neg_eap);
|
||||
PPPDEBUG(LOG_DEBUG, ("neg_eap: %d\n", ao->neg_eap) );
|
||||
#endif /* EAP_SUPPORT */
|
||||
|
||||
#if 0 /* OLD CODE */
|
||||
@ -1987,10 +1989,6 @@ get_secret(unit, client, server, secret, secret_len, am_server)
|
||||
strlcpy(rname, ppp_settings.user, sizeof(rname));
|
||||
strlcpy(secret, ppp_settings.passwd, sizeof(secret));
|
||||
secret_len = strlen(secret);
|
||||
|
||||
printf("CHAP USER = %s\n", ppp_settings.user);
|
||||
printf("CHAP PASS = %s\n", ppp_settings.passwd);
|
||||
printf("CHAP PASS LEN = %s\n", strlen(secret));
|
||||
*/
|
||||
|
||||
FILE *f;
|
||||
|
@ -343,8 +343,6 @@ fsm_input(f, inpacket, l)
|
||||
u_char code, id;
|
||||
int len;
|
||||
|
||||
printf("fsm_input: l = %d\n", l);
|
||||
|
||||
/*
|
||||
* Parse header (code, id and length).
|
||||
* If packet too short, drop it.
|
||||
@ -423,8 +421,6 @@ fsm_rconfreq(f, id, inp, len)
|
||||
{
|
||||
int code, reject_if_disagree;
|
||||
|
||||
printf("fsm_rconfreq() called, f->state = %d\n", f->state);
|
||||
|
||||
switch( f->state ){
|
||||
case CLOSED:
|
||||
/* Go away, we're closed */
|
||||
@ -464,7 +460,6 @@ fsm_rconfreq(f, id, inp, len)
|
||||
/* send the Ack, Nak or Rej to the peer */
|
||||
fsm_sdata(f, code, id, inp, len);
|
||||
|
||||
printf("fsm_rconfreq() code = %d, f->state = %d\n", code, f->state);
|
||||
if (code == CONFACK) {
|
||||
if (f->state == ACKRCVD) {
|
||||
UNTIMEOUT(fsm_timeout, f); /* Cancel timeout */
|
||||
|
@ -51,12 +51,16 @@
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#if 0
|
||||
#include <netdb.h>
|
||||
#endif
|
||||
#include <sys/param.h>
|
||||
#include <sys/types.h>
|
||||
#if 0
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
#endif
|
||||
|
||||
#include "ppp.h"
|
||||
|
||||
|
@ -2199,8 +2199,6 @@ lcp_up(f)
|
||||
lcp_options *ao = &lcp_allowoptions[f->unit];
|
||||
int mtu, mru;
|
||||
|
||||
printf("LCP IS UP !\n");
|
||||
|
||||
if (!go->neg_magicnumber)
|
||||
go->magicnumber = 0;
|
||||
if (!ho->neg_magicnumber)
|
||||
|
@ -42,7 +42,7 @@
|
||||
#include "lwip/opt.h"
|
||||
#if LWIP_INCLUDED_POLARSSL_DES
|
||||
|
||||
#include "polarssl/des.h"
|
||||
#include "des.h"
|
||||
|
||||
/*
|
||||
* 32-bit integer manipulation macros (big endian)
|
||||
|
@ -42,7 +42,7 @@
|
||||
#include "lwip/opt.h"
|
||||
#if LWIP_INCLUDED_POLARSSL_MD4
|
||||
|
||||
#include "polarssl/md4.h"
|
||||
#include "md4.h"
|
||||
|
||||
/*
|
||||
* 32-bit integer manipulation macros (little endian)
|
||||
|
@ -41,7 +41,7 @@
|
||||
#include "lwip/opt.h"
|
||||
#if LWIP_INCLUDED_POLARSSL_MD5
|
||||
|
||||
#include "polarssl/md5.h"
|
||||
#include "md5.h"
|
||||
|
||||
/*
|
||||
* 32-bit integer manipulation macros (little endian)
|
||||
|
@ -41,7 +41,7 @@
|
||||
#include "lwip/opt.h"
|
||||
#if LWIP_INCLUDED_POLARSSL_SHA1
|
||||
|
||||
#include "polarssl/sha1.h"
|
||||
#include "sha1.h"
|
||||
|
||||
/*
|
||||
* 32-bit integer manipulation macros (big endian)
|
||||
|
@ -237,7 +237,6 @@ static void ppp_input(void *arg) {
|
||||
|
||||
pd = ((struct pppInputHeader *)nb->payload)->unit;
|
||||
protocol = ((struct pppInputHeader *)nb->payload)->proto;
|
||||
printf("ppp_input() called, pd = %d, protocol = 0x%x\n", pd, protocol);
|
||||
|
||||
if(pbuf_header(nb, -(int)sizeof(struct pppInputHeader))) {
|
||||
LWIP_ASSERT("pbuf_header failed\n", 0);
|
||||
@ -323,7 +322,6 @@ static void ppp_input(void *arg) {
|
||||
break;
|
||||
|
||||
case PPP_IP: /* Internet Protocol */
|
||||
printf("IP packet received\n");
|
||||
PPPDEBUG(LOG_INFO, ("pppInput[%d]: ip in pbuf len=%d\n", pd, nb->len));
|
||||
if (pppControl[pd].netif.input) {
|
||||
pppControl[pd].netif.input(nb, &pppControl[pd].netif);
|
||||
@ -717,7 +715,6 @@ void pppInProcOverEthernet(int pd, struct pbuf *pb) {
|
||||
}
|
||||
|
||||
inProtocol = (((u8_t *)pb->payload)[0] << 8) | ((u8_t*)pb->payload)[1];
|
||||
printf("pppInProcOverEthernet() called, pd = %d, inprotocol = 0x%x\n", pd, inProtocol);
|
||||
|
||||
/* make room for pppInputHeader - should not fail */
|
||||
if (pbuf_header(pb, sizeof(*pih) - sizeof(inProtocol)) != 0) {
|
||||
@ -759,7 +756,6 @@ void pppOverEthernetInitFailed(int pd) {
|
||||
}
|
||||
|
||||
static void pppOverEthernetLinkStatusCB(int pd, int up) {
|
||||
printf("pppOverEthernetLinkStatusCB: called, pd = %d, up = %d\n", pd, up);
|
||||
if(up) {
|
||||
PPPDEBUG(LOG_INFO, ("pppOverEthernetLinkStatusCB: unit %d: Connecting\n", pd));
|
||||
pppStart(pd);
|
||||
@ -982,8 +978,6 @@ int pppWriteOverEthernet(int pd, const u_char *s, int n) {
|
||||
PPPControl *pc = &pppControl[pd];
|
||||
struct pbuf *pb;
|
||||
|
||||
printf("pppWriteOverEthernet() called\n");
|
||||
|
||||
/* skip address & flags */
|
||||
s += 2;
|
||||
n -= 2;
|
||||
|
@ -15,8 +15,7 @@
|
||||
#include "lwip/timers.h"
|
||||
|
||||
#include "pppdebug.h"
|
||||
|
||||
#include <net/ppp_defs.h> /* FIXME: merge linux/ppp_defs.h content here */
|
||||
#include "net/ppp_defs.h" /* FIXME: merge linux/ppp_defs.h content here */
|
||||
|
||||
#ifdef INET6
|
||||
#include "eui64.h"
|
||||
|
@ -42,10 +42,12 @@
|
||||
#include <fcntl.h>
|
||||
#if 0
|
||||
#include <syslog.h>
|
||||
#endif
|
||||
#include <netdb.h>
|
||||
#endif
|
||||
#include <time.h>
|
||||
#if 0
|
||||
#include <utmp.h>
|
||||
#endif
|
||||
#include <pwd.h>
|
||||
#include <sys/param.h>
|
||||
#include <sys/types.h>
|
||||
@ -53,8 +55,10 @@
|
||||
#include <sys/time.h>
|
||||
#include <sys/resource.h>
|
||||
#include <sys/stat.h>
|
||||
#if 0
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
#endif
|
||||
#ifdef SVR4
|
||||
#include <sys/mkdev.h>
|
||||
#endif
|
||||
@ -681,7 +685,7 @@ log_write(level, buf)
|
||||
{
|
||||
/* FIXME: replace this with a log callback */
|
||||
/* if(level >= min_log_level) */ /* FIXME: add a minimum log level */
|
||||
printf("LOG: %s\n", buf);
|
||||
PPPDEBUG(LOG_DEBUG, ("LOG: %s\n", buf) );
|
||||
#if 0
|
||||
if (log_to_fd >= 0 && (level != LOG_DEBUG || debug)) {
|
||||
int n = strlen(buf);
|
||||
|
Loading…
x
Reference in New Issue
Block a user