Updated API for uiplib and resolv to use uip_ipaddr_t instead of uint16_t for compability with IPv6

This commit is contained in:
nifi 2010-05-31 15:22:08 +00:00
parent c13bb8666b
commit b54c6e673b
22 changed files with 194 additions and 106 deletions

View file

@ -28,7 +28,7 @@
*
* This file is part of the Contiki operating system.
*
* $Id: shell-wget.c,v 1.1 2008/11/09 12:36:23 adamdunkels Exp $
* $Id: shell-wget.c,v 1.2 2010/05/31 15:22:08 nifi Exp $
*/
/**
@ -67,7 +67,7 @@ open_url(char *url)
static char host[32];
char *file;
register char *urlptr;
static u16_t addr[2];
static uip_ipaddr_t addr;
/* Trim off any spaces in the end of the url. */
urlptr = url + strlen(url) - 1;
@ -120,7 +120,7 @@ open_url(char *url)
/* Try to lookup the hostname. If it fails, we initiate a hostname
lookup and print out an informative message on the statusbar. */
if(uiplib_ipaddrconv(host, (unsigned char *)addr) == 0) {
if(uiplib_ipaddrconv(host, &addr) == 0) {
shell_output_str(&wget_command, "Not an IP address", "");
if(resolv_lookup(host) == NULL) {
shell_output_str(&wget_command, "Not resolved", "");