cvs commit: src/sys/netinet tcp_input.c tcp_usrreq.c

Bjoern A. Zeeb bz at FreeBSD.org
Sun Jul 29 22:00:07 UTC 2007


On Sun, 29 Jul 2007, mjacob at freebsd.org wrote:

Hi,

> On Sun, 29 Jul 2007, Bjoern A. Zeeb wrote:
>
>> On Sun, 29 Jul 2007, mjacob at freebsd.org wrote:
>> 
>>> Here's what probably works. I'll do the test compiles.
>> 
>> If I am not wrong it will not.
>> 
>> The follwoing two files have comments at the beginning to explain the 
>> changes.
>> I don't like the extern char *tcpstates[] but it seems to be the best
>> solution for now.
>
> No, that's what's actually wrong. tcpstates has to be static to honor the 
> intent of the original author. If you want to do something extern then the 
> actual tcpstates should go into tcp_debug.c. However, this is slightly less 
> flexible in that the way it is now each source file can include this array 
> simply by defining TCPSTATES (independent of TCPDEBUG as an option).

It should go int tcp_input.c if any because that's the only file that
always needs it now. If you do not have TCP there will be no
tcp_input and TCPDEBUG will make no sense but there can be a tcp_input
without TCPDEBUG/tcp_debug.

It has been used with the extern in netipx since 1995.

It is exposed to user space so moving it out of the header will break
things.

If you have any other better short term solution to not break anything
I am happy but I could not see one.

As said, I am not happy with the extern either.

-- 
Bjoern A. Zeeb                                 bzeeb at Zabbadoz dot NeT
Software is harder than hardware  so better get it right the first time.


More information about the cvs-src mailing list