The Pedigree Project  0.1
lwipopts.h
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 
20 
21 #ifndef LWIP_LWIPOPTS_H
22 #define LWIP_LWIPOPTS_H
23 
24 #include <pedigree/kernel/utilities/utility.h>
25 
26 #define MEMCPY(dst, src, len) MemoryCopy(dst, src, len)
27 #define SMEMCPY(dst, src, len) MemoryCopy(dst, src, len)
28 
29 #define MEM_LIBC_MALLOC 1
30 #define MEMP_MEM_MALLOC 1
31 
33 #define MEM_ALIGNMENT 8
34 
36 #define IPV6_FRAG_COPYHEADER 1
37 
38 #define LWIP_RAW 1
39 #define LWIP_IPV6 1
40 #define LWIP_NETCONN 1
41 
42 #define LWIP_COMPAT_SOCKETS 1
43 
44 #define LWIP_PROVIDE_ERRNO 1
45 
46 // We can safely do this rather than use an mbox as packets are pushed into
47 // a RequestQueue, not directly pushed from an IRQ context.
48 #define LWIP_TCPIP_CORE_LOCKING_INPUT 0
49 
50 #define LWIP_RANDOMIZE_INITIAL_LOCAL_PORTS 1
51 
52 #define LWIP_DHCP 1
53 #define LWIP_AUTOIP 1
54 #define LWIP_DHCP_AUTOIP_COOP 1
55 
56 #define LWIP_TCP_TIMESTAMPS 1
57 
58 #define LWIP_NETIF_LOOPBACK 1
59 
60 #define LWIP_IPV6_DHCP6 1
61 
62 #define LWIP_NETIF_STATUS_CALLBACK 1
63 #define LWIP_NETIF_LINK_CALLBACK 1
64 #define LWIP_NETIF_HWADDRHINT 1
65 
66 // General tuning
67 #define TCP_MSS 1400
68 #define TCP_WND 32768
69 #define TCP_SND_BUF 65536
70 
71 #define LWIP_WND_SCALE 1
72 #define TCP_RCV_SCALE 4
73 
74 #ifdef UTILITY_LINUX
75 #define SA_FAMILY_T_DEFINED 1
76 #endif
77 
78 #endif // LWIP_LWIPOPTS_H