[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug-inetutils] route

From: Debarshi Ray
Subject: Re: [bug-inetutils] route
Date: Fri, 5 Sep 2008 22:02:53 +0530

>>   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,

reply via email to

[Prev in Thread] Current Thread [Next in Thread]