/* fill in the option field with message type of a dhcp message.  */
static uint8_t* add_msg_type(uint8_t *msg_option_base_addr, uint8_t message_type)
/* fill in the option field with message type of a dhcp message.  */
static uint8_t* add_msg_type(uint8_t *msg_option_base_addr, uint8_t message_type)
{
	uint8_t *option_start;
	msg_option_base_addr[0] = DHCP_OPTION_CODE_MSG_TYPE;
	msg_option_base_addr[1] = DHCP_OPTION_LENGTH_ONE;
	msg_option_base_addr[2] = message_type;
	option_start = msg_option_base_addr + 3;
	if (DHCP_MESSAGE_TYPE_NAK == message_type)
		*option_start++ = DHCP_OPTION_CODE_END;	return option_start;
}