Zephyr API Documentation 4.0.0-rc2
A Scalable Open Source RTOS
|
Point-to-point (PPP) L2/driver support functions . More...
Data Structures | |
struct | ppp_api |
PPP L2 API. More... | |
struct | ppp_fsm |
Generic PPP Finite State Machine. More... | |
struct | lcp_options |
Link control protocol options. More... | |
struct | ipcp_options |
IPv4 control protocol options. More... | |
struct | ipv6cp_options |
IPv6 control protocol options. More... | |
struct | ppp_context |
PPP L2 context specific to certain network interface. More... | |
Macros | |
#define | PPP_MRU CONFIG_NET_PPP_MTU_MRU |
PPP maximum receive unit (MRU) | |
#define | PPP_MTU PPP_MRU |
PPP maximum transfer unit (MTU) | |
#define | PPP_MAX_TERMINATE_REASON_LEN 32 |
Max length of terminate description string. | |
#define | PPP_INTERFACE_IDENTIFIER_LEN 8 |
Length of network interface identifier. | |
#define | NET_EVENT_PPP_CARRIER_ON (_NET_PPP_EVENT | NET_EVENT_PPP_CMD_CARRIER_ON) |
Event emitted when PPP carrier is on. | |
#define | NET_EVENT_PPP_CARRIER_OFF (_NET_PPP_EVENT | NET_EVENT_PPP_CMD_CARRIER_OFF) |
Event emitted when PPP carrier is off. | |
#define | NET_EVENT_PPP_PHASE_RUNNING (_NET_PPP_EVENT | NET_EVENT_PPP_CMD_PHASE_RUNNING) |
Event emitted when PPP goes into running phase. | |
#define | NET_EVENT_PPP_PHASE_DEAD (_NET_PPP_EVENT | NET_EVENT_PPP_CMD_PHASE_DEAD) |
Event emitted when PPP goes into dead phase. | |
Typedefs | |
typedef void(* | net_ppp_lcp_echo_reply_cb_t) (void *user_data, size_t user_data_len) |
A callback function that can be called if a Echo-Reply needs to be received. | |
Functions | |
void | net_ppp_init (struct net_if *iface) |
Initialize PPP L2 stack for a given interface. | |
static void | ppp_mgmt_raise_carrier_on_event (struct net_if *iface) |
Raise CARRIER_ON event when PPP is connected. | |
static void | ppp_mgmt_raise_carrier_off_event (struct net_if *iface) |
Raise CARRIER_OFF event when PPP is disconnected. | |
static void | ppp_mgmt_raise_phase_running_event (struct net_if *iface) |
Raise PHASE_RUNNING event when PPP reaching RUNNING phase. | |
static void | ppp_mgmt_raise_phase_dead_event (struct net_if *iface) |
Raise PHASE_DEAD event when PPP reaching DEAD phase. | |
static int | net_ppp_ping (int idx, int32_t timeout) |
Send PPP Echo-Request to peer. | |
static struct ppp_context * | net_ppp_context_get (int idx) |
Get PPP context information. | |
Point-to-point (PPP) L2/driver support functions .
#define NET_EVENT_PPP_CARRIER_OFF (_NET_PPP_EVENT | NET_EVENT_PPP_CMD_CARRIER_OFF) |
#include <zephyr/net/ppp.h>
Event emitted when PPP carrier is off.
#define NET_EVENT_PPP_CARRIER_ON (_NET_PPP_EVENT | NET_EVENT_PPP_CMD_CARRIER_ON) |
#include <zephyr/net/ppp.h>
Event emitted when PPP carrier is on.
#define NET_EVENT_PPP_PHASE_DEAD (_NET_PPP_EVENT | NET_EVENT_PPP_CMD_PHASE_DEAD) |
#include <zephyr/net/ppp.h>
Event emitted when PPP goes into dead phase.
#define NET_EVENT_PPP_PHASE_RUNNING (_NET_PPP_EVENT | NET_EVENT_PPP_CMD_PHASE_RUNNING) |
#include <zephyr/net/ppp.h>
Event emitted when PPP goes into running phase.
#define PPP_INTERFACE_IDENTIFIER_LEN 8 |
#include <zephyr/net/ppp.h>
Length of network interface identifier.
#define PPP_MAX_TERMINATE_REASON_LEN 32 |
#include <zephyr/net/ppp.h>
Max length of terminate description string.
#define PPP_MRU CONFIG_NET_PPP_MTU_MRU |
#include <zephyr/net/ppp.h>
PPP maximum receive unit (MRU)
#define PPP_MTU PPP_MRU |
#include <zephyr/net/ppp.h>
PPP maximum transfer unit (MTU)
typedef void(* net_ppp_lcp_echo_reply_cb_t) (void *user_data, size_t user_data_len) |
#include <zephyr/net/ppp.h>
A callback function that can be called if a Echo-Reply needs to be received.
user_data | User settable data that is passed to the callback function. |
user_data_len | Length of the user data. |
enum ipcp_option_type |
#include <zephyr/net/ppp.h>
IPCP option types from RFC 1332.
enum ipv6cp_option_type |
#include <zephyr/net/ppp.h>
IPV6CP option types from RFC 5072.
Enumerator | |
---|---|
IPV6CP_OPTION_RESERVED | Reserved IPV6CP option value (do not use) |
IPV6CP_OPTION_INTERFACE_IDENTIFIER | Interface identifier. |
enum lcp_option_type |
#include <zephyr/net/ppp.h>
LCP option types from RFC 1661 ch.
6
enum ppp_phase |
#include <zephyr/net/ppp.h>
PPP phases.
enum ppp_protocol_type |
#include <zephyr/net/ppp.h>
PPP protocol types.
See https://www.iana.org/assignments/ppp-numbers/ppp-numbers.xhtml for details.
Enumerator | |
---|---|
PPP_IP | RFC 1332. |
PPP_IPV6 | RFC 5072. |
PPP_IPCP | RFC 1332. |
PPP_ECP | RFC 1968. |
PPP_IPV6CP | RFC 5072. |
PPP_CCP | RFC 1962. |
PPP_LCP | RFC 1661. |
PPP_PAP | RFC 1334. |
PPP_CHAP | RFC 1334. |
PPP_EAP | RFC 2284. |
|
inlinestatic |
#include <zephyr/net/ppp.h>
Get PPP context information.
This is only used by net-shell to print information about PPP.
idx | PPP network interface index |
void net_ppp_init | ( | struct net_if * | iface | ) |
#include <zephyr/net/ppp.h>
Initialize PPP L2 stack for a given interface.
iface | A valid pointer to a network interface |
|
inlinestatic |
#include <zephyr/net/ppp.h>
Send PPP Echo-Request to peer.
We expect to receive Echo-Reply back.
idx | PPP network interface index |
timeout | Amount of time to wait Echo-Reply. The value is in milliseconds. |
|
inlinestatic |
#include <zephyr/net/ppp.h>
Raise CARRIER_OFF event when PPP is disconnected.
iface | PPP network interface. |
|
inlinestatic |
#include <zephyr/net/ppp.h>
Raise CARRIER_ON event when PPP is connected.
iface | PPP network interface. |
|
inlinestatic |
#include <zephyr/net/ppp.h>
Raise PHASE_DEAD event when PPP reaching DEAD phase.
iface | PPP network interface. |
|
inlinestatic |
#include <zephyr/net/ppp.h>
Raise PHASE_RUNNING event when PPP reaching RUNNING phase.
iface | PPP network interface. |