The Pedigree Project  0.1
netif/ethernet.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-2003 Swedish Institute of Computer Science.
28  * Copyright (c) 2003-2004 Leon Woestenberg <leon.woestenberg@axon.tv>
29  * Copyright (c) 2003-2004 Axon Digital Design B.V., The Netherlands.
30  * All rights reserved.
31  *
32  * Redistribution and use in source and binary forms, with or without modification,
33  * are permitted provided that the following conditions are met:
34  *
35  * 1. Redistributions of source code must retain the above copyright notice,
36  * this list of conditions and the following disclaimer.
37  * 2. Redistributions in binary form must reproduce the above copyright notice,
38  * this list of conditions and the following disclaimer in the documentation
39  * and/or other materials provided with the distribution.
40  * 3. The name of the author may not be used to endorse or promote products
41  * derived from this software without specific prior written permission.
42  *
43  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
44  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
45  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
46  * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
47  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
48  * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
49  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
50  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
51  * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
52  * OF 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 
60 #ifndef LWIP_HDR_NETIF_ETHERNET_H
61 #define LWIP_HDR_NETIF_ETHERNET_H
62 
63 #include "lwip/opt.h"
64 
65 #include "lwip/pbuf.h"
66 #include "lwip/netif.h"
67 #include "lwip/prot/ethernet.h"
68 
69 #ifdef __cplusplus
70 extern "C" {
71 #endif
72 
73 #if LWIP_ARP || LWIP_ETHERNET
74 
81 #ifndef LWIP_ARP_FILTER_NETIF
82 #define LWIP_ARP_FILTER_NETIF 0
83 #endif
84 
85 err_t ethernet_input(struct pbuf *p, struct netif *netif);
86 err_t ethernet_output(struct netif* netif, struct pbuf* p, const struct eth_addr* src, const struct eth_addr* dst, u16_t eth_type);
87 
88 extern const struct eth_addr ethbroadcast, ethzero;
89 
90 #endif /* LWIP_ARP || LWIP_ETHERNET */
91 
92 #ifdef __cplusplus
93 }
94 #endif
95 
96 #endif /* LWIP_HDR_NETIF_ETHERNET_H */
Definition: pbuf.h:161
Definition: netif.h:244
s8_t err_t
Definition: err.h:76