diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2007-09-03 20:34:44 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2007-09-03 20:34:44 +0000 |
commit | c96d656001914b495f54e7a25d54079e41af86ce (patch) | |
tree | dabdb9c5fded41355669eccebd630d33b106689a /nuttx/examples/uip/main.c | |
parent | 0792c58515fae8507fcd6de41ca7db89fd2734d4 (diff) | |
download | px4-nuttx-c96d656001914b495f54e7a25d54079e41af86ce.tar.gz px4-nuttx-c96d656001914b495f54e7a25d54079e41af86ce.tar.bz2 px4-nuttx-c96d656001914b495f54e7a25d54079e41af86ce.zip |
Add send, sendto, rec, recvfrom
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@328 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/examples/uip/main.c')
-rw-r--r-- | nuttx/examples/uip/main.c | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/nuttx/examples/uip/main.c b/nuttx/examples/uip/main.c index 367e7e1c1..d7cfc6bb2 100644 --- a/nuttx/examples/uip/main.c +++ b/nuttx/examples/uip/main.c @@ -31,7 +31,7 @@ * * This file is part of the uIP TCP/IP stack. * - * $Id: main.c,v 1.3 2007-09-01 18:06:12 patacongo Exp $ + * $Id: main.c,v 1.4 2007-09-03 20:34:43 patacongo Exp $ * */ @@ -84,6 +84,7 @@ int user_start(int argc, char *argv[]) #elif defined(CONFIG_EXAMPLE_UIP_TELNETD) telnetd_init(); #elif defined(CONFIG_EXAMPLE_UIP_DHCPC) + resolv_init(); handle = dhcpc_open(&mac, 6); if (handle) { @@ -126,21 +127,6 @@ void uip_log(char *m) printf("uIP log message: %s\n", m); } -void resolv_found(char *name, uint16 *ipaddr) -{ - if (ipaddr == NULL) - { - printf("Host '%s' not found.\n", name); - } - else - { - printf("Found name '%s' = %d.%d.%d.%d\n", name, - htons(ipaddr[0]) >> 8, htons(ipaddr[0]) & 0xff, - htons(ipaddr[1]) >> 8, htons(ipaddr[1]) & 0xff); - /* webclient_get("www.sics.se", 80, "/~adam/uip");*/ - } -} - void webclient_closed(void) { printf("Webclient: connection closed\n"); |