miniOS
x86_64 hobby kernel with SMP, VFS, and POSIX process model
Loading...
Searching...
No Matches
lwipopts.h
Go to the documentation of this file.
1
// MIT License
2
//
3
// Copyright (c) 2026 Christian Spoo
4
//
5
// Permission is hereby granted, free of charge, to any person obtaining a copy
6
// of this software and associated documentation files (the "Software"), to deal
7
// in the Software without restriction, including without limitation the rights
8
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
// copies of the Software, and to permit persons to whom the Software is
10
// furnished to do so, subject to the following conditions:
11
//
12
// The above copyright notice and this permission notice shall be included in all
13
// copies or substantial portions of the Software.
14
//
15
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
// SOFTWARE.
22
31
#ifndef LWIPOPTS_H
32
#define LWIPOPTS_H
33
34
/* NO_SYS: poll-driven, no RTOS threading */
35
#define NO_SYS 1
36
37
/* Prevent lwIP arch.h from typedef-ing ssize_t (int) — we get it from sys/types.h (long) */
38
#define LWIP_NO_UNISTD_H 1
39
40
/* Use lwIP's own range-based char checks — avoids newlib _ctype_ table in freestanding kernel */
41
#define LWIP_NO_CTYPE_H 1
42
43
/* Protocol modules (per D-03) */
44
#define LWIP_ARP 1
45
#define LWIP_IPV4 1
46
#define LWIP_ICMP 1
47
#define LWIP_UDP 1
48
#define LWIP_TCP 1
49
#define LWIP_SOCKET 0
50
#define LWIP_NETCONN 0
51
#define LWIP_RAW 1
52
53
/* Ethernet */
54
#define LWIP_ETHERNET 1
55
#define LWIP_BROADCAST_PING 1
56
57
/* Memory — sized for 16 MB kernel RAM budget */
58
#define MEM_ALIGNMENT 4
59
#define MEM_SIZE (32 * 1024)
60
#define MEMP_NUM_PBUF 16
61
#define MEMP_NUM_TCP_PCB 4
62
#define MEMP_NUM_UDP_PCB 4
63
#define MEMP_NUM_RAW_PCB 4
64
#define PBUF_POOL_SIZE 16
65
#define PBUF_POOL_BUFSIZE 1536
66
67
/* Software checksums — RTL8139 does not offload */
68
#define CHECKSUM_GEN_IP 1
69
#define CHECKSUM_GEN_UDP 1
70
#define CHECKSUM_GEN_TCP 1
71
#define CHECKSUM_CHECK_IP 1
72
#define CHECKSUM_CHECK_UDP 1
73
#define CHECKSUM_CHECK_TCP 1
74
75
/* errno provided by our port */
76
#define LWIP_PROVIDE_ERRNO 1
77
78
unsigned
int
miniOS_lwip_rand
(
void
);
79
#define LWIP_RAND() miniOS_lwip_rand()
80
81
/* Disable features not needed yet */
82
#define LWIP_DNS 1
83
#define LWIP_IGMP 0
84
#define LWIP_DHCP 0
85
#define LWIP_AUTOIP 0
86
87
#endif
/* LWIPOPTS_H */
miniOS_lwip_rand
unsigned int miniOS_lwip_rand(void)
Definition
lwip_port.c:148
include
miniOS
net
lwipopts.h
Generated by
1.16.1