struct DHCP_MESSAGE * create_solicit_message (char *interface_name) { struct DHCP_MESSAGE * dhcp_message_ptr = malloc (sizeof (struct DHCP_MESSAGE)); struct OPTIONS *opt_ptr; struct interface *interface_details; interface_details = get_interface_details (interface_name); #if DEBUG == 3 print_interface_details (interface_details); #endif dhcp_message_ptr -> u_msg_type.msg_type = SOLICIT; generate_trans_id (&dhcp_message_ptr -> u_trans_id.trans_id); dhcp_message_ptr -> opt = add_client_id_option (interface_details); opt_ptr = (struct OPTIONS *) dhcp_message_ptr -> opt; (struct OPTIONS *) ((struct DUID *) opt_ptr -> opt_data) -> opt = add_ia_option (interface_details); return dhcp_message_ptr; }