The Pedigree Project  0.1
slipif.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2008-2014, Pedigree Developers
3  *
4  * Please see the CONTRIB file in the root of the source tree for a full
5  * list of contributors.
6  *
7  * Permission to use, copy, modify, and distribute this software for any
8  * purpose with or without fee is hereby granted, provided that the above
9  * copyright notice and this permission notice appear in all copies.
10  *
11  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
12  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
13  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
14  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
15  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
16  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
17  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
18  */
19 
26 /*
27  * Copyright (c) 2001, Swedish Institute of Computer Science.
28  * All rights reserved.
29  *
30  * Redistribution and use in source and binary forms, with or without
31  * modification, are permitted provided that the following conditions
32  * are met:
33  * 1. Redistributions of source code must retain the above copyright
34  * notice, this list of conditions and the following disclaimer.
35  * 2. Redistributions in binary form must reproduce the above copyright
36  * notice, this list of conditions and the following disclaimer in the
37  * documentation and/or other materials provided with the distribution.
38  * 3. Neither the name of the Institute nor the names of its contributors
39  * may be used to endorse or promote products derived from this software
40  * without specific prior written permission.
41  *
42  * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
43  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
44  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
45  * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
46  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
47  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
48  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
49  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
50  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
51  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
52  * SUCH DAMAGE.
53  *
54  * This file is part of the lwIP TCP/IP stack.
55  *
56  * Author: Adam Dunkels <adam@sics.se>
57  *
58  */
59 #ifndef LWIP_HDR_NETIF_SLIPIF_H
60 #define LWIP_HDR_NETIF_SLIPIF_H
61 
62 #include "lwip/opt.h"
63 #include "lwip/netif.h"
64 
68 #ifndef SLIP_USE_RX_THREAD
69 #define SLIP_USE_RX_THREAD !NO_SYS
70 #endif
71 
77 #ifndef SLIP_RX_FROM_ISR
78 #define SLIP_RX_FROM_ISR 0
79 #endif
80 
85 #ifndef SLIP_RX_QUEUE
86 #define SLIP_RX_QUEUE SLIP_RX_FROM_ISR
87 #endif
88 
89 #ifdef __cplusplus
90 extern "C" {
91 #endif
92 
93 err_t slipif_init(struct netif * netif);
94 void slipif_poll(struct netif *netif);
95 #if SLIP_RX_FROM_ISR
96 void slipif_process_rxqueue(struct netif *netif);
97 void slipif_received_byte(struct netif *netif, u8_t data);
98 void slipif_received_bytes(struct netif *netif, u8_t *data, u8_t len);
99 #endif /* SLIP_RX_FROM_ISR */
100 
101 #ifdef __cplusplus
102 }
103 #endif
104 
105 #endif /* LWIP_HDR_NETIF_SLIPIF_H */
106 
err_t slipif_init(struct netif *netif)
Definition: slipif.c:380
u16_t len
Definition: pbuf.h:178
Definition: netif.h:244
s8_t err_t
Definition: err.h:76
void slipif_poll(struct netif *netif)
Definition: slipif.c:446