Modified official MBED EthernetInterface The only changes are to allow hostname to be set and got
Dependencies: Socket lwip-eth lwip-sys lwip
Fork of EthernetInterfacePlusHostname by
Diff: EthernetInterface.h
- Revision:
- 50:8e692841213c
- Parent:
- 48:7f865315b678
diff -r 2fc406e2553f -r 8e692841213c EthernetInterface.h --- a/EthernetInterface.h Thu Mar 12 16:58:57 2015 +0000 +++ b/EthernetInterface.h Mon Aug 31 08:58:07 2015 +0000 @@ -79,6 +79,26 @@ * \return a pointer to a string containing the Network mask */ static char* getNetworkMask(); + + /** 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); + + /** Get the hostname + * \return a pointer to a string containing the hostname + */ + static char* getName(); + }; #include "TCPSocketConnection.h"