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.
Dependencies: mbed Socket lwip-eth lwip-sys lwip
EthernetInterface Class Reference
Interface using Ethernet to connect to an IP-based network. More...
#include <EthernetInterface.h>
Static Public Member Functions | |
| static int | init () |
| Initialize the interface with DHCP. | |
| static int | init (const char *ip, const char *mask, const char *gateway) |
| Initialize the interface with a static IP address. | |
| static int | connect (unsigned int timeout_ms=12000) |
| Connect Bring the interface up, start DHCP if needed. | |
| static int | disconnect () |
| Disconnect Bring the interface down. | |
Detailed Description
Interface using Ethernet to connect to an IP-based network.
Definition at line 33 of file EthernetInterface.h.
Member Function Documentation
| int connect | ( | unsigned int | timeout_ms = 12000 ) |
[static] |
Connect Bring the interface up, start DHCP if needed.
- Parameters:
-
timeout_ms timeout in ms (default: (12)s).
- Returns:
- 0 on success, a negative number on failure
Definition at line 75 of file EthernetInterface.cpp.
| int disconnect | ( | ) | [static] |
Disconnect Bring the interface down.
- Returns:
- 0 on success, a negative number on failure
Definition at line 90 of file EthernetInterface.cpp.
| int init | ( | ) | [static] |
Initialize the interface with DHCP.
Initialize the interface and configure it to use DHCP (no connection at this point).
- Returns:
- 0 on success, a negative number on failure
Definition at line 59 of file EthernetInterface.cpp.
| int init | ( | const char * | ip, |
| const char * | mask, | ||
| const char * | gateway | ||
| ) | [static] |
Initialize the interface with a static IP address.
Initialize the interface and configure it with the following static configuration (no connection at this point).
- Parameters:
-
ip the IP address to use mask the IP address mask gateway the gateway to use
- Returns:
- 0 on success, a negative number on failure
Definition at line 65 of file EthernetInterface.cpp.
Generated on Tue Jul 12 2022 19:57:01 by
1.7.2