Project

General

Profile

Bug #5712

tcp_fsm.h is (mostly) unused, and utterly misleading

Added by Rich Lowe about 5 years ago. Updated about 5 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
networking
Start date:
2015-03-13
Due date:
% Done:

0%

Estimated time:
Difficulty:
Hard
Tags:
needs-triage
Gerrit CR:

Description

As pointed out in #5711 tcp_fsm.h contains a duplicate set of the TCPS_* state machine states, but with different values.

A search of the source base suggests that this header is unused, except to the extent that we both install and package it (and that ipf may use it on... some? platforms?).

Someone who knows the network stack should confirm this, and delete tcp_fsm.h if it's accurate.

History

#1

Updated by Dan McDonald about 5 years ago

  • Difficulty changed from Medium to Hard

It's more complicated, unfortunately.

tcp_fsm.h is in the netinet/ directory. These values for TCP's state machine are the BSD internal versions. Packages like ipfilter, and other 3rd-party networking tools, use the netinet/ headers for many things, including the TCP state machine definitions.

A quick analysis of IPfilter suggest we might be able to remove the file without breaking illumos-gate builds, because IPfilter itself DUPLICATES the TCP FSM states as IPF_TCPS_* in usr/src/uts/common/inet/ipf/netinet/ip_compat.h. I'm very concerned about 3rd-party userland apps which may depend on the presence of this file.

To further complicate things, the illumos TCP FSM adds two addtional states: IDLE and BOUND, between CLOSED and LISTEN. These help us, esp. back in the days of TLI/XTI, but even with sockets they are useful.

#2

Updated by Rich Lowe about 5 years ago

How are the values useful when they are, compared to our internal definitions, wrong?
Where do we expose anything using those values (given we don't use the header)?

Also available in: Atom PDF