18 #ifndef L3IP_INTERFACE_H 19 #define L3IP_INTERFACE_H 23 #include "OnboardNetworkStack.h" 158 bool _blocking =
true;
nsapi_error_t set_network(const SocketAddress &ip_address, const SocketAddress &netmask, const SocketAddress &gateway) override
Set a static IP address.
L3IPInterface(L3IP &l3ip=L3IP::get_default_instance(), OnboardNetworkStack &stack=OnboardNetworkStack::get_default_instance())
Create an L3IP-based network interface.
nsapi_error_t set_dhcp(bool dhcp) override
Enable or disable DHCP on the network.
Representation of a stack's view of an interface.
char * get_interface_name(char *interface_name) override
Get the network interface name.
nsapi_error_t get_netmask(SocketAddress *address) override
Get the local network mask.
signed int nsapi_error_t
Type used to represent error codes.
void attach(mbed::Callback< void(nsapi_event_t, intptr_t)> status_cb) override
Register callback for status reporting.
nsapi_error_t connect() override
Start the interface.
nsapi_error_t set_blocking(bool blocking) override
Set blocking status of connect() which by default should be blocking.
nsapi_error_t get_gateway(SocketAddress *address) override
Get the local gateway.
mbed OS API for onboard IP stack abstraction
nsapi_error_t disconnect() override
Stop the interface.
This interface should be used to abstract low level access to networking hardware All operations rece...
Common interface that is shared between network devices.
static L3IP & get_default_instance()
Return the default on-board L3IP.
L3IPInterface class Implementation of the NetworkInterface for an IP-based driver.
void set_as_default() override
Set the network interface as default one.
static OnboardNetworkStack & get_default_instance()
Return the default on-board network stack.
nsapi_error_t get_ip_address(SocketAddress *address) override
Get the local IP address.
Callback class based on template specialization.
nsapi_connection_status_t get_connection_status() const override
Get the connection status.
NetworkStack * get_stack() override
Provide access to the underlying stack.
L3IP & getl3ip() const
Provide access to the L3IP.