-
Notifications
You must be signed in to change notification settings - Fork 31
Description
Flowsynth has the tcp.initialize option for flow declarations to automatically build the three way handshake for a TCP connection.
This is a request to support a similar tcp.close option that would add the (four way) TCP close sequence to model graceful connection closing. Since session teardown can be initiated by the server or client, you will want to be able to specify the initiator. One way would be to add the following options:
tcp.close.client;
tcp.close.server;
and have them supported in a Flow Declaration. For example:
flow default tcp 192.168.60.63:50194 > 172.16.131.97:36482 (tcp.initialize;);
default > (content:"aaaaaaa";);
default < (content:"bbbbbbbbb";);
flow default (tcp.close.client;);
Or you could do it in an Event Declaration where the direction of the event determines the initiator of the connection close. For example:
flow default tcp 192.168.60.63:50194 > 172.16.131.97:36482 (tcp.initialize;);
default > (content:"aaaaaaa";);
default < (content:"bbbbbbbbb";);
default > (tcp.close;);
It could be argued that the connection close is more of a flow action than an event action and so using the Flow Declaration is more appropriate.
As part of this work, it may make sense to add support for tcp.flags.fin but that could be a separate feature.