Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add tcp.close option for session teardown #9

Open
whartond opened this issue Nov 21, 2017 · 1 comment
Open

Add tcp.close option for session teardown #9

whartond opened this issue Nov 21, 2017 · 1 comment

Comments

@whartond
Copy link
Collaborator

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.

@rkoumis
Copy link

rkoumis commented Jul 31, 2024

See PR #28

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants