mirror of https://github.com/ARMmbed/mbed-os.git
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
parent
81932ee3c3
commit
517f0509ca
|
|
@ -37,5 +37,5 @@ const char * IPStackInterface::get_mac_address()
|
||||||
|
|
||||||
const char * IPStackInterface::get_ip_address()
|
const char * IPStackInterface::get_ip_address()
|
||||||
{
|
{
|
||||||
return lwip_get_ip_address();
|
return lwip_get_ip_address(_ip_address, sizeof(_ip_address));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -52,6 +52,8 @@ public:
|
||||||
* @return IP address in "10.11.12.13" form
|
* @return IP address in "10.11.12.13" form
|
||||||
*/
|
*/
|
||||||
virtual const char *get_ip_address();
|
virtual const char *get_ip_address();
|
||||||
|
private:
|
||||||
|
char _ip_address[16]; //IPv4
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* IP_STACK_INTERFACE_H */
|
#endif /* IP_STACK_INTERFACE_H */
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue