21 #include "OnboardNetworkStack.h" 22 #include "NanostackMemoryManager.h" 23 #include "MeshInterface.h" 24 #include "mesh_interface_types.h" 25 #include "eventOS_event.h" 271 void socket_attach(
void *handle,
void (*callback)(
void *),
void *data)
override;
336 struct nanostack_callback {
341 static void call_event_tasklet_main(arm_event_s *event);
342 char text_ip_address[40];
344 int8_t call_event_tasklet;
nsapi_size_or_error_t socket_recvfrom(void *handle, SocketAddress *address, void *buffer, nsapi_size_t size) override
Receive a packet over a UDP socket.
Wi-SUN mesh network interface class.
6LoWPAN-ND mesh network interface class
nsapi_error_t setsockopt(void *handle, int level, int optname, const void *optval, unsigned optlen) override
Set stack-specific socket options.
nsapi_error_t socket_bind(void *handle, const SocketAddress &address) override
Bind a specific address to a socket.
Representation of a stack's view of an interface.
virtual nsapi_error_t gethostbyname(const char *name, SocketAddress *address, nsapi_version_t version, const char *interface_name)
Translate a hostname to an IP address with specific version using network interface name...
virtual nsapi_value_or_error_t gethostbyname_async(const char *name, hostbyname_cb_t callback, nsapi_version_t version, const char *interface_name)
Translate a hostname to an IP address (asynchronous) using network interface name.
signed int nsapi_error_t
Type used to represent error codes.
nsapi_error_t getsockopt(void *handle, int level, int optname, void *optval, unsigned *optlen) override
Get stack-specific socket options.
Prevents generation of copy constructor and copy assignment operator in derived classes.
signed int nsapi_size_or_error_t
Type used to represent either a size or error passed through sockets.
nsapi_size_or_error_t socket_recv(void *handle, void *data, nsapi_size_t size) override
Receive data over a TCP socket.
nsapi_error_t socket_listen(void *handle, int backlog) override
Listen for connections on a TCP socket.
Thread mesh network interface class.
mbed OS API for onboard IP stack abstraction
signed int nsapi_value_or_error_t
Type used to represent either a value or error.
nsapi_error_t socket_open(void **handle, nsapi_protocol_t proto) override
Opens a socket.
nsapi_size_or_error_t socket_send(void *handle, const void *data, nsapi_size_t size) override
Send data over a TCP socket.
nsapi_error_t get_ip_address(SocketAddress *sockAddr) override
Get the local IP address.
nsapi_size_or_error_t socket_sendto(void *handle, const SocketAddress &address, const void *data, nsapi_size_t size) override
Send a packet over a UDP socket.
nsapi_error_t socket_close(void *handle) override
Close the socket.
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 nsapi_error_t get_dns_server(int index, SocketAddress *address, const char *interface_name)
Get a domain name server from a list of servers to query.
void socket_attach(void *handle, void(*callback)(void *), void *data) override
Register a callback on state change of the socket.
nsapi_error_t socket_accept(void *handle, void **server, SocketAddress *address) override
Accepts a connection on a TCP socket.
Callback class based on template specialization.
nsapi_error_t add_ethernet_interface(EMAC &emac, bool default_if, OnboardNetworkStack::Interface **interface_out) override
Register a network interface with the IP stack.
nsapi_error_t socket_connect(void *handle, const SocketAddress &address) override
Connects TCP socket to a remote host.