Public Member Functions | |
virtual nsapi_error_t | bringup (bool dhcp, const char *ip, const char *netmask, const char *gw, nsapi_ip_stack_t stack=DEFAULT_STACK, bool blocking=true) |
Connect the interface to the network. More... | |
virtual nsapi_error_t | bringdown () |
Disconnect interface from the network. More... | |
virtual void | attach (mbed::Callback< void(nsapi_event_t, intptr_t)> status_cb) |
Register callback for status reporting. More... | |
virtual nsapi_connection_status_t | get_connection_status () const |
Get the connection status. More... | |
virtual char * | get_mac_address (char *buf, nsapi_size_t buflen) |
Return MAC address of the network interface. More... | |
virtual char * | get_ip_address (char *buf, nsapi_size_t buflen) |
Copies IP address of the network interface to user supplied buffer. More... | |
virtual char * | get_netmask (char *buf, nsapi_size_t buflen) |
Copies netmask of the network interface to user supplied buffer. More... | |
virtual char * | get_gateway (char *buf, nsapi_size_t buflen) |
Copies gateway address of the network interface to user supplied buffer. More... | |
virtual char * | get_interface_name (char *buf) |
Returns interface name. More... | |
virtual char * | get_ip_address_if (char *buf, nsapi_size_t buflen, const char *interface_name) |
Copies IP address of the network interface to user supplied buffer. More... | |
Definition at line 35 of file emac_TestNetworkStack.h.
|
virtual |
Register callback for status reporting.
The specified status callback function will be called on status changes on the network. The parameters on the callback are the event type and event-type dependent reason parameter.
status_cb | The callback for status changes |
Implements OnboardNetworkStack::Interface.
|
virtual |
Disconnect interface from the network.
After this call the network interface is inactive, to use it again user needs to call mbed_ipstack_bringup again.
Implements OnboardNetworkStack::Interface.
|
virtual |
Connect the interface to the network.
Sets up a connection on specified network interface, using DHCP or provided network details. If the dhcp is set to true all the remaining parameters are ignored.
dhcp | true if the network details should be acquired using DHCP |
ip | IP address to be used for the interface as "W:X:Y:Z" or NULL |
netmask | Net mask to be used for the interface as "W:X:Y:Z" or NULL |
gw | Gateway address to be used for the interface as "W:X:Y:Z" or NULL |
stack | Allow manual selection of IPv4 and/or IPv6. |
blocking | Specify whether bringup blocks for connection completion. |
Implements OnboardNetworkStack::Interface.
|
virtual |
Get the connection status.
Implements OnboardNetworkStack::Interface.
|
virtual |
Copies gateway address of the network interface to user supplied buffer.
buf | buffer to which gateway address will be copied as "W:X:Y:Z" |
buflen | size of supplied buffer |
Implements OnboardNetworkStack::Interface.
|
virtualinherited |
Returns interface name.
Definition at line 100 of file OnboardNetworkStack.h.
|
virtual |
Copies IP address of the network interface to user supplied buffer.
buf | buffer to which IP address will be copied as "W:X:Y:Z" |
buflen | size of supplied buffer |
Implements OnboardNetworkStack::Interface.
|
virtualinherited |
Copies IP address of the network interface to user supplied buffer.
buf | buffer to which IP address will be copied as "W:X:Y:Z" |
buflen | size of supplied buffer |
interface_name | Network interface name |
Definition at line 128 of file OnboardNetworkStack.h.
|
virtual |
Return MAC address of the network interface.
Implements OnboardNetworkStack::Interface.
|
virtual |
Copies netmask of the network interface to user supplied buffer.
buf | buffer to which netmask will be copied as "W:X:Y:Z" |
buflen | size of supplied buffer |
Implements OnboardNetworkStack::Interface.