diff options
author | Mimmo La Fauci <mlafauci@metodo2.it> | 2013-03-21 09:24:07 +0100 |
---|---|---|
committer | Mimmo La Fauci <mlafauci@metodo2.it> | 2013-03-21 09:24:07 +0100 |
commit | e43ed7d47d9b2c37ccff6dc75d6bfe4c8a55ac86 (patch) | |
tree | 527a1af8acb5cb1cf64bb02567c6e29df7f7cec9 /firmwares/wifishield/wifiHD/src/cmd_wl.c | |
parent | f0ba738a71ec8dafe4705ddd02c07a2eb880655c (diff) |
Added API to set static IP and DNS server
Diffstat (limited to 'firmwares/wifishield/wifiHD/src/cmd_wl.c')
-rw-r--r-- | firmwares/wifishield/wifiHD/src/cmd_wl.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/firmwares/wifishield/wifiHD/src/cmd_wl.c b/firmwares/wifishield/wifiHD/src/cmd_wl.c index 3356931..17c476a 100644 --- a/firmwares/wifishield/wifiHD/src/cmd_wl.c +++ b/firmwares/wifishield/wifiHD/src/cmd_wl.c @@ -182,7 +182,8 @@ cmd_ibss(int argc, char* argv[], void* ctx) cmd_state_t cmd_set_ip(int argc, char* argv[], void* ctx) { - struct net_cfg *ncfg = ctx; + struct ctx_server *hs = ctx; + struct net_cfg *ncfg = &(hs->net_cfg); struct ip_addr lwip_addr; struct netif *nif = ncfg->netif; @@ -197,8 +198,10 @@ cmd_set_ip(int argc, char* argv[], void* ctx) printk(" or : ip none (to enable DHCP)\n"); return CMD_DONE; } + /* IP address */ lwip_addr = str2ip(argv[1]); + INFO_SPI("nif:%p lwip_addr=0x%x\n", nif, lwip_addr.addr); netif_set_ipaddr(nif, &lwip_addr); /* Netmask */ lwip_addr = str2ip(argv[2]); |