/[lwip]/contrib/ports/unix/proj/unixsim/simhost.c
ViewVC logotype

Diff of /contrib/ports/unix/proj/unixsim/simhost.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.11 by jani, Wed Mar 10 13:26:34 2004 UTC revision 1.12 by christiaans, Tue Nov 8 12:00:46 2005 UTC
# Line 57  Line 57 
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    
# Line 245  ping_recv(int s, struct ip_addr *addr) Line 244  ping_recv(int s, struct ip_addr *addr)
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
# Line 331  main_thread(void *arg) Line 330  main_thread(void *arg)
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);
# Line 369  main_thread(void *arg) Line 371  main_thread(void *arg)
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);

Legend:
Removed from v.1.11  
changed lines
  Added in v.1.12

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26