57 |
#if PPP_SUPPORT |
#if PPP_SUPPORT |
58 |
#include "netif/ppp/ppp.h" |
#include "netif/ppp/ppp.h" |
59 |
#define PPP_PTY_TEST 1 |
#define PPP_PTY_TEST 1 |
|
#endif |
|
|
|
|
60 |
#include <termios.h> |
#include <termios.h> |
61 |
|
#endif |
62 |
|
|
63 |
#include "lwip/ip_addr.h" |
#include "lwip/ip_addr.h" |
64 |
|
|
244 |
|
|
245 |
len = lwip_recvfrom(s, buf,sizeof(buf),0,(struct sockaddr*)&from,&fromlen); |
len = lwip_recvfrom(s, buf,sizeof(buf),0,(struct sockaddr*)&from,&fromlen); |
246 |
|
|
247 |
printf("Received %d bytes from %x\n",len,ntohl(from.sin_addr.s_addr)); |
printf("Received %d bytes from %lx\n",len,ntohl(from.sin_addr.s_addr)); |
248 |
} |
} |
249 |
|
|
250 |
static void |
static void |
330 |
|
|
331 |
netif_set_default(netif_add(&netif,&ipaddr, &netmask, &gw, NULL, tapif_init, |
netif_set_default(netif_add(&netif,&ipaddr, &netmask, &gw, NULL, tapif_init, |
332 |
tcpip_input)); |
tcpip_input)); |
333 |
|
|
334 |
|
netif_set_up(&netif); |
335 |
|
|
336 |
#endif |
#endif |
337 |
/* Only used for testing purposes: */ |
/* Only used for testing purposes: */ |
338 |
/* IP4_ADDR(&gw, 193,10,66,1); |
/* IP4_ADDR(&gw, 193,10,66,1); |
371 |
#ifdef MEM_PERF |
#ifdef MEM_PERF |
372 |
mem_perf_init("/tmp/memstats.client"); |
mem_perf_init("/tmp/memstats.client"); |
373 |
#endif /* MEM_PERF */ |
#endif /* MEM_PERF */ |
374 |
// stats_display(); |
#if 0 |
375 |
|
stats_display(); |
376 |
|
#endif |
377 |
/* Block for ever. */ |
/* Block for ever. */ |
378 |
sem = sys_sem_new(0); |
sem = sys_sem_new(0); |
379 |
sys_sem_wait(sem); |
sys_sem_wait(sem); |