third_party/lwip/repo/lwip/src/core/netif.c
/**
 * Called by a driver when its link goes up
 */
Called by a driver when its link goes up
Called by a driver when its link goes up
void netif_set_link_up(struct netif *netif )
{
  if (!(netif->flags & NETIF_FLAG_LINK_UP)) {
    netif->flags |= NETIF_FLAG_LINK_UP;
#if LWIP_DHCP
    if (netif->dhcp) {
      dhcp_network_changed(netif);
    }
#endif 
#if LWIP_AUTOIP
    if (netif->autoip) {
      autoip_network_changed(netif);
    }
#endif 
    if (netif->flags & NETIF_FLAG_UP) {
#if LWIP_ARP
      if (netif->flags & NETIF_FLAG_ETHARP) {
        etharp_gratuitous(netif);
      }
#endif 
#if LWIP_IGMP
      if (netif->flags & NETIF_FLAG_IGMP) {
        igmp_report_groups( netif);
      }
#endif 
#if LWIP_IPV6 && LWIP_IPV6_MLD
      mld6_report_groups( netif);
#endif 
    }
    NETIF_LINK_CALLBACK(netif);
  }
}
void netif_set_link_up ( struct netif * netif ) { if ( ! ( netif -> flags & NETIF_FLAG_LINK_UP ) ) { netif -> flags |= NETIF_FLAG_LINK_UP ; #if LWIP_DHCP if ( netif -> dhcp ) { dhcp_network_changed ( netif ) ; } #endif #if LWIP_AUTOIP if ( netif -> autoip ) { autoip_network_changed ( netif ) ; } #endif if ( netif -> flags & NETIF_FLAG_UP ) { #if LWIP_ARP if ( netif -> flags & NETIF_FLAG_ETHARP ) { etharp_gratuitous ( netif ) ; } #endif #if LWIP_IGMP if ( netif -> flags & NETIF_FLAG_IGMP ) { igmp_report_groups ( netif ) ; } #endif #if LWIP_IPV6 && LWIP_IPV6_MLD mld6_report_groups ( netif ) ; #endif } NETIF_LINK_CALLBACK ( netif ) ; } }
Called by a driver when its link goes up
Called by a driver when its link goes up
/* LWIP_DHCP */ /* LWIP_AUTOIP */ /* For Ethernet network interfaces, we would like to send a "gratuitous ARP" */ /* LWIP_ARP */ /* resend IGMP memberships */ /* LWIP_IGMP */ /* send mld memberships */ /* LWIP_IPV6 && LWIP_IPV6_MLD */