PPP HDLC driver. More...
#include "core/nic.h"
Go to the source code of this file.
Variables | |
const NicDriver | pppHdlcDriver |
PPP HDLC driver. More... | |
Detailed Description
PPP HDLC driver.
License
SPDX-License-Identifier: GPL-2.0-or-later
Copyright (C) 2010-2024 Oryx Embedded SARL. All rights reserved.
This file is part of CycloneTCP Open.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- Version
- 2.4.4
Definition in file ppp_hdlc.h.
Function Documentation
◆ pppHdlcDriverDisableIrq()
void pppHdlcDriverDisableIrq | ( | NetInterface * | interface | ) |
Disable interrupts.
- Parameters
-
[in] interface Underlying network interface
Definition at line 137 of file ppp_hdlc.c.
◆ pppHdlcDriverEnableIrq()
void pppHdlcDriverEnableIrq | ( | NetInterface * | interface | ) |
Enable interrupts.
- Parameters
-
[in] interface Underlying network interface
Definition at line 125 of file ppp_hdlc.c.
◆ pppHdlcDriverEventHandler()
void pppHdlcDriverEventHandler | ( | NetInterface * | interface | ) |
PPP HDLC driver event handler.
- Parameters
-
[in] interface Underlying network interface
Definition at line 148 of file ppp_hdlc.c.
◆ pppHdlcDriverInit()
error_t pppHdlcDriverInit | ( | NetInterface * | interface | ) |
PPP HDLC driver initialization.
- Parameters
-
[in] interface Underlying network interface
- Returns
- Error code
Definition at line 76 of file ppp_hdlc.c.
◆ pppHdlcDriverPurgeRxBuffer()
error_t pppHdlcDriverPurgeRxBuffer | ( | PppContext * | context | ) |
Purge RX buffer.
- Parameters
-
[in] context Pointer to the PPP context
- Returns
- Error code
Definition at line 553 of file ppp_hdlc.c.
◆ pppHdlcDriverPurgeTxBuffer()
error_t pppHdlcDriverPurgeTxBuffer | ( | PppContext * | context | ) |
Purge TX buffer.
- Parameters
-
[in] context Pointer to the PPP context
- Returns
- Error code
Definition at line 529 of file ppp_hdlc.c.
◆ pppHdlcDriverReadRxQueue()
uint8_t pppHdlcDriverReadRxQueue | ( | PppContext * | context | ) |
Read RX queue.
- Parameters
-
[in] context Pointer to the PPP context
- Returns
- Character read from the queue
Definition at line 602 of file ppp_hdlc.c.
◆ pppHdlcDriverReadTxQueue()
bool_t pppHdlcDriverReadTxQueue | ( | NetInterface * | interface, |
int_t * | c | ||
) |
Read TX queue.
- Parameters
-
[in] interface Underlying network interface [out] c Character read from the queue
- Returns
- TRUE if a context switch is required
Definition at line 632 of file ppp_hdlc.c.
◆ pppHdlcDriverReceiveAtCommand()
error_t pppHdlcDriverReceiveAtCommand | ( | NetInterface * | interface, |
char_t * | data, | ||
size_t | size | ||
) |
Wait for an incoming AT command.
- Parameters
-
[in] interface Underlying network interface [out] data Buffer where to store the incoming AT command [in] size Size of the buffer, in bytes
- Returns
- Error code
Definition at line 432 of file ppp_hdlc.c.
◆ pppHdlcDriverReceivePacket()
error_t pppHdlcDriverReceivePacket | ( | NetInterface * | interface | ) |
Receive a packet.
- Parameters
-
[in] interface Underlying network interface
- Returns
- Error code
Definition at line 294 of file ppp_hdlc.c.
◆ pppHdlcDriverSendAtCommand()
error_t pppHdlcDriverSendAtCommand | ( | NetInterface * | interface, |
const char_t * | data | ||
) |
Send AT command.
- Parameters
-
[in] interface Underlying network interface [in] data NULL-terminated string that contains the AT command to be sent
- Returns
- Error code
Definition at line 395 of file ppp_hdlc.c.
◆ pppHdlcDriverSendPacket()
error_t pppHdlcDriverSendPacket | ( | NetInterface * | interface, |
const NetBuffer * | buffer, | ||
size_t | offset, | ||
NetTxAncillary * | ancillary | ||
) |
Send a packet.
- Parameters
-
[in] interface Underlying network interface [in] buffer Multi-part buffer containing the data to send [in] offset Offset to the first data byte [in] ancillary Additional options passed to the stack along with the packet
- Returns
- Error code
Definition at line 185 of file ppp_hdlc.c.
◆ pppHdlcDriverTick()
void pppHdlcDriverTick | ( | NetInterface * | interface | ) |
PPP HDLC driver timer handler.
This routine is periodically called by the TCP/IP stack to handle periodic operations such as polling the link state
- Parameters
-
[in] interface Underlying network interface
Definition at line 115 of file ppp_hdlc.c.
◆ pppHdlcDriverUpdateMacAddrFilter()
error_t pppHdlcDriverUpdateMacAddrFilter | ( | NetInterface * | interface | ) |
Configure MAC address filtering.
- Parameters
-
[in] interface Underlying network interface
- Returns
- Error code
Definition at line 381 of file ppp_hdlc.c.
◆ pppHdlcDriverWriteRxQueue()
bool_t pppHdlcDriverWriteRxQueue | ( | NetInterface * | interface, |
uint8_t | c | ||
) |
Write RX queue.
- Parameters
-
[in] interface Underlying network interface [in] c Character to be written
- Returns
- TRUE if a context switch is required
Definition at line 679 of file ppp_hdlc.c.
◆ pppHdlcDriverWriteTxQueue()
void pppHdlcDriverWriteTxQueue | ( | PppContext * | context, |
uint8_t | c | ||
) |
Write TX queue.
- Parameters
-
[in] context Pointer to the PPP context [in] c Character to be written
Definition at line 578 of file ppp_hdlc.c.
Variable Documentation
◆ pppHdlcDriver
|
extern |
PPP HDLC driver.
Definition at line 49 of file ppp_hdlc.c.