Skip to content
Snippets Groups Projects
bootp.c 25 KiB
Newer Older
  • Learn to ignore specific revisions
  • Wolfgang Denk's avatar
    Wolfgang Denk committed
    
    
    		if (dhcp_message_type((u8 *)bp->bp_vend) == DHCP_ACK) {
    
    			if (net_read_u32((u32 *)&bp->bp_vend[0]) ==
    
    						htonl(BOOTP_VENDOR_MAGIC))
    
    				dhcp_process_options((u8 *)&bp->bp_vend[4], bp);
    
    			/* Store net params from reply */
    
    Wolfgang Denk's avatar
    Wolfgang Denk committed
    			dhcp_state = BOUND;
    
    			printf("DHCP client bound to address %pI4 (%lu ms)\n",
    
    			       &net_ip, get_timer(bootp_start));
    
    			bootstage_mark_name(BOOTSTAGE_ID_BOOTP_STOP,
    
    Wolfgang Denk's avatar
    Wolfgang Denk committed
    
    
    			net_auto_load();
    
    Wolfgang Denk's avatar
    Wolfgang Denk committed
    			return;
    		}
    		break;
    
    	case BOUND:
    		/* DHCP client bound to address */
    		break;
    
    Wolfgang Denk's avatar
    Wolfgang Denk committed
    	default:
    
    		puts("DHCP: INVALID STATE\n");
    
    void dhcp_request(void)
    
    Wolfgang Denk's avatar
    Wolfgang Denk committed
    {
    
    Wolfgang Denk's avatar
    Wolfgang Denk committed
    }
    
    #endif	/* CONFIG_CMD_DHCP */