int wifi_command(const char *command, char *reply, size_t *reply_len);
/**
- * do_dhcp_request() issues a dhcp request and returns the acquired
- * information.
- *
- * All IPV4 addresses/mask are in network byte order.
- *
- * @param ipaddr return the assigned IPV4 address
- * @param gateway return the gateway being used
- * @param mask return the IPV4 mask
- * @param dns1 return the IPV4 address of a DNS server
- * @param dns2 return the IPV4 address of a DNS server
- * @param server return the IPV4 address of DHCP server
- * @param lease return the length of lease in seconds.
- *
- * @return 0 if successful, < 0 if error.
- */
-int do_dhcp_request(int *ipaddr, int *gateway, int *mask,
- int *dns1, int *dns2, int *server, int *lease);
-
-/**
- * Return the error string of the last do_dhcp_request().
- */
-const char *get_dhcp_error_string();
-
-/**
* Return the path to requested firmware
*/
#define WIFI_GET_FW_PATH_STA 0
#define _REALLY_INCLUDE_SYS__SYSTEM_PROPERTIES_H_
#include <sys/_system_properties.h>
-extern int do_dhcp();
-extern int ifc_init();
-extern void ifc_close();
-extern char *dhcp_lasterror();
-extern void get_dhcp_info();
extern int init_module(void *, unsigned long, const char *);
extern int delete_module(const char *, unsigned int);
void wifi_close_sockets();
return ret;
}
-int do_dhcp_request(int *ipaddr, int *gateway, int *mask,
- int *dns1, int *dns2, int *server, int *lease) {
- /* For test driver, always report success */
- if (strcmp(primary_iface, WIFI_TEST_INTERFACE) == 0)
- return 0;
-
- if (ifc_init() < 0)
- return -1;
-
- if (do_dhcp(primary_iface) < 0) {
- ifc_close();
- return -1;
- }
- ifc_close();
- get_dhcp_info(ipaddr, gateway, mask, dns1, dns2, server, lease);
- return 0;
-}
-
-const char *get_dhcp_error_string() {
- return dhcp_lasterror();
-}
-
#ifdef WIFI_DRIVER_STATE_CTRL_PARAM
int wifi_change_driver_state(const char *state)
{