Hi list,
 
I am using lwip 1.3.0-stable, I am using the Netconn API.Through lwip i run a 
webserver and a server client.
In lwip i use the following:
 
- TCP- DHCP- ARP- UDP (DHCP)
 
I have through the last two days, reviewed my port files, ethernetif.c and 
sys_arch.c. Which led to small changes in the code, which resulted in 
greaterstability. However, i have seen two different implementations of 
ethernetif_input(),where the input is handled differently (see below), but both 
seem to work.
 
So my questions are:
1. Are both implementations of the ethernetif_input(), valid ? (see code 
below)2. Has there been made crucial updates to the lwip core files, since the 
lwip 1.3.0 stable version was released ?2.a If yes, does these changes affect 
me ?
1. (ETHARP_TRUST_IP_MAC is defined in lwipopts.h)static voidethernetif_input( 
void * pvParameters ){
....
switch( htons( ethhdr->type ) ) {  // IP packet?  case ETHTYPE_IP:  // pass to 
network layer   if (xNetIf->input( p, xNetIf ) != ERR_OK)  {   pbuf_free( p );  
 p = NULL;  }    break;  case ETHTYPE_ARP:  #if ETHARP_TRUST_IP_MAC  // update 
ARP table    etharp_ip_input( xNetIf, p );#endif  // pass p to ARP module    
etharp_arp_input( xNetIf, ethernetif->ethaddr, p );   break;   default:   
pbuf_free( p );   p = NULL;   break; }}
 
2.static voidethernetif_input( void * pvParameters ){
....
 switch( htons( ethhdr->type ) )  {   // IP packet?    case ETHTYPE_IP:    // 
update ARP table     etharp_ip_input( xNetIf, p );      // skip Ethernet header 
    pbuf_header( p, (s16_t)-sizeof(struct eth_hdr) );      // pass to network 
layer     if (xNetIf->input( p, xNetIf ) != ERR_OK)    {     pbuf_free( p );    
 p = NULL;    }      break;     case ETHTYPE_ARP:    // pass p to ARP module    
 etharp_arp_input( xNetIf, ethernetif->ethaddr, p );    break;     default:    
pbuf_free( p );    p = NULL;    break;  }}
 
best regards,Martin
_________________________________________________________________
Connect to the next generation of MSN Messenger 
http://imagine-msn.com/messenger/launch80/default.aspx?locale=en-us&source=wlmailtagline
_______________________________________________
lwip-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/lwip-users

Reply via email to