Daniele Lacamera / PicoTCP Featured

Dependents:   lpc1768-picotcp-demo ZeroMQ_PicoTCP_Publisher_demo TCPSocket_HelloWorld_PicoTCP Pico_TCP_UDP_Test ... more

PicoTCP. Copyright (c) 2013 TASS Belgium NV.

Released under the GNU General Public License, version 2.

Different licensing models may exist, at the sole discretion of the Copyright holders.

Official homepage: http://www.picotcp.com

Bug tracker: https://github.com/tass-belgium/picotcp/issues

Development steps:

  • initial integration with mbed RTOS
  • generic mbed Ethernet driver
  • high performance NXP LPC1768 specific Ethernet driver
  • Multi-threading support for mbed RTOS
  • Berkeley sockets and integration with the New Socket API
  • Fork of the apps running on top of the New Socket API
  • Scheduling optimizations
  • Debugging/benchmarking/testing

Demo application (measuring TCP sender performance):

Import programlpc1768-picotcp-demo

A PicoTCP demo app testing the ethernet throughput on the lpc1768 mbed board.

Revision:
142:35da43068894
Parent:
139:1f7a4a8525ef
Child:
145:dbc31fdc150d
--- a/Socket/bsd/stack_endpoint.cpp	Tue Feb 11 14:48:37 2014 +0100
+++ b/Socket/bsd/stack_endpoint.cpp	Wed Feb 19 15:12:53 2014 +0100
@@ -11,6 +11,7 @@
 #include "mbed.h"
 #include "Socket.h"
 #include "Mutex.h"
+#include "PicoTerm.h"
 
 extern "C"
 {
@@ -22,7 +23,7 @@
 //#define ptsock_dbg mbed_dbg
 #define ptsock_dbg(...)
 #define SCHEDULER_BASE  4u
-#define SCHEDULER_MAX   10u
+#define SCHEDULER_MAX   10
 
 int scheduler_timeout = 0;
 int in_the_stack = 0;
@@ -545,6 +546,20 @@
 
 
 // *************** DNS part *************** 
+
+int picotcp_dns_client_nameserver(const char *ip, int flag)
+{
+    int ret;
+    struct pico_ip4 addr;
+    pico_string_to_ipv4(ip, &addr.addr);
+
+    PicoTcpLock->lock();
+    ret = pico_dns_client_nameserver(&addr, flag);
+    PicoTcpLock->unlock();
+
+    return ret;
+}
+
 void dns_cb(char *ip,void *arg)
 {
   if(!arg)