17 #ifndef EMAC_INTERFACE_H 18 #define EMAC_INTERFACE_H 22 #include "OnboardNetworkStack.h" virtual void attach(mbed::Callback< void(nsapi_event_t, intptr_t)> status_cb)
Register callback for status reporting.
virtual const char * get_netmask()
Get the local network mask.
virtual const char * get_ip_address()
Get the local IP address.
Representation of a stack's view of an interface.
virtual EMACInterface * emacInterface()
Return pointer to an EMACInterface.
EMACInterface class Implementation of the NetworkInterface for an EMAC-based driver.
signed int nsapi_error_t
Type used to represent error codes.
EMAC & get_emac() const
Provide access to the EMAC.
mbed OS API for onboard IP stack abstraction
#define NSAPI_MAC_SIZE
Maximum size of MAC address representation.
virtual void set_as_default()
Set the network interface as default one.
virtual nsapi_error_t connect()
Start the interface.
virtual const char * get_mac_address()
Get the local MAC address.
#define NSAPI_IPv4_SIZE
Size of IPv4 representation.
static EMAC & get_default_instance()
Return the default on-board EMAC.
Common interface that is shared between network devices.
virtual nsapi_error_t set_network(const char *ip_address, const char *netmask, const char *gateway)
Set a static IP address.
virtual char * get_interface_name(char *interface_name)
Get the network interface name.
virtual const char * get_gateway()
Get the local gateways.
#define NSAPI_IPv6_SIZE
Size of IPv6 representation.
This interface should be used to abstract low level access to networking hardware All operations rece...
virtual NetworkStack * get_stack()
Provide access to the underlying stack.
virtual nsapi_error_t set_dhcp(bool dhcp)
Enable or disable DHCP on the network.
virtual nsapi_error_t set_blocking(bool blocking)
Set blocking status of connect() which by default should be blocking.
EMACInterface(EMAC &emac=EMAC::get_default_instance(), OnboardNetworkStack &stack=OnboardNetworkStack::get_default_instance())
Create an EMAC-based network interface.
virtual nsapi_error_t disconnect()
Stop the interface.
static OnboardNetworkStack & get_default_instance()
Return the default on-board network stack.
Callback class based on template specialization.
virtual nsapi_connection_status_t get_connection_status() const
Get the connection status.