简体   繁体   中英

TCP FIN in separate packet

I'm testing SSH connection under Linux.

With using tcpdump I noticed that TCP FIN flag is set in common SSH packet data. For testing purposes I'd like to achieve the situation where packet with TCP FIN flag is sent as a separate packet, so it would be a packet with no data, but with FIN flag set.

I've been looking for such a possibility in "man 7 socket" but didn't find. My question is - how to achieve such a functionality in Linux? Any ideas?

Tuning a TCP connection this way can not be done and it would not make really sense to control it. If you need to produce traffic with this behavior you cannot use normal TCP sockets but need to use raw sockets where you can set the header like you want. You would of course need to re-implement all the parts of the TCP connection you need in your application just to achieve this feature.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM