IPStackInterface - add ip address

Currently only for IPv4. lwip was updated to accept 2 arguments for getting
the ip address (buffer and length).
pull/3975/head
Martin Kojtal 2016-09-29 09:50:11 +01:00
parent 81932ee3c3
commit 517f0509ca
2 changed files with 3 additions and 1 deletions

View File

@ -37,5 +37,5 @@ const char * IPStackInterface::get_mac_address()
const char * IPStackInterface::get_ip_address()
{
return lwip_get_ip_address();
return lwip_get_ip_address(_ip_address, sizeof(_ip_address));
}

View File

@ -52,6 +52,8 @@ public:
* @return IP address in "10.11.12.13" form
*/
virtual const char *get_ip_address();
private:
char _ip_address[16]; //IPv4
};
#endif /* IP_STACK_INTERFACE_H */