ppp_hdlc.h
Go to the documentation of this file.
1 /**
2  * @file ppp_hdlc.h
3  * @brief PPP HDLC driver
4  *
5  * @section License
6  *
7  * Copyright (C) 2010-2018 Oryx Embedded SARL. All rights reserved.
8  *
9  * This file is part of CycloneTCP Open.
10  *
11  * This program is free software; you can redistribute it and/or
12  * modify it under the terms of the GNU General Public License
13  * as published by the Free Software Foundation; either version 2
14  * of the License, or (at your option) any later version.
15  *
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19  * GNU General Public License for more details.
20  *
21  * You should have received a copy of the GNU General Public License
22  * along with this program; if not, write to the Free Software Foundation,
23  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
24  *
25  * @author Oryx Embedded SARL (www.oryx-embedded.com)
26  * @version 1.9.0
27  **/
28 
29 #ifndef _PPP_HDLC_H
30 #define _PPP_HDLC_H
31 
32 //Dependencies
33 #include "core/nic.h"
34 
35 //C++ guard
36 #ifdef __cplusplus
37  extern "C" {
38 #endif
39 
40 //PPP HDLC driver
41 extern const NicDriver pppHdlcDriver;
42 
43 //PPP HDLC driver related functions
45 
46 void pppHdlcDriverTick(NetInterface *interface);
47 
48 void pppHdlcDriverEnableIrq(NetInterface *interface);
49 void pppHdlcDriverDisableIrq(NetInterface *interface);
51 
53  const NetBuffer *buffer, size_t offset);
54 
56 
58 
61 
64 
65 void pppHdlcDriverWriteTxQueue(PppContext *context, uint8_t c);
66 uint8_t pppHdlcDriverReadRxQueue(PppContext *context);
67 
69 bool_t pppHdlcDriverWriteRxQueue(NetInterface *interface, uint8_t c);
70 
71 //C++ guard
72 #ifdef __cplusplus
73  }
74 #endif
75 
76 #endif
char char_t
Definition: compiler_port.h:41
uint8_t c
Definition: ndp.h:510
error_t pppHdlcDriverReceiveAtCommand(NetInterface *interface, char_t *data, size_t size)
Wait for an incoming AT command.
Definition: ppp_hdlc.c:421
void pppHdlcDriverEventHandler(NetInterface *interface)
PPP HDLC driver event handler.
Definition: ppp_hdlc.c:146
void pppHdlcDriverTick(NetInterface *interface)
PPP HDLC driver timer handler.
Definition: ppp_hdlc.c:113
error_t pppHdlcDriverSendAtCommand(NetInterface *interface, const char_t *data)
Send AT command.
Definition: ppp_hdlc.c:386
void pppHdlcDriverWriteTxQueue(PppContext *context, uint8_t c)
Write TX queue.
Definition: ppp_hdlc.c:553
error_t pppHdlcDriverReceivePacket(NetInterface *interface)
Receive a packet.
Definition: ppp_hdlc.c:290
void pppHdlcDriverEnableIrq(NetInterface *interface)
Enable interrupts.
Definition: ppp_hdlc.c:123
error_t pppHdlcDriverInit(NetInterface *interface)
PPP HDLC driver initialization.
Definition: ppp_hdlc.c:74
signed int int_t
Definition: compiler_port.h:42
void pppHdlcDriverDisableIrq(NetInterface *interface)
Disable interrupts.
Definition: ppp_hdlc.c:135
NIC driver.
Definition: nic.h:161
Structure describing a buffer that spans multiple chunks.
Definition: net_mem.h:86
#define PppContext
Definition: ppp.h:36
bool_t pppHdlcDriverWriteRxQueue(NetInterface *interface, uint8_t c)
Write RX queue.
Definition: ppp_hdlc.c:654
bool_t pppHdlcDriverReadTxQueue(NetInterface *interface, int_t *c)
Read TX queue.
Definition: ppp_hdlc.c:607
error_t pppHdlcDriverPurgeTxBuffer(PppContext *context)
Purge TX buffer.
Definition: ppp_hdlc.c:504
error_t
Error codes.
Definition: error.h:40
const NicDriver pppHdlcDriver
PPP HDLC driver.
Definition: ppp_hdlc.c:47
uint8_t data[]
Definition: dtls_misc.h:167
#define NetInterface
Definition: net.h:34
error_t pppHdlcDriverSendPacket(NetInterface *interface, const NetBuffer *buffer, size_t offset)
Send a packet.
Definition: ppp_hdlc.c:181
error_t pppHdlcDriverPurgeRxBuffer(PppContext *context)
Purge RX buffer.
Definition: ppp_hdlc.c:528
int bool_t
Definition: compiler_port.h:47
Network interface controller abstraction layer.
uint8_t pppHdlcDriverReadRxQueue(PppContext *context)
Read RX queue.
Definition: ppp_hdlc.c:577
error_t pppHdlcDriverUpdateMacAddrFilter(NetInterface *interface)
Configure MAC address filtering.
Definition: ppp_hdlc.c:372