Public Member Functions | |
nsapi_error_t | set_ip_address (const char *ip, const char *netmask, const char *gw, uint8_t ipv6_flag=0) override |
Set IP address to LWIP stack. More... | |
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) override |
Connect the interface to the network. More... | |
nsapi_error_t | bringdown () override |
Disconnect interface from the network. More... | |
void | attach (mbed::Callback< void(nsapi_event_t, intptr_t)> status_cb) override |
Register callback for status reporting. More... | |
nsapi_connection_status_t | get_connection_status () const override |
Get the connection status. More... | |
char * | get_interface_name (char *buf) override |
Return netif interface name. More... | |
char * | get_mac_address (char *buf, nsapi_size_t buflen) override |
Return MAC address of the network interface. More... | |
nsapi_error_t | get_ip_address (SocketAddress *address) override |
Get the local IP address. More... | |
nsapi_error_t | get_ipv6_link_local_address (SocketAddress *address) override |
Get the IPv6 link local address in SocketAddress representation. More... | |
nsapi_error_t | get_netmask (SocketAddress *address) override |
Copies netmask of the network interface to user supplied buffer. More... | |
nsapi_error_t | get_gateway (SocketAddress *address) override |
Copies gateway address of the network interface to user supplied buffer. More... | |
Definition at line 46 of file LWIPStack.h.
|
overridevirtual |
Register callback for status reporting.
The specified status callback function will be called on status changes on the network. The parameters on the callback are the event type and event-type dependent reason parameter.
status_cb | The callback for status changes |
Implements OnboardNetworkStack::Interface.
|
overridevirtual |
Disconnect interface from the network.
After this call the network interface is inactive, to use it again user needs to call mbed_ipstack_bringup again.
Implements OnboardNetworkStack::Interface.
|
overridevirtual |
Connect the interface to the network.
Sets up a connection on specified network interface, using DHCP or provided network details. If the dhcp is set to true all the remaining parameters are ignored.
dhcp | true if the network details should be acquired using DHCP |
ip | IP address to be used for the interface as "W:X:Y:Z" or NULL |
netmask | Net mask to be used for the interface as "W:X:Y:Z" or NULL |
gw | Gateway address to be used for the interface as "W:X:Y:Z" or NULL |
stack | Allow manual selection of IPv4 and/or IPv6. |
blocking | Specify whether bringup blocks for connection completion. |
Implements OnboardNetworkStack::Interface.
|
overridevirtual |
Get the connection status.
Implements OnboardNetworkStack::Interface.
|
overridevirtual |
Copies gateway address of the network interface to user supplied buffer.
buf | buffer to which gateway address will be copied as "W:X:Y:Z" |
buflen | size of supplied buffer |
Implements OnboardNetworkStack::Interface.
|
overridevirtual |
Return netif interface name.
Reimplemented from OnboardNetworkStack::Interface.
|
overridevirtual |
Get the local IP address.
address | SocketAddress representation of the local IP address |
NSAPI_ERROR_OK | on success |
NSAPI_ERROR_UNSUPPORTED | if this feature is not supported |
NSAPI_ERROR_PARAMETER | if the provided pointer is invalid |
NSAPI_ERROR_NO_ADDRESS | if the address cannot be obtained from stack |
Implements OnboardNetworkStack::Interface.
|
overridevirtual |
Get the IPv6 link local address in SocketAddress representation.
SocketAddress representation of the link local IPv6 address
Reimplemented from OnboardNetworkStack::Interface.
|
overridevirtual |
Return MAC address of the network interface.
Implements OnboardNetworkStack::Interface.
|
overridevirtual |
Copies netmask of the network interface to user supplied buffer.
buf | buffer to which netmask will be copied as "W:X:Y:Z" |
buflen | size of supplied buffer |
Implements OnboardNetworkStack::Interface.
|
overridevirtual |
Set IP address to LWIP stack.
This function can set both IPv4 or IPv6 address to LWIP stack.
bringup() can only take one IP address and in dual stack case another IP address can be set using this function.
IPv4 or IPv6 address should be in format of https://tools.ietf.org/html/draft-main-ipaddr-text-rep-00.
ip | IP address to be used for the interface as IPv4 or IPv6 address string. This parameter should not be NULL. |
netmask | Net mask to be used for the interface as IPv4 address string or NULL. NULL value will set this value to 255.255.255.255. This parameter will be ignored for IPv6 ip argument. |
gw | Gateway address to be used for the interface as IPv4 address string or NULL NULL value will set this value to 0.0.0.0 This parameter will be ignored for IPv6 ip argument. |
ipv6_flag | Provide this flag for IPv6 state flag override. For example, you can set IP6_ADDR_PREFERRED. Default value is IP6_ADDR_VALID. For IPv4, this value will be ignored. |
Reimplemented from OnboardNetworkStack::Interface.
void* hw |
alternative implementation pointer - used for PPP
Definition at line 222 of file LWIPStack.h.