18 #ifndef PPP_INTERFACE_H 19 #define PPP_INTERFACE_H 22 #include "OnboardNetworkStack.h" 181 nsapi_ip_stack_t _ip_stack;
183 const char *_password;
virtual const char * get_netmask()
Get the local network mask.
PPPInterface class Implementation of the NetworkInterface for an PPP-service.
Network Interface base class.
Representation of a stack's view of an interface.
PPP & getppp() const
Provide access to the PPP.
virtual nsapi_error_t connect()
Start the 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)
Register callback for status reporting.
virtual void set_stream(mbed::FileHandle *stream)
Sets file stream used to communicate with modem.
virtual nsapi_error_t disconnect()
Stop the interface.
virtual void set_credentials(const char *uname, const char *password)
Sets user name and password for PPP protocol.
virtual const char * get_ip_address()
Get the local IP address.
virtual nsapi_error_t set_network(const char *ip_address, const char *netmask, const char *gateway)
Set a static IP address.
mbed OS API for onboard IP stack abstraction
virtual void set_as_default()
Set the network interface as default one.
#define NSAPI_IPv4_SIZE
Size of IPv4 representation.
Common interface that is shared between network devices.
virtual nsapi_connection_status_t get_connection_status() const
Get the connection status.
virtual const char * get_gateway()
Get the local gateways.
virtual char * get_interface_name(char *interface_name)
Get the network interface name.
static PPP & get_default_instance()
Return the default on-board PPP.
#define NSAPI_IPv6_SIZE
Size of IPv6 representation.
PPPInterface(PPP &ppp=PPP::get_default_instance(), OnboardNetworkStack &stack=OnboardNetworkStack::get_default_instance())
Create an PPP-based network interface.
static OnboardNetworkStack & get_default_instance()
Return the default on-board network stack.
Callback class based on template specialization.
virtual NetworkStack * get_stack()
Provide access to the underlying stack.
virtual nsapi_error_t set_blocking(bool blocking)
Set blocking status of connect() which by default should be blocking.
virtual void set_ip_stack(nsapi_ip_stack_t ip_stack)
Sets IP protocol versions of IP stack.