I see two solutions:
(A) Split up client.c, also GDHCPClient and what ever. The goal would be to
seperate DHCP, ACD, ipv4ll, ARP. Where ipv4ll is a special case of ACD.
DHCP and ACD use ipv4ll as fallback. ARP is a small utility lib which is
used by ACD.
This might look not so bad but the drawback is a big change, lots of testing.
So high risk.
(B) Or I use the current ipv4ll as reference to implement ACD (in include/src),
make a new ipv4ll based on the new ACD which is independent from dhcp.
My plan is to start with (B) and if it works and the code looks good, then maybe
solution (A) becomes closer and easier. So after (B) works we could discuss how
to refactor until we have (A) or something closer to (A).
Sounds like a good plan to me. I still want to reach (A) but we start
with (B) and then gradually change the code base to (A).