|
miniOS
x86_64 hobby kernel with SMP, VFS, and POSIX process model
|

Go to the source code of this file.
Functions | |
| void | lwip_netif_init (void) |
| Initialize lwIP stack and register eth0 netif. | |
| void | lwip_netif_poll (void) |
| Poll the network interface and drive lwIP timers. | |
| void | net_poll_thread_fn (void *arg) |
| Kernel thread function that drives lwIP polling. | |
| void lwip_netif_init | ( | void | ) |
Initialize lwIP stack and register eth0 netif.
Calls lwip_init(), netif_add() with QEMU static IPv4 config from net_config_get_active(), wires the RX callback to ethernet_input(), and calls lwip_port_attach() to connect the Ethernet seam. Must be called after net_observe_init() and before any socket operations.


| void lwip_netif_poll | ( | void | ) |
Poll the network interface and drive lwIP timers.
Calls lwip_port_poll() then sys_check_timeouts(). Must be called regularly (every ~10ms) to keep TCP retransmit and ARP aging alive. Also calls lwip_port_poll_timeouts(10) to feed the timeout accumulator.


| void net_poll_thread_fn | ( | void * | arg | ) |
Kernel thread function that drives lwIP polling.
Runs in an infinite loop: calls lwip_netif_poll() then sched_yield(). Receive callbacks call sched_wake_tid() to unblock threads sleeping in poll/select. Start via sched_create_thread(net_poll_thread_fn, NULL) after lwip_netif_init().
net_poll_thread_fn() - Dedicated kernel thread that drives lwIP polling.
Runs continuously, calling lwip_netif_poll() so that network receive callbacks fire even when userspace threads are sleeping in poll/select. Receive callbacks call sched_wake_tid() to unblock waiting threads.

