21 #include "OnboardNetworkStack.h" 22 #include "NanostackMemoryManager.h" 23 #include "MeshInterface.h" 24 #include "mesh_interface_types.h" 25 #include "eventOS_event.h" 273 void socket_attach(
void *handle,
void (*callback)(
void *),
void *data)
override;
352 struct nanostack_callback {
357 static void call_event_tasklet_main(arm_event_s *event);
358 char text_ip_address[40];
360 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.
virtual nsapi_value_or_error_t gethostbyname_async(const char *name, hostbyname_cb_t callback, nsapi_version_t version, const char *interface_name) override
Translate a hostname to an IP address (asynchronous) using network interface name.
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.
nsapi_size_or_error_t socket_recvfrom_control(nsapi_socket_t handle, SocketAddress *address, void *data, nsapi_size_t size, nsapi_msghdr_t *control, nsapi_size_t control_size) override
Receive a packet with ancillary data over a UDP socket.
Representation of a stack's view of an interface.
void * nsapi_socket_t
Opaque handle for network sockets.
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.
Common interface that is shared between network devices.
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_control(nsapi_socket_t handle, const SocketAddress &address, const void *data, nsapi_size_t size, nsapi_msghdr_t *control, nsapi_size_t control_size) override
Send a packet with ancillary data over a UDP socket.
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.
virtual nsapi_error_t get_dns_server(int index, SocketAddress *address, const char *interface_name) override
Get a domain name server from a list of servers to query.
virtual nsapi_error_t gethostbyname(const char *name, SocketAddress *address, nsapi_version_t version, const char *interface_name) override
Translate a hostname to an IP address with specific version using network interface name...
nsapi_error_t add_ethernet_interface(EMAC &emac, bool default_if, OnboardNetworkStack::Interface **interface_out, NetworkInterface *user_network_interface=NULL) override
Register a network interface with the IP stack.
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...
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 socket_connect(void *handle, const SocketAddress &address) override
Connects TCP socket to a remote host.