>> Taking your analogy, ifconfig would have had all that formatting code >> in one file separated by #ifdefs. >> >> Maybe it should; and it does. ifconfig/system.c does a #include on >> each, and each block is seperated by an #ifdef. > > So does my route/backend.c. But the lengths of these files is <30 > lines. Not some 3000+ line monolith as you are suggesting.
Ah, and don't forget that the code that you plan to copy-paste into one file supports only IPv4, bare minimum sanity checks and a single kernel. Add multi-protocol support, robust sanity checks and multiple kernels and you will get something much worse. If you don't believe me please have a look at existing route implementations. I suggest the Net Tools implementation used on GNU/Linux systems, NetBSD implementation and FreeBSD implementation. The NetBSD and FreeBSD implementations do differ. Happy hacking, Debarshi _______________________________________________ bug-inetutils mailing list [email protected] http://lists.gnu.org/mailman/listinfo/bug-inetutils
