◆ ppp_link_input_cb_t
◆ ppp_link_state_change_cb_t
◆ get_default_instance()
static PPP & get_default_instance |
( |
| ) |
|
|
static |
Return the default on-board PPP.
Returns the default on-board PPP - this will be target-specific, and may not be available on all targets.
◆ get_mtu_size()
virtual uint32_t get_mtu_size |
( |
| ) |
|
|
pure virtual |
Return maximum transmission unit.
- Returns
- MTU in bytes
Implemented in ppp_service.
◆ get_align_preference()
virtual uint32_t get_align_preference |
( |
| ) |
const |
|
pure virtual |
Gets memory buffer alignment preference.
Gets preferred memory buffer alignment of the cellular device.
- Returns
- Memory alignment requirement in bytes
Implemented in ppp_service.
◆ get_ifname()
virtual void get_ifname |
( |
char * |
name, |
|
|
uint8_t |
size |
|
) |
| const |
|
pure virtual |
Return interface name.
- Parameters
-
name | Pointer to where the name should be written |
size | Maximum number of characters to copy |
Implemented in ppp_service.
◆ link_out()
virtual bool link_out |
( |
net_stack_mem_buf_t * |
buf, |
|
|
nsapi_ip_stack_t |
ip_stack |
|
) |
| |
|
pure virtual |
Sends the packet over the link.
That cannot be called from an interrupt context.
- Parameters
-
buf | Packet to be sent |
ip_stack | IP version to use (4 or 6) to send the packet. |
- Returns
- True if the packet was sent, false otherwise
Implemented in ppp_service.
◆ power_up()
virtual bool power_up |
( |
| ) |
|
|
pure virtual |
Initializes the PPP.
- Returns
- True on success, False in case of an error.
Implemented in ppp_service.
◆ power_down()
virtual void power_down |
( |
| ) |
|
|
pure virtual |
◆ set_link_input_cb()
Sets a callback that needs to be called for packets received for that interface.
- Parameters
-
input_cb | Function to be register as a callback |
Implemented in ppp_service.
◆ set_link_state_cb()
Sets a callback that needs to be called on link status changes for given interface.
- Parameters
-
state_cb | Function to be register as a callback |
Implemented in ppp_service.
◆ set_memory_manager()
Sets memory manager that is used to handle memory buffers.
- Parameters
-
mem_mngr | Pointer to memory manager |
Implemented in ppp_service.
◆ set_stream()
Sets file stream used to communicate with modem.
- Parameters
-
stream | Pointer to file handle |
Implemented in ppp_service.
◆ set_ip_stack()
virtual void set_ip_stack |
( |
nsapi_ip_stack_t |
ip_stack | ) |
|
|
pure virtual |
Sets IP protocol versions of IP stack.
- Parameters
-
ip_stack | IP protocol version |
Implemented in ppp_service.
◆ set_credentials()
virtual void set_credentials |
( |
const char * |
uname, |
|
|
const char * |
password |
|
) |
| |
|
pure virtual |
Sets user name and password for PPP protocol.
- Parameters
-
uname | User name |
password | Password |
Implemented in ppp_service.
◆ get_ip_address()
virtual const nsapi_addr_t * get_ip_address |
( |
nsapi_version_t |
version | ) |
|
|
pure virtual |
Gets local IP address.
- Parameters
-
version | IP address version |
- Returns
- IP address
Implemented in ppp_service.
◆ get_netmask()
Get the local network mask.
- Returns
- Local network mask or null if no network mask has been received.
Implemented in ppp_service.
◆ get_gateway()
Get the local gateway.
- Returns
- Local gateway or null if no network mask has been received.
Implemented in ppp_service.
◆ get_dns_server()
virtual const nsapi_addr_t * get_dns_server |
( |
uint8_t |
index | ) |
|
|
pure virtual |