|
Zephyr Project API
3.2.0
A Scalable Open Source RTOS
|
Point-to-point (PPP) L2/driver support functions. More...
Data Structures | |
| struct | ppp_api |
| struct | ppp_fsm |
| struct | ppp_my_option_data |
| struct | lcp_options |
| struct | ipcp_options |
| struct | ipv6cp_options |
| struct | ppp_context |
Macros | |
| #define | PPP_MRU CONFIG_NET_PPP_MTU_MRU |
| #define | PPP_MTU PPP_MRU |
| #define | PPP_MAX_TERMINATE_REASON_LEN 32 |
| #define | PPP_INTERFACE_IDENTIFIER_LEN 8 |
| #define | PPP_MY_OPTION_ACKED BIT(0) |
| #define | PPP_MY_OPTION_REJECTED BIT(1) |
| #define | IPCP_NUM_MY_OPTIONS 3 |
| #define | IPV6CP_NUM_MY_OPTIONS 1 |
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. More... | |
Functions | |
| void | net_ppp_carrier_on (struct net_if *iface) |
| Inform PPP L2 driver that carrier is detected. This happens when cable is connected etc. More... | |
| void | net_ppp_carrier_off (struct net_if *iface) |
| Inform PPP L2 driver that carrier was lost. This happens when cable is disconnected etc. More... | |
| void | net_ppp_init (struct net_if *iface) |
| Initialize PPP L2 stack for a given interface. More... | |
| static void | ppp_mgmt_raise_carrier_on_event (struct net_if *iface) |
| Raise CARRIER_ON event when PPP is connected. More... | |
| static void | ppp_mgmt_raise_carrier_off_event (struct net_if *iface) |
| Raise CARRIER_OFF event when PPP is disconnected. More... | |
| static void | ppp_mgmt_raise_phase_running_event (struct net_if *iface) |
| Raise PHASE_RUNNING event when PPP reaching RUNNING phase. More... | |
| static void | ppp_mgmt_raise_phase_dead_event (struct net_if *iface) |
| Raise PHASE_DEAD event when PPP reaching DEAD phase. More... | |
| static int | net_ppp_ping (int idx, int32_t timeout) |
| Send PPP Echo-Request to peer. We expect to receive Echo-Reply back. More... | |
| static struct ppp_context * | net_ppp_context_get (int idx) |
| Get PPP context information. This is only used by net-shell to print information about PPP. More... | |
Point-to-point (PPP) L2/driver support functions.
| #define IPCP_NUM_MY_OPTIONS 3 |
#include <include/zephyr/net/ppp.h>
| #define IPV6CP_NUM_MY_OPTIONS 1 |
#include <include/zephyr/net/ppp.h>
| #define PPP_INTERFACE_IDENTIFIER_LEN 8 |
#include <include/zephyr/net/ppp.h>
Length of network interface identifier
| #define PPP_MAX_TERMINATE_REASON_LEN 32 |
#include <include/zephyr/net/ppp.h>
Max length of terminate description string
| #define PPP_MRU CONFIG_NET_PPP_MTU_MRU |
#include <include/zephyr/net/ppp.h>
PPP maximum receive unit (MRU)
| #define PPP_MTU PPP_MRU |
#include <include/zephyr/net/ppp.h>
PPP maximum transfer unit (MTU)
| #define PPP_MY_OPTION_ACKED BIT(0) |
#include <include/zephyr/net/ppp.h>
| #define PPP_MY_OPTION_REJECTED BIT(1) |
#include <include/zephyr/net/ppp.h>
| net_ppp_lcp_echo_reply_cb_t |
#include <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 <include/zephyr/net/ppp.h>
IPCP option types from RFC 1332
| enum ipv6cp_option_type |
#include <include/zephyr/net/ppp.h>
IPV6CP option types from RFC 5072
| Enumerator | |
|---|---|
| IPV6CP_OPTION_RESERVED | |
| IPV6CP_OPTION_INTERFACE_IDENTIFIER | Interface identifier |
| enum lcp_option_type |
#include <include/zephyr/net/ppp.h>
LCP option types from RFC 1661 ch. 6
| enum ppp_flags |
#include <include/zephyr/net/ppp.h>
| Enumerator | |
|---|---|
| PPP_CARRIER_UP | |
| enum ppp_packet_type |
#include <include/zephyr/net/ppp.h>
PPP protocol operations from RFC 1661
| Enumerator | |
|---|---|
| PPP_CONFIGURE_REQ | |
| PPP_CONFIGURE_ACK | |
| PPP_CONFIGURE_NACK | |
| PPP_CONFIGURE_REJ | |
| PPP_TERMINATE_REQ | |
| PPP_TERMINATE_ACK | |
| PPP_CODE_REJ | |
| PPP_PROTOCOL_REJ | |
| PPP_ECHO_REQ | |
| PPP_ECHO_REPLY | |
| PPP_DISCARD_REQ | |
| enum ppp_phase |
#include <include/zephyr/net/ppp.h>
PPP phases
| enum ppp_protocol_type |
#include <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 |
| enum ppp_state |
#include <include/zephyr/net/ppp.h>
PPP states, RFC 1661 ch. 4.2
| Enumerator | |
|---|---|
| PPP_INITIAL | |
| PPP_STARTING | |
| PPP_CLOSED | |
| PPP_STOPPED | |
| PPP_CLOSING | |
| PPP_STOPPING | |
| PPP_REQUEST_SENT | |
| PPP_ACK_RECEIVED | |
| PPP_ACK_SENT | |
| PPP_OPENED | |
| void net_ppp_carrier_off | ( | struct net_if * | iface | ) |
#include <include/zephyr/net/ppp.h>
Inform PPP L2 driver that carrier was lost. This happens when cable is disconnected etc.
| iface | Network interface |
| void net_ppp_carrier_on | ( | struct net_if * | iface | ) |
#include <include/zephyr/net/ppp.h>
Inform PPP L2 driver that carrier is detected. This happens when cable is connected etc.
| iface | Network interface |
|
inlinestatic |
#include <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 <include/zephyr/net/ppp.h>
Initialize PPP L2 stack for a given interface.
| iface | A valid pointer to a network interface |
|
inlinestatic |
#include <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 <include/zephyr/net/ppp.h>
Raise CARRIER_OFF event when PPP is disconnected.
| iface | PPP network interface. |
|
inlinestatic |
#include <include/zephyr/net/ppp.h>
Raise CARRIER_ON event when PPP is connected.
| iface | PPP network interface. |
|
inlinestatic |
#include <include/zephyr/net/ppp.h>
Raise PHASE_DEAD event when PPP reaching DEAD phase.
| iface | PPP network interface. |
|
inlinestatic |
#include <include/zephyr/net/ppp.h>
Raise PHASE_RUNNING event when PPP reaching RUNNING phase.
| iface | PPP network interface. |