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
Diff: EthernetInterface.h
- Revision:
- 46:4cb91998b200
- Parent:
- 44:de796e2a5e98
- Child:
- 47:3b0a475eb1ad
--- a/EthernetInterface.h Wed Dec 17 19:56:30 2014 +0000 +++ b/EthernetInterface.h Thu Jan 29 19:42:45 2015 +0000 @@ -47,6 +47,15 @@ */ static int init(const char* ip, const char* mask, const char* gateway); + /** Change the interface with a new static IP address. + * Change the interface and configure it with the following static configuration (no connection at this point). + * \param ip the IP address to use + * \param mask the IP address mask + * \param gateway the gateway to use + * \return 0 on success, a negative number on failure + */ + static int setNewAddr(const char* ip, const char* mask, const char* gateway); + /** Connect * Bring the interface up, start DHCP if needed. * \param timeout_ms timeout in ms (default: (15)s).