mbed IP library over Ethernet with setName and setNewAddress

Dependencies:   Socket lwip-eth lwip-sys lwip

Dependents:   JRO_CR2 JRO_DDSv2 JRO_DDSv2_rev2019

Fork of EthernetInterface by mbed official

Revision:
47:3b0a475eb1ad
Parent:
46:4cb91998b200
Child:
48:303f4d8389a1
--- a/EthernetInterface.h	Thu Jan 29 19:42:45 2015 +0000
+++ b/EthernetInterface.h	Thu Feb 05 19:02:23 2015 +0000
@@ -55,12 +55,27 @@
   * \return 0 on success, a negative number on failure
   */
   static int setNewAddr(const char* ip, const char* mask, const char* gateway);
+
+/** setName 
+  *
+  * Set the network name for this device. Apply this before
+  * calling 'connect'.
+  *
+  * \param myname is the name to assign for this node. 
+  *        Only the first 32 characters will be used if the 
+  *        name is longer.
+  *        Only '0'-'9', 'A'-'Z', 'a'-'z' are accepted,
+  *        any others are converted to '-'.
+  * \return 0 on success, a negative number on failure.
+  */
+  static int setName(const char * myname);
   
   /** Connect
   * Bring the interface up, start DHCP if needed.
   * \param   timeout_ms  timeout in ms (default: (15)s).
   * \return 0 on success, a negative number on failure
   */
+  
   static int connect(unsigned int timeout_ms=15000);
   
   /** Disconnect