Mistake on this page?
Report an issue in GitHub or email us
Data Structures | Public Member Functions | Static Public Member Functions
OnboardNetworkStack Class Referenceabstract

#include <OnboardNetworkStack.h>

Inheritance diagram for OnboardNetworkStack:
NetworkStack DNS Nanostack

Data Structures

class  Interface
 

Public Member Functions

virtual nsapi_error_t add_ethernet_interface (EMAC &emac, bool default_if, Interface **interface_out)=0
 
- Public Member Functions inherited from NetworkStack
virtual const char * get_ip_address ()
 
virtual nsapi_error_t gethostbyname (const char *host, SocketAddress *address, nsapi_version_t version=NSAPI_UNSPEC)
 
virtual nsapi_value_or_error_t gethostbyname_async (const char *host, hostbyname_cb_t callback, nsapi_version_t version=NSAPI_UNSPEC)
 
virtual nsapi_error_t gethostbyname_async_cancel (int id)
 
virtual nsapi_error_t add_dns_server (const SocketAddress &address)
 
virtual nsapi_error_t get_dns_server (int index, SocketAddress *address)
 
virtual nsapi_error_t setstackopt (int level, int optname, const void *optval, unsigned optlen)
 
virtual nsapi_error_t getstackopt (int level, int optname, void *optval, unsigned *optlen)
 
virtual OnboardNetworkStackonboardNetworkStack ()
 

Static Public Member Functions

static OnboardNetworkStackget_default_instance ()
 

Additional Inherited Members

- Public Types inherited from NetworkStack
typedef mbed::Callback< void(nsapi_error_t result, SocketAddress *address)> hostbyname_cb_t
 
- Public Types inherited from DNS
typedef mbed::Callback< void(nsapi_error_t result, SocketAddress *address)> hostbyname_cb_t
 
- Protected Member Functions inherited from NetworkStack
virtual nsapi_error_t socket_open (nsapi_socket_t *handle, nsapi_protocol_t proto)=0
 
virtual nsapi_error_t socket_close (nsapi_socket_t handle)=0
 
virtual nsapi_error_t socket_bind (nsapi_socket_t handle, const SocketAddress &address)=0
 
virtual nsapi_error_t socket_listen (nsapi_socket_t handle, int backlog)=0
 
virtual nsapi_error_t socket_connect (nsapi_socket_t handle, const SocketAddress &address)=0
 
virtual nsapi_error_t socket_accept (nsapi_socket_t server, nsapi_socket_t *handle, SocketAddress *address=0)=0
 
virtual nsapi_size_or_error_t socket_send (nsapi_socket_t handle, const void *data, nsapi_size_t size)=0
 
virtual nsapi_size_or_error_t socket_recv (nsapi_socket_t handle, void *data, nsapi_size_t size)=0
 
virtual nsapi_size_or_error_t socket_sendto (nsapi_socket_t handle, const SocketAddress &address, const void *data, nsapi_size_t size)=0
 
virtual nsapi_size_or_error_t socket_recvfrom (nsapi_socket_t handle, SocketAddress *address, void *buffer, nsapi_size_t size)=0
 
virtual void socket_attach (nsapi_socket_t handle, void(*callback)(void *), void *data)=0
 
virtual nsapi_error_t setsockopt (nsapi_socket_t handle, int level, int optname, const void *optval, unsigned optlen)
 
virtual nsapi_error_t getsockopt (nsapi_socket_t handle, int level, int optname, void *optval, unsigned *optlen)
 

Detailed Description

mbed OS API for onboard IP stack abstraction

This interface should be used by targets to initialize IP stack, create, bring up and bring down network interfaces.

An onboard network stack has the potential ability to register interfaces such as through EMAC, and has its own interface identifiers.

Member Function Documentation

virtual nsapi_error_t OnboardNetworkStack::add_ethernet_interface ( EMAC emac,
bool  default_if,
Interface **  interface_out 
)
pure virtual

Register a network interface with the IP stack

Connects EMAC layer with the IP stack and initializes all the required infrastructure. This function should be called only once for each available interface. EMAC memory manager is available to EMAC after this function call.

Parameters
emacEMAC HAL implementation for this network interface
default_iftrue if the interface should be treated as the default one
[out]interface_outpointer to stack interface object controlling the EMAC
Returns
NSAPI_ERROR_OK on success, or error code

Implemented in Nanostack.

static OnboardNetworkStack& OnboardNetworkStack::get_default_instance ( )
static

Return the default on-board network stack

Returns the default on-board network stack, as configured by JSON option nsapi.default-stack.


The documentation for this class was generated from the following file:
Important Information for this Arm website

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies. If you are not happy with the use of these cookies, please review our Cookie Policy to learn how they can be disabled. By disabling cookies, some features of the site will not work.