17 #ifndef MBED_IPSTACK_H 18 #define MBED_IPSTACK_H 66 const char *netmask,
const char *gw,
67 nsapi_ip_stack_t stack = DEFAULT_STACK,
68 bool blocking =
true) = 0;
virtual char * get_interface_name(char *buf)
Returns interface name.
Representation of a stack's view of an interface.
signed int nsapi_error_t
Type used to represent error codes.
virtual void attach(mbed::Callback< void(nsapi_event_t, intptr_t)> status_cb)=0
Register callback for status reporting.
mbed OS API for onboard IP stack abstraction
virtual nsapi_error_t add_ethernet_interface(EMAC &emac, bool default_if, Interface **interface_out)=0
Register a network interface with the IP stack.
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)=0
Connect the interface to the network.
virtual char * get_gateway(char *buf, nsapi_size_t buflen)=0
Copies gateway address of the network interface to user supplied buffer.
This interface should be used to abstract low level access to networking hardware All operations rece...
virtual nsapi_error_t bringdown()=0
Disconnect interface from the network.
virtual char * get_netmask(char *buf, nsapi_size_t buflen)=0
Copies netmask of the network interface to user supplied buffer.
virtual char * get_ip_address(char *buf, nsapi_size_t buflen)=0
Copies IP address of the network interface to user supplied buffer.
unsigned int nsapi_size_t
Type used to represent the size of data passed through sockets.
This interface should be used to abstract low level access to networking hardware All operations rece...
virtual char * get_mac_address(char *buf, nsapi_size_t buflen)=0
Return MAC address of the network interface.
static OnboardNetworkStack & get_default_instance()
Return the default on-board network stack.
virtual nsapi_connection_status_t get_connection_status() const =0
Get the connection status.
Callback class based on template specialization.
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.