minor: fixed source code layout

This commit is contained in:
goldsimon 2010-02-17 16:55:36 +00:00
parent 17026e30b1
commit 44273aed6f
3 changed files with 54 additions and 53 deletions

View File

@ -321,6 +321,3 @@ delif_init_thread(struct netif *netif)
}
/*-----------------------------------------------------------------------------------*/

View File

@ -79,8 +79,7 @@ static char errbuf[PCAP_ERRBUF_SIZE];
/*-----------------------------------------------------------------------------------*/
static err_t
pcapif_output(struct netif *netif, struct pbuf *p,
ip_addr_t *ipaddr)
pcapif_output(struct netif *netif, struct pbuf *p, ip_addr_t *ipaddr)
{
return ERR_OK;
}
@ -124,13 +123,20 @@ timeout(void *arg)
ethhdr = p->payload;
switch (htons(ethhdr->type)) {
/* IP or ARP packet? */
case ETHTYPE_IP:
etharp_ip_input(netif, p);
pbuf_header(p, -14);
netif->input(p, netif);
break;
case ETHTYPE_ARP:
etharp_arp_input(netif, pcapif->ethaddr, p);
#if PPPOE_SUPPORT
/* PPPoE packet? */
case ETHTYPE_PPPOEDISC:
case ETHTYPE_PPPOE:
#endif /* PPPOE_SUPPORT */
/* full packet send to tcpip_thread to process */
if (netif->input(p, netif) != ERR_OK) {
LWIP_DEBUGF(NETIF_DEBUG, ("ethernetif_input: IP input error\n"));
pbuf_free(p);
p = NULL;
}
break;
default:
pbuf_free(p);

View File

@ -289,22 +289,20 @@ tapif_input(struct netif *netif)
ethhdr = p->payload;
switch(htons(ethhdr->type)) {
/* IP or ARP packet? */
case ETHTYPE_IP:
LWIP_DEBUGF(TAPIF_DEBUG, ("tapif_input: IP packet\n"));
#if 0
/* CSi disabled ARP table update on ingress IP packets.
This seems to work but needs thorough testing. */
etharp_ip_input(netif, p);
#endif
pbuf_header(p, -14);
#if defined(LWIP_DEBUG) && defined(LWIP_TCPDUMP)
tcpdump(p);
#endif /* LWIP_DEBUG && LWIP_TCPDUMP */
netif->input(p, netif);
break;
case ETHTYPE_ARP:
LWIP_DEBUGF(TAPIF_DEBUG, ("tapif_input: ARP packet\n"));
etharp_arp_input(netif, tapif->ethaddr, p);
#if PPPOE_SUPPORT
/* PPPoE packet? */
case ETHTYPE_PPPOEDISC:
case ETHTYPE_PPPOE:
#endif /* PPPOE_SUPPORT */
/* full packet send to tcpip_thread to process */
if (netif->input(p, netif) != ERR_OK) {
LWIP_DEBUGF(NETIF_DEBUG, ("ethernetif_input: IP input error\n"));
pbuf_free(p);
p = NULL;
}
break;
default:
pbuf_free(p);