23 #include "FileHandle.h"    24 #include "NetStackMemoryManager.h"    36     virtual ~
PPP() = 
default;
    75     virtual void get_ifname(
char *name, uint8_t size) 
const = 0;
    85     virtual bool link_out(net_stack_mem_buf_t *buf, nsapi_ip_stack_t ip_stack) = 0;
   130     virtual void set_ip_stack(nsapi_ip_stack_t ip_stack) = 0;
   137     virtual void set_credentials(
const char *uname, 
const char *password) = 0;
 mbed::Callback< void(net_stack_mem_buf_t *buf)> ppp_link_input_cb_t
Callback to be registered with PPP interface and to be called for received packets. 
virtual const nsapi_addr_t * get_dns_server(uint8_t index)=0
Gets DNS server address. 
virtual uint32_t get_mtu_size()=0
Return maximum transmission unit. 
virtual const nsapi_addr_t * get_netmask()=0
Get the local network mask. 
mbed::Callback< void(bool up)> ppp_link_state_change_cb_t
Callback to be registered with PPP interface and to be called for link status changes. 
virtual void set_link_input_cb(ppp_link_input_cb_t input_cb)=0
Sets a callback that needs to be called for packets received for that interface. 
virtual uint32_t get_align_preference() const  =0
Gets memory buffer alignment preference. 
virtual const nsapi_addr_t * get_ip_address(nsapi_version_t version)=0
Gets local IP address. 
virtual void power_down()=0
Deinitializes the PPP. 
virtual void set_stream(mbed::FileHandle *stream)=0
Sets file stream used to communicate with modem. 
virtual void set_ip_stack(nsapi_ip_stack_t ip_stack)=0
Sets IP protocol versions of IP stack. 
virtual void set_memory_manager(NetStackMemoryManager &mem_mngr)=0
Sets memory manager that is used to handle memory buffers. 
virtual void set_link_state_cb(ppp_link_state_change_cb_t state_cb)=0
Sets a callback that needs to be called on link status changes for given interface. 
virtual bool power_up()=0
Initializes the PPP. 
virtual void get_ifname(char *name, uint8_t size) const  =0
Return interface name. 
static PPP & get_default_instance()
Return the default on-board PPP. 
virtual bool link_out(net_stack_mem_buf_t *buf, nsapi_ip_stack_t ip_stack)=0
Sends the packet over the link. 
IP address structure for passing IP addresses by value. 
virtual void set_credentials(const char *uname, const char *password)=0
Sets user name and password for PPP protocol. 
virtual const nsapi_addr_t * get_gateway()=0
Get the local gateway.