lwip-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-devel] Lwip as a router


From: Simon Goldschmidt
Subject: Re: [lwip-devel] Lwip as a router
Date: Mon, 17 Mar 2014 12:56:26 +0100

Done. Thanks for the patch.
 
To prevent not getting answers or things to get forgotten, please add a patch entry on savannah next time.
 
Simon
 
 
From: "Ghobad Emadi" <address@hidden>
 
Hi Simon,
Thank you very much for your reply. If you would be agree with adding LWIP_HOOK_ETHARP_GET_GW, do you agree with the following changes?
 
Adding LWIP_HOOK_ETHARP_GET_GW in HOOK section of opt.h and changing the following part of "etharp_output()".
 
{
#ifdef LWIP_HOOK_ETHARP_GET_GW 
    dst_addr = LWIP_HOOK_ETHARP_GET_GW(netif, ipaddr /* The IP address of the packet destination */ );
    if(!dst_addr) { /* no route to destination in routing table  */
#endif
       /* interface has default gateway? */
        if (!ip_addr_isany(&netif->gw)) {
          /* send to hardware address of default gateway IP address */
          dst_addr = &(netif->gw);
        /* no default gateway available */
        } else {
          /* no route to destination error (default gateway missing) */
          return ERR_RTE;
        }
#ifdef LWIP_HOOK_ETHARP_GET_GW 
    }
#endif
}
_______________________________________________ lwip-devel mailing list address@hidden https://lists.nongnu.org/mailman/listinfo/lwip-devel

reply via email to

[Prev in Thread] Current Thread [Next in Thread]