la 11.10.2025 klo 0.10 [email protected] kirjoitti: > > Hi Hurd, > > I've been working on a port of dhcpcd to the Hurd. I had to make > some changes in libpcap and the lwip translator to make it work. > > Here are the changes for libpcap. Basically this implements the > `selectable_fd` pcap feature for the Hurd. This is needed because > dhcpcd needs a fd to insert in an event loop. The event loop keeps > waiting on poll(), so we need to provide it with a descriptor able > to be sent to poll(). When the fd is signaled, dhcpcd calls the read > function to get the data from a BPF filter. > > In this patch, my approach is to make the data pass through a pipe, > which read end is going to be the selectable_fd for dhcpcd. When capture > starts, a new thread reads packets from gnumach bpf and pushes them to > the pipe. When the pipe has data, dhcpcd is signaled and it will call > the read function, which I modified to read from the pipe and return data > to dhcpcd. This is working fine in my local tests, but I'd appreciate a > review. > > Thanks.
Hey Joan, Thank you for putting in the time to port these missing features into Hurd. If/when they have been merged, and the result has been pushed into Unstable, I'm looking forward to receiving your diffs to make dhcpcd compile on Hurd. Once we have verified these to work on Debian without breaking anything on Linux ports, we'll be in a good position to push the changes to upstream. Cheers! Martin-Éric
