Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: SocketAddress.h
- Revision:
- 15:94e2cf3a06be
- Parent:
- 8:9c6673c93082
- Child:
- 17:b1d417383c0d
diff -r 7ca9776b9cc0 -r 94e2cf3a06be SocketAddress.h
--- a/SocketAddress.h Tue Apr 05 23:39:54 2016 +0000
+++ b/SocketAddress.h Tue Apr 05 23:47:04 2016 +0000
@@ -19,6 +19,14 @@
#include <stdint.h>
+/** Maximum size of IP address
+*/
+#define NSAPI_IP_SIZE 16
+
+/** Maximum size of MAC address
+*/
+#define NSAPI_MAC_SIZE 18
+
// Predeclared classes
class NetworkInterface;
@@ -27,10 +35,6 @@
*/
class SocketAddress {
public:
- /** Maximum size of IP address
- */
- static const int IP_SIZE = 16;
-
/** SocketAddress construction using DNS resolution
/param iface NetworkInterface to use for DNS resolution
/param addr Null-terminated hostname that will be resolved
@@ -72,7 +76,7 @@
uint16_t get_port(void) const;
private:
- char _ip_address[IP_SIZE];
+ char _ip_address[NSAPI_IP_SIZE];
uint16_t _port;
};