Task #8631
openlib: stream-tcp-private.h is not actually private
Description
stream-tcp-private.h is intended to be private, but is included by many non-private headers. The better workflow for private headers is that only ".c" files include them, and the private headers include the public headers needed, or the ".c" source file includes all the headers required. This prevents private headers from being needed in public headers.
JI Updated by Jason Ish about 3 hours ago
- Status changed from New to Triaged
JI Updated by Jason Ish about 2 hours ago
Something to question is why is stream-tcp-private named that? Should it just be merged into strema-tcp.h with some name space prefixing to avoid conflicts with system headers? For example, here are a list of files that have come to depend on types defined in stream-tcp-private.h:
Headers
- src/app-layer.h
- src/flow-timeout.h
- src/flow-util.h
- src/output-eve-stream.h
- src/output-json-frame.h
- src/stream.h
- src/stream-tcp.h
- src/stream-tcp-cache.h
- src/stream-tcp-inline.h
- src/stream-tcp-reassemble.h
- src/stream-tcp-sack.h
- src/stream-tcp-util.h
C files
- src/alert-debuglog.c
- src/app-layer.c
- src/app-layer-detect-proto.c
- src/app-layer-dnp3.c
- src/app-layer-frames.c
- src/app-layer-ftp.c
- src/app-layer-htp.c
- src/app-layer-htp-file.c
- src/app-layer-ike.c
- src/app-layer-modbus.c
- src/app-layer-parser.c
- src/app-layer-smb.c
- src/app-layer-smtp.c
- src/app-layer-ssh.c
- src/detect.c
- src/detect-engine-frame.c
- src/detect-engine-payload.c
- src/detect-engine-state.c
- src/detect-engine-tag.c
- src/detect-filestore.c
- src/detect-lua.c
- src/detect-pcre.c
- src/detect-stream_size.c
- src/detect-urilen.c
- src/flow.c
- src/flow-timeout.c
- src/flow-util.c
- src/flow-worker.c
- src/log-pcap.c
- src/output-eve-stream.c
- src/output-json-alert.c
- src/output-json-flow.c
- src/output-json-frame.c
- src/output-json-netflow.c
- src/output-streaming.c
- src/stream-tcp.c
- src/stream-tcp-cache.c
- src/stream-tcp-inline.c
- src/stream-tcp-list.c
- src/stream-tcp-reassemble.c
- src/stream-tcp-sack.c
- src/stream-tcp-util.c
- src/util-unittest-helper.c