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