Zephyr API Documentation 4.0.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches

Modem PPP . More...

Macros

#define MODEM_PPP_DEFINE(_name, _init_iface, _prio, _mtu, _buf_size)
 Define a modem PPP module and bind it to a network interface.
 

Typedefs

typedef void(* modem_ppp_init_iface) (struct net_if *iface)
 L2 network interface init callback.
 

Functions

int modem_ppp_attach (struct modem_ppp *ppp, struct modem_pipe *pipe)
 Attach pipe to instance and connect.
 
struct net_ifmodem_ppp_get_iface (struct modem_ppp *ppp)
 Get network interface modem PPP instance is bound to.
 
void modem_ppp_release (struct modem_ppp *ppp)
 Release pipe from instance.
 

Detailed Description

Modem PPP .

Macro Definition Documentation

◆ MODEM_PPP_DEFINE

#define MODEM_PPP_DEFINE ( _name,
_init_iface,
_prio,
_mtu,
_buf_size )

#include <zephyr/modem/ppp.h>

Value:
extern const struct ppp_api modem_ppp_ppp_api; \
\
static uint8_t _CONCAT(_name, _receive_buf)[_buf_size]; \
static uint8_t _CONCAT(_name, _transmit_buf)[_buf_size]; \
\
static struct modem_ppp _name = { \
.init_iface = _init_iface, \
.receive_buf = _CONCAT(_name, _receive_buf), \
.transmit_buf = _CONCAT(_name, _transmit_buf), \
.buf_size = _buf_size, \
}; \
\
NET_DEVICE_INIT(_CONCAT(ppp_net_dev_, _name), "modem_ppp_" # _name, \
modem_ppp_init_internal, NULL, &_name, NULL, _prio, &modem_ppp_ppp_api, \
PPP_L2, NET_L2_GET_CTX_TYPE(PPP_L2), _mtu)
__UINT8_TYPE__ uint8_t
Definition stdint.h:88
PPP L2 API.
Definition ppp.h:46

Define a modem PPP module and bind it to a network interface.

This macro defines the modem_ppp instance, initializes a PPP L2 network device instance, and binds the modem_ppp instance to the PPP L2 instance.

Parameters
_nameName of the statically defined modem_ppp instance
_init_ifaceHook for the PPP L2 network interface init function
_prioInitialization priority of the PPP L2 net iface
_mtuMax size of net_pkt data sent and received on PPP L2 net iface
_buf_sizeSize of partial PPP frame transmit and receive buffers

Typedef Documentation

◆ modem_ppp_init_iface

typedef void(* modem_ppp_init_iface) (struct net_if *iface)

#include <zephyr/modem/ppp.h>

L2 network interface init callback.

Function Documentation

◆ modem_ppp_attach()

int modem_ppp_attach ( struct modem_ppp * ppp,
struct modem_pipe * pipe )

#include <zephyr/modem/ppp.h>

Attach pipe to instance and connect.

Parameters
pppModem PPP instance
pipePipe to attach to modem PPP instance

◆ modem_ppp_get_iface()

struct net_if * modem_ppp_get_iface ( struct modem_ppp * ppp)

#include <zephyr/modem/ppp.h>

Get network interface modem PPP instance is bound to.

Parameters
pppModem PPP instance
Returns
Pointer to network interface modem PPP instance is bound to

◆ modem_ppp_release()

void modem_ppp_release ( struct modem_ppp * ppp)

#include <zephyr/modem/ppp.h>

Release pipe from instance.

Parameters
pppModem PPP instance