third_party/lwip/repo/lwip/src/core/netif.c
/**
 * Bring an interface up, available for processing
 * traffic.
 * 
 * @note: Enabling DHCP on a down interface will make it come
 * up once configured.
 * 
 * @see dhcp_start()
 */
Bring an interface up, available for processing
traffic.

@note: Enabling DHCP on a down interface will make it come
up once configured.


Bring an interface up available for processing traffic . @note : Enabling DHCP on a down interface will make it come up once configured .
void netif_set_up(struct netif *netif)
{
  if (!(netif->flags & NETIF_FLAG_UP)) {
    netif->flags |= NETIF_FLAG_UP;
#if LWIP_SNMP
    snmp_get_sysuptime(&netif->ts);
#endif 
    NETIF_STATUS_CALLBACK(netif);
    if (netif->flags & NETIF_FLAG_LINK_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 
#if LWIP_IPV6_SEND_ROUTER_SOLICIT
      netif->rs_count = LWIP_ND6_MAX_MULTICAST_SOLICIT;
#endif 
    }
  }
}
void netif_set_up ( struct netif * netif ) { if ( ! ( netif -> flags & NETIF_FLAG_UP ) ) { netif -> flags |= NETIF_FLAG_UP ; #if LWIP_SNMP snmp_get_sysuptime ( & netif -> ts ) ; #endif NETIF_STATUS_CALLBACK ( netif ) ; if ( netif -> flags & NETIF_FLAG_LINK_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 #if LWIP_IPV6_SEND_ROUTER_SOLICIT netif -> rs_count = LWIP_ND6_MAX_MULTICAST_SOLICIT ; #endif } } }
Bring an interface up, available for processing
 traffic.
Bring an interface up available for processing traffic .
/* LWIP_SNMP */ /* 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 */ /* Send Router Solicitation messages. */ /* LWIP_IPV6_SEND_ROUTER_SOLICIT */